Ejemplo n.º 1
0
        public static String GetArchiveProperty(int archive, ArchiveProperty property)
        {
            if (archive < 0 || archive >= 256 || stLoadedArchives[archive] == null)
            {
                throw new ArchiveNotLoadedException(archive);
            }

            Archive arch = stLoadedArchives[archive];

            switch (property)
            {
            case ArchiveProperty.Author:
                return(arch.Author);

            case ArchiveProperty.AuthorEmail:
                return(arch.AuthorEmail);

            case ArchiveProperty.AuthorWebsite:
                return(arch.AuthorWebsite);

            case ArchiveProperty.Description:
                return(arch.Description);

            case ArchiveProperty.Name:
                return(arch.Name);

            case ArchiveProperty.Version:
                return(arch.Version);
            }

            return("");
        }
 public bool Equals(ArchiveProperty afi)
 {
     if (afi.Name == this.Name)
     {
         return(afi.Value == this.Value);
     }
     return(false);
 }
Ejemplo n.º 3
0
            public void Parse(Stream hs)
            {
                while (true)
                {
                    PropertyID propertyID = GetPropertyID(this, hs);
                    if (propertyID == PropertyID.kEnd)
                    {
                        return;
                    }

                    ArchiveProperty property = new ArchiveProperty(propertyID);
                    property.Parse(hs);
                    Properties.Add(property);
                }
            }
Ejemplo n.º 4
0
 /// <summary>
 /// Determines whether the specified ArchiveProperty is equal to the current ArchiveProperty.
 /// </summary>
 /// <param name="afi">The ArchiveProperty to compare with the current ArchiveProperty.</param>
 /// <returns>true if the specified ArchiveProperty is equal to the current ArchiveProperty; otherwise, false.</returns>
 public bool Equals(ArchiveProperty afi)
 {
     return(afi.Name == Name && afi.Value == Value);
 }