Class ProviderDataSource
Represents a data source that uses a connection string for the connection.
Inheritance
Implements
Inherited Members
Namespace: TabularEditor.TOMWrapper
Assembly: TOMWrapper.dll
Syntax
public sealed class ProviderDataSource : DataSource, ICustomTypeDescriptor, INotifyPropertyChanging, ITabularNamedObject, INamedObject, IComparable, IDescriptionObject, IAnnotationObject, IExtendedPropertyObject, ITabularObject, INotifyPropertyChanged, IClonableObject
Properties
Account
The user account used for impersonation.
Declaration
public string Account { get; set; }
Property Value
Type | Description |
---|---|
string |
ConnectionString
A string used to open the connection to the data source.
Declaration
[TypeConverter(typeof(ConnectionStringConverter))]
public string ConnectionString { get; set; }
Property Value
Type | Description |
---|---|
string |
ImpersonationMode
Determines how credentials are obtained for an impersonated connection to a data source during data import or refresh.
Declaration
public ImpersonationMode ImpersonationMode { get; set; }
Property Value
Type | Description |
---|---|
ImpersonationMode |
IsPowerBIMashup
Declaration
[Browsable(false)]
public bool IsPowerBIMashup { get; }
Property Value
Type | Description |
---|---|
bool |
Isolation
Specifies the locking behavior of the SQL statements when executing commands against the data source. Valid values include ReadCommitted (default) which only reads from committed transactions, or Snapshot which can read any statement in a transaction that is transactionally consistent.
Declaration
public DatasourceIsolation Isolation { get; set; }
Property Value
Type | Description |
---|---|
DatasourceIsolation |
Location
Declaration
[Browsable(false)]
public string Location { get; }
Property Value
Type | Description |
---|---|
string |
MQuery
Declaration
public string MQuery { get; }
Property Value
Type | Description |
---|---|
string |
Name
The name of this object. Warning: Changing the name can break formula logic, if Automatic Formula Fix-up is disabled.
Declaration
public override string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Overrides
Parent
The parent Model of the current Provider Data Source.
Declaration
public Model Parent { get; }
Property Value
Type | Description |
---|---|
Model |
Password
The account password.
Declaration
public string Password { get; set; }
Property Value
Type | Description |
---|---|
string |
Provider
An optional string that identifies the name of the managed data provider for the data source.
Declaration
public string Provider { get; set; }
Property Value
Type | Description |
---|---|
string |
SourceID
Declaration
public string SourceID { get; }
Property Value
Type | Description |
---|---|
string |
Timeout
The timeout in seconds for commands executed against the data source.
Declaration
public int Timeout { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
Clone(string)
Creates an exact copy of this ProviderDataSource object.
Declaration
public ProviderDataSource Clone(string newName = null)
Parameters
Type | Name | Description |
---|---|---|
string | newName |
Returns
Type | Description |
---|---|
ProviderDataSource |
CreateNew(Model, string)
Creates a new ProviderDataSource and adds it to the parent Model. Also creates the underlying metadataobject and adds it to the TOM tree.
Declaration
public static ProviderDataSource CreateNew(Model parent, string name = null)
Parameters
Type | Name | Description |
---|---|---|
Model | parent | |
string | name |
Returns
Type | Description |
---|---|
ProviderDataSource |
Init()
Derived members should override this method to instantiate child objects
Declaration
protected override void Init()
Overrides
OnPropertyChanging(string, object, ref bool, ref bool)
Called before a property is changed on an object. Derived classes can control how the change is handled. Throw ArgumentException within this method, to display an error message in the UI.
Declaration
protected override void OnPropertyChanging(string propertyName, object newValue, ref bool undoable, ref bool cancel)
Parameters
Type | Name | Description |
---|---|---|
string | propertyName | Name of the changed property. |
object | newValue | New value assigned to the property. |
bool | undoable | Return false if automatic undo of the property change is not needed. |
bool | cancel | Return true if the property change should not apply. |
Overrides
SetPlaceholder(string, string)
Replaces any occurence of the specified "keyword" with the specified "replaceWith", in the ConnectionString property of this data source.
Declaration
public void SetPlaceholder(string keyword, string replaceWith)
Parameters
Type | Name | Description |
---|---|---|
string | keyword | |
string | replaceWith |