-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathScriptObject.cs
37 lines (31 loc) · 1.02 KB
/
ScriptObject.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
namespace DataScriptWriter
{
public class ScriptObject
{
private string _schema;
private string _table;
private string _method;
public ScriptObject(DataRowView row)
{
_schema = Plain(row["schema"].ToString());
_table = Plain(row["table"].ToString());
_method = row["method"].ToString();
}
private string Plain(string name)
{
return name.Replace("[", "").Replace("]", "");
}
public string Schema { get => _schema; }
public string Table { get => _table; }
public string Method { get => _method; }
public string FullName { get => _schema + "." + _table; }
public string FullQuoted { get => "[" + _schema + "].[" + _table + "]"; }
public string TempCounterpart { get => "#" + FullName.Replace(".", "_").Replace(" ", "_"); }
}
}