GetDescriptorType() публичный Метод

public GetDescriptorType ( System.Guid soapDescriptorTypeId ) : IDescriptorTypeProxy
soapDescriptorTypeId System.Guid
Результат IDescriptorTypeProxy
Пример #1
0
 public void RenameNodeMetadata(MetadataContext key, string newName)
 {
     if (HasMetadata(key))
     {
         INodeService         nodeService    = IoC.IoCContainer.GetInjectionInstance().GetInstance <INodeService>();
         TypeManager          typeManager    = IoC.IoCContainer.GetInjectionInstance().GetInstance <TypeManager>();
         IDescriptorTypeProxy descriptorType = null;
         if (key.DescriptorTypeUid.HasValue)
         {
             descriptorType = typeManager.GetDescriptorType(key.DescriptorTypeUid.Value);
         }
         Guid relationshipId = Guid.Empty;
         if (key.RelationshipUid.HasValue)
         {
             relationshipId = key.RelationshipUid.Value;
         }
         nodeService.RenameNodeMetadataAsync(Domain, Id, relationshipId, descriptorType, key.MetadataName, newName);
     }
 }
Пример #2
0
        public void SetNodeMetadata(MetadataContext key, string metadataValue, IMetadataTypeProxy metadataType)
        {
            if (BaseSoapNode.Metadata != null)
            {
                if (HasMetadata(key))
                {
                    GetNodeMetadata(key).MetadataValue = metadataValue;
                }
                else
                {
                    BaseSoapNode.Metadata.Add(key, new SoapMetadata()
                    {
                        MetadataName = key.MetadataName,
                        MetadataType = new SoapMetadataType()
                        {
                            Id = metadataType.Id, Name = metadataType.Name
                        },
                        MetadataValue = metadataValue
                    });
                }

                INodeService         nodeService    = IoC.IoCContainer.GetInjectionInstance().GetInstance <INodeService>();
                TypeManager          typeManager    = IoC.IoCContainer.GetInjectionInstance().GetInstance <TypeManager>();
                IDescriptorTypeProxy descriptorType = null;
                if (key.DescriptorTypeUid.HasValue)
                {
                    descriptorType = typeManager.GetDescriptorType(key.DescriptorTypeUid.Value);
                }
                Guid relationshipId = Guid.Empty;
                if (key.RelationshipUid.HasValue)
                {
                    relationshipId = key.RelationshipUid.Value;
                }

                nodeService.UpdateNodeMetadataAsync(Domain, this.Id, relationshipId, descriptorType, key.MetadataName, metadataValue, metadataType);
            }
        }