コード例 #1
0
        /// <summary>
        /// Builds a tactical metadata type string.
        /// </summary>
        /// <param name="pType">The user type.</param>
        /// <returns>The type as string.</returns>
        public string BuildParentTypeAsString(MetadataSetType pType)
        {
            string           lPath   = string.Empty;
            IMetadataSetType lParent = pType.ParentType;

            while (lParent != null)
            {
                if (string.IsNullOrEmpty(lPath))
                {
                    lPath = lParent.GetTypeAsString();
                }
                else
                {
                    lPath = lParent.GetTypeAsString() + MetadataManager.PARENT_TYPE_AS_STRING_SEP + lPath;
                }

                lParent = lParent.ParentType;
            }

            return(lPath);
        }
コード例 #2
0
ファイル: MetadataSet.cs プロジェクト: mastertnt/XRay
 /// <summary>
 /// Initializes a new instance of the <see cref="MetadataSet"/> class.
 /// </summary>
 /// <param name="pPropertyDescriptors">The properties of the metadata set.</param>
 /// <param name="pType">The parent type.</param>
 public MetadataSet(PropertyDescriptorCollection pPropertyDescriptors, IMetadataSetType pType)
     : base(pPropertyDescriptors, pType.GetTypeAsString())
 {
     this.Type = pType;
 }