/// <summary>
        /// Adds a ThumbnailPart to the WordprocessingDocument.
        /// </summary>
        /// <param name="partType">The type of the ThumbnailPart.</param>
        /// <returns>The newly added ThumbnailPart.</returns>
        public ThumbnailPart AddThumbnailPart(ThumbnailPartType partType)
        {
            string contentType   = ThumbnailPartTypeInfo.GetContentType(partType);
            string partExtension = ThumbnailPartTypeInfo.GetTargetExtension(partType);

            PartExtensionProvider.MakeSurePartExtensionExist(contentType, partExtension);

            return(AddThumbnailPart(contentType));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the PartExtensionProvider class that contains elements copied from the specified PartExtensionProvider.
 /// </summary>
 /// <param name="partExtProvider">The source PartExtensionProvider whose elements are copied to the new PartExtensionProvider.</param>
 public PartExtensionProvider(PartExtensionProvider partExtProvider)
     : base(partExtProvider)
 {
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PartExtensionProvider"/> class that contains elements copied from <paramref name="partExtProvider"/>.
 /// </summary>
 /// <param name="partExtProvider">The source <see cref="PartExtensionProvider"/> whose elements are copied to the new <see cref="PartExtensionProvider"/>.</param>
 public PartExtensionProvider(PartExtensionProvider partExtProvider)
     : base(partExtProvider, StringComparer.Ordinal)
 {
 }