Esempio n. 1
0
        public void Fabric()
        {
            var items         = Utilities.GetItemsStreamExample(SourceFiles);
            var payloadConfig = PayloadLayoutConfigurationFactory.CreateDefault(PayloadLayoutScheme.Fabric);

            DoMux(payloadConfig, items, SourceFiles);
        }
Esempio n. 2
0
        public void Test()
        {
            var manifest = new Manifest
            {
                PayloadItems = new List <PayloadItem>(),

                PayloadOffset        = 69,
                PayloadConfiguration = PayloadLayoutConfigurationFactory.CreateDefault(PayloadLayoutSchemes.Frameshift)
            };

            manifest.PayloadItems.Add(new PayloadItem()
            {
                Encryption = SymmetricCipherConfigurationFactory.CreateBlockCipherConfiguration
                                 (SymmetricBlockCipher.AES, BlockCipherModes.CTR, BlockCipherPaddings.None)
            });

            var stream = StratCom.SerialiseDto(manifest);

            stream.Seek(0, SeekOrigin.Begin);
            var outputObj = StratCom.DeserialiseDTO <Manifest>(stream.ToArray());

            bool equal = manifest.Equals(outputObj);

            Assert.IsTrue(equal);
        }
Esempio n. 3
0
        public void Frameshift()
        {
            var items         = Utilities.GetItemsBlockExample(SourceFiles);
            var payloadConfig = PayloadLayoutConfigurationFactory.CreateDefault(PayloadLayoutScheme.Frameshift);

            DoMux(payloadConfig, items, SourceFiles, true);
        }
Esempio n. 4
0
        public void Simple()
        {
            var inputObj = PayloadLayoutConfigurationFactory.CreateDefault(PayloadLayoutScheme.Simple);

            var stream = SerialiseToMemory(inputObj);

            stream.Seek(0, SeekOrigin.Begin);
            var outputObj = DeserialiseFromMemory <PayloadConfiguration>(stream);

            bool equal = inputObj.Equals(outputObj);

            Assert.IsTrue(equal);
        }