Open.Core.PackageBase.FormatMethod C# (CSharp) Method

FormatMethod() private static method

private static FormatMethod ( string method ) : string
method string
return string
        private static string FormatMethod(string method)
        {
            if (Script.IsUndefined(method) || string.IsNullOrEmpty(method)) return null;

            StringHelper helper = Helper.String;
            method = helper.RemoveEnd(method, ";");
            method = helper.RemoveEnd(method, "()");

            string[] parts = method.Split(".");
            string name = parts[parts.Length - 1];

            return string.Format("{0}{1}()",
                                 helper.RemoveEnd(method, name),
                                 helper.ToCamelCase(name));
        }
        #endregion