예제 #1
0
        internal static Encoding GetEncoding(TypeAttribute att)
        {
            Encoding encoding = null;

            if (!TryGetEncoding(att, out encoding))
            {
                throw new ArgumentException("Attributte '{0}' is not the 'TcEncoding' attribute!", att.Name);
            }
            return(encoding);
        }
예제 #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (base.GetType() != obj.GetType())
            {
                return(false);
            }
            TypeAttribute attribute = (TypeAttribute)obj;

            return(StringComparer.OrdinalIgnoreCase.Compare(this.Name, attribute.Name) == 0);
        }