摘要:using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Reflection;using System.Reflection.Emit;using System.Runtime.CompilerServices;using System.Text;namespace Rocky{ internal delegate bool Forwarder(WeakReference weakRef, object sender, EventArgs e...
阅读全文
摘要:/// <summary> /// System.Security.SecurityElement.Escape(); /// </summary> /// <param name="xml"></param> /// <returns></returns> public static string GetSafeXml(string xml) { //s = <You're angle & evil>, ['&<>] return Regex.R
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics.Contracts;using System.Collections.Specialized;using System.IO;using System.Net;using System.Net.Sockets;using System.Net.Security;using System.Net.Mime;using System.Reflection;namespace Rocky.
阅读全文
摘要:public static string MD5Hash16(string input) { return MD5Hash16(Encoding.UTF8.GetBytes(input)); } public static string MD5Hash16(byte[] input) { var hasher = MD5.Create(); byte[] data = hasher.ComputeHash(input); string ...
阅读全文
摘要:View Code using System;using System.Reflection.Emit;namespace Rocky{ /// <summary> /// ForState /// </summary> internal class ForState { private Label beginLabel; private object end; private Label endLabel; private LocalBuilder indexVariable; private...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;namespace Rocky{ /// <summary> /// Release下会忽略此类所有方法 /// </summary> [DebuggerStepThrough] public static class Validator { #region Fields public const string Debu...
阅读全文