コード例 #1
0
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="jsonName"></param>
        public JsonNameAttribute(string jsonName)
        {
#if !NO_ECMASCRIPT
            this.jsonName = EcmaScriptIdentifier.EnsureValidIdentifier(jsonName, false);
#else
            this.jsonName = jsonName;
#endif
        }
コード例 #2
0
 /// <summary>
 /// Ensures is a valid EcmaScript variable expression.
 /// </summary>
 /// <param name="varExpr">the variable expression</param>
 /// <returns>varExpr</returns>
 public static string EnsureValidIdentifier(string varExpr, bool nested)
 {
     return(EcmaScriptIdentifier.EnsureValidIdentifier(varExpr, nested, true));
 }
コード例 #3
0
 /// <summary>
 /// Ctor
 /// </summary>
 public EcmaScriptIdentifier(string ident)
 {
     this.identifier = String.IsNullOrEmpty(ident) ? String.Empty :
                       EcmaScriptIdentifier.EnsureValidIdentifier(ident, true);
 }