ACAT.Lib.Core.PanelManagement.PanelConfigMap.GetFormId C# (CSharp) Метод

GetFormId() статический приватный Метод

Gets the ACAT descriptor guid for the specifed Type
static private GetFormId ( Type type ) : System.Guid
type System.Type Scanner class Type
Результат System.Guid
        internal static Guid GetFormId(Type type)
        {
            var descAttribute = DescriptorAttribute.GetDescriptor(type);
            Guid retVal = Guid.Empty;
            if (descAttribute != null)
            {
                retVal = descAttribute.Id;
            }

            return retVal;
        }

Usage Example

Пример #1
0
        /// <summary>
        /// Add the form of the specified type to the form cache.
        /// </summary>
        /// <param name="type">the .NET type</param>
        public void AddFormToCache(Type type)
        {
            var guid = PanelConfigMap.GetFormId(type);

            PanelConfigMap.AddFormToCache(guid, type);
        }