Exemplo n.º 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
        }
Exemplo n.º 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));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Ctor
 /// </summary>
 public EcmaScriptIdentifier(string ident)
 {
     this.identifier = String.IsNullOrEmpty(ident) ? String.Empty :
                       EcmaScriptIdentifier.EnsureValidIdentifier(ident, true);
 }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="jsonName"></param>
 public JsonNameAttribute(string jsonName)
 {
     this.jsonName = EcmaScriptIdentifier.EnsureValidIdentifier(jsonName, false);
 }
Exemplo n.º 5
0
 public EcmaScriptIdentifier(string ident)
 {
     this.identifier = ((!string.IsNullOrEmpty(ident)) ? EcmaScriptIdentifier.EnsureValidIdentifier(ident, true) : string.Empty);
 }
Exemplo n.º 6
0
 public EcmaScriptIdentifier(string ident)
 {
     identifier = !string.IsNullOrEmpty(ident) ? EcmaScriptIdentifier.EnsureValidIdentifier(ident, true) : string.Empty;
 }