Exemplo n.º 1
0
        public virtual AttributeInfo CreatePseudo(string entityName, string logicalName, AttributeTypeCode attTypeCode, AttributeTypeDisplayName attDisplayName = null)
        {
            var newAtt = new PseudoAttributeInfo();

            newAtt.AttributeType = attTypeCode;
            newAtt.AttributeOf   = string.Empty;
            newAtt.AttributeType = attTypeCode;
            if (attDisplayName == null)
            {
                newAtt.AttributeTypeDisplayName = GetAttributeTypeDisplayName(attTypeCode);
            }
            else
            {
                newAtt.AttributeTypeDisplayName = attDisplayName;
            }

            newAtt.CanBeSecuredForCreate       = false;
            newAtt.CanBeSecuredForRead         = false;
            newAtt.CanBeSecuredForUpdate       = false;
            newAtt.CanModifyAdditionalSettings = false;
            // newAtt.ColumnNumber = attributeMetadata.ColumnNumber;
            //newAtt.DataType = attributeMetadata.GetSqlDataType
            newAtt.DeprecatedVersion = string.Empty;
            newAtt.Description       = string.Empty;
            newAtt.DisplayName       = string.Empty;

            newAtt.EntityLogicalName = entityName;
            // newAtt.IdentityIncrement;
            // newAtt.IdentitySeed;
            newAtt.IntroducedVersion = string.Empty;
            newAtt.IsAuditEnabled    = false;
            newAtt.IsCustomAttribute = true;
            newAtt.IsCustomizable    = false;
            // newAtt.IsIdentity = GetBooleanManagedValue(attributeMetadata.is);
            newAtt.IsManaged              = false;
            newAtt.IsPrimaryId            = false;
            newAtt.IsPrimaryName          = false;
            newAtt.IsPseudo               = true;
            newAtt.IsRenameable           = false;
            newAtt.IsSecured              = false;
            newAtt.IsValidForAdvancedFind = false;
            newAtt.IsValidForCreate       = false;
            newAtt.IsValidForRead         = false;
            newAtt.IsValidForUpdate       = false;
            //newAtt.Length
            newAtt.LinkedAttributeId = null;
            newAtt.LogicalName       = logicalName;
            newAtt.MetadataId        = Guid.Empty;
            newAtt.RequiredLevel     = new AttributeRequiredLevelManagedProperty(AttributeRequiredLevel.None);
            newAtt.SchemaName        = logicalName;
            return(newAtt);
        }
Exemplo n.º 2
0
        public virtual AttributeInfo CreatePseudo(string entityName, string logicalName, AttributeTypeCode attTypeCode, AttributeTypeDisplayName attDisplayName = null)
        {
            var newAtt = new PseudoAttributeInfo();
            newAtt.AttributeType = attTypeCode;
            newAtt.AttributeOf = string.Empty;
            newAtt.AttributeType = attTypeCode;
            if (attDisplayName == null)
            {
                newAtt.AttributeTypeDisplayName = GetAttributeTypeDisplayName(attTypeCode);
            }
            else
            {
                newAtt.AttributeTypeDisplayName = attDisplayName;
            }

            newAtt.CanBeSecuredForCreate = false;
            newAtt.CanBeSecuredForRead = false;
            newAtt.CanBeSecuredForUpdate = false;
            newAtt.CanModifyAdditionalSettings = false;
            // newAtt.ColumnNumber = attributeMetadata.ColumnNumber;
            //newAtt.DataType = attributeMetadata.GetSqlDataType
            newAtt.DeprecatedVersion = string.Empty;
            newAtt.Description = string.Empty;
            newAtt.DisplayName = string.Empty;

            newAtt.EntityLogicalName = entityName;
            // newAtt.IdentityIncrement;
            // newAtt.IdentitySeed;
            newAtt.IntroducedVersion = string.Empty;
            newAtt.IsAuditEnabled = false;
            newAtt.IsCustomAttribute = true;
            newAtt.IsCustomizable = false;
            // newAtt.IsIdentity = GetBooleanManagedValue(attributeMetadata.is);
            newAtt.IsManaged = false;
            newAtt.IsPrimaryId = false;
            newAtt.IsPrimaryName = false;
            newAtt.IsPseudo = true;
            newAtt.IsRenameable = false;
            newAtt.IsSecured = false;
            newAtt.IsValidForAdvancedFind = false;
            newAtt.IsValidForCreate = false;
            newAtt.IsValidForRead = false;
            newAtt.IsValidForUpdate = false;
            //newAtt.Length
            newAtt.LinkedAttributeId = null;
            newAtt.LogicalName = logicalName;
            newAtt.MetadataId = Guid.Empty;
            newAtt.RequiredLevel = new AttributeRequiredLevelManagedProperty(AttributeRequiredLevel.None);
            newAtt.SchemaName = logicalName;
            return newAtt;
        }