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)); }
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>(); }
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; }