Пример #1
0
        /// <summary>
        /// Gets the type of the c sharp.
        /// </summary>
        /// <param name="field">The field.</param>
        /// <returns>System.String.</returns>
        private string GetCSharpType(IntegrationServiceTypeFieldDefinition field)
        {
            var fullName = field.Type.FullName;

            if (field.Type.IsValueType && field.IsNullable)
                fullName = fullName + "?";

            if (field.AllowMultiple)
                fullName = fullName + "[]";

            return fullName;
        }
Пример #2
0
        private string GetXmlAttribute(IntegrationServiceTypeFieldDefinition field)
        {
            if (field.AllowMultiple && !field.SerializeAsSequence)
                return string.Format("[System.Xml.Serialization.XmlArrayAttribute(Namespace = {0}, IsNullable = {1})]", field.Namespace.ToLiteral(), field.IsNullable.ToLiteral());

            return string.Format("[System.Xml.Serialization.XmlElementAttribute(Namespace = {0}, IsNullable = {1})]", field.Namespace.ToLiteral(), field.IsNullable.ToLiteral());
        }