示例#1
0
 public Resource(ResourceType type, string version)
 {
     Type      = type;
     Version   = version;
     TimeStamp = ResourceSignature.TimeStamp;
     ID        = new ResourceID();
 }
示例#2
0
        public void Open(string path)
        {
            using (var r = new BinaryReader(File.OpenRead(path)))
            {
                if (!ResourceSignature.Read(r))
                {
                    throw new Exception(
                              "Invalid resource [" + path + "] signature.");
                }

                Type      = StringToType(r.ReadString());
                Version   = r.ReadString();
                TimeStamp = r.ReadString();
                ID        = new ResourceID(r);
                ReadData(r);
            }
        }
示例#3
0
 public ResourceLink(string path)
 {
     FilePath = path;
     Type     = Resource.GetType(path);
     ID       = Resource.GetID(path);
 }
示例#4
0
 public ResourceLink()
 {
     FilePath = null;
     Type     = ResourceType.MissingFile;
     ID       = null;
 }