Ejemplo 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
        }
Ejemplo 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));
 }
Ejemplo 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);
 }
 public EcmaScriptIdentifier(string ident)
 {
     this.identifier = ((!string.IsNullOrEmpty(ident)) ? EcmaScriptIdentifier.EnsureValidIdentifier(ident, true) : string.Empty);
 }