Exemplo n.º 1
0
 protected virtual void WriteProperties(XmlWriter aWriter)
 {
     aWriter.WriteAttributeString("Name", Name);
     aWriter.WriteAttributeString("Path", Path);
     aWriter.WriteAttributeString("Description", Description);
     aWriter.WriteAttributeString("IsAbstract", IsAbstract.ToString());
     aWriter.WriteAttributeString("Type", Type.ToString());
 }
Exemplo n.º 2
0
        public XElement ToXml()
        {
            var xElement = new XElement(ElementXNames.Element,
                                        new XAttribute(ElementXNames.Abstract, IsAbstract.ToString().ToLowerInvariant()),
                                        new XAttribute(ElementXNames.Id, Id),
                                        new XAttribute(ElementXNames.Name, Name.LocalName),
                                        new XAttribute(ElementXNames.Nillable, "true"),
                                        new XAttribute(ElementXNames.SubstitutionGroup, SubstitutionGroup),
                                        new XAttribute(ElementXNames.Type, DataType),
                                        new XAttribute(ElementXNames.PeriodType, PeriodType)
                                        );

            // A small (about 150) number of IFRS concepts are monetary and still lack a balance type. This occurs, e.g. for prices.
            if (DataType == DataTypeRegistry.Monetary && BalanceType != null)
            {
                xElement.Add(new XAttribute(ElementXNames.Balance, BalanceType));
            }

            return(xElement);
        }
Exemplo n.º 3
0
        public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "classid": // Int
                return(ClassId.ToString(strFormat, formatProvider));

            case "namespaceid": // Int
                return(NamespaceId.ToString(strFormat, formatProvider));

            case "componentid": // Int
                if (ComponentId == null)
                {
                    return("");
                }
                ;
                return(((int)ComponentId).ToString(strFormat, formatProvider));

            case "classname": // NVarChar
                return(PropertyAccess.FormatString(ClassName, strFormat));

            case "declaration": // NVarChar
                if (Declaration == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Declaration, strFormat));

            case "documentation": // NVarCharMax
                if (Documentation == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Documentation, strFormat));

            case "description": // NVarCharMax
                if (Description == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Description, strFormat));

            case "appearedinversion": // VarChar
                return(PropertyAccess.FormatString(AppearedInVersion, strFormat));

            case "deprecatedinversion": // VarChar
                if (DeprecatedInVersion == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DeprecatedInVersion, strFormat));

            case "disappearedinversion": // VarChar
                if (DisappearedInVersion == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DisappearedInVersion, strFormat));

            case "isdeprecated": // Bit
                return(IsDeprecated.ToString());

            case "deprecationmessage": // NVarChar
                if (DeprecationMessage == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DeprecationMessage, strFormat));

            case "documentationid": // Int
                if (DocumentationId == null)
                {
                    return("");
                }
                ;
                return(((int)DocumentationId).ToString(strFormat, formatProvider));

            case "pendingdescription": // NVarCharMax
                if (PendingDescription == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(PendingDescription, strFormat));

            case "fullname": // NVarChar
                return(PropertyAccess.FormatString(FullName, strFormat));

            case "isabstract": // Bit
                return(IsAbstract.ToString());

            case "isansiclass": // Bit
                return(IsAnsiClass.ToString());

            case "isarray": // Bit
                return(IsArray.ToString());

            case "isautoclass": // Bit
                return(IsAutoClass.ToString());

            case "isautolayout": // Bit
                return(IsAutoLayout.ToString());

            case "isbeforefieldinit": // Bit
                return(IsBeforeFieldInit.ToString());

            case "isbyreference": // Bit
                return(IsByReference.ToString());

            case "isclass": // Bit
                return(IsClass.ToString());

            case "isdefinition": // Bit
                return(IsDefinition.ToString());

            case "isenum": // Bit
                return(IsEnum.ToString());

            case "isexplicitlayout": // Bit
                return(IsExplicitLayout.ToString());

            case "isfunctionpointer": // Bit
                return(IsFunctionPointer.ToString());

            case "isgenericinstance": // Bit
                return(IsGenericInstance.ToString());

            case "isgenericparameter": // Bit
                return(IsGenericParameter.ToString());

            case "isimport": // Bit
                return(IsImport.ToString());

            case "isinterface": // Bit
                return(IsInterface.ToString());

            case "isnested": // Bit
                return(IsNested.ToString());

            case "isnestedassembly": // Bit
                return(IsNestedAssembly.ToString());

            case "isnestedprivate": // Bit
                return(IsNestedPrivate.ToString());

            case "isnestedpublic": // Bit
                return(IsNestedPublic.ToString());

            case "isnotpublic": // Bit
                return(IsNotPublic.ToString());

            default:
                propertyNotFound = true;
                break;
            }

            return(Null.NullString);
        }