예제 #1
0
        public EntityComponent(CrmComponent component, EntityMetadata emd)
        {
            this.emd = emd;
            Id       = emd.MetadataId;
            RootComponentBehavior   = component.RootComponentBehavior;
            RootSolutionComponentId = component.RootSolutionComponentId;
            ComponentType           = component.ComponentType;
            Name        = emd.LogicalName;
            DisplayName = emd.DisplayName?.UserLocalizedLabel?.Label;

            if (RootComponentBehavior == 0)
            {
                foreach (var amd in emd.Attributes)
                {
                    Attributes.Add(new AttributeComponent(amd));
                }
                foreach (var rel in emd.OneToManyRelationships)
                {
                    OneToManyRelashionships.Add(new OneToManyRelationshipComponent(rel));
                }
                foreach (var rel in emd.ManyToManyRelationships)
                {
                    ManyToManyRelationships.Add(new ManyToManyRelationshipComponent(rel));
                }
            }
        }
예제 #2
0
 public OptionSetComponent(CrmComponent c, OptionSetMetadataBase osmdb)
 {
     this.osmdb    = osmdb;
     Id            = osmdb.MetadataId;
     ComponentType = c.ComponentType;
     Name          = osmdb.Name;
     DisplayName   = osmdb.DisplayName?.UserLocalizedLabel?.Label;
 }
예제 #3
0
 public WorkflowComponent(CrmComponent c, Entity e)
 {
     this.e        = e;
     Id            = e.Id;
     ComponentType = c.ComponentType;
     Name          = e.GetAttributeValue <string>("name");
     DisplayName   = Name;
 }
예제 #4
0
 public PluginAssemblyComponent(CrmComponent c, Entity e)
 {
     this.e        = e;
     Id            = e.Id;
     ComponentType = c.ComponentType;
     Name          = e.GetAttributeValue <string>("name");
     DisplayName   = e.GetAttributeValue <string>("friendlyname");
 }
 public KbArticleTemplateComponent(CrmComponent c, Entity e)
 {
     this.e        = e;
     Id            = e.Id;
     ComponentType = c.ComponentType;
     Name          = e.GetAttributeValue <string>("title");
     DisplayName   = Name;
 }
예제 #6
0
 public ContractTemplateComponent(CrmComponent c, Entity e)
 {
     Id            = e.Id;
     ComponentType = c.ComponentType;
     Name          = e.GetAttributeValue <string>("name");
     DisplayName   = Name;
     this.e        = e;
 }
예제 #7
0
 public MailMergeTemplateComponent(CrmComponent c, Entity e)
 {
     this.e        = e;
     Id            = e.Id;
     ComponentType = c.ComponentType;
     Name          = e.GetAttributeValue <string>("name");
     DisplayName   = Name;
 }