/// <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;
            }
Beispiel #2
0
 public virtual void Setup()
 {
     Store = new Storage(Dictionary = new DictionaryStorage(new Dictionary <string, string>()));
 }
Beispiel #3
0
 static CertificateHandler()
 {
     ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback;
     Storage = new RegistryStorage();
 }
Beispiel #4
0
 /// <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);
 }
Beispiel #5
0
 /// <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); }
Beispiel #7
0
 protected BaseTestSerializers(T store)
 {
     Store = store;
 }
		public virtual void Setup()
		{
			Store = new Storage(Dictionary = new DictionaryStorage(new Dictionary<string, string>()));
		}
Beispiel #9
0
 /// <summary>
 /// Reads all properties from the specified proeprty serialization
 /// </summary>
 public void Deserialize(INameValueStore storage)
 {
     base.Deserialize(_instance, storage);
 }
Beispiel #10
0
 public new void Deserialize(object i, INameValueStore s)
 {
     throw new NotSupportedException();
 }
Beispiel #11
0
 /// <summary>
 /// Reads all properties from the specified proeprty serialization
 /// </summary>
 public void Deserialize(T instance, INameValueStore rawstorage)
 {
     base.Deserialize(instance, rawstorage);
 }
Beispiel #12
0
 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;
            }
Beispiel #14
0
 static CertificateHandler()
 {
     ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback;
     Storage = new CSharpTest.Net.Serialization.StorageClasses.RegistryStorage();
 }
Beispiel #15
0
 static CertificateHandler()
 {
     ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback;
     Storage = new RegistryStorage();
 }