/// <summary> /// Создает и возвращает новый экземпляр класса <c>Tag</c>. Creates a new <c>Tag</c> instance. /// </summary> /// <param name="tagId"> /// Кол тега. Tag id. /// </param> /// <param name="values">Значения тега. Values of tag.</param> /// <returns> /// Объект <c>Tag</c>. An <c>Tag</c> object. /// </returns> public static Tag <T> Create(TiffTags tagId, params T[] values) { return(new Tag <T> { TagId = tagId, Values = values }); }
public Tiff.IfdEntry this[TiffTags tag] { get { for (int i = 0; i < this.Count; i++) { if (this[i].Tag == tag) { return(this[i]); } } throw new KeyNotFoundException(); } }
internal static object ToClrType(TiffTags tag, object value) { foreach (var _type in typeof(TiffTags).Assembly.GetTypes()) { if (_type.IsEnum) { foreach (TiffTagAttribute _attr in _type.GetCustomAttributes(typeof(TiffTagAttribute), false)) { if (_attr.Tag == tag) { return(Enum.ToObject(_type, value)); } } } } return(value); }
public TiffTagAttribute(TiffTags tag) { this.Tag = tag; }