⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 encryptionextensionattribute.cs

📁 Other things about csharp. you could learn from this
💻 CS
字号:
using System;
using System.IO;
using System.Xml;
using System.Text;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Security.Cryptography;

[AttributeUsage(AttributeTargets.Method)]
public class EncryptionExtensionAttribute : SoapExtensionAttribute {
	private int priority;
	private EncryptMode encryptionMode = EncryptMode.None;
	private DecryptMode decryptionMode = DecryptMode.None;
	private Target target = Target.Method;

	public override Type ExtensionType {
		get { return typeof(EncryptionExtension); }
	}

	public override int Priority {
		get { 
			return priority; 
		}
		set { 
			priority = value; 
		}
	}

	public EncryptMode Encrypt {
		get {
			return encryptionMode;
		}
		set {
			encryptionMode = value;
		}
	}

	public DecryptMode Decrypt {
		get {
			return decryptionMode;
		}
		set {
			decryptionMode = value;
		}
	}

	public Target Target {
		get {
			return target;
		}
		set {
			target = value;
		}
	}

}

public enum DecryptMode {
	None,
	Response,
	Request
}

public enum EncryptMode {
	None,
	Response,
	Request
}

public enum Target {
	Envelope,
	Body,
	Method
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -