public void Add( Guid identifier, Resource resource )
 {
     Dictionary.Add( identifier, resource );
 }
Exemple #2
0
        object ICloneable.Clone()
        {
            Resource clone = new Resource();

            clone.Identifier = Identifier;
            clone.Type = Type;
            clone.HRef = HRef;
            if (Files != null)
            {
                clone.Files = (File[])Files.Clone();
            }
            if (Dependencies != null)
            {
                clone.Dependencies = (Resource[])Dependencies.Clone();
            }

            if (Extension != null)
            {
                if (Extension is ICloneable)
                {
                    clone.Extension = ((ICloneable)Extension).Clone();
                }
            }

            return clone;
        }