Skip to content

Expression should be string type for workspace info scan #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
Expression should be string type for workspace info scan
  • Loading branch information
richardoliverpearce authored Sep 17, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit b1bee0379cbb3aa64e601c31f8558f91e2d6fb34
23 changes: 3 additions & 20 deletions sdk/PowerBI.Api/Source/Models/Expression.cs
Original file line number Diff line number Diff line change
@@ -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;
@@ -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
@@ -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();
}
}
}
}