Пример #1
0
        public void ProtocolBufferAssemblyGeneratorCanGenerateCs()
        {
            ProtocolBuffersAssemblyGenerator generator = new ProtocolBuffersAssemblyGenerator();
            DirectoryInfo dir = generator.GenerateCsFiles(typeof(Left));

            OutLine(dir.FullName);
        }
Пример #2
0
 public void ProtocolBufferAssemblyGeneratorCanCreateAssembly()
 {
     string filePathFile = ".\\thefile.txt";
     if (File.Exists(filePathFile))
     {
         string theFilePath = File.ReadAllText(filePathFile);
         if (File.Exists(theFilePath))
         {
             File.Delete(theFilePath);
         }
     }
     ProtocolBuffersAssemblyGenerator generator = new ProtocolBuffersAssemblyGenerator("TestProtoBuf.dll", typeof(Left));
     Assembly ass = generator.GetAssembly();
     Expect.IsNotNull(ass);
     string filePath = ass.GetFileInfo().FullName;
     OutLine(filePath);
     Expect.IsTrue(File.Exists(filePath));
     filePath.SafeWriteToFile(filePathFile, true);
 }