Skip to content

Commit 16e3dce

Browse files
Merge pull request #15 from alivirya/issue-14
[ISSUE-14] Modified regex to be a private static variable
2 parents 08ca42e + c90d166 commit 16e3dce

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

AjaxPro/JSON/JavaScriptUtil.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* JavaScriptUtil.cs
33
*
4-
* Copyright © 2007 Michael Schwarz (http://www.ajaxpro.info).
4+
* Copyright © 2007 Michael Schwarz (http://www.ajaxpro.info).
55
* All Rights Reserved.
66
*
77
* Permission is hereby granted, free of charge, to any person
@@ -52,6 +52,8 @@ namespace AjaxPro
5252
/// </summary>
5353
public sealed class JavaScriptUtil
5454
{
55+
private static System.Text.RegularExpressions.Regex r = new System.Text.RegularExpressions.Regex(@"\w+|\W+", System.Text.RegularExpressions.RegexOptions.Compiled);
56+
5557
/// <summary>
5658
/// Get the client-side JavaScript namespace script.
5759
/// </summary>
@@ -395,7 +397,6 @@ public static IJavaScriptObject GetIJavaScriptObjectFromXmlNode(XmlNode n)
395397
//if (xpath == "" || xpath == "/")
396398
// xpath = n.Name;
397399

398-
System.Text.RegularExpressions.Regex r = new System.Text.RegularExpressions.Regex(@"\w+|\W+", System.Text.RegularExpressions.RegexOptions.Compiled);
399400
JavaScriptObject o = new JavaScriptObject();
400401

401402
if (n.NodeType == XmlNodeType.Element)

AjaxPro/Utilities/Constant.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Constant.cs
33
*
4-
* Copyright © 2007 Michael Schwarz (http://www.ajaxpro.info).
4+
* Copyright © 2007 Michael Schwarz (http://www.ajaxpro.info).
55
* All Rights Reserved.
66
*
77
* Permission is hereby granted, free of charge, to any person
@@ -52,6 +52,6 @@ public sealed class Constant
5252
/// <summary>
5353
/// The assembly version.
5454
/// </summary>
55-
public const string AssemblyVersion = "21.12.22.1";
55+
public const string AssemblyVersion = "22.02.03.1";
5656
}
5757
}

0 commit comments

Comments
 (0)