/// <summary>
        /// Initialize a new instance of ChildElementTypeAttribute.
        /// </summary>
        /// <param name="elementType">Specifies the type of the possible child element.</param>
        /// <param name="availableInOfficeVersion">Specifies the office version where the child element is first available.</param>
        public ChildElementInfoAttribute(Type elementType, FileFormatVersions availableInOfficeVersion)
        {
#pragma warning disable CS0618 // Type or member is obsolete
            ElementType        = elementType;
            AvailableInVersion = availableInOfficeVersion.AndLater();
#pragma warning restore CS0618 // Type or member is obsolete
        }
예제 #2
0
 public void AndLaterExceptions(FileFormatVersions version)
 {
     Assert.Throws <ArgumentOutOfRangeException>(nameof(version), () => version.AndLater());
 }
예제 #3
0
 /// <summary>
 /// Initialize a new instance of ChildElementTypeAttribute.
 /// </summary>
 /// <param name="elementType">Specifies the type of the possible child element.</param>
 /// <param name="availableInOfficeVersion">Specifies the office version where the child element is first available.</param>
 public ChildElementInfoAttribute(Type elementType, FileFormatVersions availableInOfficeVersion)
 {
     ElementType        = elementType;
     AvailableInVersion = availableInOfficeVersion.AndLater();
 }