Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 3 additions & 20 deletions sdk/PowerBI.Api/Source/Models/Expression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public Expression()
/// </summary>
/// <param name="name">The expression name</param>
/// <param name="description">The expression description</param>
public Expression(ASMashupExpression expressionProperty, string name = default(string), string description = default(string))
/// <param name="expressionProperty">The expression</param>
public Expression(string expressionProperty = default(string), string name = default(string), string description = default(string))
{
ExpressionProperty = expressionProperty;
Name = name;
Expand All @@ -44,7 +45,7 @@ public Expression()
/// <summary>
/// </summary>
[JsonProperty(PropertyName = "expression")]
public ASMashupExpression ExpressionProperty { get; set; }
public string ExpressionProperty { get; set; }

/// <summary>
/// Gets or sets the expression name
Expand All @@ -57,23 +58,5 @@ public Expression()
/// </summary>
[JsonProperty(PropertyName = "description")]
public string Description { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (ExpressionProperty == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "ExpressionProperty");
}
if (ExpressionProperty != null)
{
ExpressionProperty.Validate();
}
}
}
}