ServiceClientGenerator.ServiceModel.CapitalizeFirstChar C# (CSharp) Method

CapitalizeFirstChar() static private method

Capitalizes the first character of a string, used to create proper naming for services, attributes, and operations
static private CapitalizeFirstChar ( string text ) : string
text string The string to capitalize the first character of
return string
        internal static string CapitalizeFirstChar(string text)
        {
            var chars = text.ToCharArray();
            chars[0] = char.ToUpperInvariant(chars[0]);
            return new string(chars);
        }

Usage Example

Exemplo n.º 1
0
        /// <summary>
        /// Creates a shape with a reference to the model it's a part of, its name, and the json data of the shape pulled from the model.
        /// Shapes are used to model structures and member types. If they are a structure the shape
        /// defines what members it has and what shape those members are. It also defines which of those
        /// members are required. If it is not a structure then it is used to specify the type of the member and its properties.
        /// </summary>
        /// <param name="model">The model that contains the shape</param>
        /// <param name="name">The name of the shape</param>
        /// <param name="data">The json object of the shape, pulled form the model json</param>
        public Shape(ServiceModel model, string name, JsonData data)
            : base(model, data)
        {
            this._name = ServiceModel.CapitalizeFirstChar(name);
            var nameOverride = this.model.Customizations.GetOverrideShapeName(this._name);

            if (nameOverride != null)
            {
                this._name = nameOverride;
            }
        }
All Usage Examples Of ServiceClientGenerator.ServiceModel::CapitalizeFirstChar