/// <summary> /// Constructs/reconstructs the server-side receiver to process one or more messages. This class /// maintains all state in the INameValueStore so it may be destroyed between requests, or there /// may be multiple instances handling requests, provided that all instances have access to the /// underlying storage provided by the INameValueStore instance. /// </summary> /// <param name="privateKey">The private key used for this server</param> /// <param name="clientKey">The public key of the client to allow</param> /// <param name="storage">The state storage used between requests</param> public Server(RSAPrivateKey privateKey, RSAPublicKey clientKey, INameValueStore storage) { _privateKey = privateKey; _clientKey = clientKey; _storage = storage; NonceSize = 32; KeyBytes = 32; MaxInboundFileChunk = ushort.MaxValue; MaxOutboundFileChunk = 1000 * 1024; }
public virtual void Setup() { Store = new Storage(Dictionary = new DictionaryStorage(new Dictionary <string, string>())); }
static CertificateHandler() { ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback; Storage = new RegistryStorage(); }
/// <summary> /// Constructs a storage wrapper for the given name/value store and sets the initial /// path to the provided value. /// </summary> /// <param name="store">The storage container to use</param> /// <param name="contextPath">The full context of the storage item, delimit with '/' or '\'</param> public Storage(INameValueStore store, string contextPath) { _store = Check.NotNull(store); PathInfo.SetPath(this, contextPath); }
/// <summary> /// Constructs a storage wrapper for the given name/value store and sets the initial /// path to the provided value. /// </summary> /// <param name="store">The storage container to use</param> public Storage(INameValueStore store) : this(store, null) { }
/// <summary> /// Reads all properties from the specified proeprty serialization /// </summary> public void Deserialize(INameValueStore storage) { base.Deserialize(_instance, storage); }
protected BaseTestSerializers(T store) { Store = store; }
public virtual void Setup() { Store = new Storage(Dictionary = new DictionaryStorage(new Dictionary<string, string>())); }
/// <summary> /// Reads all properties from the specified proeprty serialization /// </summary> public void Deserialize(INameValueStore storage) { base.Deserialize(_instance, storage); }
public new void Deserialize(object i, INameValueStore s) { throw new NotSupportedException(); }
/// <summary> /// Reads all properties from the specified proeprty serialization /// </summary> public void Deserialize(T instance, INameValueStore rawstorage) { base.Deserialize(instance, rawstorage); }
static CertificateHandler() { ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback; Storage = new CSharpTest.Net.Serialization.StorageClasses.RegistryStorage(); }
/// <summary> /// Constructs/reconstructs the server-side receiver to process one or more messages. This class /// maintains all state in the INameValueStore so it may be destroyed between requests, or there /// may be multiple instances handling requests, provided that all instances have access to the /// underlying storage provided by the INameValueStore instance. /// </summary> /// <param name="privateKey">The private key used for this server</param> /// <param name="clientKey">The public key of the client to allow</param> /// <param name="storage">The state storage used between requests</param> public Server(RSAPrivateKey privateKey, RSAPublicKey clientKey, INameValueStore storage) { _privateKey = privateKey; _clientKey = clientKey; _storage = storage; NonceSize = 32; KeyBytes = 32; MaxInboundFileChunk = ushort.MaxValue; MaxOutboundFileChunk = 1000*1024; }
static CertificateHandler() { ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback; Storage = new CSharpTest.Net.Serialization.StorageClasses.RegistryStorage(); }
static CertificateHandler() { ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback; Storage = new RegistryStorage(); }