Class DataCoverageDefinition
- Inheritance
-
DataCoverageDefinition
- Implements
-
- Inherited Members
-
- Namespace
- TabularEditor.TOMWrapper
- Assembly
- TOMWrapper.dll
A tabular DataCoverageDefinition object. The expression defined on this object gives hint about the data in a partition.
public sealed class DataCoverageDefinition : TabularObject, ICustomTypeDescriptor, INotifyPropertyChanging, ITomErrorMessageObject, IDescriptionObject, IAnnotationObject, IExpressionObject, ITabularTableObject, ITabularNamedObject, ITabularObject, INotifyPropertyChanged, INamedObject
- Extension Methods
-
Properties
Annotations
The collection of Annotations on the current Data Coverage Definition.
[Browsable(true)]
public AnnotationCollection Annotations { get; }
Property Value
DefaultExpressionProperty
Gets the default expression property on the current object.
[Browsable(false)]
public ExpressionProperty? DefaultExpressionProperty { get; }
Property Value
Description
The description of the DataCoverageDefinition, visible to developers at design time and to administrators in management tools, such as SQL Server Management Studio.
public string Description { get; set; }
Property Value
ErrorMessage
The string that explains the error state associated with the DataCoverageDefinition. It is set by the engine only when the state of the Expression is one of these four values: EvaluationError, SemanticError, DependencyError or SyntaxError.
public string ErrorMessage { get; }
Property Value
Expression
The DAX expression that is evaluated for the DataCoverageDefinition.
public string Expression { get; set; }
Property Value
[Browsable(false)]
public int MetadataIndex { get; }
Property Value
Name
[Browsable(false)]
public string Name { get; set; }
Property Value
Partition
A reference to the Partition object that owns the DataCoverageDefinition.
public Partition Partition { get; }
Property Value
State
Provides information on the state of the Expression. Possible values and their interpretation are as follows. Ready (1) The Expression is queryable and has up-to-date data. CalculationNeeded (4): The Expression is not queryable and needs to be refreshed to become functional. SemanticError (5) The Expression has a semantic error. DependencyError (7) A dependency associated with the Expression is in an error state (SemanticError, EvaluationError, or DependencyError). SyntaxError (9) The Expression has a syntax error.
public ObjectState State { get; }
Property Value
Table
[Browsable(false)]
public Table Table { get; }
Property Value
Methods
CanDelete()
Returns
CanDelete(out string)
public bool CanDelete(out string message)
Parameters
Type |
Name |
Description |
string |
message |
|
Returns
ClearAnnotations()
Removes all annotations from this object.
public void ClearAnnotations()
public static DataCoverageDefinition CreateFromMetadata(Partition parent, DataCoverageDefinition metadataObject)
Parameters
Type |
Name |
Description |
Partition |
parent |
|
DataCoverageDefinition |
metadataObject |
|
Returns
CreateNew(Partition)
public static DataCoverageDefinition CreateNew(Partition parent)
Parameters
Returns
Delete()
GetAnnotation(int)
Gets the value of the annotation with the given index, assuming it exists.
public string GetAnnotation(int index)
Parameters
Type |
Name |
Description |
int |
index |
|
Returns
GetAnnotation(string)
Gets the value of the annotation with the given name. Returns null if no such annotation exists.
public string GetAnnotation(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
GetAnnotations()
Gets a collection of all annotation names on the current Data Coverage Definition.
public IEnumerable<string> GetAnnotations()
Returns
GetAnnotationsCount()
Gets the number of annotations on the current Data Coverage Definition.
public int GetAnnotationsCount()
Returns
GetExpression(ExpressionProperty)
Gets the specified expression from the current object.
public string GetExpression(ExpressionProperty expressionProperty)
Parameters
Returns
Exceptions
- InvalidEnumArgumentException
Thrown when the current object does not support the specified ExpressionProperty
GetExpressionProperties()
Gets all supported expression properties on the current object.
public IEnumerable<ExpressionProperty> GetExpressionProperties()
Returns
GetNewAnnotationName()
Returns a unique name for a new annotation.
public string GetNewAnnotationName()
Returns
HasAnnotation(string)
Returns true if an annotation with the given name exists. Otherwise false.
public bool HasAnnotation(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
OnPropertyChanged(string, object, object)
Fired after a property is changed
protected override void OnPropertyChanged(string propertyName, object oldValue, object newValue)
Parameters
RemoveAnnotation(string)
Remove an annotation by the given name.
public void RemoveAnnotation(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
SetAnnotation(int, string)
Sets the value of the annotation with the given index, assuming it exists.
public void SetAnnotation(int index, string value)
Parameters
SetAnnotation(string, string)
Sets the value of the annotation having the given name. If no such annotation exists, it will be created. If value is set to null, the annotation will be removed.
public void SetAnnotation(string name, string value)
Parameters
SetExpression(ExpressionProperty, string)
Sets the specified expression on the current object.
public void SetExpression(ExpressionProperty expressionProperty, string expression)
Parameters
Exceptions
- InvalidEnumArgumentException
Thrown when the current object does not support the specified ExpressionProperty