Exemple #1
0
        internal static object QuoteAndEscapeIfString(object value)
        {
            string str = value as string;

            if (str == null)
            {
                return(value);
            }
            else
            {
                return(MofDataType.QuoteAndEscapeString(str));
            }
        }
Exemple #2
0
        public override string ToString()
        {
            string str = "";

            if (this.m_parameter == null)
            {
                return(string.Format("{0}{1}", this.m_name, str));
            }
            else
            {
                return(string.Format("{0}({1}){2}", this.m_name, MofDataType.QuoteAndEscapeIfString(this.m_parameter), str));
            }
        }
Exemple #3
0
        public override string ToString()
        {
            StringBuilder stringBuilder = new StringBuilder();
            string        str           = this.m_qualifiers.ToString();

            if (str.Length > 0)
            {
                stringBuilder.Append(str);
                stringBuilder.Append(" ");
            }
            stringBuilder.Append(this.m_propertyName);
            if (this.m_initializer != null)
            {
                stringBuilder.Append(" = ");
                stringBuilder.Append(MofDataType.QuoteAndEscapeIfString(this.m_initializer));
            }
            stringBuilder.Append(";");
            return(stringBuilder.ToString());
        }
Exemple #4
0
        public override string ToString()
        {
            StringBuilder stringBuilder = new StringBuilder();
            string        str           = this.m_qualifiers.ToString();

            if (str.Length > 0)
            {
                stringBuilder.Append(str);
                stringBuilder.Append(" ");
            }
            ArrayType dataType = this.DataType as ArrayType;

            if (dataType != null)
            {
                stringBuilder.Append(dataType.ElementType);
            }
            else
            {
                stringBuilder.Append(this.DataType);
            }
            stringBuilder.Append(" ");
            stringBuilder.Append(this.Name);
            if (dataType != null)
            {
                stringBuilder.Append("[");
                int?length = dataType.Length;
                if (length.HasValue)
                {
                    stringBuilder.Append(dataType.Length);
                }
                stringBuilder.Append("]");
            }
            if (this.m_defaultValue != null)
            {
                stringBuilder.Append(" = ");
                stringBuilder.Append(MofDataType.QuoteAndEscapeIfString(this.m_defaultValue));
            }
            stringBuilder.Append(";");
            return(stringBuilder.ToString());
        }
Exemple #5
0
 public override string ToString()
 {
     return(string.Concat("#pragma include(", MofDataType.QuoteAndEscapeString(this.Filename), ")"));
 }
Exemple #6
0
 public override string ToString()
 {
     return(string.Concat("#pragma locale(", MofDataType.QuoteAndEscapeString(this.Locale), ")"));
 }
Exemple #7
0
 public override string ToString()
 {
     return(string.Concat("#pragma Namespace(", MofDataType.QuoteAndEscapeString(this.Namespace), ")"));
 }