<PackageReference Include="System.Drawing.Common" Version="10.0.0-preview.1.25080.3" />

DataFormatNames

static class DataFormatNames
using System.Collections.Generic; using System.Runtime.CompilerServices; namespace System.Private.Windows.Ole { [NullableContext(1)] [Nullable(0)] internal static class DataFormatNames { internal const string Text = "Text"; internal const string UnicodeText = "UnicodeText"; internal const string Dib = "DeviceIndependentBitmap"; internal const string Bitmap = "Bitmap"; internal const string Emf = "EnhancedMetafile"; internal const string Wmf = "MetaFilePict"; internal const string SymbolicLink = "SymbolicLink"; internal const string Dif = "DataInterchangeFormat"; internal const string Tiff = "TaggedImageFileFormat"; internal const string OemText = "OEMText"; internal const string Palette = "Palette"; internal const string PenData = "PenData"; internal const string Riff = "RiffAudio"; internal const string WaveAudio = "WaveAudio"; internal const string FileDrop = "FileDrop"; internal const string Locale = "Locale"; internal const string Html = "HTML Format"; internal const string Rtf = "Rich Text Format"; internal const string Csv = "Csv"; internal const string String = "System.String"; internal const string Serializable = "WindowsForms10PersistentObject"; internal const string Xaml = "Xaml"; internal const string XamlPackage = "XamlPackage"; internal const string InkSerializedFormat = "Ink Serialized Format"; internal const string FileNameAnsi = "FileName"; internal const string FileNameUnicode = "FileNameW"; internal const string BinaryFormatBitmap = "System.Drawing.Bitmap"; internal static void AddMappedFormats<[Nullable(0)] T>(string format, T formats) where T : ICollection<string> { if (format != null) { switch (format.Length) { case 8: switch (format[4]) { case 'D': if (format == "FileDrop") { ((ICollection<string>)formats).Add("FileNameW"); ((ICollection<string>)formats).Add("FileName"); } break; case 'N': if (format == "FileName") { ((ICollection<string>)formats).Add("FileDrop"); ((ICollection<string>)formats).Add("FileNameW"); } break; } break; case 4: if (format == "Text") { ((ICollection<string>)formats).Add("System.String"); ((ICollection<string>)formats).Add("UnicodeText"); } break; case 11: if (format == "UnicodeText") { ((ICollection<string>)formats).Add("System.String"); ((ICollection<string>)formats).Add("Text"); } break; case 13: if (format == "System.String") { ((ICollection<string>)formats).Add("Text"); ((ICollection<string>)formats).Add("UnicodeText"); } break; case 9: if (format == "FileNameW") { ((ICollection<string>)formats).Add("FileDrop"); ((ICollection<string>)formats).Add("FileName"); } break; case 6: if (format == "Bitmap") ((ICollection<string>)formats).Add("System.Drawing.Bitmap"); break; case 21: if (format == "System.Drawing.Bitmap") ((ICollection<string>)formats).Add("Bitmap"); break; } } } } }