示例#1
0
        public static bool HasIdentityCategoryFlag(this IBase baseObject, IdentityFieldCategory identityFieldCategoryFlag)
        {
            var identityFieldAttribute         = baseObject.GetFacetAttribute <IdentityFieldAttribute>();
            var identityFieldKind              = identityFieldAttribute.IdentityFieldKind;
            var identityFieldCategoryAttribute = identityFieldKind.GetIdentityFieldCategoryAttribute();
            var identityFieldCategory          = identityFieldCategoryAttribute.IdentityFieldCategoryFlags;

            return(identityFieldCategory.HasAnyFlag(identityFieldCategoryFlag));
        }
示例#2
0
        public Response(IBase baseObject, IGeneratorConfiguration generatorConfiguration) : base(baseObject, generatorConfiguration)
        {
            var gridColumnAttribute = baseObject.GetFacetAttribute <GridColumnAttribute>();
            var displayName         = baseObject.GetDisplayName();
            var name = baseObject.GetNavigationName();

            this.Title            = displayName;
            this.Name             = name;
            this.GridColumnKind   = gridColumnAttribute.GridColumnKind;
            this.IsTextIdentifier = gridColumnAttribute.IsTextIdentifier;
            this.IsKey            = baseObject.HasFacetAttribute <KeyAttribute>();
        }
示例#3
0
        public SlidingTab(IBase baseObject, IGeneratorConfiguration generatorConfiguration) : base(baseObject, generatorConfiguration)
        {
            var    navigationAttribute   = baseObject.GetFacetAttribute <UINavigationAttribute>();
            var    hasComponentAttribute = baseObject.HasFacetAttribute <UIAttribute>();
            var    tabName = baseObject.GetDisplayName();
            string name;

            if (!hasComponentAttribute && baseObject.Kind == DefinitionKind.ComplexSetProperty)
            {
                var parentBase   = (IParentBase)baseObject;
                var childElement = parentBase.ChildElements.Single();

                name = childElement.GetNavigationName() + "Page";
            }
            else
            {
                name = baseObject.GetNavigationName() + "Page";
            }

            this.Root  = name;
            this.Title = tabName;
        }