Esempio n. 1
0
        private void Parse(string path)
        {
            VObject vObject = (VObject)VdfConvert.Deserialize(File.ReadAllText(path).Replace(@"\", @"\\")).Value;

            DepotId     = int.Parse(vObject["DepotID"].ToString());
            ContentRoot = vObject["ContentRoot"].ToString();
            foreach (VProperty child in vObject.Children())
            {
                switch (child.Key)
                {
                case "FileMapping":
                    VObject mapping = (VObject)child.Value;
                    FileMappings.Add(new FileMapping {
                        LocalPath = mapping["LocalPath"].ToString(),
                        DepotPath = mapping["DepotPath"].ToString(),
                        Recursive = int.Parse(mapping["recursive"].ToString())
                    });
                    break;

                case "FileExclusion":
                    FileExclusions.Add(new FileExclusion(child.Value.ToString()));
                    break;

                default:
                    continue;
                }
            }
        }
Esempio n. 2
0
 public Depot(int depotId)
 {
     DepotId = depotId;
     FileMappings.Add(new FileMapping());
     FileExclusions.Add(new FileExclusion());
 }