예제 #1
0
        public LogFile(string startupPath, string logVariablesPath)
        {
            Directory.CreateDirectory(@".\LogFiles\");
            this.startupPath     = startupPath;
            this.LogVariablePath = logVariablesPath;

            logVariables = new VariableStorage(logVariablesPath);
            ObjStr       = new ObjectStream(startupPath);
            object id = logVariables.GetVariable("Id");

            if (id != null)
            {
                Id = Int32.Parse(id.ToString());
            }
        }
예제 #2
0
        public LogFile()
        {
            Directory.CreateDirectory(@".\LogFiles\");
            this.startupPath     = System.IO.Path.GetFullPath(@".\LogFiles\test1.txt");
            this.LogVariablePath = Path.GetFullPath(@".\LogFiles\logV");

            logVariables = new VariableStorage(LogVariablePath);
            ObjStr       = new ObjectStream(startupPath);

            object id = logVariables.GetVariable("Id");

            if (id != null)
            {
                Id = Int32.Parse(id.ToString());
            }
        }
예제 #3
0
        public VariableStorage(string filePath)
        {
            this.filePath = filePath ?? throw new ArgumentNullException("Argument at pos: 1, not null.");

            fileStream = new ObjectStream(filePath);
        }