本文整理汇总了C#中Entity.GetAttributeValue方法的典型用法代码示例。如果您正苦于以下问题:C# Entity.GetAttributeValue方法的具体用法?C# Entity.GetAttributeValue怎么用?C# Entity.GetAttributeValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Entity
的用法示例。
在下文中一共展示了Entity.GetAttributeValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SynchronousWorkflow
public SynchronousWorkflow(Entity workflow)
{
this.workflow = workflow;
initialRank = Rank;
// Stage
if (workflow.GetAttributeValue<bool>("triggeroncreate"))
{
var stageCode = workflow.GetAttributeValue<OptionSetValue>("createstage");
Stage = stageCode != null ? stageCode.Value : 40;
Message = "Create";
}
else if (workflow.GetAttributeValue<bool>("triggeronupdate") ||
!string.IsNullOrEmpty(workflow.GetAttributeValue<string>("triggeronupdateattributelist")))
{
var stageCode = workflow.GetAttributeValue<OptionSetValue>("updatestage");
Stage = stageCode != null ? stageCode.Value : 40;
Message = "Update";
}
else if (workflow.GetAttributeValue<bool>("triggerondelete"))
{
var stageCode = workflow.GetAttributeValue<OptionSetValue>("deletestage");
Stage = stageCode != null ? stageCode.Value : 20;
Message = "Delete";
}
}
示例2: SynchronousWorkflow
public SynchronousWorkflow(Entity workflow)
{
this.workflow = workflow;
initialRank = Rank;
// Stage
if (workflow.GetAttributeValue<bool>("triggeroncreate"))
{
var stageCode = workflow.GetAttributeValue<OptionSetValue>("createstage");
Stage = stageCode != null ? stageCode.Value : 40;
Message = "Create";
}
else if (workflow.GetAttributeValue<bool>("triggeronupdate"))
{
var stageCode = workflow.GetAttributeValue<OptionSetValue>("updatestage");
Stage = stageCode != null ? stageCode.Value : 40;
Message = "Update";
}
else if (workflow.GetAttributeValue<bool>("triggerondelete"))
{
var stageCode = workflow.GetAttributeValue<OptionSetValue>("deletestage");
Stage = stageCode != null ? stageCode.Value : 20;
Message = "Delete";
}
else
{
// throw new Exception("Unexpected stage data");
}
}
示例3: PluginStep
public PluginStep(Entity pluginStep, IEnumerable<Entity> sdkMessageFilers, IEnumerable<Entity> sdkMessages)
{
this.pluginStep = pluginStep;
initialRank = Rank;
// EntityLogicalName
var messageFilter = sdkMessageFilers.FirstOrDefault(
s => pluginStep.GetAttributeValue<EntityReference>("sdkmessagefilterid") != null &&
s.Id == pluginStep.GetAttributeValue<EntityReference>("sdkmessagefilterid").Id);
if (messageFilter != null)
{
EntityLogicalName = messageFilter.GetAttributeValue<string>("primaryobjecttypecode");
if (EntityLogicalName.Length == 0)
{
EntityLogicalName = "None";
}
var message = sdkMessages.FirstOrDefault(
m => m.Id == messageFilter.GetAttributeValue<EntityReference>("sdkmessageid").Id);
if (message != null)
{
Message = message.GetAttributeValue<string>("name");
}
}
else
{
EntityLogicalName = "(none)";
var message = sdkMessages.FirstOrDefault(
m => m.Id == pluginStep.GetAttributeValue<EntityReference>("sdkmessageid").Id);
if (message != null)
{
Message = message.GetAttributeValue<string>("name");
}
}
}
示例4: WebResource
public WebResource(Entity webResource, string filePath)
{
FilePath = filePath;
WebResourceEntity = webResource;
InitialBase64 = webResource.GetAttributeValue<string>("content");
}