diff --git a/BuildToolsVersion.txt b/BuildToolsVersion.txt index c62266d1d755..f8f308481e6f 100644 --- a/BuildToolsVersion.txt +++ b/BuildToolsVersion.txt @@ -1 +1 @@ -2.0.0-prerelease-02014-02 +2.0.0-prerelease-02020-01 diff --git a/dependencies.props b/dependencies.props index 6852b1d6207d..5d9fbb07db1f 100644 --- a/dependencies.props +++ b/dependencies.props @@ -9,29 +9,29 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - ab762a3c35e208cd698988fb7761bc92be417be9 - 03b82d8284524a8a14ecea71deb2601b0c21c2cb - 568fb017cade704dcf611a1c991e7b8e2e27972b + ed8cf4ba3c0e143c142542aaf53a8cdaa6cb0023 + 790f084a4cfcc9f4559edc92988809906ebb6b6b + 790f084a4cfcc9f4559edc92988809906ebb6b6b 96dc7805f5df4a70a55783964ce69dcd91bfca80 - 568fb017cade704dcf611a1c991e7b8e2e27972b - 568fb017cade704dcf611a1c991e7b8e2e27972b + f67e34b392960a4fcc1da7fdb7a8082ae031471d + f67e34b392960a4fcc1da7fdb7a8082ae031471d 8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd - 7ad3a5fba96f1ad3032fe742bee5069b5167beca - 2a83ae1685d323e6bd206dd2596b953488479922 + 41dcb6f6c972d9900b4bf8dc9b9352ceabdec66e + 8cd983ea0756ec0b094cce18c820b9d1b9d2b107 - 2.1.0-preview1-25712-02 - preview1-25712-02 - 2.1.0-preview1-25715-02 + 2.1.0-preview1-25718-03 + preview1-25718-03 + 2.1.0-preview1-25720-03 beta-25627-00 - beta-25715-00 - beta-25715-00 - 1.0.0-beta-25715-00 - 2.1.0-preview1-25714-01 + beta-25723-00 + beta-25723-00 + 1.0.0-beta-25723-00 + 2.1.0-preview1-25722-01 NETStandard.Library - 2.1.0-preview1-25714-02 + 2.1.0-preview1-25719-04 4.4.0 diff --git a/dir.props b/dir.props index aebbb9ba6849..5c90cfc83ce0 100644 --- a/dir.props +++ b/dir.props @@ -297,6 +297,6 @@ - - + + diff --git a/external/test-runtime/XUnit.Runtime.depproj b/external/test-runtime/XUnit.Runtime.depproj index ad997092240a..643c7f2e51d5 100644 --- a/external/test-runtime/XUnit.Runtime.depproj +++ b/external/test-runtime/XUnit.Runtime.depproj @@ -76,7 +76,7 @@ 1.0.0-prerelease - 1.0.3 + 1.0.6 diff --git a/external/test-runtime/optional.json b/external/test-runtime/optional.json index 25a480967be9..eb307ecf8f71 100644 --- a/external/test-runtime/optional.json +++ b/external/test-runtime/optional.json @@ -3,9 +3,9 @@ "net45": { "dependencies": { "Microsoft.DotNet.IBCMerge": "4.6.0-alpha-00001", - "TestILC.amd64ret": "1.0.0-beta-25715-00", - "TestILC.armret": "1.0.0-beta-25715-00", - "TestILC.x86ret": "1.0.0-beta-25715-00" + "TestILC.amd64ret": "1.0.0-beta-25723-00", + "TestILC.armret": "1.0.0-beta-25723-00", + "TestILC.x86ret": "1.0.0-beta-25723-00" } } } diff --git a/pkg/Microsoft.NETFramework.Compatibility/Microsoft.NETFramework.Compatibility.pkgproj b/pkg/Microsoft.NETFramework.Compatibility/Microsoft.NETFramework.Compatibility.pkgproj index f7d45d979ffa..c2e8ce256ab8 100644 --- a/pkg/Microsoft.NETFramework.Compatibility/Microsoft.NETFramework.Compatibility.pkgproj +++ b/pkg/Microsoft.NETFramework.Compatibility/Microsoft.NETFramework.Compatibility.pkgproj @@ -44,6 +44,7 @@ + diff --git a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json index 7c6c3a1eca26..eb994241cb86 100644 --- a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json +++ b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json @@ -1577,6 +1577,12 @@ "4.2.0.0": "4.5.0" } }, + "System.Data.Odbc": { + "InboxOn": {}, + "AssemblyVersionInPackageVersion": { + "4.0.0.0": "4.5.0" + } + }, "System.Drawing.Common": { "InboxOn": {}, "AssemblyVersionInPackageVersion": { @@ -5439,4 +5445,4 @@ "System.Xml.XDocument" ] } -} \ No newline at end of file +} diff --git a/pkg/descriptions.json b/pkg/descriptions.json index 4c905c08006a..725deb8faf32 100644 --- a/pkg/descriptions.json +++ b/pkg/descriptions.json @@ -454,6 +454,19 @@ "System.Data.TypedTableBaseExtensions" ] }, + { + "Name": "System.Data.Odbc", + "Description": "Provides a collection of classes used to access an ODBC data source in the managed space", + "CommonTypes": [ + "System.Data.Odbc.OdbcCommand", + "System.Data.Odbc.OdbcConnection", + "System.Data.Odbc.OdbcDataReader", + "System.Data.Odbc.OdbcDataAdapter", + "System.Data.Odbc.OdbcParameter", + "System.Data.Odbc.OdbcParameterCollection", + "System.Data.Odbc.OdbcTransaction" + ] + }, { "Name": "System.Data.SqlClient", "Description": "Provides the data provider for SQL Server. These classes provide access to versions of SQL Server and encapsulate database-specific protocols, including tabular data stream (TDS)", diff --git a/src/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs b/src/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs index d9d713d4c428..2b87afa3c764 100644 --- a/src/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs +++ b/src/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs @@ -14,13 +14,15 @@ internal static partial class Interop internal static partial class procfs { internal const string RootPath = "/proc/"; - internal const string SelfExeFilePath = RootPath + "self/exe"; - internal const string ProcUptimeFilePath = RootPath + "uptime"; + private const string ExeFileName = "/exe"; private const string StatFileName = "/stat"; private const string MapsFileName = "/maps"; private const string FileDescriptorDirectoryName = "/fd/"; private const string TaskDirectoryName = "/task/"; + internal const string SelfExeFilePath = RootPath + "self" + ExeFileName; + internal const string ProcUptimeFilePath = RootPath + "uptime"; + internal struct ParsedStat { // Commented out fields are available in the stat data file but @@ -80,6 +82,11 @@ internal struct ParsedMapsModule internal KeyValuePair AddressRange; } + internal static string GetExeFilePathForProcess(int pid) + { + return RootPath + pid.ToString(CultureInfo.InvariantCulture) + ExeFileName; + } + internal static string GetStatFilePathForProcess(int pid) { return RootPath + pid.ToString(CultureInfo.InvariantCulture) + StatFileName; diff --git a/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs b/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs index a2f601eb437f..b8a610af19cb 100644 --- a/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs +++ b/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs @@ -21,53 +21,101 @@ internal static partial class Sys /// internal enum UnixFileSystemTypes : long { - adfs = 0xadf5, + adfs = 0xADF5, affs = 0xADFF, + afs = 0x5346414F, + anoninode = 0x09041934, + aufs = 0x61756673, + autofs = 0x0187, befs = 0x42465331, + bdevfs = 0x62646576, bfs = 0x1BADFACE, + binfmt_misc = 0x42494E4D, + btrfs = 0x9123683E, + ceph = 0x00C36400, + cgroupfs = 0x0027E0EB, cifs = 0xFF534D42, coda = 0x73757245, coherent = 0x012FF7B7, - cramfs = 0x28cd3d45, + cramfs = 0x28CD3D45, + debugfs = 0x64626720, devfs = 0x1373, + devpts = 0x1CD1, + ecryptfs = 0xF15F, efs = 0x00414A53, ext = 0x137D, ext2_old = 0xEF51, ext2 = 0xEF53, ext3 = 0xEF53, ext4 = 0xEF53, + fat = 0x4006, + fhgfs = 0x19830326, + fuseblk = 0x65735546, + fusectl = 0x65735543, + futexfs = 0x0BAD1DEA, + gfsgfs2 = 0x1161970, + gpfs = 0x47504653, hfs = 0x4244, hpfs = 0xF995E849, - hugetlbfs = 0x958458f6, + hugetlbfs = 0x958458F6, + inodefs = 0x11307854, + inotifyfs = 0x2BAD1DEA, isofs = 0x9660, - jffs2 = 0x72b6, - jfs = 0x3153464a, + // isofs = 0x4004, // R_WIN + // isofs = 0x4000, // WIN + jffs = 0x07C0, + jffs2 = 0x72B6, + jfs = 0x3153464A, + kafs = 0x6B414653, + lustre = 0x0BD00BD0, minix_old = 0x137F, /* orig. minix */ minix = 0x138F, /* 30 char minix */ minix2 = 0x2468, /* minix V2 */ - minix2v2 = 0x2478, /* minix V2, 30 char names */ - msdos = 0x4d44, - ncpfs = 0x564c, + minix2v2 = 0x2478, /* MINIX V2, 30 char names */ + minix3 = 0x4D5A, + mqueue = 0x19800202, + msdos = 0x4D44, nfs = 0x6969, - ntfs = 0x5346544e, - openprom = 0x9fa1, - overlay = 0x794c7630, - overlayfs = 0x794c764f, - proc = 0x9fa0, - qnx4 = 0x002f, + nfsd = 0x6E667364, + nilfs = 0x3434, + novell = 0x564C, + ntfs = 0x5346544E, + openprom = 0x9FA1, + ocfs2 = 0x7461636F, + overlay = 0x794C7630, + overlayfs = 0x794C764F, + panfs = 0xAAD7AAEA, + pipefs = 0x50495045, + proc = 0x9FA0, + pstorefs = 0x6165676C, + qnx4 = 0x002F, + qnx6 = 0x68191122, + ramfs = 0x858458F6, reiserfs = 0x52654973, romfs = 0x7275, + rpc_pipefs = 0x67596969, + securityfs = 0x73636673, + selinux = 0xF97CFF8C, smb = 0x517B, + sockfs = 0x534F434B, + squashfs = 0x73717368, + sysfs = 0x62656572, sysv2 = 0x012FF7B6, sysv4 = 0x012FF7B5, tmpfs = 0x01021994, udf = 0x15013346, ufs = 0x00011954, - usbdevice = 0x9fa2, - vxfs = 0xa501FCF5, + // ufs = 0x54190100, // byteswapped + usbdevice = 0x9FA2, + v9fs = 0x01021997, + vmhgfs = 0xBACBACBC, + vxfs = 0xA501FCF5, + vzfs = 0x565A4653, + xenfs = 0xABBA1974, xenix = 0x012FF7B4, xfs = 0x58465342, - xiafs = 0x012FD16D, + xia = 0x012FD16D, + zfs = 0x2FC12FC1, } [StructLayout(LayoutKind.Sequential)] @@ -130,7 +178,7 @@ private static int GetFormatInfoForMountPoint(string name, out string format, ou /// The recognized drive type. private static DriveType GetDriveType(string fileSystemName) { - // This list is based primarily on "man fs", "man mount", "mntent.h", "/proc/filesystems", + // This list is based primarily on "man fs", "man mount", "mntent.h", "/proc/filesystems", coreutils "stat.c", // and "wiki.debian.org/FileSystem". It can be extended over time as we // find additional file systems that should be recognized as a particular drive type. switch (fileSystemName) @@ -143,91 +191,154 @@ private static DriveType GetDriveType(string fileSystemName) case "umview-mod-umfuseiso9660": return DriveType.CDRom; + case "aafs": case "adfs": case "affs": + case "anoninode": + case "anon-inode FS": case "apfs": + case "autofs": + case "balloon-kvm-fs": + case "bdevfs": case "befs": case "bfs": + case "bpf_fs": case "btrfs": + case "btrfs_test": + case "cgroup2fs": + case "cgroupfs": + case "coh": + case "cramfs": + case "cramfs-wend": + case "daxfs": case "drvfs": case "ecryptfs": + case "efivarfs": case "efs": + case "exofs": case "ext": case "ext2": case "ext2_old": case "ext3": + case "ext2/ext3": case "ext4": case "ext4dev": + case "f2fs": case "fat": - case "fuseblk": case "fuseext2": case "fusefat": + case "futexfs": case "hfs": + case "hfs+": case "hfsplus": + case "hfsx": + case "hostfs": case "hpfs": + case "inodefs": + case "inotifyfs": case "jbd": case "jbd2": - case "jfs": case "jffs": case "jffs2": + case "jfs": + case "logfs": case "lxfs": + case "minix (30 char.)": + case "minix v2 (30 char.)": + case "minix v2": case "minix": case "minix_old": case "minix2": case "minix2v2": + case "minix3": + case "mlfs": case "msdos": + case "nilfs": + case "nsfs": + case "ntfs": case "ocfs2": case "omfs": case "openprom": case "overlay": case "overlayfs": - case "ntfs": + case "pstorefs": case "qnx4": + case "qnx6": case "reiserfs": + case "rpc_pipefs": + case "selinux": + case "smackfs": case "squashfs": case "swap": + case "sysfs": case "sysv": + case "sysv2": + case "sysv4": + case "tracefs": case "ubifs": case "udf": case "ufs": case "umsdos": case "umview-mod-umfuseext2": + case "usbdevfs": + case "v9fs": + case "vzfs": + case "wslfs": + case "xenfs": case "xenix": case "xfs": + case "xia": case "xiafs": case "xmount": + case "zfs": case "zfs-fuse": + case "zsmallocfs": return DriveType.Fixed; case "9p": - case "autofs": + case "acfs": + case "afs": + case "aufs": case "autofs4": case "beaglefs": + case "ceph": case "cifs": case "coda": case "coherent": case "curlftpfs": case "davfs2": case "dlm": + case "fhgfs": case "flickrfs": + case "fuseblk": case "fusedav": case "fusesmb": + case "gfsgfs2": + case "gfs/gfs2": case "gfs2": case "glusterfs-client": case "gmailfs": + case "gpfs": + case "ibrix": + case "k-afs": case "kafs": case "ltspfs": + case "lustre": case "ncpfs": case "nfs": case "nfs4": + case "nfsd": + case "novell": case "obexfs": + case "panfs": + case "prl_fs": case "s3ql": case "smb": + case "smb2": case "smbfs": + case "snfs": case "sshfs": - case "sysfs": - case "sysv2": - case "sysv4": + case "vmhgfs": case "vxfs": case "wikipediafs": return DriveType.Network; @@ -239,7 +350,6 @@ private static DriveType GetDriveType(string fileSystemName) case "binfmt_misc": case "cgroup": case "configfs": - case "cramfs": case "cryptkeeper": case "cpuset": case "debugfs": diff --git a/src/Common/src/Interop/Windows/kernel32/Interop.FlushViewOfFile.cs b/src/Common/src/Interop/Windows/kernel32/Interop.FlushViewOfFile.cs index c6ba2496bec7..053d7e824f4a 100644 --- a/src/Common/src/Interop/Windows/kernel32/Interop.FlushViewOfFile.cs +++ b/src/Common/src/Interop/Windows/kernel32/Interop.FlushViewOfFile.cs @@ -9,7 +9,7 @@ internal partial class Interop { internal partial class Kernel32 { - [DllImport(Libraries.Kernel32)] - internal extern static int FlushViewOfFile(IntPtr lpBaseAddress, UIntPtr dwNumberOfBytesToFlush); + [DllImport(Libraries.Kernel32, SetLastError = true)] + internal extern static bool FlushViewOfFile(IntPtr lpBaseAddress, UIntPtr dwNumberOfBytesToFlush); } } diff --git a/src/Common/src/Interop/Windows/kernel32/Interop.UnmapViewOfFile.cs b/src/Common/src/Interop/Windows/kernel32/Interop.UnmapViewOfFile.cs index 8895ac80e6a7..2a1879fa30a9 100644 --- a/src/Common/src/Interop/Windows/kernel32/Interop.UnmapViewOfFile.cs +++ b/src/Common/src/Interop/Windows/kernel32/Interop.UnmapViewOfFile.cs @@ -9,7 +9,7 @@ internal partial class Interop { internal partial class Kernel32 { - [DllImport(Libraries.Kernel32)] - internal extern static int UnmapViewOfFile(IntPtr lpBaseAddress); + [DllImport(Libraries.Kernel32, SetLastError = true)] + internal extern static bool UnmapViewOfFile(IntPtr lpBaseAddress); } } diff --git a/src/Common/src/System/Net/Http/WinHttpException.cs b/src/Common/src/System/Net/Http/WinHttpException.cs index 1a4bcf8f5272..d77e3471351f 100644 --- a/src/Common/src/System/Net/Http/WinHttpException.cs +++ b/src/Common/src/System/Net/Http/WinHttpException.cs @@ -15,6 +15,11 @@ public WinHttpException(int error, string message) : base(error, message) this.HResult = ConvertErrorCodeToHR(error); } + public WinHttpException(int error, string message, Exception innerException) : base(message, innerException) + { + this.HResult = ConvertErrorCodeToHR(error); + } + public static int ConvertErrorCodeToHR(int error) { // This method allows common error detection code to be used by consumers @@ -52,6 +57,13 @@ public static WinHttpException CreateExceptionUsingError(int error) return e; } + public static WinHttpException CreateExceptionUsingError(int error, Exception innerException) + { + var e = new WinHttpException(error, GetErrorMessage(error), innerException); + ExceptionStackTrace.AddCurrentStack(e); + return e; + } + public static string GetErrorMessage(int error) { // Look up specific error message in WINHTTP.DLL since it is not listed in default system resources diff --git a/src/Common/tests/System/Buffers/NativeOwnedMemory.cs b/src/Common/tests/System/Buffers/NativeOwnedMemory.cs index 3058add17c19..31d90b35bfe4 100644 --- a/src/Common/tests/System/Buffers/NativeOwnedMemory.cs +++ b/src/Common/tests/System/Buffers/NativeOwnedMemory.cs @@ -51,7 +51,7 @@ protected override bool IsRetained } } - public override unsafe Span AsSpan() => new Span((void*)_ptr, _length); + public override unsafe Span Span => new Span((void*)_ptr, _length); public override unsafe MemoryHandle Pin() => new MemoryHandle(this, (void*)_ptr); diff --git a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs index 97be5d7274c5..9f9f65465c80 100644 --- a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs +++ b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs @@ -77,6 +77,9 @@ public static partial class PlatformDetection public static Version ICUVersion { get { return null; } } public static bool IsUbuntu { get { throw null; } } public static bool IsUbuntu1404 { get { throw null; } } + public static bool IsUbuntu1604 { get { throw null; } } + public static bool IsUbuntu1704 { get { throw null; } } + public static bool IsUbuntu1710 { get { throw null; } } public static bool IsWindows { get { throw null; } } public static bool IsWindows10InsiderPreviewBuild16215OrGreater { get { throw null; } } public static bool IsWindows10Version1607OrGreater { get { throw null; } } @@ -131,6 +134,7 @@ protected RemoteExecutorTestBase() { } public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvoke(System.Func method, string arg1, string arg2, string arg3, string arg4, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; } public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvoke(System.Func method, string arg1, string arg2, string arg3, string arg4, string arg5, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; } public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvoke(System.Func> method, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; } + public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvoke(System.Func> method, string arg, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; } public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvokeRaw(System.Delegate method, string unparsedArg, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; } public sealed partial class RemoteInvokeHandle : System.IDisposable { diff --git a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs index 78ceb4a99712..9ff440256c1c 100644 --- a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs +++ b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs @@ -42,6 +42,17 @@ public static RemoteInvokeHandle RemoteInvoke( return RemoteInvoke(GetMethodInfo(method), Array.Empty(), options); } + /// Invokes the method from this assembly in another process using the specified arguments. + /// The method to invoke. + /// Options to use for the invocation. + public static RemoteInvokeHandle RemoteInvoke( + Func> method, + string arg, + RemoteInvokeOptions options = null) + { + return RemoteInvoke(GetMethodInfo(method), new[] { arg }, options); + } + /// Invokes the method from this assembly in another process using the specified arguments. /// The method to invoke. /// The first argument to pass to the method. diff --git a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Unix.cs b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Unix.cs index b606cb5ee982..abb86f939948 100644 --- a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Unix.cs +++ b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Unix.cs @@ -33,6 +33,9 @@ public static partial class PlatformDetection public static bool IsDebian => IsDistroAndVersion("debian"); public static bool IsDebian8 => IsDistroAndVersion("debian", "8"); public static bool IsUbuntu1404 => IsDistroAndVersion("ubuntu", "14.04"); + public static bool IsUbuntu1604 => IsDistroAndVersion("ubuntu", "16.04"); + public static bool IsUbuntu1704 => IsDistroAndVersion("ubuntu", "17.04"); + public static bool IsUbuntu1710 => IsDistroAndVersion("ubuntu", "17.10"); public static bool IsCentos7 => IsDistroAndVersion("centos", "7"); public static bool IsTizen => IsDistroAndVersion("tizen"); public static bool IsNotFedoraOrRedHatOrCentos => !IsDistroAndVersion("fedora") && !IsDistroAndVersion("rhel") && !IsDistroAndVersion("centos"); diff --git a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Windows.cs b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Windows.cs index 9d93f3c45e5a..ce31c9965a0a 100644 --- a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Windows.cs +++ b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Windows.cs @@ -21,6 +21,9 @@ public static partial class PlatformDetection public static bool IsDebian => false; public static bool IsDebian8 => false; public static bool IsUbuntu1404 => false; + public static bool IsUbuntu1604 => false; + public static bool IsUbuntu1704 => false; + public static bool IsUbuntu1710 => false; public static bool IsCentos7 => false; public static bool IsTizen => false; public static bool IsNotFedoraOrRedHatOrCentos => true; diff --git a/src/Microsoft.XmlSerializer.Generator/pkg/GenerateNupkgProps.targets b/src/Microsoft.XmlSerializer.Generator/pkg/GenerateNupkgProps.targets index 54dfbfe6508d..ce4649910de2 100644 --- a/src/Microsoft.XmlSerializer.Generator/pkg/GenerateNupkgProps.targets +++ b/src/Microsoft.XmlSerializer.Generator/pkg/GenerateNupkgProps.targets @@ -20,9 +20,6 @@ <ItemGroup> <DotNetCliToolReference Include="$(Id)" Version="$(PackageVersion)" /> </ItemGroup> - <ItemGroup> - <None Condition="Exists('%24(OutputPath)\%24(AssemblyName).XmlSerializers.dll')=='true'" Include="%24(OutputPath)\%24(AssemblyName).XmlSerializers.dll" Pack="true" PackagePath="lib\netstandard2.0" /> - </ItemGroup> </Project> diff --git a/src/Microsoft.XmlSerializer.Generator/pkg/build/Microsoft.XmlSerializer.Generator.targets b/src/Microsoft.XmlSerializer.Generator/pkg/build/Microsoft.XmlSerializer.Generator.targets index fe8bf38787f0..8ebc0d32c436 100644 --- a/src/Microsoft.XmlSerializer.Generator/pkg/build/Microsoft.XmlSerializer.Generator.targets +++ b/src/Microsoft.XmlSerializer.Generator/pkg/build/Microsoft.XmlSerializer.Generator.targets @@ -11,7 +11,7 @@ - + @@ -21,4 +21,7 @@ + + + \ No newline at end of file diff --git a/src/Microsoft.XmlSerializer.Generator/src/Sgen.cs b/src/Microsoft.XmlSerializer.Generator/src/Sgen.cs index 28cc23e81e4d..ae28c4bc974f 100644 --- a/src/Microsoft.XmlSerializer.Generator/src/Sgen.cs +++ b/src/Microsoft.XmlSerializer.Generator/src/Sgen.cs @@ -28,6 +28,7 @@ private int Run(string[] args) var errs = new ArrayList(); bool force = false; bool proxyOnly = false; + bool disableRun = true; try { @@ -85,6 +86,10 @@ private int Run(string[] args) assembly = value; } + else if (ArgumentMatch(arg, "quiet")) + { + disableRun = false; + } else { if (arg.EndsWith(".dll") || arg.EndsWith(".exe")) @@ -122,6 +127,14 @@ private int Run(string[] args) return 0; } + if(disableRun) + { + Console.WriteLine("This tool is not intended to be used directly."); + Console.WriteLine("The feature is still under development."); + Console.WriteLine("Please refer to https://go.microsoft.com/fwlink/?linkid=858539 for more detail."); + return 0; + } + GenerateFile(types, assembly, proxyOnly, force, codePath); } catch (Exception e) diff --git a/src/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj b/src/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj index 52084587be8f..83e46880c330 100644 --- a/src/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj +++ b/src/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj @@ -54,7 +54,7 @@ $(AssemblyName).XmlSerializers - + Padded head and tail indices, to avoid false sharing between producers and consumers. [DebuggerDisplay("Head = {Head}, Tail = {Tail}")] - [StructLayout(LayoutKind.Explicit, Size = 192)] // padding before/between/after fields based on typical cache line size of 64 + [StructLayout(LayoutKind.Explicit, Size = 384)] // padding before/between/after fields based on worst case cache line size of 128 internal struct PaddedHeadAndTail { - [FieldOffset(64)] public int Head; - [FieldOffset(128)] public int Tail; + [FieldOffset(128)] public int Head; + [FieldOffset(256)] public int Tail; } } diff --git a/src/System.Collections.Immutable/src/PEVerifyCompat.rsp b/src/System.Collections.Immutable/src/PEVerifyCompat.rsp new file mode 100644 index 000000000000..0a7805fa7ae9 --- /dev/null +++ b/src/System.Collections.Immutable/src/PEVerifyCompat.rsp @@ -0,0 +1 @@ +/features:peverify-compat \ No newline at end of file diff --git a/src/System.Collections.Immutable/src/System.Collections.Immutable.csproj b/src/System.Collections.Immutable/src/System.Collections.Immutable.csproj index 457c68c3a80a..e33534057228 100644 --- a/src/System.Collections.Immutable/src/System.Collections.Immutable.csproj +++ b/src/System.Collections.Immutable/src/System.Collections.Immutable.csproj @@ -9,6 +9,7 @@ 512 $(OutputPath)$(MSBuildProjectName).xml False + $(MSBuildThisFileDirectory)PEVerifyCompat.rsp;$(CompilerResponseFile) netstandard1.0;portable-net45+win8+wp8+wpa81 diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableInterlocked.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableInterlocked.cs index 5e92ae53303e..dfa77cce24dc 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableInterlocked.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableInterlocked.cs @@ -423,7 +423,7 @@ public static bool TryRemove(ref ImmutableDictionary #region ImmutableStack members /// - /// Pushes a new element onto a stack. + /// Pops the top element off a stack and returns it to the caller, if the stack is not empty. /// /// The type of elements stored in the stack. /// The variable or field to atomically update. diff --git a/src/System.Collections/src/System/Collections/Generic/HashSet.cs b/src/System.Collections/src/System/Collections/Generic/HashSet.cs index 1228e55072d4..ece16c972efd 100644 --- a/src/System.Collections/src/System/Collections/Generic/HashSet.cs +++ b/src/System.Collections/src/System/Collections/Generic/HashSet.cs @@ -1148,7 +1148,7 @@ private void IncreaseCapacity() } // Able to increase capacity; copy elements to larger array and rehash - SetCapacity(newSize, false); + SetCapacity(newSize); } /// @@ -1156,7 +1156,7 @@ private void IncreaseCapacity() /// *must* be a prime. It is very likely that you want to call IncreaseCapacity() /// instead of this method. /// - private void SetCapacity(int newSize, bool forceNewHashCodes) + private void SetCapacity(int newSize) { Debug.Assert(_buckets != null, "SetCapacity called on a set with no elements"); @@ -1166,21 +1166,6 @@ private void SetCapacity(int newSize, bool forceNewHashCodes) Array.Copy(_slots, 0, newSlots, 0, _lastIndex); } -#if FEATURE_RANDOMIZED_STRING_HASHING - if (forceNewHashCodes) - { - for (int i = 0; i < _lastIndex; i++) - { - if (newSlots[i].hashCode != -1) - { - newSlots[i].hashCode = InternalGetHashCode(newSlots[i].value); - } - } - } -#else - Debug.Assert(!forceNewHashCodes); -#endif - int[] newBuckets = new int[newSize]; for (int i = 0; i < _lastIndex; i++) { @@ -1207,18 +1192,13 @@ private bool AddIfNotPresent(T value) int hashCode = InternalGetHashCode(value); int bucket = hashCode % _buckets.Length; -#if FEATURE_RANDOMIZED_STRING_HASHING - int collisionCount = 0; -#endif + for (int i = _buckets[bucket] - 1; i >= 0; i = _slots[i].next) { if (_slots[i].hashCode == hashCode && _comparer.Equals(_slots[i].value, value)) { return false; } -#if FEATURE_RANDOMIZED_STRING_HASHING - collisionCount++; -#endif } int index; @@ -1245,14 +1225,6 @@ private bool AddIfNotPresent(T value) _count++; _version++; -#if FEATURE_RANDOMIZED_STRING_HASHING - if (collisionCount > HashHelpers.HashCollisionThreshold && HashHelpers.IsWellKnownEqualityComparer(_comparer)) - { - _comparer = (IEqualityComparer)HashHelpers.GetRandomizedEqualityComparer(_comparer); - SetCapacity(_buckets.Length, true); - } -#endif // FEATURE_RANDOMIZED_STRING_HASHING - return true; } diff --git a/src/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/MaxLengthAttribute.cs b/src/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/MaxLengthAttribute.cs index 012b6ea01c97..06f4ba0ccb00 100644 --- a/src/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/MaxLengthAttribute.cs +++ b/src/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/MaxLengthAttribute.cs @@ -122,12 +122,24 @@ public static bool TryGetCount(object value, out int count) return true; } - PropertyInfo property = value.GetType().GetRuntimeProperty("Count"); + PropertyInfo property = null; + try + { + // On CoreRT, this property may not be enabled for reflection. + // It may be possible to eliminate the exception by using direct reflection + // (i.e. not via the RuntimeReflectionExtensions or the new split TypeInfo format. + property = value.GetType().GetRuntimeProperty("Count"); + } + catch (TypeAccessException) + { + } + if (property != null && property.CanRead && property.PropertyType == typeof(int)) { count = (int)property.GetValue(value); return true; } + count = -1; return false; } diff --git a/src/System.Data.Odbc/dir.props b/src/System.Data.Odbc/dir.props index af5b29338515..4356decc45ef 100644 --- a/src/System.Data.Odbc/dir.props +++ b/src/System.Data.Odbc/dir.props @@ -2,7 +2,7 @@ - 4.0.1.0 + 4.0.0.0 Open \ No newline at end of file diff --git a/src/System.Data.Odbc/pkg/System.Data.Odbc.pkgproj b/src/System.Data.Odbc/pkg/System.Data.Odbc.pkgproj new file mode 100644 index 000000000000..c0232ef4ea44 --- /dev/null +++ b/src/System.Data.Odbc/pkg/System.Data.Odbc.pkgproj @@ -0,0 +1,11 @@ + + + + + + net461;netcoreapp2.0;$(AllXamarinFrameworks) + + + + + diff --git a/src/System.Data.Odbc/src/Configurations.props b/src/System.Data.Odbc/src/Configurations.props index 34857a0ae48e..8c227f14fcd1 100644 --- a/src/System.Data.Odbc/src/Configurations.props +++ b/src/System.Data.Odbc/src/Configurations.props @@ -3,6 +3,7 @@ netfx-Windows_NT; + netstandard; netstandard-Linux; netstandard-OSX; netstandard-Windows_NT; diff --git a/src/System.Data.Odbc/src/Resources/Strings.resx b/src/System.Data.Odbc/src/Resources/Strings.resx index a0981e69ba2f..7c1d6f4331dd 100644 --- a/src/System.Data.Odbc/src/Resources/Strings.resx +++ b/src/System.Data.Odbc/src/Resources/Strings.resx @@ -429,4 +429,7 @@ An internal connection does not have an owner. + + System.Data.ODBC is not supported on this platform. + \ No newline at end of file diff --git a/src/System.Data.Odbc/src/System.Data.Odbc.csproj b/src/System.Data.Odbc/src/System.Data.Odbc.csproj index 43dbb34d2a82..e24e87e76ce8 100644 --- a/src/System.Data.Odbc/src/System.Data.Odbc.csproj +++ b/src/System.Data.Odbc/src/System.Data.Odbc.csproj @@ -6,6 +6,7 @@ System.Data.Odbc true true + SR.Odbc_PlatformNotSupported @@ -15,7 +16,7 @@ - + Common\System\Data\Common\AdapterUtil.cs diff --git a/src/System.Data.SqlClient/src/System/Data/SqlClient/SqlInternalConnectionTds.cs b/src/System.Data.SqlClient/src/System/Data/SqlClient/SqlInternalConnectionTds.cs index 0bc0df2c97ac..f5c03bb81cf8 100644 --- a/src/System.Data.SqlClient/src/System/Data/SqlClient/SqlInternalConnectionTds.cs +++ b/src/System.Data.SqlClient/src/System/Data/SqlClient/SqlInternalConnectionTds.cs @@ -1416,7 +1416,7 @@ TimeoutTimer timeout // Determine unit interval if (timeout.IsInfinite) { - timeoutUnitInterval = checked((long)ADP.FailoverTimeoutStep * ADP.TimerFromSeconds(ADP.DefaultConnectionTimeout)); + timeoutUnitInterval = checked((long)(ADP.FailoverTimeoutStep * ADP.TimerFromSeconds(ADP.DefaultConnectionTimeout))); } else { diff --git a/src/System.Data.SqlClient/tests/ManualTests/SQL/MirroringTest/ConnectionOnMirroringTest.cs b/src/System.Data.SqlClient/tests/ManualTests/SQL/MirroringTest/ConnectionOnMirroringTest.cs new file mode 100644 index 000000000000..ac72f03d1c0d --- /dev/null +++ b/src/System.Data.SqlClient/tests/ManualTests/SQL/MirroringTest/ConnectionOnMirroringTest.cs @@ -0,0 +1,97 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Diagnostics; +using System.Threading; + +namespace System.Data.SqlClient.ManualTesting.Tests +{ + public static class ConnectionOnMirroringTest + { + private static ManualResetEvent workerCompletedEvent = new ManualResetEvent(false); + + [CheckConnStrSetupFact] + public static void TestMultipleConnectionToMirroredServer() + { + string mirroringStateDesc; + string failoverPartnerName; + bool isMirroring = GetMirroringInfo(DataTestUtility.TcpConnStr, out mirroringStateDesc, out failoverPartnerName); + bool isSynchronized = "SYNCHRONIZED".Equals(mirroringStateDesc, StringComparison.InvariantCultureIgnoreCase); + if (isMirroring && isSynchronized && !string.IsNullOrEmpty(failoverPartnerName)) + { + SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(DataTestUtility.TcpConnStr); + builder.ConnectTimeout = 0; + + TestWorker worker = new TestWorker(builder.ConnectionString); + Thread childThread = new Thread(() => worker.TestMultipleConnection()); + childThread.Start(); + + if (workerCompletedEvent.WaitOne(10000)) + { + childThread.Join(); + } + else + { + // currently Thread.Abort() throws PlatformNotSupportedException in CoreFx. + childThread.Interrupt(); + throw new Exception("SqlConnection could not open and close successfully in timely manner. Possibly connection hangs."); + } + } + } + + private static bool GetMirroringInfo(string connectionString, out string mirroringStateDesc, out string failoverPartnerName) + { + mirroringStateDesc = null; + failoverPartnerName = null; + + SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(connectionString); + string dbname = builder.InitialCatalog; + + builder.ConnectTimeout = 5; + connectionString = builder.ConnectionString; + + DataTable dt = DataTestUtility.RunQuery(connectionString, $"select mirroring_state_desc from sys.database_mirroring where database_id = DB_ID('{dbname}')"); + mirroringStateDesc = dt.Rows[0][0].ToString(); + + bool isMirroring = !string.IsNullOrEmpty(mirroringStateDesc); + if (isMirroring) + { + dt = DataTestUtility.RunQuery(connectionString, $"select mirroring_partner_name from sys.database_mirroring where database_id = DB_ID('{dbname}')"); + failoverPartnerName = dt.Rows[0][0].ToString(); + } + + return isMirroring; + } + + private class TestWorker + { + private string _connectionString; + + public TestWorker(string connectionString) + { + _connectionString = connectionString; + } + + public void TestMultipleConnection() + { + List list = new List(); + + for (int i = 0; i < 10; ++i) + { + SqlConnection conn = new SqlConnection(_connectionString); + list.Add(conn); + conn.Open(); + } + + foreach (SqlConnection conn in list) + { + conn.Dispose(); + } + + workerCompletedEvent.Set(); + } + } + } +} diff --git a/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj b/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj index 3805a80820b9..7a0e5419151a 100644 --- a/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj +++ b/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj @@ -56,6 +56,7 @@ + diff --git a/src/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs b/src/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs index d46cda85f4d2..898cf347ec1f 100644 --- a/src/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs +++ b/src/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs @@ -186,9 +186,14 @@ private void SetWorkingSetLimitsCore(IntPtr? newMin, IntPtr? newMax, out IntPtr // ---- PAL layer ends here ---- // ----------------------------- - /// Gets the path to the current executable, or null if it could not be retrieved. - private static string GetExePath() + /// Gets the path to the executable for the process, or null if it could not be retrieved. + /// The pid for the target process, or -1 for the current process. + internal static string GetExePath(int processId = -1) { + string exeFilePath = processId == -1 ? + Interop.procfs.SelfExeFilePath : + Interop.procfs.GetExeFilePathForProcess(processId); + // Determine the maximum size of a path int maxPath = Interop.Sys.MaxPath; @@ -197,7 +202,7 @@ private static string GetExePath() { // Read from procfs the symbolic link to this process' executable byte[] buffer = new byte[pathLen + 1]; // +1 for null termination - int resultLength = Interop.Sys.ReadLink(Interop.procfs.SelfExeFilePath, buffer, pathLen); + int resultLength = Interop.Sys.ReadLink(exeFilePath, buffer, pathLen); // If we got one, null terminate it (readlink doesn't do this) and return the string if (resultLength > 0) diff --git a/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs b/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs index a64f50d89aa0..61e1d1f2e531 100644 --- a/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs +++ b/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs @@ -80,6 +80,22 @@ internal static ProcessModuleCollection GetModules(int processId) } } + // Move the main executable module to be the first in the list if it's not already + string exePath = Process.GetExePath(processId); + for (int i = 0; i < modules.Count; i++) + { + ProcessModule module = modules[i]; + if (module.FileName == exePath) + { + if (i > 0) + { + modules.RemoveAt(i); + modules.Insert(0, module); + } + break; + } + } + // Return the set of modules found return modules; } diff --git a/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessModuleCollection.cs b/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessModuleCollection.cs index e370668b7cf1..6b701ec5c974 100644 --- a/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessModuleCollection.cs +++ b/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessModuleCollection.cs @@ -27,6 +27,10 @@ internal ProcessModuleCollection(int capacity) internal void Add(ProcessModule module) => InnerList.Add(module); + internal void Insert(int index, ProcessModule module) => InnerList.Insert(index, module); + + internal void RemoveAt(int index) => InnerList.RemoveAt(index); + public ProcessModule this[int index] => (ProcessModule)InnerList[index]; public int IndexOf(ProcessModule module) => InnerList.IndexOf(module); diff --git a/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs b/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs index 281fae85abb9..1f655227ea72 100644 --- a/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs +++ b/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs @@ -44,6 +44,7 @@ public void Error() [Fact] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, reason: "https://github.com/dotnet/corefx/issues/23661")] + [ActiveIssue("https://github.com/dotnet/corefx/issues/22791", TargetFrameworkMonikers.UapAot)] public void Test_Write_Metric_EventListener() { using (var listener = new EventListenerListener()) diff --git a/src/System.DirectoryServices.AccountManagement/tests/PrincipalContextTests.cs b/src/System.DirectoryServices.AccountManagement/tests/PrincipalContextTests.cs index 3f12128f7560..bf67a3c0591e 100644 --- a/src/System.DirectoryServices.AccountManagement/tests/PrincipalContextTests.cs +++ b/src/System.DirectoryServices.AccountManagement/tests/PrincipalContextTests.cs @@ -170,7 +170,11 @@ public void Ctor_InvalidContexType_ThrowsInvalidEnumArgumentException(ContextTyp [Fact] public void Ctor_DomainContextType_ThrowsPrincipalServerDownException() { - Assert.Throws(() => new PrincipalContext(ContextType.Domain)); + if (Environment.MachineName.Equals(Environment.UserDomainName, StringComparison.OrdinalIgnoreCase)) + { + // The machine is not connected to a domain. we expect PrincipalContext(ContextType.Domain) to throw + Assert.Throws(() => new PrincipalContext(ContextType.Domain)); + } } [Fact] diff --git a/src/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/SearchResults.cs b/src/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/SearchResults.cs index 9edcb9389bc7..7c811207178e 100644 --- a/src/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/SearchResults.cs +++ b/src/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/SearchResults.cs @@ -72,10 +72,11 @@ public class SearchResultEntry { private DirectoryControl[] _resultControls = null; - internal SearchResultEntry(string dn) => DistinguishedName = dn; + internal SearchResultEntry(string dn) : this(dn, new SearchResultAttributeCollection()) {} - internal SearchResultEntry(string dn, SearchResultAttributeCollection attrs) : this(dn) + internal SearchResultEntry(string dn, SearchResultAttributeCollection attrs) { + DistinguishedName = dn; Attributes = attrs; } diff --git a/src/System.Drawing.Common/System.Drawing.Common.sln b/src/System.Drawing.Common/System.Drawing.Common.sln index abc475c28dc3..bdc9c7a7074a 100644 --- a/src/System.Drawing.Common/System.Drawing.Common.sln +++ b/src/System.Drawing.Common/System.Drawing.Common.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26730.10 +VisualStudioVersion = 15.0.26911.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Drawing.Common.Tests", "tests\System.Drawing.Common.Tests.csproj", "{4B93E684-0630-45F4-8F63-6C7788C9892F}" ProjectSection(ProjectDependencies) = postProject diff --git a/src/System.Drawing.Common/src/Unix/MonoTODOAttribute.cs b/src/System.Drawing.Common/src/MonoTODOAttribute.cs similarity index 100% rename from src/System.Drawing.Common/src/Unix/MonoTODOAttribute.cs rename to src/System.Drawing.Common/src/MonoTODOAttribute.cs diff --git a/src/System.Drawing.Common/src/System.Drawing.Common.csproj b/src/System.Drawing.Common/src/System.Drawing.Common.csproj index fde00ae01d91..e96c9dddc0bf 100644 --- a/src/System.Drawing.Common/src/System.Drawing.Common.csproj +++ b/src/System.Drawing.Common/src/System.Drawing.Common.csproj @@ -32,6 +32,7 @@ + @@ -50,6 +51,8 @@ + + @@ -112,6 +115,7 @@ + @@ -202,29 +206,28 @@ - + - - - + + + - - + + - + - + - - - - - + + + + @@ -243,10 +246,9 @@ - + - @@ -295,6 +297,10 @@ + + + + @@ -305,39 +311,29 @@ - - - - - - - - - - - + + + + + + - - - - - - + + + + + + - - - + + + - - - - - - + - + Common\Interop\Unix\Interop.Libraries.cs @@ -365,4 +361,4 @@ - \ No newline at end of file + diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/Bitmap.cs b/src/System.Drawing.Common/src/System/Drawing/Bitmap.Unix.cs similarity index 83% rename from src/System.Drawing.Common/src/Unix/System.Drawing/Bitmap.cs rename to src/System.Drawing.Common/src/System/Drawing/Bitmap.Unix.cs index 34c11158d81d..5c6707c9aeb9 100644 --- a/src/System.Drawing.Common/src/Unix/System.Drawing/Bitmap.cs +++ b/src/System.Drawing.Common/src/System/Drawing/Bitmap.Unix.cs @@ -71,9 +71,6 @@ internal Bitmap(IntPtr ptr) // (when using MS GDI+ and IStream we must ensure the stream stays alive for all the life of the Image) internal Bitmap(IntPtr ptr, Stream stream) { - // under Win32 stream is owned by SD/GDI+ code - if (GDIPlus.RunningOnWindows()) - this.stream = stream; nativeObject = ptr; } @@ -87,7 +84,7 @@ public Bitmap(int width, int height, Graphics g) throw new ArgumentNullException("g"); IntPtr bmp; - Status s = SafeNativeMethods.Gdip.GdipCreateBitmapFromGraphics(width, height, g.nativeObject, out bmp); + int s = SafeNativeMethods.Gdip.GdipCreateBitmapFromGraphics(width, height, g.nativeObject, out bmp); SafeNativeMethods.Gdip.CheckStatus(s); nativeObject = bmp; } @@ -95,7 +92,7 @@ public Bitmap(int width, int height, Graphics g) public Bitmap(int width, int height, PixelFormat format) { IntPtr bmp; - Status s = SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(width, height, 0, format, IntPtr.Zero, out bmp); + int s = SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(width, height, 0, format, IntPtr.Zero, out bmp); SafeNativeMethods.Gdip.CheckStatus(s); nativeObject = bmp; @@ -121,7 +118,7 @@ public Bitmap(string filename, bool useIcm) throw new ArgumentNullException("filename"); IntPtr imagePtr; - Status st; + int st; if (useIcm) st = SafeNativeMethods.Gdip.GdipCreateBitmapFromFileICM(filename, out imagePtr); @@ -149,9 +146,6 @@ public Bitmap(Type type, string resource) } nativeObject = InitFromStream(s); - // under Win32 stream is owned by SD/GDI+ code - if (GDIPlus.RunningOnWindows()) - stream = s; } public Bitmap(Image original, int width, int height) : this(width, height, PixelFormat.Format32bppArgb) @@ -166,7 +160,7 @@ public Bitmap(int width, int height, int stride, PixelFormat format, IntPtr scan { IntPtr bmp; - Status status = SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(width, height, stride, format, scan0, out bmp); + int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(width, height, stride, format, scan0, out bmp); SafeNativeMethods.Gdip.CheckStatus(status); nativeObject = bmp; } @@ -182,7 +176,7 @@ public Color GetPixel(int x, int y) int argb; - Status s = SafeNativeMethods.Gdip.GdipBitmapGetPixel(nativeObject, x, y, out argb); + int s = SafeNativeMethods.Gdip.GdipBitmapGetPixel(nativeObject, x, y, out argb); SafeNativeMethods.Gdip.CheckStatus(s); return Color.FromArgb(argb); @@ -190,8 +184,8 @@ public Color GetPixel(int x, int y) public void SetPixel(int x, int y, Color color) { - Status s = SafeNativeMethods.Gdip.GdipBitmapSetPixel(nativeObject, x, y, color.ToArgb()); - if (s == Status.InvalidParameter) + int s = SafeNativeMethods.Gdip.GdipBitmapSetPixel(nativeObject, x, y, color.ToArgb()); + if (s == SafeNativeMethods.Gdip.InvalidParameter) { // check is done in case of an error only to avoid another // unmanaged call for normal (successful) calls @@ -207,7 +201,7 @@ public void SetPixel(int x, int y, Color color) public Bitmap Clone(Rectangle rect, PixelFormat format) { IntPtr bmp; - Status status = SafeNativeMethods.Gdip.GdipCloneBitmapAreaI(rect.X, rect.Y, rect.Width, rect.Height, + int status = SafeNativeMethods.Gdip.GdipCloneBitmapAreaI(rect.X, rect.Y, rect.Width, rect.Height, format, nativeObject, out bmp); SafeNativeMethods.Gdip.CheckStatus(status); return new Bitmap(bmp); @@ -216,7 +210,7 @@ public Bitmap Clone(Rectangle rect, PixelFormat format) public Bitmap Clone(RectangleF rect, PixelFormat format) { IntPtr bmp; - Status status = SafeNativeMethods.Gdip.GdipCloneBitmapArea(rect.X, rect.Y, rect.Width, rect.Height, + int status = SafeNativeMethods.Gdip.GdipCloneBitmapArea(rect.X, rect.Y, rect.Width, rect.Height, format, nativeObject, out bmp); SafeNativeMethods.Gdip.CheckStatus(status); return new Bitmap(bmp); @@ -225,7 +219,7 @@ public Bitmap Clone(RectangleF rect, PixelFormat format) public static Bitmap FromHicon(IntPtr hicon) { IntPtr bitmap; - Status status = SafeNativeMethods.Gdip.GdipCreateBitmapFromHICON(hicon, out bitmap); + int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromHICON(hicon, out bitmap); SafeNativeMethods.Gdip.CheckStatus(status); return new Bitmap(bitmap); } @@ -233,7 +227,7 @@ public static Bitmap FromHicon(IntPtr hicon) public static Bitmap FromResource(IntPtr hinstance, string bitmapName) //TODO: Untested { IntPtr bitmap; - Status status = SafeNativeMethods.Gdip.GdipCreateBitmapFromResource(hinstance, bitmapName, out bitmap); + int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromResource(hinstance, bitmapName, out bitmap); SafeNativeMethods.Gdip.CheckStatus(status); return new Bitmap(bitmap); } @@ -249,7 +243,7 @@ public IntPtr GetHbitmap(Color background) { IntPtr HandleBmp; - Status status = SafeNativeMethods.Gdip.GdipCreateHBITMAPFromBitmap(nativeObject, out HandleBmp, background.ToArgb()); + int status = SafeNativeMethods.Gdip.GdipCreateHBITMAPFromBitmap(nativeObject, out HandleBmp, background.ToArgb()); SafeNativeMethods.Gdip.CheckStatus(status); return HandleBmp; @@ -260,7 +254,7 @@ public IntPtr GetHicon() { IntPtr HandleIcon; - Status status = SafeNativeMethods.Gdip.GdipCreateHICONFromBitmap(nativeObject, out HandleIcon); + int status = SafeNativeMethods.Gdip.GdipCreateHICONFromBitmap(nativeObject, out HandleIcon); SafeNativeMethods.Gdip.CheckStatus(status); return HandleIcon; @@ -275,7 +269,11 @@ public BitmapData LockBits(Rectangle rect, ImageLockMode flags, PixelFormat form public BitmapData LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format, BitmapData bitmapData) { - Status status = SafeNativeMethods.Gdip.GdipBitmapLockBits(nativeObject, ref rect, flags, format, bitmapData); + int status = SafeNativeMethods.Gdip.GdipBitmapLockBits(nativeObject, ref rect, flags, format, bitmapData); + if (status == 7) + { + status = 8; // libgdiplus has the wrong error code mapping for this state. + } //NOTE: scan0 points to piece of memory allocated in the unmanaged space SafeNativeMethods.Gdip.CheckStatus(status); @@ -311,13 +309,13 @@ public void MakeTransparent(Color transparentColor) public void SetResolution(float xDpi, float yDpi) { - Status status = SafeNativeMethods.Gdip.GdipBitmapSetResolution(nativeObject, xDpi, yDpi); + int status = SafeNativeMethods.Gdip.GdipBitmapSetResolution(nativeObject, xDpi, yDpi); SafeNativeMethods.Gdip.CheckStatus(status); } public void UnlockBits(BitmapData bitmapdata) { - Status status = SafeNativeMethods.Gdip.GdipBitmapUnlockBits(nativeObject, bitmapdata); + int status = SafeNativeMethods.Gdip.GdipBitmapUnlockBits(nativeObject, bitmapdata); SafeNativeMethods.Gdip.CheckStatus(status); } } diff --git a/src/System.Drawing.Common/src/System/Drawing/Bitmap.cs b/src/System.Drawing.Common/src/System/Drawing/Bitmap.Windows.cs similarity index 100% rename from src/System.Drawing.Common/src/System/Drawing/Bitmap.cs rename to src/System.Drawing.Common/src/System/Drawing/Bitmap.Windows.cs diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/BufferedGraphics.cs b/src/System.Drawing.Common/src/System/Drawing/BufferedGraphics.Unix.cs similarity index 100% rename from src/System.Drawing.Common/src/Unix/System.Drawing/BufferedGraphics.cs rename to src/System.Drawing.Common/src/System/Drawing/BufferedGraphics.Unix.cs diff --git a/src/System.Drawing.Common/src/System/Drawing/BufferedGraphics.cs b/src/System.Drawing.Common/src/System/Drawing/BufferedGraphics.Windows.cs similarity index 100% rename from src/System.Drawing.Common/src/System/Drawing/BufferedGraphics.cs rename to src/System.Drawing.Common/src/System/Drawing/BufferedGraphics.Windows.cs diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/BufferedGraphicsContext.cs b/src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsContext.Unix.cs similarity index 100% rename from src/System.Drawing.Common/src/Unix/System.Drawing/BufferedGraphicsContext.cs rename to src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsContext.Unix.cs diff --git a/src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsContext.cs b/src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsContext.Windows.cs similarity index 100% rename from src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsContext.cs rename to src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsContext.Windows.cs diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/BufferedGraphicsManager.cs b/src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsManager.Unix.cs similarity index 100% rename from src/System.Drawing.Common/src/Unix/System.Drawing/BufferedGraphicsManager.cs rename to src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsManager.Unix.cs diff --git a/src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsManager.cs b/src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsManager.Windows.cs similarity index 100% rename from src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsManager.cs rename to src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsManager.Windows.cs diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing.Drawing2D/GraphicsPath.cs b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPath.Unix.cs similarity index 76% rename from src/System.Drawing.Common/src/Unix/System.Drawing.Drawing2D/GraphicsPath.cs rename to src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPath.Unix.cs index 20ef1909461b..1260c98a5cd5 100644 --- a/src/System.Drawing.Common/src/Unix/System.Drawing.Drawing2D/GraphicsPath.cs +++ b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPath.Unix.cs @@ -50,13 +50,13 @@ public sealed class GraphicsPath : MarshalByRefObject, ICloneable, IDisposable public GraphicsPath() { - Status status = SafeNativeMethods.Gdip.GdipCreatePath(FillMode.Alternate, out nativePath); + int status = SafeNativeMethods.Gdip.GdipCreatePath(FillMode.Alternate, out nativePath); SafeNativeMethods.Gdip.CheckStatus(status); } public GraphicsPath(FillMode fillMode) { - Status status = SafeNativeMethods.Gdip.GdipCreatePath(fillMode, out nativePath); + int status = SafeNativeMethods.Gdip.GdipCreatePath(fillMode, out nativePath); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -77,7 +77,7 @@ public GraphicsPath(Point[] pts, byte[] types, FillMode fillMode) if (pts.Length != types.Length) throw new ArgumentException("Invalid parameter passed. Number of points and types must be same."); - Status status = SafeNativeMethods.Gdip.GdipCreatePath2I(pts, types, pts.Length, fillMode, out nativePath); + int status = SafeNativeMethods.Gdip.GdipCreatePath2I(pts, types, pts.Length, fillMode, out nativePath); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -88,7 +88,7 @@ public GraphicsPath(PointF[] pts, byte[] types, FillMode fillMode) if (pts.Length != types.Length) throw new ArgumentException("Invalid parameter passed. Number of points and types must be same."); - Status status = SafeNativeMethods.Gdip.GdipCreatePath2(pts, types, pts.Length, fillMode, out nativePath); + int status = SafeNativeMethods.Gdip.GdipCreatePath2(pts, types, pts.Length, fillMode, out nativePath); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -96,7 +96,7 @@ public object Clone() { IntPtr clone; - Status status = SafeNativeMethods.Gdip.GdipClonePath(nativePath, out clone); + int status = SafeNativeMethods.Gdip.GdipClonePath(nativePath, out clone); SafeNativeMethods.Gdip.CheckStatus(status); return new GraphicsPath(clone); @@ -115,7 +115,7 @@ public void Dispose() void Dispose(bool disposing) { - Status status; + int status; if (nativePath != IntPtr.Zero) { status = SafeNativeMethods.Gdip.GdipDeletePath(nativePath); @@ -130,7 +130,7 @@ public FillMode FillMode get { FillMode mode; - Status status = SafeNativeMethods.Gdip.GdipGetPathFillMode(nativePath, out mode); + int status = SafeNativeMethods.Gdip.GdipGetPathFillMode(nativePath, out mode); SafeNativeMethods.Gdip.CheckStatus(status); return mode; @@ -140,7 +140,7 @@ public FillMode FillMode if ((value < FillMode.Alternate) || (value > FillMode.Winding)) throw new InvalidEnumArgumentException("FillMode", (int)value, typeof(FillMode)); - Status status = SafeNativeMethods.Gdip.GdipSetPathFillMode(nativePath, value); + int status = SafeNativeMethods.Gdip.GdipSetPathFillMode(nativePath, value); SafeNativeMethods.Gdip.CheckStatus(status); } } @@ -150,7 +150,7 @@ public PathData PathData get { int count; - Status status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count); + int status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count); SafeNativeMethods.Gdip.CheckStatus(status); PointF[] points = new PointF[count]; @@ -179,7 +179,7 @@ public PointF[] PathPoints get { int count; - Status status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count); + int status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count); SafeNativeMethods.Gdip.CheckStatus(status); if (count == 0) throw new ArgumentException("PathPoints"); @@ -197,7 +197,7 @@ public byte[] PathTypes get { int count; - Status status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count); + int status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count); SafeNativeMethods.Gdip.CheckStatus(status); if (count == 0) throw new ArgumentException("PathTypes"); @@ -215,7 +215,7 @@ public int PointCount get { int count; - Status status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count); + int status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count); SafeNativeMethods.Gdip.CheckStatus(status); return count; @@ -239,25 +239,25 @@ internal IntPtr NativeObject // public void AddArc(Rectangle rect, float startAngle, float sweepAngle) { - Status status = SafeNativeMethods.Gdip.GdipAddPathArcI(nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); + int status = SafeNativeMethods.Gdip.GdipAddPathArcI(nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); SafeNativeMethods.Gdip.CheckStatus(status); } public void AddArc(RectangleF rect, float startAngle, float sweepAngle) { - Status status = SafeNativeMethods.Gdip.GdipAddPathArc(nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); + int status = SafeNativeMethods.Gdip.GdipAddPathArc(nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); SafeNativeMethods.Gdip.CheckStatus(status); } public void AddArc(int x, int y, int width, int height, float startAngle, float sweepAngle) { - Status status = SafeNativeMethods.Gdip.GdipAddPathArcI(nativePath, x, y, width, height, startAngle, sweepAngle); + int status = SafeNativeMethods.Gdip.GdipAddPathArcI(nativePath, x, y, width, height, startAngle, sweepAngle); SafeNativeMethods.Gdip.CheckStatus(status); } public void AddArc(float x, float y, float width, float height, float startAngle, float sweepAngle) { - Status status = SafeNativeMethods.Gdip.GdipAddPathArc(nativePath, x, y, width, height, startAngle, sweepAngle); + int status = SafeNativeMethods.Gdip.GdipAddPathArc(nativePath, x, y, width, height, startAngle, sweepAngle); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -266,7 +266,7 @@ public void AddArc(float x, float y, float width, float height, float startAngle // public void AddBezier(Point pt1, Point pt2, Point pt3, Point pt4) { - Status status = SafeNativeMethods.Gdip.GdipAddPathBezierI(nativePath, pt1.X, pt1.Y, + int status = SafeNativeMethods.Gdip.GdipAddPathBezierI(nativePath, pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y); SafeNativeMethods.Gdip.CheckStatus(status); @@ -274,7 +274,7 @@ public void AddBezier(Point pt1, Point pt2, Point pt3, Point pt4) public void AddBezier(PointF pt1, PointF pt2, PointF pt3, PointF pt4) { - Status status = SafeNativeMethods.Gdip.GdipAddPathBezier(nativePath, pt1.X, pt1.Y, + int status = SafeNativeMethods.Gdip.GdipAddPathBezier(nativePath, pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y); SafeNativeMethods.Gdip.CheckStatus(status); @@ -282,13 +282,13 @@ public void AddBezier(PointF pt1, PointF pt2, PointF pt3, PointF pt4) public void AddBezier(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) { - Status status = SafeNativeMethods.Gdip.GdipAddPathBezierI(nativePath, x1, y1, x2, y2, x3, y3, x4, y4); + int status = SafeNativeMethods.Gdip.GdipAddPathBezierI(nativePath, x1, y1, x2, y2, x3, y3, x4, y4); SafeNativeMethods.Gdip.CheckStatus(status); } public void AddBezier(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) { - Status status = SafeNativeMethods.Gdip.GdipAddPathBezier(nativePath, x1, y1, x2, y2, x3, y3, x4, y4); + int status = SafeNativeMethods.Gdip.GdipAddPathBezier(nativePath, x1, y1, x2, y2, x3, y3, x4, y4); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -299,7 +299,7 @@ public void AddBeziers(params Point[] points) { if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathBeziersI(nativePath, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipAddPathBeziersI(nativePath, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -307,7 +307,7 @@ public void AddBeziers(PointF[] points) { if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathBeziers(nativePath, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipAddPathBeziers(nativePath, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -316,25 +316,25 @@ public void AddBeziers(PointF[] points) // public void AddEllipse(RectangleF rect) { - Status status = SafeNativeMethods.Gdip.GdipAddPathEllipse(nativePath, rect.X, rect.Y, rect.Width, rect.Height); + int status = SafeNativeMethods.Gdip.GdipAddPathEllipse(nativePath, rect.X, rect.Y, rect.Width, rect.Height); SafeNativeMethods.Gdip.CheckStatus(status); } public void AddEllipse(float x, float y, float width, float height) { - Status status = SafeNativeMethods.Gdip.GdipAddPathEllipse(nativePath, x, y, width, height); + int status = SafeNativeMethods.Gdip.GdipAddPathEllipse(nativePath, x, y, width, height); SafeNativeMethods.Gdip.CheckStatus(status); } public void AddEllipse(Rectangle rect) { - Status status = SafeNativeMethods.Gdip.GdipAddPathEllipseI(nativePath, rect.X, rect.Y, rect.Width, rect.Height); + int status = SafeNativeMethods.Gdip.GdipAddPathEllipseI(nativePath, rect.X, rect.Y, rect.Width, rect.Height); SafeNativeMethods.Gdip.CheckStatus(status); } public void AddEllipse(int x, int y, int width, int height) { - Status status = SafeNativeMethods.Gdip.GdipAddPathEllipseI(nativePath, x, y, width, height); + int status = SafeNativeMethods.Gdip.GdipAddPathEllipseI(nativePath, x, y, width, height); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -344,13 +344,13 @@ public void AddEllipse(int x, int y, int width, int height) // public void AddLine(Point pt1, Point pt2) { - Status status = SafeNativeMethods.Gdip.GdipAddPathLineI(nativePath, pt1.X, pt1.Y, pt2.X, pt2.Y); + int status = SafeNativeMethods.Gdip.GdipAddPathLineI(nativePath, pt1.X, pt1.Y, pt2.X, pt2.Y); SafeNativeMethods.Gdip.CheckStatus(status); } public void AddLine(PointF pt1, PointF pt2) { - Status status = SafeNativeMethods.Gdip.GdipAddPathLine(nativePath, pt1.X, pt1.Y, pt2.X, + int status = SafeNativeMethods.Gdip.GdipAddPathLine(nativePath, pt1.X, pt1.Y, pt2.X, pt2.Y); SafeNativeMethods.Gdip.CheckStatus(status); @@ -358,13 +358,13 @@ public void AddLine(PointF pt1, PointF pt2) public void AddLine(int x1, int y1, int x2, int y2) { - Status status = SafeNativeMethods.Gdip.GdipAddPathLineI(nativePath, x1, y1, x2, y2); + int status = SafeNativeMethods.Gdip.GdipAddPathLineI(nativePath, x1, y1, x2, y2); SafeNativeMethods.Gdip.CheckStatus(status); } public void AddLine(float x1, float y1, float x2, float y2) { - Status status = SafeNativeMethods.Gdip.GdipAddPathLine(nativePath, x1, y1, x2, + int status = SafeNativeMethods.Gdip.GdipAddPathLine(nativePath, x1, y1, x2, y2); SafeNativeMethods.Gdip.CheckStatus(status); @@ -380,7 +380,7 @@ public void AddLines(Point[] points) if (points.Length == 0) throw new ArgumentException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathLine2I(nativePath, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipAddPathLine2I(nativePath, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -391,7 +391,7 @@ public void AddLines(PointF[] points) if (points.Length == 0) throw new ArgumentException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathLine2(nativePath, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipAddPathLine2(nativePath, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -400,20 +400,20 @@ public void AddLines(PointF[] points) // public void AddPie(Rectangle rect, float startAngle, float sweepAngle) { - Status status = SafeNativeMethods.Gdip.GdipAddPathPie( + int status = SafeNativeMethods.Gdip.GdipAddPathPie( nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); SafeNativeMethods.Gdip.CheckStatus(status); } public void AddPie(int x, int y, int width, int height, float startAngle, float sweepAngle) { - Status status = SafeNativeMethods.Gdip.GdipAddPathPieI(nativePath, x, y, width, height, startAngle, sweepAngle); + int status = SafeNativeMethods.Gdip.GdipAddPathPieI(nativePath, x, y, width, height, startAngle, sweepAngle); SafeNativeMethods.Gdip.CheckStatus(status); } public void AddPie(float x, float y, float width, float height, float startAngle, float sweepAngle) { - Status status = SafeNativeMethods.Gdip.GdipAddPathPie(nativePath, x, y, width, height, startAngle, sweepAngle); + int status = SafeNativeMethods.Gdip.GdipAddPathPie(nativePath, x, y, width, height, startAngle, sweepAngle); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -425,7 +425,7 @@ public void AddPolygon(Point[] points) if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathPolygonI(nativePath, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipAddPathPolygonI(nativePath, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -434,7 +434,7 @@ public void AddPolygon(PointF[] points) if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathPolygon(nativePath, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipAddPathPolygon(nativePath, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -443,13 +443,13 @@ public void AddPolygon(PointF[] points) // public void AddRectangle(Rectangle rect) { - Status status = SafeNativeMethods.Gdip.GdipAddPathRectangleI(nativePath, rect.X, rect.Y, rect.Width, rect.Height); + int status = SafeNativeMethods.Gdip.GdipAddPathRectangleI(nativePath, rect.X, rect.Y, rect.Width, rect.Height); SafeNativeMethods.Gdip.CheckStatus(status); } public void AddRectangle(RectangleF rect) { - Status status = SafeNativeMethods.Gdip.GdipAddPathRectangle(nativePath, rect.X, rect.Y, rect.Width, rect.Height); + int status = SafeNativeMethods.Gdip.GdipAddPathRectangle(nativePath, rect.X, rect.Y, rect.Width, rect.Height); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -463,7 +463,7 @@ public void AddRectangles(Rectangle[] rects) if (rects.Length == 0) throw new ArgumentException("rects"); - Status status = SafeNativeMethods.Gdip.GdipAddPathRectanglesI(nativePath, rects, rects.Length); + int status = SafeNativeMethods.Gdip.GdipAddPathRectanglesI(nativePath, rects, rects.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -474,7 +474,7 @@ public void AddRectangles(RectangleF[] rects) if (rects.Length == 0) throw new ArgumentException("rects"); - Status status = SafeNativeMethods.Gdip.GdipAddPathRectangles(nativePath, rects, rects.Length); + int status = SafeNativeMethods.Gdip.GdipAddPathRectangles(nativePath, rects, rects.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -486,14 +486,14 @@ public void AddPath(GraphicsPath addingPath, bool connect) if (addingPath == null) throw new ArgumentNullException("addingPath"); - Status status = SafeNativeMethods.Gdip.GdipAddPathPath(nativePath, addingPath.nativePath, connect); + int status = SafeNativeMethods.Gdip.GdipAddPathPath(nativePath, addingPath.nativePath, connect); SafeNativeMethods.Gdip.CheckStatus(status); } public PointF GetLastPoint() { PointF pt; - Status status = SafeNativeMethods.Gdip.GdipGetPathLastPoint(nativePath, out pt); + int status = SafeNativeMethods.Gdip.GdipGetPathLastPoint(nativePath, out pt); SafeNativeMethods.Gdip.CheckStatus(status); return pt; @@ -507,7 +507,7 @@ public void AddClosedCurve(Point[] points) if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathClosedCurveI(nativePath, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurveI(nativePath, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -516,7 +516,7 @@ public void AddClosedCurve(PointF[] points) if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve(nativePath, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve(nativePath, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -525,7 +525,7 @@ public void AddClosedCurve(Point[] points, float tension) if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2I(nativePath, points, points.Length, tension); + int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2I(nativePath, points, points.Length, tension); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -534,7 +534,7 @@ public void AddClosedCurve(PointF[] points, float tension) if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2(nativePath, points, points.Length, tension); + int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2(nativePath, points, points.Length, tension); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -546,7 +546,7 @@ public void AddCurve(Point[] points) if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathCurveI(nativePath, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipAddPathCurveI(nativePath, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -555,7 +555,7 @@ public void AddCurve(PointF[] points) if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathCurve(nativePath, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipAddPathCurve(nativePath, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -564,7 +564,7 @@ public void AddCurve(Point[] points, float tension) if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathCurve2I(nativePath, points, points.Length, tension); + int status = SafeNativeMethods.Gdip.GdipAddPathCurve2I(nativePath, points, points.Length, tension); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -573,7 +573,7 @@ public void AddCurve(PointF[] points, float tension) if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathCurve2(nativePath, points, points.Length, tension); + int status = SafeNativeMethods.Gdip.GdipAddPathCurve2(nativePath, points, points.Length, tension); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -582,7 +582,7 @@ public void AddCurve(Point[] points, int offset, int numberOfSegments, float ten if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathCurve3I(nativePath, points, points.Length, + int status = SafeNativeMethods.Gdip.GdipAddPathCurve3I(nativePath, points, points.Length, offset, numberOfSegments, tension); SafeNativeMethods.Gdip.CheckStatus(status); @@ -593,7 +593,7 @@ public void AddCurve(PointF[] points, int offset, int numberOfSegments, float te if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipAddPathCurve3(nativePath, points, points.Length, + int status = SafeNativeMethods.Gdip.GdipAddPathCurve3(nativePath, points, points.Length, offset, numberOfSegments, tension); SafeNativeMethods.Gdip.CheckStatus(status); @@ -601,13 +601,13 @@ public void AddCurve(PointF[] points, int offset, int numberOfSegments, float te public void Reset() { - Status status = SafeNativeMethods.Gdip.GdipResetPath(nativePath); + int status = SafeNativeMethods.Gdip.GdipResetPath(nativePath); SafeNativeMethods.Gdip.CheckStatus(status); } public void Reverse() { - Status status = SafeNativeMethods.Gdip.GdipReversePath(nativePath); + int status = SafeNativeMethods.Gdip.GdipReversePath(nativePath); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -616,7 +616,7 @@ public void Transform(Matrix matrix) if (matrix == null) throw new ArgumentNullException("matrix"); - Status status = SafeNativeMethods.Gdip.GdipTransformPath(nativePath, matrix.nativeMatrix); + int status = SafeNativeMethods.Gdip.GdipTransformPath(nativePath, matrix.nativeMatrix); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -646,7 +646,7 @@ public void AddString(string s, FontFamily family, int style, float emSize, Rect IntPtr sformat = (format == null) ? IntPtr.Zero : format.nativeFormat; // note: the NullReferenceException on s.Length is the expected (MS) exception - Status status = SafeNativeMethods.Gdip.GdipAddPathStringI(nativePath, s, s.Length, family.NativeFamily, style, emSize, ref layoutRect, sformat); + int status = SafeNativeMethods.Gdip.GdipAddPathStringI(nativePath, s, s.Length, family.NativeFamily, style, emSize, ref layoutRect, sformat); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -658,27 +658,27 @@ public void AddString(string s, FontFamily family, int style, float emSize, Rect IntPtr sformat = (format == null) ? IntPtr.Zero : format.nativeFormat; // note: the NullReferenceException on s.Length is the expected (MS) exception - Status status = SafeNativeMethods.Gdip.GdipAddPathString(nativePath, s, s.Length, family.NativeFamily, style, emSize, ref layoutRect, sformat); + int status = SafeNativeMethods.Gdip.GdipAddPathString(nativePath, s, s.Length, family.NativeFamily, style, emSize, ref layoutRect, sformat); SafeNativeMethods.Gdip.CheckStatus(status); } public void ClearMarkers() { - Status s = SafeNativeMethods.Gdip.GdipClearPathMarkers(nativePath); + int s = SafeNativeMethods.Gdip.GdipClearPathMarkers(nativePath); SafeNativeMethods.Gdip.CheckStatus(s); } public void CloseAllFigures() { - Status s = SafeNativeMethods.Gdip.GdipClosePathFigures(nativePath); + int s = SafeNativeMethods.Gdip.GdipClosePathFigures(nativePath); SafeNativeMethods.Gdip.CheckStatus(s); } public void CloseFigure() { - Status s = SafeNativeMethods.Gdip.GdipClosePathFigure(nativePath); + int s = SafeNativeMethods.Gdip.GdipClosePathFigure(nativePath); SafeNativeMethods.Gdip.CheckStatus(s); } @@ -696,7 +696,7 @@ public void Flatten(Matrix matrix) public void Flatten(Matrix matrix, float flatness) { IntPtr m = (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix; - Status status = SafeNativeMethods.Gdip.GdipFlattenPath(nativePath, m, flatness); + int status = SafeNativeMethods.Gdip.GdipFlattenPath(nativePath, m, flatness); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -717,7 +717,7 @@ public RectangleF GetBounds(Matrix matrix, Pen pen) IntPtr m = (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix; IntPtr p = (pen == null) ? IntPtr.Zero : pen.NativePen; - Status s = SafeNativeMethods.Gdip.GdipGetPathWorldBounds(nativePath, out retval, m, p); + int s = SafeNativeMethods.Gdip.GdipGetPathWorldBounds(nativePath, out retval, m, p); SafeNativeMethods.Gdip.CheckStatus(s); @@ -762,7 +762,7 @@ public bool IsOutlineVisible(int x, int y, Pen pen, Graphics graphics) bool result; IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject; - Status s = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPointI(nativePath, x, y, pen.NativePen, g, out result); + int s = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPointI(nativePath, x, y, pen.NativePen, g, out result); SafeNativeMethods.Gdip.CheckStatus(s); return result; @@ -776,7 +776,7 @@ public bool IsOutlineVisible(float x, float y, Pen pen, Graphics graphics) bool result; IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject; - Status s = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPoint(nativePath, x, y, pen.NativePen, g, out result); + int s = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPoint(nativePath, x, y, pen.NativePen, g, out result); SafeNativeMethods.Gdip.CheckStatus(s); return result; @@ -818,7 +818,7 @@ public bool IsVisible(int x, int y, Graphics graphics) IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject; - Status s = SafeNativeMethods.Gdip.GdipIsVisiblePathPointI(nativePath, x, y, g, out retval); + int s = SafeNativeMethods.Gdip.GdipIsVisiblePathPointI(nativePath, x, y, g, out retval); SafeNativeMethods.Gdip.CheckStatus(s); @@ -831,7 +831,7 @@ public bool IsVisible(float x, float y, Graphics graphics) IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject; - Status s = SafeNativeMethods.Gdip.GdipIsVisiblePathPoint(nativePath, x, y, g, out retval); + int s = SafeNativeMethods.Gdip.GdipIsVisiblePathPoint(nativePath, x, y, g, out retval); SafeNativeMethods.Gdip.CheckStatus(s); @@ -840,14 +840,14 @@ public bool IsVisible(float x, float y, Graphics graphics) public void SetMarkers() { - Status s = SafeNativeMethods.Gdip.GdipSetPathMarker(nativePath); + int s = SafeNativeMethods.Gdip.GdipSetPathMarker(nativePath); SafeNativeMethods.Gdip.CheckStatus(s); } public void StartFigure() { - Status s = SafeNativeMethods.Gdip.GdipStartPathFigure(nativePath); + int s = SafeNativeMethods.Gdip.GdipStartPathFigure(nativePath); SafeNativeMethods.Gdip.CheckStatus(s); } @@ -878,7 +878,7 @@ public void Warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix, WarpMod IntPtr m = (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix; - Status s = SafeNativeMethods.Gdip.GdipWarpPath(nativePath, m, destPoints, destPoints.Length, + int s = SafeNativeMethods.Gdip.GdipWarpPath(nativePath, m, destPoints, destPoints.Length, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, warpMode, flatness); SafeNativeMethods.Gdip.CheckStatus(s); @@ -905,7 +905,7 @@ public void Widen(Pen pen, Matrix matrix, float flatness) return; IntPtr m = (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix; - Status s = SafeNativeMethods.Gdip.GdipWidenPath(nativePath, pen.NativePen, m, flatness); + int s = SafeNativeMethods.Gdip.GdipWidenPath(nativePath, pen.NativePen, m, flatness); SafeNativeMethods.Gdip.CheckStatus(s); } } diff --git a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPath.cs b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPath.Windows.cs similarity index 100% rename from src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPath.cs rename to src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPath.Windows.cs diff --git a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/HatchBrush.cs b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/HatchBrush.cs index 68e539988df8..43ea6829e2bb 100644 --- a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/HatchBrush.cs +++ b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/HatchBrush.cs @@ -15,6 +15,11 @@ public HatchBrush(HatchStyle hatchstyle, Color foreColor) : this(hatchstyle, for public HatchBrush(HatchStyle hatchstyle, Color foreColor, Color backColor) { + if (hatchstyle < HatchStyle.Min || hatchstyle > HatchStyle.SolidDiamond) + { + throw new ArgumentException(SR.Format(SR.InvalidEnumArgument, nameof(hatchstyle), hatchstyle, nameof(HatchStyle)), nameof(hatchstyle)); + } + IntPtr nativeBrush; int status = SafeNativeMethods.Gdip.GdipCreateHatchBrush(unchecked((int)hatchstyle), foreColor.ToArgb(), backColor.ToArgb(), out nativeBrush); SafeNativeMethods.Gdip.CheckStatus(status); diff --git a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/LinearGradientBrush.cs b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/LinearGradientBrush.cs index cf158ee9773e..162a4735ecdc 100644 --- a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/LinearGradientBrush.cs +++ b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/LinearGradientBrush.cs @@ -335,9 +335,14 @@ public Blend Blend public void SetSigmaBellShape(float focus, float scale) { - if (focus < 0 || focus > 1 || scale < 0 || scale > 1) + if (focus < 0 || focus > 1) { - throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter)); + throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(focus)); + } + + if (scale < 0 || scale > 1) + { + throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(scale)); } int status = SafeNativeMethods.Gdip.GdipSetLineSigmaBlend(new HandleRef(this, NativeBrush), focus, scale); @@ -348,9 +353,14 @@ public void SetSigmaBellShape(float focus, float scale) public void SetBlendTriangularShape(float focus, float scale) { - if (focus < 0 || focus > 1 || scale < 0 || scale > 1) + if (focus < 0 || focus > 1) { - throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter)); + throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(focus)); + } + + if (scale < 0 || scale > 1) + { + throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(scale)); } int status = SafeNativeMethods.Gdip.GdipSetLineLinearBlend(new HandleRef(this, NativeBrush), focus, scale); @@ -531,7 +541,7 @@ public Matrix Transform { if (value == null) { - throw new ArgumentNullException("matrix"); + throw new ArgumentNullException(nameof(value)); } int status = SafeNativeMethods.Gdip.GdipSetLineTransform(new HandleRef(this, NativeBrush), new HandleRef(value, value.nativeMatrix)); @@ -554,6 +564,13 @@ public void MultiplyTransform(Matrix matrix, MatrixOrder order) throw new ArgumentNullException(nameof(matrix)); } + // Multiplying the transform by a disposed matrix is a nop in GDI+, but throws + // with the libgdiplus backend. Simulate a nop for compatability with GDI+. + if (matrix.nativeMatrix == IntPtr.Zero) + { + return; + } + int status = SafeNativeMethods.Gdip.GdipMultiplyLineTransform(new HandleRef(this, NativeBrush), new HandleRef(matrix, matrix.nativeMatrix), order); diff --git a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/PathGradientBrush.cs b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/PathGradientBrush.cs index 1293902b5f2f..a268e66aad5d 100644 --- a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/PathGradientBrush.cs +++ b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/PathGradientBrush.cs @@ -339,30 +339,36 @@ public Blend Blend public void SetSigmaBellShape(float focus, float scale) { - if (focus < 0 || focus > 1 || scale < 0 || scale > 1) + if (focus < 0 || focus > 1) { - throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter)); + throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(focus)); } - int status = SafeNativeMethods.Gdip.GdipSetPathGradientSigmaBlend(new HandleRef(this, NativeBrush), focus, scale); + if (scale < 0 || scale > 1) + { + throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(scale)); + } - if (status != SafeNativeMethods.Gdip.Ok) - throw SafeNativeMethods.Gdip.StatusException(status); + int status = SafeNativeMethods.Gdip.GdipSetPathGradientSigmaBlend(new HandleRef(this, NativeBrush), focus, scale); + SafeNativeMethods.Gdip.CheckStatus(status); } public void SetBlendTriangularShape(float focus) => SetBlendTriangularShape(focus, (float)1.0); public void SetBlendTriangularShape(float focus, float scale) { - if (focus < 0 || focus > 1 || scale < 0 || scale > 1) + if (focus < 0 || focus > 1) { - throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter)); + throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(focus)); } - int status = SafeNativeMethods.Gdip.GdipSetPathGradientLinearBlend(new HandleRef(this, NativeBrush), focus, scale); + if (scale < 0 || scale > 1) + { + throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(scale)); + } - if (status != SafeNativeMethods.Gdip.Ok) - throw SafeNativeMethods.Gdip.StatusException(status); + int status = SafeNativeMethods.Gdip.GdipSetPathGradientLinearBlend(new HandleRef(this, NativeBrush), focus, scale); + SafeNativeMethods.Gdip.CheckStatus(status); } public ColorBlend InterpolationColors @@ -450,21 +456,19 @@ public Matrix Transform Matrix matrix = new Matrix(); int status = SafeNativeMethods.Gdip.GdipGetPathGradientTransform(new HandleRef(this, NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); - - if (status != SafeNativeMethods.Gdip.Ok) - throw SafeNativeMethods.Gdip.StatusException(status); + SafeNativeMethods.Gdip.CheckStatus(status); return matrix; } set { if (value == null) - throw new ArgumentNullException("matrix"); + { + throw new ArgumentNullException(nameof(value)); + } int status = SafeNativeMethods.Gdip.GdipSetPathGradientTransform(new HandleRef(this, NativeBrush), new HandleRef(value, value.nativeMatrix)); - - if (status != SafeNativeMethods.Gdip.Ok) - throw SafeNativeMethods.Gdip.StatusException(status); + SafeNativeMethods.Gdip.CheckStatus(status); } } @@ -481,14 +485,21 @@ public void ResetTransform() public void MultiplyTransform(Matrix matrix, MatrixOrder order) { if (matrix == null) - throw new ArgumentNullException("matrix"); + { + throw new ArgumentNullException(nameof(matrix)); + } + + // Multiplying the transform by a disposed matrix is a nop in GDI+, but throws + // with the libgdiplus backend. Simulate a nop for compatability with GDI+. + if (matrix.nativeMatrix == IntPtr.Zero) + { + return; + } int status = SafeNativeMethods.Gdip.GdipMultiplyPathGradientTransform(new HandleRef(this, NativeBrush), new HandleRef(matrix, matrix.nativeMatrix), order); - - if (status != SafeNativeMethods.Gdip.Ok) - throw SafeNativeMethods.Gdip.StatusException(status); + SafeNativeMethods.Gdip.CheckStatus(status); } public void TranslateTransform(float dx, float dy) => TranslateTransform(dx, dy, MatrixOrder.Prepend); diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/Font.cs b/src/System.Drawing.Common/src/System/Drawing/Font.Unix.cs similarity index 86% rename from src/System.Drawing.Common/src/Unix/System.Drawing/Font.cs rename to src/System.Drawing.Common/src/System/Drawing/Font.Unix.cs index a77cc2ca66d4..2f360846f1c4 100644 --- a/src/System.Drawing.Common/src/Unix/System.Drawing/Font.cs +++ b/src/System.Drawing.Common/src/System/Drawing/Font.Unix.cs @@ -52,7 +52,6 @@ public sealed class Font : MarshalByRefObject, ISerializable, ICloneable, IDispo private string systemFontName; private string originalFontName; private float _size; - private object olf; private const byte DefaultCharSet = 1; private static int CharSetOffset = -1; @@ -73,9 +72,9 @@ private void CreateFont(string familyName, float emSize, FontStyle style, Graphi } setProperties(family, emSize, style, unit, charSet, isVertical); - Status status = SafeNativeMethods.Gdip.GdipCreateFont(family.NativeFamily, emSize, style, unit, out fontObject); + int status = SafeNativeMethods.Gdip.GdipCreateFont(family.NativeFamily, emSize, style, unit, out fontObject); - if (status == Status.FontStyleNotFound) + if (status == SafeNativeMethods.Gdip.FontStyleNotFound) throw new ArgumentException(string.Format("Style {0} isn't supported by font {1}.", style.ToString(), familyName)); SafeNativeMethods.Gdip.CheckStatus(status); @@ -113,7 +112,7 @@ public void Dispose() { if (fontObject != IntPtr.Zero) { - Status status = SafeNativeMethods.Gdip.GdipDeleteFont(fontObject); + int status = SafeNativeMethods.Gdip.GdipDeleteFont(fontObject); fontObject = IntPtr.Zero; GC.SuppressFinalize(this); // check the status code (throw) at the last step @@ -214,7 +213,6 @@ void setProperties(FontFamily family, float emSize, FontStyle style, GraphicsUni public static Font FromHfont(IntPtr hfont) { IntPtr newObject; - IntPtr hdc; FontStyle newStyle = FontStyle.Regular; float newSize; SafeNativeMethods.LOGFONT lf = new SafeNativeMethods.LOGFONT(); @@ -226,32 +224,10 @@ public static Font FromHfont(IntPtr hfont) return (result); } - if (GDIPlus.RunningOnUnix()) - { - // If we're on Unix we use our private gdiplus API to avoid Wine - // dependencies in S.D - Status s = SafeNativeMethods.Gdip.GdipCreateFontFromHfont(hfont, out newObject, ref lf); - SafeNativeMethods.Gdip.CheckStatus(s); - } - else - { - - // This needs testing - // GetDC, SelectObject, ReleaseDC GetTextMetric and - // GetFontFace are not really GDIPlus, see gdipFunctions.cs - - newStyle = FontStyle.Regular; - - hdc = GDIPlus.GetDC(IntPtr.Zero); - try - { - return FromLogFont(lf, hdc); - } - finally - { - GDIPlus.ReleaseDC(IntPtr.Zero, hdc); - } - } + // If we're on Unix we use our private gdiplus API to avoid Wine + // dependencies in S.D + int s = SafeNativeMethods.Gdip.GdipCreateFontFromHfont(hfont, out newObject, ref lf); + SafeNativeMethods.Gdip.CheckStatus(s); if (lf.lfItalic != 0) { @@ -290,17 +266,7 @@ public IntPtr ToHfont() if (fontObject == IntPtr.Zero) throw new ArgumentException("Object has been disposed."); - if (GDIPlus.RunningOnUnix()) - return fontObject; - - // win32 specific code - if (olf == null) - { - olf = new LOGFONT(); - ToLogFont(olf); - } - LOGFONT lf = (LOGFONT)olf; - return GDIPlus.CreateFontIndirect(ref lf); + return fontObject; } internal Font(IntPtr newFontObject, string familyName, FontStyle style, float size) @@ -325,7 +291,7 @@ public Font(Font prototype, FontStyle newStyle) // no null checks, MS throws a NullReferenceException if original is null setProperties(prototype.FontFamily, prototype.Size, newStyle, prototype.Unit, prototype.GdiCharSet, prototype.GdiVerticalFont); - Status status = SafeNativeMethods.Gdip.GdipCreateFont(_fontFamily.NativeFamily, Size, Style, Unit, out fontObject); + int status = SafeNativeMethods.Gdip.GdipCreateFont(_fontFamily.NativeFamily, Size, Style, Unit, out fontObject); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -365,7 +331,7 @@ public Font(FontFamily family, float emSize, FontStyle style, if (family == null) throw new ArgumentNullException("family"); - Status status; + int status; setProperties(family, emSize, style, unit, gdiCharSet, gdiVerticalFont); status = SafeNativeMethods.Gdip.GdipCreateFont(family.NativeFamily, emSize, style, unit, out fontObject); SafeNativeMethods.Gdip.CheckStatus(status); @@ -632,7 +598,7 @@ public static Font FromLogFont(object lf, IntPtr hdc) { IntPtr newObject; SafeNativeMethods.LOGFONT o = (SafeNativeMethods.LOGFONT)lf; - Status status = SafeNativeMethods.Gdip.GdipCreateFontFromLogfont(hdc, ref o, out newObject); + int status = SafeNativeMethods.Gdip.GdipCreateFontFromLogfont(hdc, ref o, out newObject); SafeNativeMethods.Gdip.CheckStatus(status); return new Font(newObject, "Microsoft Sans Serif", FontStyle.Regular, 10); } @@ -644,50 +610,18 @@ public float GetHeight() public static Font FromLogFont(object lf) { - if (GDIPlus.RunningOnUnix()) - return FromLogFont(lf, IntPtr.Zero); - - // win32 specific code - IntPtr hDC = IntPtr.Zero; - try - { - hDC = GDIPlus.GetDC(IntPtr.Zero); - return FromLogFont(lf, hDC); - } - finally - { - GDIPlus.ReleaseDC(IntPtr.Zero, hDC); - } + return FromLogFont(lf, IntPtr.Zero); } public void ToLogFont(object logFont) { - if (GDIPlus.RunningOnUnix()) - { - // Unix - We don't have a window we could associate the DC with - // so we use an image instead - using (Bitmap img = new Bitmap(1, 1, Imaging.PixelFormat.Format32bppArgb)) - { - using (Graphics g = Graphics.FromImage(img)) - { - ToLogFont(logFont, g); - } - } - } - else + // Unix - We don't have a window we could associate the DC with + // so we use an image instead + using (Bitmap img = new Bitmap(1, 1, Imaging.PixelFormat.Format32bppArgb)) { - // Windows - IntPtr hDC = GDIPlus.GetDC(IntPtr.Zero); - try - { - using (Graphics g = Graphics.FromHdc(hDC)) - { - ToLogFont(logFont, g); - } - } - finally + using (Graphics g = Graphics.FromImage(img)) { - GDIPlus.ReleaseDC(IntPtr.Zero, hDC); + ToLogFont(logFont, g); } } } @@ -711,14 +645,14 @@ public void ToLogFont(object logFont, Graphics graphics) int size = Marshal.SizeOf(logFont); if (size >= Marshal.SizeOf(lf)) { - Status status; + int status; IntPtr copy = Marshal.AllocHGlobal(size); try { Marshal.StructureToPtr(logFont, copy, false); status = SafeNativeMethods.Gdip.GdipGetLogFont(NativeObject, graphics.NativeObject, logFont); - if (status != Status.Ok) + if (status != SafeNativeMethods.Gdip.Ok) { // reset to original values Marshal.PtrToStructure(copy, logFont); @@ -764,7 +698,7 @@ public float GetHeight(Graphics graphics) throw new ArgumentNullException("graphics"); float size; - Status status = SafeNativeMethods.Gdip.GdipGetFontHeight(fontObject, graphics.NativeObject, out size); + int status = SafeNativeMethods.Gdip.GdipGetFontHeight(fontObject, graphics.NativeObject, out size); SafeNativeMethods.Gdip.CheckStatus(status); return size; } @@ -772,7 +706,7 @@ public float GetHeight(Graphics graphics) public float GetHeight(float dpi) { float size; - Status status = SafeNativeMethods.Gdip.GdipGetFontHeightGivenDPI(fontObject, dpi, out size); + int status = SafeNativeMethods.Gdip.GdipGetFontHeightGivenDPI(fontObject, dpi, out size); SafeNativeMethods.Gdip.CheckStatus(status); return size; } diff --git a/src/System.Drawing.Common/src/System/Drawing/Font.cs b/src/System.Drawing.Common/src/System/Drawing/Font.Windows.cs similarity index 100% rename from src/System.Drawing.Common/src/System/Drawing/Font.cs rename to src/System.Drawing.Common/src/System/Drawing/Font.Windows.cs diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/GdiPlusStreamHelper.cs b/src/System.Drawing.Common/src/System/Drawing/GdiPlusStreamHelper.Unix.cs similarity index 100% rename from src/System.Drawing.Common/src/Unix/System.Drawing/GdiPlusStreamHelper.cs rename to src/System.Drawing.Common/src/System/Drawing/GdiPlusStreamHelper.Unix.cs diff --git a/src/System.Drawing.Common/src/System/Drawing/Gdiplus.cs b/src/System.Drawing.Common/src/System/Drawing/Gdiplus.cs index 4c729c473301..2783c02b7684 100644 --- a/src/System.Drawing.Common/src/System/Drawing/Gdiplus.cs +++ b/src/System.Drawing.Common/src/System/Drawing/Gdiplus.cs @@ -83,7 +83,7 @@ static Gdip() s_gdipModule = LoadNativeLibrary(); LoadSharedFunctionPointers(); - LoadPlatformFunctionPointers(); // This should be combined with the above call when Windows/Unix implementations are unified. + PlatformInitialize(); StartupInput input = StartupInput.GetDefault(); StartupOutput output; diff --git a/src/System.Drawing.Common/src/System/Drawing/GdiplusNative.Unix.cs b/src/System.Drawing.Common/src/System/Drawing/GdiplusNative.Unix.cs index 98df532e795f..7e531ba0b2cc 100644 --- a/src/System.Drawing.Common/src/System/Drawing/GdiplusNative.Unix.cs +++ b/src/System.Drawing.Common/src/System/Drawing/GdiplusNative.Unix.cs @@ -5,10 +5,7 @@ using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.Drawing.Text; -using System.IO; using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; -using System.Text; namespace System.Drawing { @@ -16,87 +13,89 @@ internal partial class SafeNativeMethods { internal unsafe partial class Gdip { + public static IntPtr Display = IntPtr.Zero; + public static bool UseX11Drawable = false; + public static bool UseCarbonDrawable = false; + public static bool UseCocoaDrawable = false; + private static IntPtr LoadNativeLibrary() { - // Various Unix package managers have chosen different names for the "libgdiplus" shared library. - // The mono project, where libgdiplus originated, allowed both of the names below to be used, via - // a global configuration setting. We prefer the "unversioned" shared object name, and fallback to - // the name suffixed with ".0". - IntPtr lib = Interop.Libdl.dlopen("libgdiplus.so", Interop.Libdl.RTLD_NOW); - if (lib == IntPtr.Zero) + IntPtr lib = IntPtr.Zero; + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + lib = Interop.Libdl.dlopen("libgdiplus.dylib", Interop.Libdl.RTLD_NOW); + } + else { - lib = Interop.Libdl.dlopen("libgdiplus.so.0", Interop.Libdl.RTLD_NOW); + // Various Unix package managers have chosen different names for the "libgdiplus" shared library. + // The mono project, where libgdiplus originated, allowed both of the names below to be used, via + // a global configuration setting. We prefer the "unversioned" shared object name, and fallback to + // the name suffixed with ".0". + lib = Interop.Libdl.dlopen("libgdiplus.so", Interop.Libdl.RTLD_NOW); if (lib == IntPtr.Zero) { - throw new DllNotFoundException(SR.LibgdiplusNotFound); + lib = Interop.Libdl.dlopen("libgdiplus.so.0", Interop.Libdl.RTLD_NOW); } } + // This function may return a null handle. If it does, individual functions loaded from it will throw a DllNotFoundException, + // but not until an attempt is made to actually use the function (rather than load it). This matches how PInvokes behave. return lib; } private static IntPtr LoadFunctionPointer(IntPtr nativeLibraryHandle, string functionName) => Interop.Libdl.dlsym(nativeLibraryHandle, functionName); - internal static void CheckStatus(Status status) + private static void PlatformInitialize() { - string msg; - switch (status) + InitializeSystemContext(); + LoadFunctionPointers(); + } + + private static void InitializeSystemContext() + { + if (Environment.GetEnvironmentVariable("not_supported_MONO_MWF_USE_NEW_X11_BACKEND") != null || Environment.GetEnvironmentVariable("MONO_MWF_MAC_FORCE_X11") != null) { - case Status.Ok: - return; - case Status.GenericError: - msg = string.Format("Generic Error [GDI+ status: {0}]", status); - throw new Exception(msg); - case Status.InvalidParameter: - msg = string.Format("A null reference or invalid value was found [GDI+ status: {0}]", status); - throw new ArgumentException(msg); - case Status.OutOfMemory: - msg = string.Format("Not enough memory to complete operation [GDI+ status: {0}]", status); - throw new OutOfMemoryException(msg); - case Status.ObjectBusy: - msg = string.Format("Object is busy and cannot state allow this operation [GDI+ status: {0}]", status); - throw new MemberAccessException(msg); - case Status.InsufficientBuffer: - msg = string.Format("Insufficient buffer provided to complete operation [GDI+ status: {0}]", status); -#if NETCORE - throw new Exception(msg); -#else - throw new InternalBufferOverflowException (msg); -#endif - case Status.PropertyNotSupported: - msg = string.Format("Property not supported [GDI+ status: {0}]", status); - throw new NotSupportedException(msg); - case Status.FileNotFound: - msg = string.Format("Requested file was not found [GDI+ status: {0}]", status); - throw new FileNotFoundException(msg); - case Status.AccessDenied: - msg = string.Format("Access to resource was denied [GDI+ status: {0}]", status); - throw new UnauthorizedAccessException(msg); - case Status.UnknownImageFormat: - msg = string.Format("Either the image format is unknown or you don't have the required libraries to decode this format [GDI+ status: {0}]", status); - throw new NotSupportedException(msg); - case Status.NotImplemented: - msg = string.Format("The requested feature is not implemented [GDI+ status: {0}]", status); - throw new NotImplementedException(msg); - case Status.WrongState: - msg = string.Format("Object is not in a state that can allow this operation [GDI+ status: {0}]", status); - throw new ArgumentException(msg); - case Status.FontFamilyNotFound: - msg = string.Format("The requested FontFamily could not be found [GDI+ status: {0}]", status); - throw new ArgumentException(msg); - case Status.ValueOverflow: - msg = string.Format("Argument is out of range [GDI+ status: {0}]", status); - throw new OverflowException(msg); - case Status.Win32Error: - msg = string.Format("The operation is invalid [GDI+ status: {0}]", status); - throw new InvalidOperationException(msg); - default: - msg = string.Format("Unknown Error [GDI+ status: {0}]", status); - throw new Exception(msg); + UseX11Drawable = true; + } + else + { + IntPtr buf = Marshal.AllocHGlobal(8192); + // This is kind of a hack but gets us sysname from uname (struct utsname *name) on + // linux and darwin + if (uname(buf) != 0) + { + // WTH: We couldn't detect the OS; lets default to X11 + UseX11Drawable = true; + } + else + { + string os = Marshal.PtrToStringAnsi(buf); + if (os == "Darwin") + UseCarbonDrawable = true; + else + UseX11Drawable = true; + } + Marshal.FreeHGlobal(buf); } + + // under MS 1.x this event is raised only for the default application domain +#if !NETSTANDARD1_6 + AppDomain.CurrentDomain.ProcessExit += new EventHandler(ProcessExit); +#endif + } + + [DllImport("libc")] + static extern int uname(IntPtr buf); + + private static void ProcessExit(object sender, EventArgs e) + { + // Called all pending objects and claim any pending handle before + // shutting down + GC.Collect(); + GC.WaitForPendingFinalizers(); } - private static void LoadPlatformFunctionPointers() + private static void LoadFunctionPointers() { GdiplusStartup_ptr = FunctionWrapper.Load(s_gdipModule, "GdiplusStartup"); GdiplusShutdown_ptr = FunctionWrapper.Load(s_gdipModule, "GdiplusShutdown"); @@ -200,8 +199,6 @@ private static void LoadPlatformFunctionPointers() GdipBitmapGetPixel_ptr = FunctionWrapper.Load(s_gdipModule, "GdipBitmapGetPixel"); GdipBitmapSetPixel_ptr = FunctionWrapper.Load(s_gdipModule, "GdipBitmapSetPixel"); GdipLoadImageFromFile_ptr = FunctionWrapper.Load(s_gdipModule, "GdipLoadImageFromFile"); - GdipLoadImageFromStream_ptr = FunctionWrapper.Load(s_gdipModule, "GdipLoadImageFromStream"); - GdipSaveImageToStream_ptr = FunctionWrapper.Load(s_gdipModule, "GdipSaveImageToStream"); GdipCloneImage_ptr = FunctionWrapper.Load(s_gdipModule, "GdipCloneImage"); GdipLoadImageFromFileICM_ptr = FunctionWrapper.Load(s_gdipModule, "GdipLoadImageFromFileICM"); GdipCreateBitmapFromHBITMAP_ptr = FunctionWrapper.Load(s_gdipModule, "GdipCreateBitmapFromHBITMAP"); @@ -340,10 +337,6 @@ private static void LoadPlatformFunctionPointers() GdipRecordMetafileI_ptr = FunctionWrapper.Load(s_gdipModule, "GdipRecordMetafileI"); GdipRecordMetafileFileName_ptr = FunctionWrapper.Load(s_gdipModule, "GdipRecordMetafileFileName"); GdipRecordMetafileFileNameI_ptr = FunctionWrapper.Load(s_gdipModule, "GdipRecordMetafileFileNameI"); - GdipCreateMetafileFromStream_ptr = FunctionWrapper.Load(s_gdipModule, "GdipCreateMetafileFromStream"); - GdipGetMetafileHeaderFromStream_ptr = FunctionWrapper.Load(s_gdipModule, "GdipGetMetafileHeaderFromStream"); - GdipRecordMetafileStream_ptr = FunctionWrapper.Load(s_gdipModule, "GdipRecordMetafileStream"); - GdipRecordMetafileStreamI_ptr = FunctionWrapper.Load(s_gdipModule, "GdipRecordMetafileStreamI"); GdipCreateFromContext_macosx_ptr = FunctionWrapper.Load(s_gdipModule, "GdipCreateFromContext_macosx"); GdipSetVisibleClip_linux_ptr = FunctionWrapper.Load(s_gdipModule, "GdipSetVisibleClip_linux"); GdipCreateFromXDrawable_linux_ptr = FunctionWrapper.Load(s_gdipModule, "GdipCreateFromXDrawable_linux"); @@ -359,7 +352,7 @@ private static void LoadPlatformFunctionPointers() // Imported functions - private delegate Status GdiplusStartup_delegate(out IntPtr token, ref StartupInput input, out StartupOutput output); + private delegate int GdiplusStartup_delegate(out IntPtr token, ref StartupInput input, out StartupOutput output); private static FunctionWrapper GdiplusStartup_ptr; internal static int GdiplusStartup(out IntPtr token, ref StartupInput input, out StartupOutput output) => (int)GdiplusStartup_ptr.Delegate(out token, ref input, out output); @@ -375,1048 +368,1024 @@ private static void LoadPlatformFunctionPointers() private static FunctionWrapper GdipFree_ptr; internal static void GdipFree(IntPtr ptr) => GdipFree_ptr.Delegate(ptr); - private delegate Status GdipDeleteBrush_delegate(IntPtr brush); + private delegate int GdipDeleteBrush_delegate(IntPtr brush); private static FunctionWrapper GdipDeleteBrush_ptr; - internal static Status GdipDeleteBrush(IntPtr brush) => GdipDeleteBrush_ptr.Delegate(brush); + internal static int GdipDeleteBrush(IntPtr brush) => GdipDeleteBrush_ptr.Delegate(brush); internal static int IntGdipDeleteBrush(HandleRef brush) => (int)GdipDeleteBrush_ptr.Delegate(brush.Handle); - private delegate Status GdipGetBrushType_delegate(IntPtr brush, out BrushType type); + private delegate int GdipGetBrushType_delegate(IntPtr brush, out BrushType type); private static FunctionWrapper GdipGetBrushType_ptr; - internal static Status GdipGetBrushType(IntPtr brush, out BrushType type) => GdipGetBrushType_ptr.Delegate(brush, out type); + internal static int GdipGetBrushType(IntPtr brush, out BrushType type) => GdipGetBrushType_ptr.Delegate(brush, out type); - private delegate Status GdipCreateFromHDC_delegate(IntPtr hDC, out IntPtr graphics); + private delegate int GdipCreateFromHDC_delegate(IntPtr hDC, out IntPtr graphics); private static FunctionWrapper GdipCreateFromHDC_ptr; - internal static Status GdipCreateFromHDC(IntPtr hDC, out IntPtr graphics) => GdipCreateFromHDC_ptr.Delegate(hDC, out graphics); + internal static int GdipCreateFromHDC(IntPtr hDC, out IntPtr graphics) => GdipCreateFromHDC_ptr.Delegate(hDC, out graphics); - private delegate Status GdipDeleteGraphics_delegate(IntPtr graphics); + private delegate int GdipDeleteGraphics_delegate(IntPtr graphics); private static FunctionWrapper GdipDeleteGraphics_ptr; - internal static Status GdipDeleteGraphics(IntPtr graphics) => GdipDeleteGraphics_ptr.Delegate(graphics); + internal static int GdipDeleteGraphics(IntPtr graphics) => GdipDeleteGraphics_ptr.Delegate(graphics); internal static int IntGdipDeleteGraphics(HandleRef graphics) => (int)GdipDeleteGraphics_ptr.Delegate(graphics.Handle); - private delegate Status GdipRestoreGraphics_delegate(IntPtr graphics, uint graphicsState); + private delegate int GdipRestoreGraphics_delegate(IntPtr graphics, uint graphicsState); private static FunctionWrapper GdipRestoreGraphics_ptr; - internal static Status GdipRestoreGraphics(IntPtr graphics, uint graphicsState) => GdipRestoreGraphics_ptr.Delegate(graphics, graphicsState); + internal static int GdipRestoreGraphics(IntPtr graphics, uint graphicsState) => GdipRestoreGraphics_ptr.Delegate(graphics, graphicsState); - private delegate Status GdipSaveGraphics_delegate(IntPtr graphics, out uint state); + private delegate int GdipSaveGraphics_delegate(IntPtr graphics, out uint state); private static FunctionWrapper GdipSaveGraphics_ptr; - internal static Status GdipSaveGraphics(IntPtr graphics, out uint state) => GdipSaveGraphics_ptr.Delegate(graphics, out state); + internal static int GdipSaveGraphics(IntPtr graphics, out uint state) => GdipSaveGraphics_ptr.Delegate(graphics, out state); - private delegate Status GdipDrawArc_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle); + private delegate int GdipDrawArc_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle); private static FunctionWrapper GdipDrawArc_ptr; - internal static Status GdipDrawArc(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipDrawArc_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle); + internal static int GdipDrawArc(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipDrawArc_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle); - private delegate Status GdipDrawArcI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle); + private delegate int GdipDrawArcI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle); private static FunctionWrapper GdipDrawArcI_ptr; - internal static Status GdipDrawArcI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipDrawArcI_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle); + internal static int GdipDrawArcI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipDrawArcI_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle); - private delegate Status GdipDrawBezier_delegate(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4); + private delegate int GdipDrawBezier_delegate(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4); private static FunctionWrapper GdipDrawBezier_ptr; - internal static Status GdipDrawBezier(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) => GdipDrawBezier_ptr.Delegate(graphics, pen, x1, y1, x2, y2, x3, y3, x4, y4); + internal static int GdipDrawBezier(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) => GdipDrawBezier_ptr.Delegate(graphics, pen, x1, y1, x2, y2, x3, y3, x4, y4); - private delegate Status GdipDrawBezierI_delegate(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4); + private delegate int GdipDrawBezierI_delegate(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4); private static FunctionWrapper GdipDrawBezierI_ptr; - internal static Status GdipDrawBezierI(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) => GdipDrawBezierI_ptr.Delegate(graphics, pen, x1, y1, x2, y2, x3, y3, x4, y4); + internal static int GdipDrawBezierI(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) => GdipDrawBezierI_ptr.Delegate(graphics, pen, x1, y1, x2, y2, x3, y3, x4, y4); - private delegate Status GdipDrawEllipseI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height); + private delegate int GdipDrawEllipseI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height); private static FunctionWrapper GdipDrawEllipseI_ptr; - internal static Status GdipDrawEllipseI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height) => GdipDrawEllipseI_ptr.Delegate(graphics, pen, x, y, width, height); + internal static int GdipDrawEllipseI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height) => GdipDrawEllipseI_ptr.Delegate(graphics, pen, x, y, width, height); - private delegate Status GdipDrawEllipse_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height); + private delegate int GdipDrawEllipse_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height); private static FunctionWrapper GdipDrawEllipse_ptr; - internal static Status GdipDrawEllipse(IntPtr graphics, IntPtr pen, float x, float y, float width, float height) => GdipDrawEllipse_ptr.Delegate(graphics, pen, x, y, width, height); + internal static int GdipDrawEllipse(IntPtr graphics, IntPtr pen, float x, float y, float width, float height) => GdipDrawEllipse_ptr.Delegate(graphics, pen, x, y, width, height); - private delegate Status GdipDrawLine_delegate(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2); + private delegate int GdipDrawLine_delegate(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2); private static FunctionWrapper GdipDrawLine_ptr; - internal static Status GdipDrawLine(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2) => GdipDrawLine_ptr.Delegate(graphics, pen, x1, y1, x2, y2); + internal static int GdipDrawLine(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2) => GdipDrawLine_ptr.Delegate(graphics, pen, x1, y1, x2, y2); - private delegate Status GdipDrawLineI_delegate(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2); + private delegate int GdipDrawLineI_delegate(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2); private static FunctionWrapper GdipDrawLineI_ptr; - internal static Status GdipDrawLineI(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2) => GdipDrawLineI_ptr.Delegate(graphics, pen, x1, y1, x2, y2); + internal static int GdipDrawLineI(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2) => GdipDrawLineI_ptr.Delegate(graphics, pen, x1, y1, x2, y2); - private delegate Status GdipDrawLines_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count); + private delegate int GdipDrawLines_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count); private static FunctionWrapper GdipDrawLines_ptr; - internal static Status GdipDrawLines(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawLines_ptr.Delegate(graphics, pen, points, count); + internal static int GdipDrawLines(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawLines_ptr.Delegate(graphics, pen, points, count); - private delegate Status GdipDrawLinesI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count); + private delegate int GdipDrawLinesI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count); private static FunctionWrapper GdipDrawLinesI_ptr; - internal static Status GdipDrawLinesI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawLinesI_ptr.Delegate(graphics, pen, points, count); + internal static int GdipDrawLinesI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawLinesI_ptr.Delegate(graphics, pen, points, count); - private delegate Status GdipDrawPath_delegate(IntPtr graphics, IntPtr pen, IntPtr path); + private delegate int GdipDrawPath_delegate(IntPtr graphics, IntPtr pen, IntPtr path); private static FunctionWrapper GdipDrawPath_ptr; - internal static Status GdipDrawPath(IntPtr graphics, IntPtr pen, IntPtr path) => GdipDrawPath_ptr.Delegate(graphics, pen, path); + internal static int GdipDrawPath(IntPtr graphics, IntPtr pen, IntPtr path) => GdipDrawPath_ptr.Delegate(graphics, pen, path); - private delegate Status GdipDrawPie_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle); + private delegate int GdipDrawPie_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle); private static FunctionWrapper GdipDrawPie_ptr; - internal static Status GdipDrawPie(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipDrawPie_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle); + internal static int GdipDrawPie(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipDrawPie_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle); - private delegate Status GdipDrawPieI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle); + private delegate int GdipDrawPieI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle); private static FunctionWrapper GdipDrawPieI_ptr; - internal static Status GdipDrawPieI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipDrawPieI_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle); + internal static int GdipDrawPieI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipDrawPieI_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle); - private delegate Status GdipDrawPolygon_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count); + private delegate int GdipDrawPolygon_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count); private static FunctionWrapper GdipDrawPolygon_ptr; - internal static Status GdipDrawPolygon(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawPolygon_ptr.Delegate(graphics, pen, points, count); + internal static int GdipDrawPolygon(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawPolygon_ptr.Delegate(graphics, pen, points, count); - private delegate Status GdipDrawPolygonI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count); + private delegate int GdipDrawPolygonI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count); private static FunctionWrapper GdipDrawPolygonI_ptr; - internal static Status GdipDrawPolygonI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawPolygonI_ptr.Delegate(graphics, pen, points, count); + internal static int GdipDrawPolygonI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawPolygonI_ptr.Delegate(graphics, pen, points, count); - private delegate Status GdipDrawRectangle_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height); + private delegate int GdipDrawRectangle_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height); private static FunctionWrapper GdipDrawRectangle_ptr; - internal static Status GdipDrawRectangle(IntPtr graphics, IntPtr pen, float x, float y, float width, float height) => GdipDrawRectangle_ptr.Delegate(graphics, pen, x, y, width, height); + internal static int GdipDrawRectangle(IntPtr graphics, IntPtr pen, float x, float y, float width, float height) => GdipDrawRectangle_ptr.Delegate(graphics, pen, x, y, width, height); - private delegate Status GdipDrawRectangleI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height); + private delegate int GdipDrawRectangleI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height); private static FunctionWrapper GdipDrawRectangleI_ptr; - internal static Status GdipDrawRectangleI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height) => GdipDrawRectangleI_ptr.Delegate(graphics, pen, x, y, width, height); + internal static int GdipDrawRectangleI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height) => GdipDrawRectangleI_ptr.Delegate(graphics, pen, x, y, width, height); - private delegate Status GdipDrawRectangles_delegate(IntPtr graphics, IntPtr pen, RectangleF[] rects, int count); + private delegate int GdipDrawRectangles_delegate(IntPtr graphics, IntPtr pen, RectangleF[] rects, int count); private static FunctionWrapper GdipDrawRectangles_ptr; - internal static Status GdipDrawRectangles(IntPtr graphics, IntPtr pen, RectangleF[] rects, int count) => GdipDrawRectangles_ptr.Delegate(graphics, pen, rects, count); + internal static int GdipDrawRectangles(IntPtr graphics, IntPtr pen, RectangleF[] rects, int count) => GdipDrawRectangles_ptr.Delegate(graphics, pen, rects, count); - private delegate Status GdipDrawRectanglesI_delegate(IntPtr graphics, IntPtr pen, Rectangle[] rects, int count); + private delegate int GdipDrawRectanglesI_delegate(IntPtr graphics, IntPtr pen, Rectangle[] rects, int count); private static FunctionWrapper GdipDrawRectanglesI_ptr; - internal static Status GdipDrawRectanglesI(IntPtr graphics, IntPtr pen, Rectangle[] rects, int count) => GdipDrawRectanglesI_ptr.Delegate(graphics, pen, rects, count); + internal static int GdipDrawRectanglesI(IntPtr graphics, IntPtr pen, Rectangle[] rects, int count) => GdipDrawRectanglesI_ptr.Delegate(graphics, pen, rects, count); - private delegate Status GdipFillEllipseI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height); + private delegate int GdipFillEllipseI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height); private static FunctionWrapper GdipFillEllipseI_ptr; - internal static Status GdipFillEllipseI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height) => GdipFillEllipseI_ptr.Delegate(graphics, pen, x, y, width, height); + internal static int GdipFillEllipseI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height) => GdipFillEllipseI_ptr.Delegate(graphics, pen, x, y, width, height); - private delegate Status GdipFillEllipse_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height); + private delegate int GdipFillEllipse_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height); private static FunctionWrapper GdipFillEllipse_ptr; - internal static Status GdipFillEllipse(IntPtr graphics, IntPtr pen, float x, float y, float width, float height) => GdipFillEllipse_ptr.Delegate(graphics, pen, x, y, width, height); + internal static int GdipFillEllipse(IntPtr graphics, IntPtr pen, float x, float y, float width, float height) => GdipFillEllipse_ptr.Delegate(graphics, pen, x, y, width, height); - private delegate Status GdipFillPolygon_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count, FillMode fillMode); + private delegate int GdipFillPolygon_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count, FillMode fillMode); private static FunctionWrapper GdipFillPolygon_ptr; - internal static Status GdipFillPolygon(IntPtr graphics, IntPtr brush, PointF[] points, int count, FillMode fillMode) => GdipFillPolygon_ptr.Delegate(graphics, brush, points, count, fillMode); + internal static int GdipFillPolygon(IntPtr graphics, IntPtr brush, PointF[] points, int count, FillMode fillMode) => GdipFillPolygon_ptr.Delegate(graphics, brush, points, count, fillMode); - private delegate Status GdipFillPolygonI_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count, FillMode fillMode); + private delegate int GdipFillPolygonI_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count, FillMode fillMode); private static FunctionWrapper GdipFillPolygonI_ptr; - internal static Status GdipFillPolygonI(IntPtr graphics, IntPtr brush, Point[] points, int count, FillMode fillMode) => GdipFillPolygonI_ptr.Delegate(graphics, brush, points, count, fillMode); + internal static int GdipFillPolygonI(IntPtr graphics, IntPtr brush, Point[] points, int count, FillMode fillMode) => GdipFillPolygonI_ptr.Delegate(graphics, brush, points, count, fillMode); - private delegate Status GdipFillPolygon2_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count); + private delegate int GdipFillPolygon2_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count); private static FunctionWrapper GdipFillPolygon2_ptr; - internal static Status GdipFillPolygon2(IntPtr graphics, IntPtr brush, PointF[] points, int count) => GdipFillPolygon2_ptr.Delegate(graphics, brush, points, count); + internal static int GdipFillPolygon2(IntPtr graphics, IntPtr brush, PointF[] points, int count) => GdipFillPolygon2_ptr.Delegate(graphics, brush, points, count); - private delegate Status GdipFillPolygon2I_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count); + private delegate int GdipFillPolygon2I_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count); private static FunctionWrapper GdipFillPolygon2I_ptr; - internal static Status GdipFillPolygon2I(IntPtr graphics, IntPtr brush, Point[] points, int count) => GdipFillPolygon2I_ptr.Delegate(graphics, brush, points, count); + internal static int GdipFillPolygon2I(IntPtr graphics, IntPtr brush, Point[] points, int count) => GdipFillPolygon2I_ptr.Delegate(graphics, brush, points, count); - private delegate Status GdipFillRectangle_delegate(IntPtr graphics, IntPtr brush, float x1, float y1, float x2, float y2); + private delegate int GdipFillRectangle_delegate(IntPtr graphics, IntPtr brush, float x1, float y1, float x2, float y2); private static FunctionWrapper GdipFillRectangle_ptr; - internal static Status GdipFillRectangle(IntPtr graphics, IntPtr brush, float x1, float y1, float x2, float y2) => GdipFillRectangle_ptr.Delegate(graphics, brush, x1, y1, x2, y2); + internal static int GdipFillRectangle(IntPtr graphics, IntPtr brush, float x1, float y1, float x2, float y2) => GdipFillRectangle_ptr.Delegate(graphics, brush, x1, y1, x2, y2); - private delegate Status GdipFillRectangleI_delegate(IntPtr graphics, IntPtr brush, int x1, int y1, int x2, int y2); + private delegate int GdipFillRectangleI_delegate(IntPtr graphics, IntPtr brush, int x1, int y1, int x2, int y2); private static FunctionWrapper GdipFillRectangleI_ptr; - internal static Status GdipFillRectangleI(IntPtr graphics, IntPtr brush, int x1, int y1, int x2, int y2) => GdipFillRectangleI_ptr.Delegate(graphics, brush, x1, y1, x2, y2); + internal static int GdipFillRectangleI(IntPtr graphics, IntPtr brush, int x1, int y1, int x2, int y2) => GdipFillRectangleI_ptr.Delegate(graphics, brush, x1, y1, x2, y2); - private delegate Status GdipFillRectangles_delegate(IntPtr graphics, IntPtr brush, RectangleF[] rects, int count); + private delegate int GdipFillRectangles_delegate(IntPtr graphics, IntPtr brush, RectangleF[] rects, int count); private static FunctionWrapper GdipFillRectangles_ptr; - internal static Status GdipFillRectangles(IntPtr graphics, IntPtr brush, RectangleF[] rects, int count) => GdipFillRectangles_ptr.Delegate(graphics, brush, rects, count); + internal static int GdipFillRectangles(IntPtr graphics, IntPtr brush, RectangleF[] rects, int count) => GdipFillRectangles_ptr.Delegate(graphics, brush, rects, count); - private delegate Status GdipFillRectanglesI_delegate(IntPtr graphics, IntPtr brush, Rectangle[] rects, int count); + private delegate int GdipFillRectanglesI_delegate(IntPtr graphics, IntPtr brush, Rectangle[] rects, int count); private static FunctionWrapper GdipFillRectanglesI_ptr; - internal static Status GdipFillRectanglesI(IntPtr graphics, IntPtr brush, Rectangle[] rects, int count) => GdipFillRectanglesI_ptr.Delegate(graphics, brush, rects, count); + internal static int GdipFillRectanglesI(IntPtr graphics, IntPtr brush, Rectangle[] rects, int count) => GdipFillRectanglesI_ptr.Delegate(graphics, brush, rects, count); - private delegate Status GdipDrawString_delegate(IntPtr graphics, [MarshalAs(UnmanagedType.LPWStr)]string text, int len, IntPtr font, ref RectangleF rc, IntPtr format, IntPtr brush); + private delegate int GdipDrawString_delegate(IntPtr graphics, [MarshalAs(UnmanagedType.LPWStr)]string text, int len, IntPtr font, ref RectangleF rc, IntPtr format, IntPtr brush); private static FunctionWrapper GdipDrawString_ptr; - internal static Status GdipDrawString(IntPtr graphics, string text, int len, IntPtr font, ref RectangleF rc, IntPtr format, IntPtr brush) => GdipDrawString_ptr.Delegate(graphics, text, len, font, ref rc, format, brush); + internal static int GdipDrawString(IntPtr graphics, string text, int len, IntPtr font, ref RectangleF rc, IntPtr format, IntPtr brush) => GdipDrawString_ptr.Delegate(graphics, text, len, font, ref rc, format, brush); - private delegate Status GdipGetDC_delegate(IntPtr graphics, out IntPtr hdc); + private delegate int GdipGetDC_delegate(IntPtr graphics, out IntPtr hdc); private static FunctionWrapper GdipGetDC_ptr; - internal static Status GdipGetDC(IntPtr graphics, out IntPtr hdc) => GdipGetDC_ptr.Delegate(graphics, out hdc); + internal static int GdipGetDC(IntPtr graphics, out IntPtr hdc) => GdipGetDC_ptr.Delegate(graphics, out hdc); - private delegate Status GdipReleaseDC_delegate(IntPtr graphics, IntPtr hdc); + private delegate int GdipReleaseDC_delegate(IntPtr graphics, IntPtr hdc); private static FunctionWrapper GdipReleaseDC_ptr; - internal static Status GdipReleaseDC(IntPtr graphics, IntPtr hdc) => GdipReleaseDC_ptr.Delegate(graphics, hdc); + internal static int GdipReleaseDC(IntPtr graphics, IntPtr hdc) => GdipReleaseDC_ptr.Delegate(graphics, hdc); internal static int IntGdipReleaseDC(HandleRef graphics, HandleRef hdc) => (int)GdipReleaseDC_ptr.Delegate(graphics.Handle, hdc.Handle); - private delegate Status GdipDrawImageRectI_delegate(IntPtr graphics, IntPtr image, int x, int y, int width, int height); + private delegate int GdipDrawImageRectI_delegate(IntPtr graphics, IntPtr image, int x, int y, int width, int height); private static FunctionWrapper GdipDrawImageRectI_ptr; - internal static Status GdipDrawImageRectI(IntPtr graphics, IntPtr image, int x, int y, int width, int height) => GdipDrawImageRectI_ptr.Delegate(graphics, image, x, y, width, height); + internal static int GdipDrawImageRectI(IntPtr graphics, IntPtr image, int x, int y, int width, int height) => GdipDrawImageRectI_ptr.Delegate(graphics, image, x, y, width, height); - private delegate Status GdipGetRenderingOrigin_delegate(IntPtr graphics, out int x, out int y); + private delegate int GdipGetRenderingOrigin_delegate(IntPtr graphics, out int x, out int y); private static FunctionWrapper GdipGetRenderingOrigin_ptr; - internal static Status GdipGetRenderingOrigin(IntPtr graphics, out int x, out int y) => GdipGetRenderingOrigin_ptr.Delegate(graphics, out x, out y); + internal static int GdipGetRenderingOrigin(IntPtr graphics, out int x, out int y) => GdipGetRenderingOrigin_ptr.Delegate(graphics, out x, out y); - private delegate Status GdipSetRenderingOrigin_delegate(IntPtr graphics, int x, int y); + private delegate int GdipSetRenderingOrigin_delegate(IntPtr graphics, int x, int y); private static FunctionWrapper GdipSetRenderingOrigin_ptr; - internal static Status GdipSetRenderingOrigin(IntPtr graphics, int x, int y) => GdipSetRenderingOrigin_ptr.Delegate(graphics, x, y); + internal static int GdipSetRenderingOrigin(IntPtr graphics, int x, int y) => GdipSetRenderingOrigin_ptr.Delegate(graphics, x, y); - private delegate Status GdipCloneBitmapArea_delegate(float x, float y, float width, float height, PixelFormat format, IntPtr original, out IntPtr bitmap); + private delegate int GdipCloneBitmapArea_delegate(float x, float y, float width, float height, PixelFormat format, IntPtr original, out IntPtr bitmap); private static FunctionWrapper GdipCloneBitmapArea_ptr; - internal static Status GdipCloneBitmapArea(float x, float y, float width, float height, PixelFormat format, IntPtr original, out IntPtr bitmap) => GdipCloneBitmapArea_ptr.Delegate(x, y, width, height, format, original, out bitmap); + internal static int GdipCloneBitmapArea(float x, float y, float width, float height, PixelFormat format, IntPtr original, out IntPtr bitmap) => GdipCloneBitmapArea_ptr.Delegate(x, y, width, height, format, original, out bitmap); - private delegate Status GdipCloneBitmapAreaI_delegate(int x, int y, int width, int height, PixelFormat format, IntPtr original, out IntPtr bitmap); + private delegate int GdipCloneBitmapAreaI_delegate(int x, int y, int width, int height, PixelFormat format, IntPtr original, out IntPtr bitmap); private static FunctionWrapper GdipCloneBitmapAreaI_ptr; - internal static Status GdipCloneBitmapAreaI(int x, int y, int width, int height, PixelFormat format, IntPtr original, out IntPtr bitmap) => GdipCloneBitmapAreaI_ptr.Delegate(x, y, width, height, format, original, out bitmap); + internal static int GdipCloneBitmapAreaI(int x, int y, int width, int height, PixelFormat format, IntPtr original, out IntPtr bitmap) => GdipCloneBitmapAreaI_ptr.Delegate(x, y, width, height, format, original, out bitmap); - private delegate Status GdipGraphicsClear_delegate(IntPtr graphics, int argb); + private delegate int GdipGraphicsClear_delegate(IntPtr graphics, int argb); private static FunctionWrapper GdipGraphicsClear_ptr; - internal static Status GdipGraphicsClear(IntPtr graphics, int argb) => GdipGraphicsClear_ptr.Delegate(graphics, argb); + internal static int GdipGraphicsClear(IntPtr graphics, int argb) => GdipGraphicsClear_ptr.Delegate(graphics, argb); - private delegate Status GdipDrawClosedCurve_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count); + private delegate int GdipDrawClosedCurve_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count); private static FunctionWrapper GdipDrawClosedCurve_ptr; - internal static Status GdipDrawClosedCurve(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawClosedCurve_ptr.Delegate(graphics, pen, points, count); + internal static int GdipDrawClosedCurve(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawClosedCurve_ptr.Delegate(graphics, pen, points, count); - private delegate Status GdipDrawClosedCurveI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count); + private delegate int GdipDrawClosedCurveI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count); private static FunctionWrapper GdipDrawClosedCurveI_ptr; - internal static Status GdipDrawClosedCurveI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawClosedCurveI_ptr.Delegate(graphics, pen, points, count); + internal static int GdipDrawClosedCurveI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawClosedCurveI_ptr.Delegate(graphics, pen, points, count); - private delegate Status GdipDrawClosedCurve2_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension); + private delegate int GdipDrawClosedCurve2_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension); private static FunctionWrapper GdipDrawClosedCurve2_ptr; - internal static Status GdipDrawClosedCurve2(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension) => GdipDrawClosedCurve2_ptr.Delegate(graphics, pen, points, count, tension); + internal static int GdipDrawClosedCurve2(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension) => GdipDrawClosedCurve2_ptr.Delegate(graphics, pen, points, count, tension); - private delegate Status GdipDrawClosedCurve2I_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension); + private delegate int GdipDrawClosedCurve2I_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension); private static FunctionWrapper GdipDrawClosedCurve2I_ptr; - internal static Status GdipDrawClosedCurve2I(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension) => GdipDrawClosedCurve2I_ptr.Delegate(graphics, pen, points, count, tension); + internal static int GdipDrawClosedCurve2I(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension) => GdipDrawClosedCurve2I_ptr.Delegate(graphics, pen, points, count, tension); - private delegate Status GdipDrawCurve_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count); + private delegate int GdipDrawCurve_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count); private static FunctionWrapper GdipDrawCurve_ptr; - internal static Status GdipDrawCurve(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawCurve_ptr.Delegate(graphics, pen, points, count); + internal static int GdipDrawCurve(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawCurve_ptr.Delegate(graphics, pen, points, count); - private delegate Status GdipDrawCurveI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count); + private delegate int GdipDrawCurveI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count); private static FunctionWrapper GdipDrawCurveI_ptr; - internal static Status GdipDrawCurveI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawCurveI_ptr.Delegate(graphics, pen, points, count); + internal static int GdipDrawCurveI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawCurveI_ptr.Delegate(graphics, pen, points, count); - private delegate Status GdipDrawCurve2_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension); + private delegate int GdipDrawCurve2_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension); private static FunctionWrapper GdipDrawCurve2_ptr; - internal static Status GdipDrawCurve2(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension) => GdipDrawCurve2_ptr.Delegate(graphics, pen, points, count, tension); + internal static int GdipDrawCurve2(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension) => GdipDrawCurve2_ptr.Delegate(graphics, pen, points, count, tension); - private delegate Status GdipDrawCurve2I_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension); + private delegate int GdipDrawCurve2I_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension); private static FunctionWrapper GdipDrawCurve2I_ptr; - internal static Status GdipDrawCurve2I(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension) => GdipDrawCurve2I_ptr.Delegate(graphics, pen, points, count, tension); + internal static int GdipDrawCurve2I(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension) => GdipDrawCurve2I_ptr.Delegate(graphics, pen, points, count, tension); - private delegate Status GdipDrawCurve3_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count, int offset, int numberOfSegments, float tension); + private delegate int GdipDrawCurve3_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count, int offset, int numberOfSegments, float tension); private static FunctionWrapper GdipDrawCurve3_ptr; - internal static Status GdipDrawCurve3(IntPtr graphics, IntPtr pen, PointF[] points, int count, int offset, int numberOfSegments, float tension) => GdipDrawCurve3_ptr.Delegate(graphics, pen, points, count, offset, numberOfSegments, tension); + internal static int GdipDrawCurve3(IntPtr graphics, IntPtr pen, PointF[] points, int count, int offset, int numberOfSegments, float tension) => GdipDrawCurve3_ptr.Delegate(graphics, pen, points, count, offset, numberOfSegments, tension); - private delegate Status GdipDrawCurve3I_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count, int offset, int numberOfSegments, float tension); + private delegate int GdipDrawCurve3I_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count, int offset, int numberOfSegments, float tension); private static FunctionWrapper GdipDrawCurve3I_ptr; - internal static Status GdipDrawCurve3I(IntPtr graphics, IntPtr pen, Point[] points, int count, int offset, int numberOfSegments, float tension) => GdipDrawCurve3I_ptr.Delegate(graphics, pen, points, count, offset, numberOfSegments, tension); + internal static int GdipDrawCurve3I(IntPtr graphics, IntPtr pen, Point[] points, int count, int offset, int numberOfSegments, float tension) => GdipDrawCurve3I_ptr.Delegate(graphics, pen, points, count, offset, numberOfSegments, tension); - private delegate Status GdipFillClosedCurve_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count); + private delegate int GdipFillClosedCurve_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count); private static FunctionWrapper GdipFillClosedCurve_ptr; - internal static Status GdipFillClosedCurve(IntPtr graphics, IntPtr brush, PointF[] points, int count) => GdipFillClosedCurve_ptr.Delegate(graphics, brush, points, count); + internal static int GdipFillClosedCurve(IntPtr graphics, IntPtr brush, PointF[] points, int count) => GdipFillClosedCurve_ptr.Delegate(graphics, brush, points, count); - private delegate Status GdipFillClosedCurveI_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count); + private delegate int GdipFillClosedCurveI_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count); private static FunctionWrapper GdipFillClosedCurveI_ptr; - internal static Status GdipFillClosedCurveI(IntPtr graphics, IntPtr brush, Point[] points, int count) => GdipFillClosedCurveI_ptr.Delegate(graphics, brush, points, count); + internal static int GdipFillClosedCurveI(IntPtr graphics, IntPtr brush, Point[] points, int count) => GdipFillClosedCurveI_ptr.Delegate(graphics, brush, points, count); - private delegate Status GdipFillClosedCurve2_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count, float tension, FillMode fillMode); + private delegate int GdipFillClosedCurve2_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count, float tension, FillMode fillMode); private static FunctionWrapper GdipFillClosedCurve2_ptr; - internal static Status GdipFillClosedCurve2(IntPtr graphics, IntPtr brush, PointF[] points, int count, float tension, FillMode fillMode) => GdipFillClosedCurve2_ptr.Delegate(graphics, brush, points, count, tension, fillMode); + internal static int GdipFillClosedCurve2(IntPtr graphics, IntPtr brush, PointF[] points, int count, float tension, FillMode fillMode) => GdipFillClosedCurve2_ptr.Delegate(graphics, brush, points, count, tension, fillMode); - private delegate Status GdipFillClosedCurve2I_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count, float tension, FillMode fillMode); + private delegate int GdipFillClosedCurve2I_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count, float tension, FillMode fillMode); private static FunctionWrapper GdipFillClosedCurve2I_ptr; - internal static Status GdipFillClosedCurve2I(IntPtr graphics, IntPtr brush, Point[] points, int count, float tension, FillMode fillMode) => GdipFillClosedCurve2I_ptr.Delegate(graphics, brush, points, count, tension, fillMode); + internal static int GdipFillClosedCurve2I(IntPtr graphics, IntPtr brush, Point[] points, int count, float tension, FillMode fillMode) => GdipFillClosedCurve2I_ptr.Delegate(graphics, brush, points, count, tension, fillMode); - private delegate Status GdipFillPie_delegate(IntPtr graphics, IntPtr brush, float x, float y, float width, float height, float startAngle, float sweepAngle); + private delegate int GdipFillPie_delegate(IntPtr graphics, IntPtr brush, float x, float y, float width, float height, float startAngle, float sweepAngle); private static FunctionWrapper GdipFillPie_ptr; - internal static Status GdipFillPie(IntPtr graphics, IntPtr brush, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipFillPie_ptr.Delegate(graphics, brush, x, y, width, height, startAngle, sweepAngle); + internal static int GdipFillPie(IntPtr graphics, IntPtr brush, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipFillPie_ptr.Delegate(graphics, brush, x, y, width, height, startAngle, sweepAngle); - private delegate Status GdipFillPieI_delegate(IntPtr graphics, IntPtr brush, int x, int y, int width, int height, float startAngle, float sweepAngle); + private delegate int GdipFillPieI_delegate(IntPtr graphics, IntPtr brush, int x, int y, int width, int height, float startAngle, float sweepAngle); private static FunctionWrapper GdipFillPieI_ptr; - internal static Status GdipFillPieI(IntPtr graphics, IntPtr brush, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipFillPieI_ptr.Delegate(graphics, brush, x, y, width, height, startAngle, sweepAngle); + internal static int GdipFillPieI(IntPtr graphics, IntPtr brush, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipFillPieI_ptr.Delegate(graphics, brush, x, y, width, height, startAngle, sweepAngle); - private delegate Status GdipFillPath_delegate(IntPtr graphics, IntPtr brush, IntPtr path); + private delegate int GdipFillPath_delegate(IntPtr graphics, IntPtr brush, IntPtr path); private static FunctionWrapper GdipFillPath_ptr; - internal static Status GdipFillPath(IntPtr graphics, IntPtr brush, IntPtr path) => GdipFillPath_ptr.Delegate(graphics, brush, path); + internal static int GdipFillPath(IntPtr graphics, IntPtr brush, IntPtr path) => GdipFillPath_ptr.Delegate(graphics, brush, path); - private delegate Status GdipGetNearestColor_delegate(IntPtr graphics, out int argb); + private delegate int GdipGetNearestColor_delegate(IntPtr graphics, out int argb); private static FunctionWrapper GdipGetNearestColor_ptr; - internal static Status GdipGetNearestColor(IntPtr graphics, out int argb) => GdipGetNearestColor_ptr.Delegate(graphics, out argb); + internal static int GdipGetNearestColor(IntPtr graphics, out int argb) => GdipGetNearestColor_ptr.Delegate(graphics, out argb); - private delegate Status GdipTransformPoints_delegate(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count); + private delegate int GdipTransformPoints_delegate(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count); private static FunctionWrapper GdipTransformPoints_ptr; - internal static Status GdipTransformPoints(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count) => GdipTransformPoints_ptr.Delegate(graphics, destSpace, srcSpace, points, count); + internal static int GdipTransformPoints(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count) => GdipTransformPoints_ptr.Delegate(graphics, destSpace, srcSpace, points, count); - private delegate Status GdipTransformPointsI_delegate(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count); + private delegate int GdipTransformPointsI_delegate(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count); private static FunctionWrapper GdipTransformPointsI_ptr; - internal static Status GdipTransformPointsI(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count) => GdipTransformPointsI_ptr.Delegate(graphics, destSpace, srcSpace, points, count); + internal static int GdipTransformPointsI(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count) => GdipTransformPointsI_ptr.Delegate(graphics, destSpace, srcSpace, points, count); - private delegate Status GdipSetCompositingMode_delegate(IntPtr graphics, CompositingMode compositingMode); + private delegate int GdipSetCompositingMode_delegate(IntPtr graphics, CompositingMode compositingMode); private static FunctionWrapper GdipSetCompositingMode_ptr; - internal static Status GdipSetCompositingMode(IntPtr graphics, CompositingMode compositingMode) => GdipSetCompositingMode_ptr.Delegate(graphics, compositingMode); + internal static int GdipSetCompositingMode(IntPtr graphics, CompositingMode compositingMode) => GdipSetCompositingMode_ptr.Delegate(graphics, compositingMode); - private delegate Status GdipGetCompositingMode_delegate(IntPtr graphics, out CompositingMode compositingMode); + private delegate int GdipGetCompositingMode_delegate(IntPtr graphics, out CompositingMode compositingMode); private static FunctionWrapper GdipGetCompositingMode_ptr; - internal static Status GdipGetCompositingMode(IntPtr graphics, out CompositingMode compositingMode) => GdipGetCompositingMode_ptr.Delegate(graphics, out compositingMode); + internal static int GdipGetCompositingMode(IntPtr graphics, out CompositingMode compositingMode) => GdipGetCompositingMode_ptr.Delegate(graphics, out compositingMode); - private delegate Status GdipSetCompositingQuality_delegate(IntPtr graphics, CompositingQuality compositingQuality); + private delegate int GdipSetCompositingQuality_delegate(IntPtr graphics, CompositingQuality compositingQuality); private static FunctionWrapper GdipSetCompositingQuality_ptr; - internal static Status GdipSetCompositingQuality(IntPtr graphics, CompositingQuality compositingQuality) => GdipSetCompositingQuality_ptr.Delegate(graphics, compositingQuality); + internal static int GdipSetCompositingQuality(IntPtr graphics, CompositingQuality compositingQuality) => GdipSetCompositingQuality_ptr.Delegate(graphics, compositingQuality); - private delegate Status GdipGetCompositingQuality_delegate(IntPtr graphics, out CompositingQuality compositingQuality); + private delegate int GdipGetCompositingQuality_delegate(IntPtr graphics, out CompositingQuality compositingQuality); private static FunctionWrapper GdipGetCompositingQuality_ptr; - internal static Status GdipGetCompositingQuality(IntPtr graphics, out CompositingQuality compositingQuality) => GdipGetCompositingQuality_ptr.Delegate(graphics, out compositingQuality); + internal static int GdipGetCompositingQuality(IntPtr graphics, out CompositingQuality compositingQuality) => GdipGetCompositingQuality_ptr.Delegate(graphics, out compositingQuality); - private delegate Status GdipSetInterpolationMode_delegate(IntPtr graphics, InterpolationMode interpolationMode); + private delegate int GdipSetInterpolationMode_delegate(IntPtr graphics, InterpolationMode interpolationMode); private static FunctionWrapper GdipSetInterpolationMode_ptr; - internal static Status GdipSetInterpolationMode(IntPtr graphics, InterpolationMode interpolationMode) => GdipSetInterpolationMode_ptr.Delegate(graphics, interpolationMode); + internal static int GdipSetInterpolationMode(IntPtr graphics, InterpolationMode interpolationMode) => GdipSetInterpolationMode_ptr.Delegate(graphics, interpolationMode); - private delegate Status GdipGetInterpolationMode_delegate(IntPtr graphics, out InterpolationMode interpolationMode); + private delegate int GdipGetInterpolationMode_delegate(IntPtr graphics, out InterpolationMode interpolationMode); private static FunctionWrapper GdipGetInterpolationMode_ptr; - internal static Status GdipGetInterpolationMode(IntPtr graphics, out InterpolationMode interpolationMode) => GdipGetInterpolationMode_ptr.Delegate(graphics, out interpolationMode); + internal static int GdipGetInterpolationMode(IntPtr graphics, out InterpolationMode interpolationMode) => GdipGetInterpolationMode_ptr.Delegate(graphics, out interpolationMode); - private delegate Status GdipGetDpiX_delegate(IntPtr graphics, out float dpi); + private delegate int GdipGetDpiX_delegate(IntPtr graphics, out float dpi); private static FunctionWrapper GdipGetDpiX_ptr; - internal static Status GdipGetDpiX(IntPtr graphics, out float dpi) => GdipGetDpiX_ptr.Delegate(graphics, out dpi); + internal static int GdipGetDpiX(IntPtr graphics, out float dpi) => GdipGetDpiX_ptr.Delegate(graphics, out dpi); - private delegate Status GdipGetDpiY_delegate(IntPtr graphics, out float dpi); + private delegate int GdipGetDpiY_delegate(IntPtr graphics, out float dpi); private static FunctionWrapper GdipGetDpiY_ptr; - internal static Status GdipGetDpiY(IntPtr graphics, out float dpi) => GdipGetDpiY_ptr.Delegate(graphics, out dpi); + internal static int GdipGetDpiY(IntPtr graphics, out float dpi) => GdipGetDpiY_ptr.Delegate(graphics, out dpi); - private delegate Status GdipGetPageUnit_delegate(IntPtr graphics, out GraphicsUnit unit); + private delegate int GdipGetPageUnit_delegate(IntPtr graphics, out GraphicsUnit unit); private static FunctionWrapper GdipGetPageUnit_ptr; - internal static Status GdipGetPageUnit(IntPtr graphics, out GraphicsUnit unit) => GdipGetPageUnit_ptr.Delegate(graphics, out unit); + internal static int GdipGetPageUnit(IntPtr graphics, out GraphicsUnit unit) => GdipGetPageUnit_ptr.Delegate(graphics, out unit); - private delegate Status GdipGetPageScale_delegate(IntPtr graphics, out float scale); + private delegate int GdipGetPageScale_delegate(IntPtr graphics, out float scale); private static FunctionWrapper GdipGetPageScale_ptr; - internal static Status GdipGetPageScale(IntPtr graphics, out float scale) => GdipGetPageScale_ptr.Delegate(graphics, out scale); + internal static int GdipGetPageScale(IntPtr graphics, out float scale) => GdipGetPageScale_ptr.Delegate(graphics, out scale); - private delegate Status GdipSetPageUnit_delegate(IntPtr graphics, GraphicsUnit unit); + private delegate int GdipSetPageUnit_delegate(IntPtr graphics, GraphicsUnit unit); private static FunctionWrapper GdipSetPageUnit_ptr; - internal static Status GdipSetPageUnit(IntPtr graphics, GraphicsUnit unit) => GdipSetPageUnit_ptr.Delegate(graphics, unit); + internal static int GdipSetPageUnit(IntPtr graphics, GraphicsUnit unit) => GdipSetPageUnit_ptr.Delegate(graphics, unit); - private delegate Status GdipSetPageScale_delegate(IntPtr graphics, float scale); + private delegate int GdipSetPageScale_delegate(IntPtr graphics, float scale); private static FunctionWrapper GdipSetPageScale_ptr; - internal static Status GdipSetPageScale(IntPtr graphics, float scale) => GdipSetPageScale_ptr.Delegate(graphics, scale); + internal static int GdipSetPageScale(IntPtr graphics, float scale) => GdipSetPageScale_ptr.Delegate(graphics, scale); - private delegate Status GdipSetPixelOffsetMode_delegate(IntPtr graphics, PixelOffsetMode pixelOffsetMode); + private delegate int GdipSetPixelOffsetMode_delegate(IntPtr graphics, PixelOffsetMode pixelOffsetMode); private static FunctionWrapper GdipSetPixelOffsetMode_ptr; - internal static Status GdipSetPixelOffsetMode(IntPtr graphics, PixelOffsetMode pixelOffsetMode) => GdipSetPixelOffsetMode_ptr.Delegate(graphics, pixelOffsetMode); + internal static int GdipSetPixelOffsetMode(IntPtr graphics, PixelOffsetMode pixelOffsetMode) => GdipSetPixelOffsetMode_ptr.Delegate(graphics, pixelOffsetMode); - private delegate Status GdipGetPixelOffsetMode_delegate(IntPtr graphics, out PixelOffsetMode pixelOffsetMode); + private delegate int GdipGetPixelOffsetMode_delegate(IntPtr graphics, out PixelOffsetMode pixelOffsetMode); private static FunctionWrapper GdipGetPixelOffsetMode_ptr; - internal static Status GdipGetPixelOffsetMode(IntPtr graphics, out PixelOffsetMode pixelOffsetMode) => GdipGetPixelOffsetMode_ptr.Delegate(graphics, out pixelOffsetMode); + internal static int GdipGetPixelOffsetMode(IntPtr graphics, out PixelOffsetMode pixelOffsetMode) => GdipGetPixelOffsetMode_ptr.Delegate(graphics, out pixelOffsetMode); - private delegate Status GdipSetSmoothingMode_delegate(IntPtr graphics, SmoothingMode smoothingMode); + private delegate int GdipSetSmoothingMode_delegate(IntPtr graphics, SmoothingMode smoothingMode); private static FunctionWrapper GdipSetSmoothingMode_ptr; - internal static Status GdipSetSmoothingMode(IntPtr graphics, SmoothingMode smoothingMode) => GdipSetSmoothingMode_ptr.Delegate(graphics, smoothingMode); + internal static int GdipSetSmoothingMode(IntPtr graphics, SmoothingMode smoothingMode) => GdipSetSmoothingMode_ptr.Delegate(graphics, smoothingMode); - private delegate Status GdipGetSmoothingMode_delegate(IntPtr graphics, out SmoothingMode smoothingMode); + private delegate int GdipGetSmoothingMode_delegate(IntPtr graphics, out SmoothingMode smoothingMode); private static FunctionWrapper GdipGetSmoothingMode_ptr; - internal static Status GdipGetSmoothingMode(IntPtr graphics, out SmoothingMode smoothingMode) => GdipGetSmoothingMode_ptr.Delegate(graphics, out smoothingMode); + internal static int GdipGetSmoothingMode(IntPtr graphics, out SmoothingMode smoothingMode) => GdipGetSmoothingMode_ptr.Delegate(graphics, out smoothingMode); - private delegate Status GdipSetTextContrast_delegate(IntPtr graphics, int contrast); + private delegate int GdipSetTextContrast_delegate(IntPtr graphics, int contrast); private static FunctionWrapper GdipSetTextContrast_ptr; - internal static Status GdipSetTextContrast(IntPtr graphics, int contrast) => GdipSetTextContrast_ptr.Delegate(graphics, contrast); + internal static int GdipSetTextContrast(IntPtr graphics, int contrast) => GdipSetTextContrast_ptr.Delegate(graphics, contrast); - private delegate Status GdipGetTextContrast_delegate(IntPtr graphics, out int contrast); + private delegate int GdipGetTextContrast_delegate(IntPtr graphics, out int contrast); private static FunctionWrapper GdipGetTextContrast_ptr; - internal static Status GdipGetTextContrast(IntPtr graphics, out int contrast) => GdipGetTextContrast_ptr.Delegate(graphics, out contrast); + internal static int GdipGetTextContrast(IntPtr graphics, out int contrast) => GdipGetTextContrast_ptr.Delegate(graphics, out contrast); - private delegate Status GdipSetTextRenderingHint_delegate(IntPtr graphics, TextRenderingHint mode); + private delegate int GdipSetTextRenderingHint_delegate(IntPtr graphics, TextRenderingHint mode); private static FunctionWrapper GdipSetTextRenderingHint_ptr; - internal static Status GdipSetTextRenderingHint(IntPtr graphics, TextRenderingHint mode) => GdipSetTextRenderingHint_ptr.Delegate(graphics, mode); + internal static int GdipSetTextRenderingHint(IntPtr graphics, TextRenderingHint mode) => GdipSetTextRenderingHint_ptr.Delegate(graphics, mode); - private delegate Status GdipGetTextRenderingHint_delegate(IntPtr graphics, out TextRenderingHint mode); + private delegate int GdipGetTextRenderingHint_delegate(IntPtr graphics, out TextRenderingHint mode); private static FunctionWrapper GdipGetTextRenderingHint_ptr; - internal static Status GdipGetTextRenderingHint(IntPtr graphics, out TextRenderingHint mode) => GdipGetTextRenderingHint_ptr.Delegate(graphics, out mode); + internal static int GdipGetTextRenderingHint(IntPtr graphics, out TextRenderingHint mode) => GdipGetTextRenderingHint_ptr.Delegate(graphics, out mode); - private delegate Status GdipFlush_delegate(IntPtr graphics, FlushIntention intention); + private delegate int GdipFlush_delegate(IntPtr graphics, FlushIntention intention); private static FunctionWrapper GdipFlush_ptr; - internal static Status GdipFlush(IntPtr graphics, FlushIntention intention) => GdipFlush_ptr.Delegate(graphics, intention); + internal static int GdipFlush(IntPtr graphics, FlushIntention intention) => GdipFlush_ptr.Delegate(graphics, intention); - private delegate Status GdipAddPathString_delegate(IntPtr path, [MarshalAs(UnmanagedType.LPWStr)]string s, int lenght, IntPtr family, int style, float emSize, ref RectangleF layoutRect, IntPtr format); + private delegate int GdipAddPathString_delegate(IntPtr path, [MarshalAs(UnmanagedType.LPWStr)]string s, int lenght, IntPtr family, int style, float emSize, ref RectangleF layoutRect, IntPtr format); private static FunctionWrapper GdipAddPathString_ptr; - internal static Status GdipAddPathString(IntPtr path, string s, int lenght, IntPtr family, int style, float emSize, ref RectangleF layoutRect, IntPtr format) => GdipAddPathString_ptr.Delegate(path, s, lenght, family, style, emSize, ref layoutRect, format); + internal static int GdipAddPathString(IntPtr path, string s, int lenght, IntPtr family, int style, float emSize, ref RectangleF layoutRect, IntPtr format) => GdipAddPathString_ptr.Delegate(path, s, lenght, family, style, emSize, ref layoutRect, format); - private delegate Status GdipAddPathStringI_delegate(IntPtr path, [MarshalAs(UnmanagedType.LPWStr)]string s, int lenght, IntPtr family, int style, float emSize, ref Rectangle layoutRect, IntPtr format); + private delegate int GdipAddPathStringI_delegate(IntPtr path, [MarshalAs(UnmanagedType.LPWStr)]string s, int lenght, IntPtr family, int style, float emSize, ref Rectangle layoutRect, IntPtr format); private static FunctionWrapper GdipAddPathStringI_ptr; - internal static Status GdipAddPathStringI(IntPtr path, string s, int lenght, IntPtr family, int style, float emSize, ref Rectangle layoutRect, IntPtr format) => GdipAddPathStringI_ptr.Delegate(path, s, lenght, family, style, emSize, ref layoutRect, format); + internal static int GdipAddPathStringI(IntPtr path, string s, int lenght, IntPtr family, int style, float emSize, ref Rectangle layoutRect, IntPtr format) => GdipAddPathStringI_ptr.Delegate(path, s, lenght, family, style, emSize, ref layoutRect, format); - private delegate Status GdipCreateFromHWND_delegate(IntPtr hwnd, out IntPtr graphics); + private delegate int GdipCreateFromHWND_delegate(IntPtr hwnd, out IntPtr graphics); private static FunctionWrapper GdipCreateFromHWND_ptr; - internal static Status GdipCreateFromHWND(IntPtr hwnd, out IntPtr graphics) => GdipCreateFromHWND_ptr.Delegate(hwnd, out graphics); + internal static int GdipCreateFromHWND(IntPtr hwnd, out IntPtr graphics) => GdipCreateFromHWND_ptr.Delegate(hwnd, out graphics); - private delegate Status GdipMeasureString_delegate(IntPtr graphics, [MarshalAs(UnmanagedType.LPWStr)]string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, out RectangleF boundingBox, int* codepointsFitted, int* linesFilled); + private delegate int GdipMeasureString_delegate(IntPtr graphics, [MarshalAs(UnmanagedType.LPWStr)]string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, out RectangleF boundingBox, int* codepointsFitted, int* linesFilled); private static FunctionWrapper GdipMeasureString_ptr; - internal static Status GdipMeasureString(IntPtr graphics, string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, out RectangleF boundingBox, int* codepointsFitted, int* linesFilled) => GdipMeasureString_ptr.Delegate(graphics, str, length, font, ref layoutRect, stringFormat, out boundingBox, codepointsFitted, linesFilled); + internal static int GdipMeasureString(IntPtr graphics, string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, out RectangleF boundingBox, int* codepointsFitted, int* linesFilled) => GdipMeasureString_ptr.Delegate(graphics, str, length, font, ref layoutRect, stringFormat, out boundingBox, codepointsFitted, linesFilled); - private delegate Status GdipMeasureCharacterRanges_delegate(IntPtr graphics, [MarshalAs(UnmanagedType.LPWStr)]string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, int regcount, out IntPtr regions); + private delegate int GdipMeasureCharacterRanges_delegate(IntPtr graphics, [MarshalAs(UnmanagedType.LPWStr)]string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, int regcount, out IntPtr regions); private static FunctionWrapper GdipMeasureCharacterRanges_ptr; - internal static Status GdipMeasureCharacterRanges(IntPtr graphics, string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, int regcount, out IntPtr regions) => GdipMeasureCharacterRanges_ptr.Delegate(graphics, str, length, font, ref layoutRect, stringFormat, regcount, out regions); + internal static int GdipMeasureCharacterRanges(IntPtr graphics, string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, int regcount, out IntPtr regions) => GdipMeasureCharacterRanges_ptr.Delegate(graphics, str, length, font, ref layoutRect, stringFormat, regcount, out regions); - private delegate Status GdipCreateBitmapFromScan0_delegate(int width, int height, int stride, PixelFormat format, IntPtr scan0, out IntPtr bmp); + private delegate int GdipCreateBitmapFromScan0_delegate(int width, int height, int stride, PixelFormat format, IntPtr scan0, out IntPtr bmp); private static FunctionWrapper GdipCreateBitmapFromScan0_ptr; - internal static Status GdipCreateBitmapFromScan0(int width, int height, int stride, PixelFormat format, IntPtr scan0, out IntPtr bmp) => GdipCreateBitmapFromScan0_ptr.Delegate(width, height, stride, format, scan0, out bmp); + internal static int GdipCreateBitmapFromScan0(int width, int height, int stride, PixelFormat format, IntPtr scan0, out IntPtr bmp) => GdipCreateBitmapFromScan0_ptr.Delegate(width, height, stride, format, scan0, out bmp); - private delegate Status GdipCreateBitmapFromGraphics_delegate(int width, int height, IntPtr target, out IntPtr bitmap); + private delegate int GdipCreateBitmapFromGraphics_delegate(int width, int height, IntPtr target, out IntPtr bitmap); private static FunctionWrapper GdipCreateBitmapFromGraphics_ptr; - internal static Status GdipCreateBitmapFromGraphics(int width, int height, IntPtr target, out IntPtr bitmap) => GdipCreateBitmapFromGraphics_ptr.Delegate(width, height, target, out bitmap); + internal static int GdipCreateBitmapFromGraphics(int width, int height, IntPtr target, out IntPtr bitmap) => GdipCreateBitmapFromGraphics_ptr.Delegate(width, height, target, out bitmap); - private delegate Status GdipBitmapLockBits_delegate(IntPtr bmp, ref Rectangle rc, ImageLockMode flags, PixelFormat format, [In] [Out] BitmapData bmpData); + private delegate int GdipBitmapLockBits_delegate(IntPtr bmp, ref Rectangle rc, ImageLockMode flags, PixelFormat format, [In] [Out] BitmapData bmpData); private static FunctionWrapper GdipBitmapLockBits_ptr; - internal static Status GdipBitmapLockBits(IntPtr bmp, ref Rectangle rc, ImageLockMode flags, PixelFormat format, [In] [Out] BitmapData bmpData) => GdipBitmapLockBits_ptr.Delegate(bmp, ref rc, flags, format, bmpData); + internal static int GdipBitmapLockBits(IntPtr bmp, ref Rectangle rc, ImageLockMode flags, PixelFormat format, [In] [Out] BitmapData bmpData) => GdipBitmapLockBits_ptr.Delegate(bmp, ref rc, flags, format, bmpData); - private delegate Status GdipBitmapSetResolution_delegate(IntPtr bmp, float xdpi, float ydpi); + private delegate int GdipBitmapSetResolution_delegate(IntPtr bmp, float xdpi, float ydpi); private static FunctionWrapper GdipBitmapSetResolution_ptr; - internal static Status GdipBitmapSetResolution(IntPtr bmp, float xdpi, float ydpi) => GdipBitmapSetResolution_ptr.Delegate(bmp, xdpi, ydpi); + internal static int GdipBitmapSetResolution(IntPtr bmp, float xdpi, float ydpi) => GdipBitmapSetResolution_ptr.Delegate(bmp, xdpi, ydpi); - private delegate Status GdipBitmapUnlockBits_delegate(IntPtr bmp, [In] [Out] BitmapData bmpData); + private delegate int GdipBitmapUnlockBits_delegate(IntPtr bmp, [In] [Out] BitmapData bmpData); private static FunctionWrapper GdipBitmapUnlockBits_ptr; - internal static Status GdipBitmapUnlockBits(IntPtr bmp, [In] [Out] BitmapData bmpData) => GdipBitmapUnlockBits_ptr.Delegate(bmp, bmpData); + internal static int GdipBitmapUnlockBits(IntPtr bmp, [In] [Out] BitmapData bmpData) => GdipBitmapUnlockBits_ptr.Delegate(bmp, bmpData); - private delegate Status GdipBitmapGetPixel_delegate(IntPtr bmp, int x, int y, out int argb); + private delegate int GdipBitmapGetPixel_delegate(IntPtr bmp, int x, int y, out int argb); private static FunctionWrapper GdipBitmapGetPixel_ptr; - internal static Status GdipBitmapGetPixel(IntPtr bmp, int x, int y, out int argb) => GdipBitmapGetPixel_ptr.Delegate(bmp, x, y, out argb); + internal static int GdipBitmapGetPixel(IntPtr bmp, int x, int y, out int argb) => GdipBitmapGetPixel_ptr.Delegate(bmp, x, y, out argb); - private delegate Status GdipBitmapSetPixel_delegate(IntPtr bmp, int x, int y, int argb); + private delegate int GdipBitmapSetPixel_delegate(IntPtr bmp, int x, int y, int argb); private static FunctionWrapper GdipBitmapSetPixel_ptr; - internal static Status GdipBitmapSetPixel(IntPtr bmp, int x, int y, int argb) => GdipBitmapSetPixel_ptr.Delegate(bmp, x, y, argb); + internal static int GdipBitmapSetPixel(IntPtr bmp, int x, int y, int argb) => GdipBitmapSetPixel_ptr.Delegate(bmp, x, y, argb); - private delegate Status GdipLoadImageFromFile_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr image); + private delegate int GdipLoadImageFromFile_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr image); private static FunctionWrapper GdipLoadImageFromFile_ptr; - internal static Status GdipLoadImageFromFile(string filename, out IntPtr image) => GdipLoadImageFromFile_ptr.Delegate(filename, out image); + internal static int GdipLoadImageFromFile(string filename, out IntPtr image) => GdipLoadImageFromFile_ptr.Delegate(filename, out image); - private delegate Status GdipLoadImageFromStream_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ComIStreamMarshaler))]IStream stream, out IntPtr image); - private static FunctionWrapper GdipLoadImageFromStream_ptr; - internal static Status GdipLoadImageFromStream(IStream stream, out IntPtr image) => GdipLoadImageFromStream_ptr.Delegate(stream, out image); - - private delegate Status GdipSaveImageToStream_delegate(HandleRef image, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ComIStreamMarshaler))]IStream stream, ref Guid clsidEncoder, HandleRef encoderParams); - private static FunctionWrapper GdipSaveImageToStream_ptr; - internal static Status GdipSaveImageToStream(HandleRef image, IStream stream, ref Guid clsidEncoder, HandleRef encoderParams) => GdipSaveImageToStream_ptr.Delegate(image, stream, ref clsidEncoder, encoderParams); - - private delegate Status GdipCloneImage_delegate(IntPtr image, out IntPtr imageclone); + private delegate int GdipCloneImage_delegate(IntPtr image, out IntPtr imageclone); private static FunctionWrapper GdipCloneImage_ptr; - internal static Status GdipCloneImage(IntPtr image, out IntPtr imageclone) => GdipCloneImage_ptr.Delegate(image, out imageclone); + internal static int GdipCloneImage(IntPtr image, out IntPtr imageclone) => GdipCloneImage_ptr.Delegate(image, out imageclone); - private delegate Status GdipLoadImageFromFileICM_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr image); + private delegate int GdipLoadImageFromFileICM_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr image); private static FunctionWrapper GdipLoadImageFromFileICM_ptr; - internal static Status GdipLoadImageFromFileICM(string filename, out IntPtr image) => GdipLoadImageFromFileICM_ptr.Delegate(filename, out image); + internal static int GdipLoadImageFromFileICM(string filename, out IntPtr image) => GdipLoadImageFromFileICM_ptr.Delegate(filename, out image); - private delegate Status GdipCreateBitmapFromHBITMAP_delegate(IntPtr hBitMap, IntPtr gdiPalette, out IntPtr image); + private delegate int GdipCreateBitmapFromHBITMAP_delegate(IntPtr hBitMap, IntPtr gdiPalette, out IntPtr image); private static FunctionWrapper GdipCreateBitmapFromHBITMAP_ptr; - internal static Status GdipCreateBitmapFromHBITMAP(IntPtr hBitMap, IntPtr gdiPalette, out IntPtr image) => GdipCreateBitmapFromHBITMAP_ptr.Delegate(hBitMap, gdiPalette, out image); + internal static int GdipCreateBitmapFromHBITMAP(IntPtr hBitMap, IntPtr gdiPalette, out IntPtr image) => GdipCreateBitmapFromHBITMAP_ptr.Delegate(hBitMap, gdiPalette, out image); - private delegate Status GdipDisposeImage_delegate(IntPtr image); + private delegate int GdipDisposeImage_delegate(IntPtr image); private static FunctionWrapper GdipDisposeImage_ptr; - internal static Status GdipDisposeImage(IntPtr image) => GdipDisposeImage_ptr.Delegate(image); + internal static int GdipDisposeImage(IntPtr image) => GdipDisposeImage_ptr.Delegate(image); internal static int IntGdipDisposeImage(HandleRef image) => (int)GdipDisposeImage_ptr.Delegate(image.Handle); - private delegate Status GdipGetImageFlags_delegate(IntPtr image, out int flag); + private delegate int GdipGetImageFlags_delegate(IntPtr image, out int flag); private static FunctionWrapper GdipGetImageFlags_ptr; - internal static Status GdipGetImageFlags(IntPtr image, out int flag) => GdipGetImageFlags_ptr.Delegate(image, out flag); + internal static int GdipGetImageFlags(IntPtr image, out int flag) => GdipGetImageFlags_ptr.Delegate(image, out flag); - private delegate Status GdipGetImageType_delegate(IntPtr image, out ImageType type); + private delegate int GdipGetImageType_delegate(IntPtr image, out ImageType type); private static FunctionWrapper GdipGetImageType_ptr; - internal static Status GdipGetImageType(IntPtr image, out ImageType type) => GdipGetImageType_ptr.Delegate(image, out type); + internal static int GdipGetImageType(IntPtr image, out ImageType type) => GdipGetImageType_ptr.Delegate(image, out type); - private delegate Status GdipImageGetFrameDimensionsCount_delegate(IntPtr image, out uint count); + private delegate int GdipImageGetFrameDimensionsCount_delegate(IntPtr image, out uint count); private static FunctionWrapper GdipImageGetFrameDimensionsCount_ptr; - internal static Status GdipImageGetFrameDimensionsCount(IntPtr image, out uint count) => GdipImageGetFrameDimensionsCount_ptr.Delegate(image, out count); + internal static int GdipImageGetFrameDimensionsCount(IntPtr image, out uint count) => GdipImageGetFrameDimensionsCount_ptr.Delegate(image, out count); - private delegate Status GdipImageGetFrameDimensionsList_delegate(IntPtr image, [Out] Guid[] dimensionIDs, uint count); + private delegate int GdipImageGetFrameDimensionsList_delegate(IntPtr image, [Out] Guid[] dimensionIDs, uint count); private static FunctionWrapper GdipImageGetFrameDimensionsList_ptr; - internal static Status GdipImageGetFrameDimensionsList(IntPtr image, [Out] Guid[] dimensionIDs, uint count) => GdipImageGetFrameDimensionsList_ptr.Delegate(image, dimensionIDs, count); + internal static int GdipImageGetFrameDimensionsList(IntPtr image, [Out] Guid[] dimensionIDs, uint count) => GdipImageGetFrameDimensionsList_ptr.Delegate(image, dimensionIDs, count); - private delegate Status GdipGetImageHeight_delegate(IntPtr image, out uint height); + private delegate int GdipGetImageHeight_delegate(IntPtr image, out uint height); private static FunctionWrapper GdipGetImageHeight_ptr; - internal static Status GdipGetImageHeight(IntPtr image, out uint height) => GdipGetImageHeight_ptr.Delegate(image, out height); + internal static int GdipGetImageHeight(IntPtr image, out uint height) => GdipGetImageHeight_ptr.Delegate(image, out height); - private delegate Status GdipGetImageHorizontalResolution_delegate(IntPtr image, out float resolution); + private delegate int GdipGetImageHorizontalResolution_delegate(IntPtr image, out float resolution); private static FunctionWrapper GdipGetImageHorizontalResolution_ptr; - internal static Status GdipGetImageHorizontalResolution(IntPtr image, out float resolution) => GdipGetImageHorizontalResolution_ptr.Delegate(image, out resolution); + internal static int GdipGetImageHorizontalResolution(IntPtr image, out float resolution) => GdipGetImageHorizontalResolution_ptr.Delegate(image, out resolution); - private delegate Status GdipGetImagePaletteSize_delegate(IntPtr image, out int size); + private delegate int GdipGetImagePaletteSize_delegate(IntPtr image, out int size); private static FunctionWrapper GdipGetImagePaletteSize_ptr; - internal static Status GdipGetImagePaletteSize(IntPtr image, out int size) => GdipGetImagePaletteSize_ptr.Delegate(image, out size); + internal static int GdipGetImagePaletteSize(IntPtr image, out int size) => GdipGetImagePaletteSize_ptr.Delegate(image, out size); - private delegate Status GdipGetImagePalette_delegate(IntPtr image, IntPtr palette, int size); + private delegate int GdipGetImagePalette_delegate(IntPtr image, IntPtr palette, int size); private static FunctionWrapper GdipGetImagePalette_ptr; - internal static Status GdipGetImagePalette(IntPtr image, IntPtr palette, int size) => GdipGetImagePalette_ptr.Delegate(image, palette, size); + internal static int GdipGetImagePalette(IntPtr image, IntPtr palette, int size) => GdipGetImagePalette_ptr.Delegate(image, palette, size); - private delegate Status GdipSetImagePalette_delegate(IntPtr image, IntPtr palette); + private delegate int GdipSetImagePalette_delegate(IntPtr image, IntPtr palette); private static FunctionWrapper GdipSetImagePalette_ptr; - internal static Status GdipSetImagePalette(IntPtr image, IntPtr palette) => GdipSetImagePalette_ptr.Delegate(image, palette); + internal static int GdipSetImagePalette(IntPtr image, IntPtr palette) => GdipSetImagePalette_ptr.Delegate(image, palette); - private delegate Status GdipGetImageDimension_delegate(IntPtr image, out float width, out float height); + private delegate int GdipGetImageDimension_delegate(IntPtr image, out float width, out float height); private static FunctionWrapper GdipGetImageDimension_ptr; - internal static Status GdipGetImageDimension(IntPtr image, out float width, out float height) => GdipGetImageDimension_ptr.Delegate(image, out width, out height); + internal static int GdipGetImageDimension(IntPtr image, out float width, out float height) => GdipGetImageDimension_ptr.Delegate(image, out width, out height); - private delegate Status GdipGetImagePixelFormat_delegate(IntPtr image, out PixelFormat format); + private delegate int GdipGetImagePixelFormat_delegate(IntPtr image, out PixelFormat format); private static FunctionWrapper GdipGetImagePixelFormat_ptr; - internal static Status GdipGetImagePixelFormat(IntPtr image, out PixelFormat format) => GdipGetImagePixelFormat_ptr.Delegate(image, out format); + internal static int GdipGetImagePixelFormat(IntPtr image, out PixelFormat format) => GdipGetImagePixelFormat_ptr.Delegate(image, out format); - private delegate Status GdipGetPropertyCount_delegate(IntPtr image, out uint propNumbers); + private delegate int GdipGetPropertyCount_delegate(IntPtr image, out uint propNumbers); private static FunctionWrapper GdipGetPropertyCount_ptr; - internal static Status GdipGetPropertyCount(IntPtr image, out uint propNumbers) => GdipGetPropertyCount_ptr.Delegate(image, out propNumbers); + internal static int GdipGetPropertyCount(IntPtr image, out uint propNumbers) => GdipGetPropertyCount_ptr.Delegate(image, out propNumbers); - private delegate Status GdipGetPropertyIdList_delegate(IntPtr image, uint propNumbers, [Out] int[] list); + private delegate int GdipGetPropertyIdList_delegate(IntPtr image, uint propNumbers, [Out] int[] list); private static FunctionWrapper GdipGetPropertyIdList_ptr; - internal static Status GdipGetPropertyIdList(IntPtr image, uint propNumbers, [Out] int[] list) => GdipGetPropertyIdList_ptr.Delegate(image, propNumbers, list); + internal static int GdipGetPropertyIdList(IntPtr image, uint propNumbers, [Out] int[] list) => GdipGetPropertyIdList_ptr.Delegate(image, propNumbers, list); - private delegate Status GdipGetPropertySize_delegate(IntPtr image, out int bufferSize, out int propNumbers); + private delegate int GdipGetPropertySize_delegate(IntPtr image, out int bufferSize, out int propNumbers); private static FunctionWrapper GdipGetPropertySize_ptr; - internal static Status GdipGetPropertySize(IntPtr image, out int bufferSize, out int propNumbers) => GdipGetPropertySize_ptr.Delegate(image, out bufferSize, out propNumbers); + internal static int GdipGetPropertySize(IntPtr image, out int bufferSize, out int propNumbers) => GdipGetPropertySize_ptr.Delegate(image, out bufferSize, out propNumbers); - private delegate Status GdipGetAllPropertyItems_delegate(IntPtr image, int bufferSize, int propNumbers, IntPtr items); + private delegate int GdipGetAllPropertyItems_delegate(IntPtr image, int bufferSize, int propNumbers, IntPtr items); private static FunctionWrapper GdipGetAllPropertyItems_ptr; - internal static Status GdipGetAllPropertyItems(IntPtr image, int bufferSize, int propNumbers, IntPtr items) => GdipGetAllPropertyItems_ptr.Delegate(image, bufferSize, propNumbers, items); + internal static int GdipGetAllPropertyItems(IntPtr image, int bufferSize, int propNumbers, IntPtr items) => GdipGetAllPropertyItems_ptr.Delegate(image, bufferSize, propNumbers, items); - private delegate Status GdipGetImageRawFormat_delegate(IntPtr image, out Guid format); + private delegate int GdipGetImageRawFormat_delegate(IntPtr image, out Guid format); private static FunctionWrapper GdipGetImageRawFormat_ptr; - internal static Status GdipGetImageRawFormat(IntPtr image, out Guid format) => GdipGetImageRawFormat_ptr.Delegate(image, out format); + internal static int GdipGetImageRawFormat(IntPtr image, out Guid format) => GdipGetImageRawFormat_ptr.Delegate(image, out format); - private delegate Status GdipGetImageVerticalResolution_delegate(IntPtr image, out float resolution); + private delegate int GdipGetImageVerticalResolution_delegate(IntPtr image, out float resolution); private static FunctionWrapper GdipGetImageVerticalResolution_ptr; - internal static Status GdipGetImageVerticalResolution(IntPtr image, out float resolution) => GdipGetImageVerticalResolution_ptr.Delegate(image, out resolution); + internal static int GdipGetImageVerticalResolution(IntPtr image, out float resolution) => GdipGetImageVerticalResolution_ptr.Delegate(image, out resolution); - private delegate Status GdipGetImageWidth_delegate(IntPtr image, out uint width); + private delegate int GdipGetImageWidth_delegate(IntPtr image, out uint width); private static FunctionWrapper GdipGetImageWidth_ptr; - internal static Status GdipGetImageWidth(IntPtr image, out uint width) => GdipGetImageWidth_ptr.Delegate(image, out width); + internal static int GdipGetImageWidth(IntPtr image, out uint width) => GdipGetImageWidth_ptr.Delegate(image, out width); - private delegate Status GdipGetImageBounds_delegate(IntPtr image, out RectangleF source, ref GraphicsUnit unit); + private delegate int GdipGetImageBounds_delegate(IntPtr image, out RectangleF source, ref GraphicsUnit unit); private static FunctionWrapper GdipGetImageBounds_ptr; - internal static Status GdipGetImageBounds(IntPtr image, out RectangleF source, ref GraphicsUnit unit) => GdipGetImageBounds_ptr.Delegate(image, out source, ref unit); + internal static int GdipGetImageBounds(IntPtr image, out RectangleF source, ref GraphicsUnit unit) => GdipGetImageBounds_ptr.Delegate(image, out source, ref unit); - private delegate Status GdipGetEncoderParameterListSize_delegate(IntPtr image, ref Guid encoder, out uint size); + private delegate int GdipGetEncoderParameterListSize_delegate(IntPtr image, ref Guid encoder, out uint size); private static FunctionWrapper GdipGetEncoderParameterListSize_ptr; - internal static Status GdipGetEncoderParameterListSize(IntPtr image, ref Guid encoder, out uint size) => GdipGetEncoderParameterListSize_ptr.Delegate(image, ref encoder, out size); + internal static int GdipGetEncoderParameterListSize(IntPtr image, ref Guid encoder, out uint size) => GdipGetEncoderParameterListSize_ptr.Delegate(image, ref encoder, out size); - private delegate Status GdipGetEncoderParameterList_delegate(IntPtr image, ref Guid encoder, uint size, IntPtr buffer); + private delegate int GdipGetEncoderParameterList_delegate(IntPtr image, ref Guid encoder, uint size, IntPtr buffer); private static FunctionWrapper GdipGetEncoderParameterList_ptr; - internal static Status GdipGetEncoderParameterList(IntPtr image, ref Guid encoder, uint size, IntPtr buffer) => GdipGetEncoderParameterList_ptr.Delegate(image, ref encoder, size, buffer); + internal static int GdipGetEncoderParameterList(IntPtr image, ref Guid encoder, uint size, IntPtr buffer) => GdipGetEncoderParameterList_ptr.Delegate(image, ref encoder, size, buffer); - private delegate Status GdipImageGetFrameCount_delegate(IntPtr image, ref Guid guidDimension, out uint count); + private delegate int GdipImageGetFrameCount_delegate(IntPtr image, ref Guid guidDimension, out uint count); private static FunctionWrapper GdipImageGetFrameCount_ptr; - internal static Status GdipImageGetFrameCount(IntPtr image, ref Guid guidDimension, out uint count) => GdipImageGetFrameCount_ptr.Delegate(image, ref guidDimension, out count); + internal static int GdipImageGetFrameCount(IntPtr image, ref Guid guidDimension, out uint count) => GdipImageGetFrameCount_ptr.Delegate(image, ref guidDimension, out count); - private delegate Status GdipImageSelectActiveFrame_delegate(IntPtr image, ref Guid guidDimension, int frameIndex); + private delegate int GdipImageSelectActiveFrame_delegate(IntPtr image, ref Guid guidDimension, int frameIndex); private static FunctionWrapper GdipImageSelectActiveFrame_ptr; - internal static Status GdipImageSelectActiveFrame(IntPtr image, ref Guid guidDimension, int frameIndex) => GdipImageSelectActiveFrame_ptr.Delegate(image, ref guidDimension, frameIndex); + internal static int GdipImageSelectActiveFrame(IntPtr image, ref Guid guidDimension, int frameIndex) => GdipImageSelectActiveFrame_ptr.Delegate(image, ref guidDimension, frameIndex); - private delegate Status GdipGetPropertyItemSize_delegate(IntPtr image, int propertyID, out int propertySize); + private delegate int GdipGetPropertyItemSize_delegate(IntPtr image, int propertyID, out int propertySize); private static FunctionWrapper GdipGetPropertyItemSize_ptr; - internal static Status GdipGetPropertyItemSize(IntPtr image, int propertyID, out int propertySize) => GdipGetPropertyItemSize_ptr.Delegate(image, propertyID, out propertySize); + internal static int GdipGetPropertyItemSize(IntPtr image, int propertyID, out int propertySize) => GdipGetPropertyItemSize_ptr.Delegate(image, propertyID, out propertySize); - private delegate Status GdipGetPropertyItem_delegate(IntPtr image, int propertyID, int propertySize, IntPtr buffer); + private delegate int GdipGetPropertyItem_delegate(IntPtr image, int propertyID, int propertySize, IntPtr buffer); private static FunctionWrapper GdipGetPropertyItem_ptr; - internal static Status GdipGetPropertyItem(IntPtr image, int propertyID, int propertySize, IntPtr buffer) => GdipGetPropertyItem_ptr.Delegate(image, propertyID, propertySize, buffer); + internal static int GdipGetPropertyItem(IntPtr image, int propertyID, int propertySize, IntPtr buffer) => GdipGetPropertyItem_ptr.Delegate(image, propertyID, propertySize, buffer); - private delegate Status GdipRemovePropertyItem_delegate(IntPtr image, int propertyId); + private delegate int GdipRemovePropertyItem_delegate(IntPtr image, int propertyId); private static FunctionWrapper GdipRemovePropertyItem_ptr; - internal static Status GdipRemovePropertyItem(IntPtr image, int propertyId) => GdipRemovePropertyItem_ptr.Delegate(image, propertyId); + internal static int GdipRemovePropertyItem(IntPtr image, int propertyId) => GdipRemovePropertyItem_ptr.Delegate(image, propertyId); - private delegate Status GdipSetPropertyItem_delegate(IntPtr image, GdipPropertyItem* propertyItem); + private delegate int GdipSetPropertyItem_delegate(IntPtr image, GdipPropertyItem* propertyItem); private static FunctionWrapper GdipSetPropertyItem_ptr; - internal static Status GdipSetPropertyItem(IntPtr image, GdipPropertyItem* propertyItem) => GdipSetPropertyItem_ptr.Delegate(image, propertyItem); + internal static int GdipSetPropertyItem(IntPtr image, GdipPropertyItem* propertyItem) => GdipSetPropertyItem_ptr.Delegate(image, propertyItem); - private delegate Status GdipGetImageThumbnail_delegate(IntPtr image, uint width, uint height, out IntPtr thumbImage, IntPtr callback, IntPtr callBackData); + private delegate int GdipGetImageThumbnail_delegate(IntPtr image, uint width, uint height, out IntPtr thumbImage, IntPtr callback, IntPtr callBackData); private static FunctionWrapper GdipGetImageThumbnail_ptr; - internal static Status GdipGetImageThumbnail(IntPtr image, uint width, uint height, out IntPtr thumbImage, IntPtr callback, IntPtr callBackData) => GdipGetImageThumbnail_ptr.Delegate(image, width, height, out thumbImage, callback, callBackData); + internal static int GdipGetImageThumbnail(IntPtr image, uint width, uint height, out IntPtr thumbImage, IntPtr callback, IntPtr callBackData) => GdipGetImageThumbnail_ptr.Delegate(image, width, height, out thumbImage, callback, callBackData); - private delegate Status GdipImageRotateFlip_delegate(IntPtr image, RotateFlipType rotateFlipType); + private delegate int GdipImageRotateFlip_delegate(IntPtr image, RotateFlipType rotateFlipType); private static FunctionWrapper GdipImageRotateFlip_ptr; - internal static Status GdipImageRotateFlip(IntPtr image, RotateFlipType rotateFlipType) => GdipImageRotateFlip_ptr.Delegate(image, rotateFlipType); + internal static int GdipImageRotateFlip(IntPtr image, RotateFlipType rotateFlipType) => GdipImageRotateFlip_ptr.Delegate(image, rotateFlipType); - private delegate Status GdipSaveImageToFile_delegate(IntPtr image, [MarshalAs(UnmanagedType.LPWStr)]string filename, ref Guid encoderClsID, IntPtr encoderParameters); + private delegate int GdipSaveImageToFile_delegate(IntPtr image, [MarshalAs(UnmanagedType.LPWStr)]string filename, ref Guid encoderClsID, IntPtr encoderParameters); private static FunctionWrapper GdipSaveImageToFile_ptr; - internal static Status GdipSaveImageToFile(IntPtr image, string filename, ref Guid encoderClsID, IntPtr encoderParameters) => GdipSaveImageToFile_ptr.Delegate(image, filename, ref encoderClsID, encoderParameters); + internal static int GdipSaveImageToFile(IntPtr image, string filename, ref Guid encoderClsID, IntPtr encoderParameters) => GdipSaveImageToFile_ptr.Delegate(image, filename, ref encoderClsID, encoderParameters); - private delegate Status GdipSaveAdd_delegate(IntPtr image, IntPtr encoderParameters); + private delegate int GdipSaveAdd_delegate(IntPtr image, IntPtr encoderParameters); private static FunctionWrapper GdipSaveAdd_ptr; - internal static Status GdipSaveAdd(IntPtr image, IntPtr encoderParameters) => GdipSaveAdd_ptr.Delegate(image, encoderParameters); + internal static int GdipSaveAdd(IntPtr image, IntPtr encoderParameters) => GdipSaveAdd_ptr.Delegate(image, encoderParameters); - private delegate Status GdipSaveAddImage_delegate(IntPtr image, IntPtr imagenew, IntPtr encoderParameters); + private delegate int GdipSaveAddImage_delegate(IntPtr image, IntPtr imagenew, IntPtr encoderParameters); private static FunctionWrapper GdipSaveAddImage_ptr; - internal static Status GdipSaveAddImage(IntPtr image, IntPtr imagenew, IntPtr encoderParameters) => GdipSaveAddImage_ptr.Delegate(image, imagenew, encoderParameters); + internal static int GdipSaveAddImage(IntPtr image, IntPtr imagenew, IntPtr encoderParameters) => GdipSaveAddImage_ptr.Delegate(image, imagenew, encoderParameters); - private delegate Status GdipDrawImageI_delegate(IntPtr graphics, IntPtr image, int x, int y); + private delegate int GdipDrawImageI_delegate(IntPtr graphics, IntPtr image, int x, int y); private static FunctionWrapper GdipDrawImageI_ptr; - internal static Status GdipDrawImageI(IntPtr graphics, IntPtr image, int x, int y) => GdipDrawImageI_ptr.Delegate(graphics, image, x, y); + internal static int GdipDrawImageI(IntPtr graphics, IntPtr image, int x, int y) => GdipDrawImageI_ptr.Delegate(graphics, image, x, y); - private delegate Status GdipGetImageGraphicsContext_delegate(IntPtr image, out IntPtr graphics); + private delegate int GdipGetImageGraphicsContext_delegate(IntPtr image, out IntPtr graphics); private static FunctionWrapper GdipGetImageGraphicsContext_ptr; - internal static Status GdipGetImageGraphicsContext(IntPtr image, out IntPtr graphics) => GdipGetImageGraphicsContext_ptr.Delegate(image, out graphics); + internal static int GdipGetImageGraphicsContext(IntPtr image, out IntPtr graphics) => GdipGetImageGraphicsContext_ptr.Delegate(image, out graphics); - private delegate Status GdipDrawImage_delegate(IntPtr graphics, IntPtr image, float x, float y); + private delegate int GdipDrawImage_delegate(IntPtr graphics, IntPtr image, float x, float y); private static FunctionWrapper GdipDrawImage_ptr; - internal static Status GdipDrawImage(IntPtr graphics, IntPtr image, float x, float y) => GdipDrawImage_ptr.Delegate(graphics, image, x, y); + internal static int GdipDrawImage(IntPtr graphics, IntPtr image, float x, float y) => GdipDrawImage_ptr.Delegate(graphics, image, x, y); - private delegate Status GdipDrawImagePoints_delegate(IntPtr graphics, IntPtr image, PointF[] destPoints, int count); + private delegate int GdipDrawImagePoints_delegate(IntPtr graphics, IntPtr image, PointF[] destPoints, int count); private static FunctionWrapper GdipDrawImagePoints_ptr; - internal static Status GdipDrawImagePoints(IntPtr graphics, IntPtr image, PointF[] destPoints, int count) => GdipDrawImagePoints_ptr.Delegate(graphics, image, destPoints, count); + internal static int GdipDrawImagePoints(IntPtr graphics, IntPtr image, PointF[] destPoints, int count) => GdipDrawImagePoints_ptr.Delegate(graphics, image, destPoints, count); - private delegate Status GdipDrawImagePointsI_delegate(IntPtr graphics, IntPtr image, Point[] destPoints, int count); + private delegate int GdipDrawImagePointsI_delegate(IntPtr graphics, IntPtr image, Point[] destPoints, int count); private static FunctionWrapper GdipDrawImagePointsI_ptr; - internal static Status GdipDrawImagePointsI(IntPtr graphics, IntPtr image, Point[] destPoints, int count) => GdipDrawImagePointsI_ptr.Delegate(graphics, image, destPoints, count); + internal static int GdipDrawImagePointsI(IntPtr graphics, IntPtr image, Point[] destPoints, int count) => GdipDrawImagePointsI_ptr.Delegate(graphics, image, destPoints, count); - private delegate Status GdipDrawImageRectRectI_delegate(IntPtr graphics, IntPtr image, int dstx, int dsty, int dstwidth, int dstheight, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData); + private delegate int GdipDrawImageRectRectI_delegate(IntPtr graphics, IntPtr image, int dstx, int dsty, int dstwidth, int dstheight, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData); private static FunctionWrapper GdipDrawImageRectRectI_ptr; - internal static Status GdipDrawImageRectRectI(IntPtr graphics, IntPtr image, int dstx, int dsty, int dstwidth, int dstheight, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImageRectRectI_ptr.Delegate(graphics, image, dstx, dsty, dstwidth, dstheight, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData); + internal static int GdipDrawImageRectRectI(IntPtr graphics, IntPtr image, int dstx, int dsty, int dstwidth, int dstheight, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImageRectRectI_ptr.Delegate(graphics, image, dstx, dsty, dstwidth, dstheight, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData); - private delegate Status GdipDrawImageRectRect_delegate(IntPtr graphics, IntPtr image, float dstx, float dsty, float dstwidth, float dstheight, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData); + private delegate int GdipDrawImageRectRect_delegate(IntPtr graphics, IntPtr image, float dstx, float dsty, float dstwidth, float dstheight, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData); private static FunctionWrapper GdipDrawImageRectRect_ptr; - internal static Status GdipDrawImageRectRect(IntPtr graphics, IntPtr image, float dstx, float dsty, float dstwidth, float dstheight, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImageRectRect_ptr.Delegate(graphics, image, dstx, dsty, dstwidth, dstheight, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData); + internal static int GdipDrawImageRectRect(IntPtr graphics, IntPtr image, float dstx, float dsty, float dstwidth, float dstheight, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImageRectRect_ptr.Delegate(graphics, image, dstx, dsty, dstwidth, dstheight, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData); - private delegate Status GdipDrawImagePointsRectI_delegate(IntPtr graphics, IntPtr image, Point[] destPoints, int count, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData); + private delegate int GdipDrawImagePointsRectI_delegate(IntPtr graphics, IntPtr image, Point[] destPoints, int count, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData); private static FunctionWrapper GdipDrawImagePointsRectI_ptr; - internal static Status GdipDrawImagePointsRectI(IntPtr graphics, IntPtr image, Point[] destPoints, int count, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImagePointsRectI_ptr.Delegate(graphics, image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData); + internal static int GdipDrawImagePointsRectI(IntPtr graphics, IntPtr image, Point[] destPoints, int count, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImagePointsRectI_ptr.Delegate(graphics, image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData); - private delegate Status GdipDrawImagePointsRect_delegate(IntPtr graphics, IntPtr image, PointF[] destPoints, int count, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData); + private delegate int GdipDrawImagePointsRect_delegate(IntPtr graphics, IntPtr image, PointF[] destPoints, int count, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData); private static FunctionWrapper GdipDrawImagePointsRect_ptr; - internal static Status GdipDrawImagePointsRect(IntPtr graphics, IntPtr image, PointF[] destPoints, int count, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImagePointsRect_ptr.Delegate(graphics, image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData); + internal static int GdipDrawImagePointsRect(IntPtr graphics, IntPtr image, PointF[] destPoints, int count, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImagePointsRect_ptr.Delegate(graphics, image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData); - private delegate Status GdipDrawImageRect_delegate(IntPtr graphics, IntPtr image, float x, float y, float width, float height); + private delegate int GdipDrawImageRect_delegate(IntPtr graphics, IntPtr image, float x, float y, float width, float height); private static FunctionWrapper GdipDrawImageRect_ptr; - internal static Status GdipDrawImageRect(IntPtr graphics, IntPtr image, float x, float y, float width, float height) => GdipDrawImageRect_ptr.Delegate(graphics, image, x, y, width, height); + internal static int GdipDrawImageRect(IntPtr graphics, IntPtr image, float x, float y, float width, float height) => GdipDrawImageRect_ptr.Delegate(graphics, image, x, y, width, height); - private delegate Status GdipDrawImagePointRect_delegate(IntPtr graphics, IntPtr image, float x, float y, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit); + private delegate int GdipDrawImagePointRect_delegate(IntPtr graphics, IntPtr image, float x, float y, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit); private static FunctionWrapper GdipDrawImagePointRect_ptr; - internal static Status GdipDrawImagePointRect(IntPtr graphics, IntPtr image, float x, float y, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit) => GdipDrawImagePointRect_ptr.Delegate(graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit); + internal static int GdipDrawImagePointRect(IntPtr graphics, IntPtr image, float x, float y, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit) => GdipDrawImagePointRect_ptr.Delegate(graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit); - private delegate Status GdipDrawImagePointRectI_delegate(IntPtr graphics, IntPtr image, int x, int y, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit); + private delegate int GdipDrawImagePointRectI_delegate(IntPtr graphics, IntPtr image, int x, int y, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit); private static FunctionWrapper GdipDrawImagePointRectI_ptr; - internal static Status GdipDrawImagePointRectI(IntPtr graphics, IntPtr image, int x, int y, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit) => GdipDrawImagePointRectI_ptr.Delegate(graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit); + internal static int GdipDrawImagePointRectI(IntPtr graphics, IntPtr image, int x, int y, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit) => GdipDrawImagePointRectI_ptr.Delegate(graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit); - private delegate Status GdipCreateHBITMAPFromBitmap_delegate(IntPtr bmp, out IntPtr HandleBmp, int clrbackground); + private delegate int GdipCreateHBITMAPFromBitmap_delegate(IntPtr bmp, out IntPtr HandleBmp, int clrbackground); private static FunctionWrapper GdipCreateHBITMAPFromBitmap_ptr; - internal static Status GdipCreateHBITMAPFromBitmap(IntPtr bmp, out IntPtr HandleBmp, int clrbackground) => GdipCreateHBITMAPFromBitmap_ptr.Delegate(bmp, out HandleBmp, clrbackground); + internal static int GdipCreateHBITMAPFromBitmap(IntPtr bmp, out IntPtr HandleBmp, int clrbackground) => GdipCreateHBITMAPFromBitmap_ptr.Delegate(bmp, out HandleBmp, clrbackground); - private delegate Status GdipCreateBitmapFromFile_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr bitmap); + private delegate int GdipCreateBitmapFromFile_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr bitmap); private static FunctionWrapper GdipCreateBitmapFromFile_ptr; - internal static Status GdipCreateBitmapFromFile(string filename, out IntPtr bitmap) => GdipCreateBitmapFromFile_ptr.Delegate(filename, out bitmap); + internal static int GdipCreateBitmapFromFile(string filename, out IntPtr bitmap) => GdipCreateBitmapFromFile_ptr.Delegate(filename, out bitmap); - private delegate Status GdipCreateBitmapFromFileICM_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr bitmap); + private delegate int GdipCreateBitmapFromFileICM_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr bitmap); private static FunctionWrapper GdipCreateBitmapFromFileICM_ptr; - internal static Status GdipCreateBitmapFromFileICM(string filename, out IntPtr bitmap) => GdipCreateBitmapFromFileICM_ptr.Delegate(filename, out bitmap); + internal static int GdipCreateBitmapFromFileICM(string filename, out IntPtr bitmap) => GdipCreateBitmapFromFileICM_ptr.Delegate(filename, out bitmap); - private delegate Status GdipCreateHICONFromBitmap_delegate(IntPtr bmp, out IntPtr HandleIcon); + private delegate int GdipCreateHICONFromBitmap_delegate(IntPtr bmp, out IntPtr HandleIcon); private static FunctionWrapper GdipCreateHICONFromBitmap_ptr; - internal static Status GdipCreateHICONFromBitmap(IntPtr bmp, out IntPtr HandleIcon) => GdipCreateHICONFromBitmap_ptr.Delegate(bmp, out HandleIcon); + internal static int GdipCreateHICONFromBitmap(IntPtr bmp, out IntPtr HandleIcon) => GdipCreateHICONFromBitmap_ptr.Delegate(bmp, out HandleIcon); - private delegate Status GdipCreateBitmapFromHICON_delegate(IntPtr hicon, out IntPtr bitmap); + private delegate int GdipCreateBitmapFromHICON_delegate(IntPtr hicon, out IntPtr bitmap); private static FunctionWrapper GdipCreateBitmapFromHICON_ptr; - internal static Status GdipCreateBitmapFromHICON(IntPtr hicon, out IntPtr bitmap) => GdipCreateBitmapFromHICON_ptr.Delegate(hicon, out bitmap); + internal static int GdipCreateBitmapFromHICON(IntPtr hicon, out IntPtr bitmap) => GdipCreateBitmapFromHICON_ptr.Delegate(hicon, out bitmap); - private delegate Status GdipCreateBitmapFromResource_delegate(IntPtr hInstance, [MarshalAs(UnmanagedType.LPWStr)]string lpBitmapName, out IntPtr bitmap); + private delegate int GdipCreateBitmapFromResource_delegate(IntPtr hInstance, [MarshalAs(UnmanagedType.LPWStr)]string lpBitmapName, out IntPtr bitmap); private static FunctionWrapper GdipCreateBitmapFromResource_ptr; - internal static Status GdipCreateBitmapFromResource(IntPtr hInstance, string lpBitmapName, out IntPtr bitmap) => GdipCreateBitmapFromResource_ptr.Delegate(hInstance, lpBitmapName, out bitmap); + internal static int GdipCreateBitmapFromResource(IntPtr hInstance, string lpBitmapName, out IntPtr bitmap) => GdipCreateBitmapFromResource_ptr.Delegate(hInstance, lpBitmapName, out bitmap); - private delegate Status GdipCreatePath_delegate(FillMode brushMode, out IntPtr path); + private delegate int GdipCreatePath_delegate(FillMode brushMode, out IntPtr path); private static FunctionWrapper GdipCreatePath_ptr; - internal static Status GdipCreatePath(FillMode brushMode, out IntPtr path) => GdipCreatePath_ptr.Delegate(brushMode, out path); + internal static int GdipCreatePath(FillMode brushMode, out IntPtr path) => GdipCreatePath_ptr.Delegate(brushMode, out path); - private delegate Status GdipCreatePath2_delegate(PointF[] points, byte[] types, int count, FillMode brushMode, out IntPtr path); + private delegate int GdipCreatePath2_delegate(PointF[] points, byte[] types, int count, FillMode brushMode, out IntPtr path); private static FunctionWrapper GdipCreatePath2_ptr; - internal static Status GdipCreatePath2(PointF[] points, byte[] types, int count, FillMode brushMode, out IntPtr path) => GdipCreatePath2_ptr.Delegate(points, types, count, brushMode, out path); + internal static int GdipCreatePath2(PointF[] points, byte[] types, int count, FillMode brushMode, out IntPtr path) => GdipCreatePath2_ptr.Delegate(points, types, count, brushMode, out path); - private delegate Status GdipCreatePath2I_delegate(Point[] points, byte[] types, int count, FillMode brushMode, out IntPtr path); + private delegate int GdipCreatePath2I_delegate(Point[] points, byte[] types, int count, FillMode brushMode, out IntPtr path); private static FunctionWrapper GdipCreatePath2I_ptr; - internal static Status GdipCreatePath2I(Point[] points, byte[] types, int count, FillMode brushMode, out IntPtr path) => GdipCreatePath2I_ptr.Delegate(points, types, count, brushMode, out path); + internal static int GdipCreatePath2I(Point[] points, byte[] types, int count, FillMode brushMode, out IntPtr path) => GdipCreatePath2I_ptr.Delegate(points, types, count, brushMode, out path); - private delegate Status GdipClonePath_delegate(IntPtr path, out IntPtr clonePath); + private delegate int GdipClonePath_delegate(IntPtr path, out IntPtr clonePath); private static FunctionWrapper GdipClonePath_ptr; - internal static Status GdipClonePath(IntPtr path, out IntPtr clonePath) => GdipClonePath_ptr.Delegate(path, out clonePath); + internal static int GdipClonePath(IntPtr path, out IntPtr clonePath) => GdipClonePath_ptr.Delegate(path, out clonePath); - private delegate Status GdipDeletePath_delegate(IntPtr path); + private delegate int GdipDeletePath_delegate(IntPtr path); private static FunctionWrapper GdipDeletePath_ptr; - internal static Status GdipDeletePath(IntPtr path) => GdipDeletePath_ptr.Delegate(path); + internal static int GdipDeletePath(IntPtr path) => GdipDeletePath_ptr.Delegate(path); internal static int IntGdipDeletePath(HandleRef path) => (int)GdipDeletePath_ptr.Delegate(path.Handle); - private delegate Status GdipResetPath_delegate(IntPtr path); + private delegate int GdipResetPath_delegate(IntPtr path); private static FunctionWrapper GdipResetPath_ptr; - internal static Status GdipResetPath(IntPtr path) => GdipResetPath_ptr.Delegate(path); + internal static int GdipResetPath(IntPtr path) => GdipResetPath_ptr.Delegate(path); - private delegate Status GdipGetPointCount_delegate(IntPtr path, out int count); + private delegate int GdipGetPointCount_delegate(IntPtr path, out int count); private static FunctionWrapper GdipGetPointCount_ptr; - internal static Status GdipGetPointCount(IntPtr path, out int count) => GdipGetPointCount_ptr.Delegate(path, out count); + internal static int GdipGetPointCount(IntPtr path, out int count) => GdipGetPointCount_ptr.Delegate(path, out count); - private delegate Status GdipGetPathTypes_delegate(IntPtr path, [Out] byte[] types, int count); + private delegate int GdipGetPathTypes_delegate(IntPtr path, [Out] byte[] types, int count); private static FunctionWrapper GdipGetPathTypes_ptr; - internal static Status GdipGetPathTypes(IntPtr path, [Out] byte[] types, int count) => GdipGetPathTypes_ptr.Delegate(path, types, count); + internal static int GdipGetPathTypes(IntPtr path, [Out] byte[] types, int count) => GdipGetPathTypes_ptr.Delegate(path, types, count); - private delegate Status GdipGetPathPoints_delegate(IntPtr path, [Out] PointF[] points, int count); + private delegate int GdipGetPathPoints_delegate(IntPtr path, [Out] PointF[] points, int count); private static FunctionWrapper GdipGetPathPoints_ptr; - internal static Status GdipGetPathPoints(IntPtr path, [Out] PointF[] points, int count) => GdipGetPathPoints_ptr.Delegate(path, points, count); + internal static int GdipGetPathPoints(IntPtr path, [Out] PointF[] points, int count) => GdipGetPathPoints_ptr.Delegate(path, points, count); - private delegate Status GdipGetPathPointsI_delegate(IntPtr path, [Out] Point[] points, int count); + private delegate int GdipGetPathPointsI_delegate(IntPtr path, [Out] Point[] points, int count); private static FunctionWrapper GdipGetPathPointsI_ptr; - internal static Status GdipGetPathPointsI(IntPtr path, [Out] Point[] points, int count) => GdipGetPathPointsI_ptr.Delegate(path, points, count); + internal static int GdipGetPathPointsI(IntPtr path, [Out] Point[] points, int count) => GdipGetPathPointsI_ptr.Delegate(path, points, count); - private delegate Status GdipGetPathFillMode_delegate(IntPtr path, out FillMode fillMode); + private delegate int GdipGetPathFillMode_delegate(IntPtr path, out FillMode fillMode); private static FunctionWrapper GdipGetPathFillMode_ptr; - internal static Status GdipGetPathFillMode(IntPtr path, out FillMode fillMode) => GdipGetPathFillMode_ptr.Delegate(path, out fillMode); + internal static int GdipGetPathFillMode(IntPtr path, out FillMode fillMode) => GdipGetPathFillMode_ptr.Delegate(path, out fillMode); - private delegate Status GdipSetPathFillMode_delegate(IntPtr path, FillMode fillMode); + private delegate int GdipSetPathFillMode_delegate(IntPtr path, FillMode fillMode); private static FunctionWrapper GdipSetPathFillMode_ptr; - internal static Status GdipSetPathFillMode(IntPtr path, FillMode fillMode) => GdipSetPathFillMode_ptr.Delegate(path, fillMode); + internal static int GdipSetPathFillMode(IntPtr path, FillMode fillMode) => GdipSetPathFillMode_ptr.Delegate(path, fillMode); - private delegate Status GdipStartPathFigure_delegate(IntPtr path); + private delegate int GdipStartPathFigure_delegate(IntPtr path); private static FunctionWrapper GdipStartPathFigure_ptr; - internal static Status GdipStartPathFigure(IntPtr path) => GdipStartPathFigure_ptr.Delegate(path); + internal static int GdipStartPathFigure(IntPtr path) => GdipStartPathFigure_ptr.Delegate(path); - private delegate Status GdipClosePathFigure_delegate(IntPtr path); + private delegate int GdipClosePathFigure_delegate(IntPtr path); private static FunctionWrapper GdipClosePathFigure_ptr; - internal static Status GdipClosePathFigure(IntPtr path) => GdipClosePathFigure_ptr.Delegate(path); + internal static int GdipClosePathFigure(IntPtr path) => GdipClosePathFigure_ptr.Delegate(path); - private delegate Status GdipClosePathFigures_delegate(IntPtr path); + private delegate int GdipClosePathFigures_delegate(IntPtr path); private static FunctionWrapper GdipClosePathFigures_ptr; - internal static Status GdipClosePathFigures(IntPtr path) => GdipClosePathFigures_ptr.Delegate(path); + internal static int GdipClosePathFigures(IntPtr path) => GdipClosePathFigures_ptr.Delegate(path); - private delegate Status GdipSetPathMarker_delegate(IntPtr path); + private delegate int GdipSetPathMarker_delegate(IntPtr path); private static FunctionWrapper GdipSetPathMarker_ptr; - internal static Status GdipSetPathMarker(IntPtr path) => GdipSetPathMarker_ptr.Delegate(path); + internal static int GdipSetPathMarker(IntPtr path) => GdipSetPathMarker_ptr.Delegate(path); - private delegate Status GdipClearPathMarkers_delegate(IntPtr path); + private delegate int GdipClearPathMarkers_delegate(IntPtr path); private static FunctionWrapper GdipClearPathMarkers_ptr; - internal static Status GdipClearPathMarkers(IntPtr path) => GdipClearPathMarkers_ptr.Delegate(path); + internal static int GdipClearPathMarkers(IntPtr path) => GdipClearPathMarkers_ptr.Delegate(path); - private delegate Status GdipReversePath_delegate(IntPtr path); + private delegate int GdipReversePath_delegate(IntPtr path); private static FunctionWrapper GdipReversePath_ptr; - internal static Status GdipReversePath(IntPtr path) => GdipReversePath_ptr.Delegate(path); + internal static int GdipReversePath(IntPtr path) => GdipReversePath_ptr.Delegate(path); - private delegate Status GdipGetPathLastPoint_delegate(IntPtr path, out PointF lastPoint); + private delegate int GdipGetPathLastPoint_delegate(IntPtr path, out PointF lastPoint); private static FunctionWrapper GdipGetPathLastPoint_ptr; - internal static Status GdipGetPathLastPoint(IntPtr path, out PointF lastPoint) => GdipGetPathLastPoint_ptr.Delegate(path, out lastPoint); + internal static int GdipGetPathLastPoint(IntPtr path, out PointF lastPoint) => GdipGetPathLastPoint_ptr.Delegate(path, out lastPoint); - private delegate Status GdipAddPathLine_delegate(IntPtr path, float x1, float y1, float x2, float y2); + private delegate int GdipAddPathLine_delegate(IntPtr path, float x1, float y1, float x2, float y2); private static FunctionWrapper GdipAddPathLine_ptr; - internal static Status GdipAddPathLine(IntPtr path, float x1, float y1, float x2, float y2) => GdipAddPathLine_ptr.Delegate(path, x1, y1, x2, y2); + internal static int GdipAddPathLine(IntPtr path, float x1, float y1, float x2, float y2) => GdipAddPathLine_ptr.Delegate(path, x1, y1, x2, y2); - private delegate Status GdipAddPathLine2_delegate(IntPtr path, PointF[] points, int count); + private delegate int GdipAddPathLine2_delegate(IntPtr path, PointF[] points, int count); private static FunctionWrapper GdipAddPathLine2_ptr; - internal static Status GdipAddPathLine2(IntPtr path, PointF[] points, int count) => GdipAddPathLine2_ptr.Delegate(path, points, count); + internal static int GdipAddPathLine2(IntPtr path, PointF[] points, int count) => GdipAddPathLine2_ptr.Delegate(path, points, count); - private delegate Status GdipAddPathLine2I_delegate(IntPtr path, Point[] points, int count); + private delegate int GdipAddPathLine2I_delegate(IntPtr path, Point[] points, int count); private static FunctionWrapper GdipAddPathLine2I_ptr; - internal static Status GdipAddPathLine2I(IntPtr path, Point[] points, int count) => GdipAddPathLine2I_ptr.Delegate(path, points, count); + internal static int GdipAddPathLine2I(IntPtr path, Point[] points, int count) => GdipAddPathLine2I_ptr.Delegate(path, points, count); - private delegate Status GdipAddPathArc_delegate(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle); + private delegate int GdipAddPathArc_delegate(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle); private static FunctionWrapper GdipAddPathArc_ptr; - internal static Status GdipAddPathArc(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipAddPathArc_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle); + internal static int GdipAddPathArc(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipAddPathArc_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle); - private delegate Status GdipAddPathBezier_delegate(IntPtr path, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4); + private delegate int GdipAddPathBezier_delegate(IntPtr path, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4); private static FunctionWrapper GdipAddPathBezier_ptr; - internal static Status GdipAddPathBezier(IntPtr path, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) => GdipAddPathBezier_ptr.Delegate(path, x1, y1, x2, y2, x3, y3, x4, y4); + internal static int GdipAddPathBezier(IntPtr path, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) => GdipAddPathBezier_ptr.Delegate(path, x1, y1, x2, y2, x3, y3, x4, y4); - private delegate Status GdipAddPathBeziers_delegate(IntPtr path, PointF[] points, int count); + private delegate int GdipAddPathBeziers_delegate(IntPtr path, PointF[] points, int count); private static FunctionWrapper GdipAddPathBeziers_ptr; - internal static Status GdipAddPathBeziers(IntPtr path, PointF[] points, int count) => GdipAddPathBeziers_ptr.Delegate(path, points, count); + internal static int GdipAddPathBeziers(IntPtr path, PointF[] points, int count) => GdipAddPathBeziers_ptr.Delegate(path, points, count); - private delegate Status GdipAddPathCurve_delegate(IntPtr path, PointF[] points, int count); + private delegate int GdipAddPathCurve_delegate(IntPtr path, PointF[] points, int count); private static FunctionWrapper GdipAddPathCurve_ptr; - internal static Status GdipAddPathCurve(IntPtr path, PointF[] points, int count) => GdipAddPathCurve_ptr.Delegate(path, points, count); + internal static int GdipAddPathCurve(IntPtr path, PointF[] points, int count) => GdipAddPathCurve_ptr.Delegate(path, points, count); - private delegate Status GdipAddPathCurveI_delegate(IntPtr path, Point[] points, int count); + private delegate int GdipAddPathCurveI_delegate(IntPtr path, Point[] points, int count); private static FunctionWrapper GdipAddPathCurveI_ptr; - internal static Status GdipAddPathCurveI(IntPtr path, Point[] points, int count) => GdipAddPathCurveI_ptr.Delegate(path, points, count); + internal static int GdipAddPathCurveI(IntPtr path, Point[] points, int count) => GdipAddPathCurveI_ptr.Delegate(path, points, count); - private delegate Status GdipAddPathCurve2_delegate(IntPtr path, PointF[] points, int count, float tension); + private delegate int GdipAddPathCurve2_delegate(IntPtr path, PointF[] points, int count, float tension); private static FunctionWrapper GdipAddPathCurve2_ptr; - internal static Status GdipAddPathCurve2(IntPtr path, PointF[] points, int count, float tension) => GdipAddPathCurve2_ptr.Delegate(path, points, count, tension); + internal static int GdipAddPathCurve2(IntPtr path, PointF[] points, int count, float tension) => GdipAddPathCurve2_ptr.Delegate(path, points, count, tension); - private delegate Status GdipAddPathCurve2I_delegate(IntPtr path, Point[] points, int count, float tension); + private delegate int GdipAddPathCurve2I_delegate(IntPtr path, Point[] points, int count, float tension); private static FunctionWrapper GdipAddPathCurve2I_ptr; - internal static Status GdipAddPathCurve2I(IntPtr path, Point[] points, int count, float tension) => GdipAddPathCurve2I_ptr.Delegate(path, points, count, tension); + internal static int GdipAddPathCurve2I(IntPtr path, Point[] points, int count, float tension) => GdipAddPathCurve2I_ptr.Delegate(path, points, count, tension); - private delegate Status GdipAddPathCurve3_delegate(IntPtr path, PointF[] points, int count, int offset, int numberOfSegments, float tension); + private delegate int GdipAddPathCurve3_delegate(IntPtr path, PointF[] points, int count, int offset, int numberOfSegments, float tension); private static FunctionWrapper GdipAddPathCurve3_ptr; - internal static Status GdipAddPathCurve3(IntPtr path, PointF[] points, int count, int offset, int numberOfSegments, float tension) => GdipAddPathCurve3_ptr.Delegate(path, points, count, offset, numberOfSegments, tension); + internal static int GdipAddPathCurve3(IntPtr path, PointF[] points, int count, int offset, int numberOfSegments, float tension) => GdipAddPathCurve3_ptr.Delegate(path, points, count, offset, numberOfSegments, tension); - private delegate Status GdipAddPathCurve3I_delegate(IntPtr path, Point[] points, int count, int offset, int numberOfSegments, float tension); + private delegate int GdipAddPathCurve3I_delegate(IntPtr path, Point[] points, int count, int offset, int numberOfSegments, float tension); private static FunctionWrapper GdipAddPathCurve3I_ptr; - internal static Status GdipAddPathCurve3I(IntPtr path, Point[] points, int count, int offset, int numberOfSegments, float tension) => GdipAddPathCurve3I_ptr.Delegate(path, points, count, offset, numberOfSegments, tension); + internal static int GdipAddPathCurve3I(IntPtr path, Point[] points, int count, int offset, int numberOfSegments, float tension) => GdipAddPathCurve3I_ptr.Delegate(path, points, count, offset, numberOfSegments, tension); - private delegate Status GdipAddPathClosedCurve_delegate(IntPtr path, PointF[] points, int count); + private delegate int GdipAddPathClosedCurve_delegate(IntPtr path, PointF[] points, int count); private static FunctionWrapper GdipAddPathClosedCurve_ptr; - internal static Status GdipAddPathClosedCurve(IntPtr path, PointF[] points, int count) => GdipAddPathClosedCurve_ptr.Delegate(path, points, count); + internal static int GdipAddPathClosedCurve(IntPtr path, PointF[] points, int count) => GdipAddPathClosedCurve_ptr.Delegate(path, points, count); - private delegate Status GdipAddPathClosedCurveI_delegate(IntPtr path, Point[] points, int count); + private delegate int GdipAddPathClosedCurveI_delegate(IntPtr path, Point[] points, int count); private static FunctionWrapper GdipAddPathClosedCurveI_ptr; - internal static Status GdipAddPathClosedCurveI(IntPtr path, Point[] points, int count) => GdipAddPathClosedCurveI_ptr.Delegate(path, points, count); + internal static int GdipAddPathClosedCurveI(IntPtr path, Point[] points, int count) => GdipAddPathClosedCurveI_ptr.Delegate(path, points, count); - private delegate Status GdipAddPathClosedCurve2_delegate(IntPtr path, PointF[] points, int count, float tension); + private delegate int GdipAddPathClosedCurve2_delegate(IntPtr path, PointF[] points, int count, float tension); private static FunctionWrapper GdipAddPathClosedCurve2_ptr; - internal static Status GdipAddPathClosedCurve2(IntPtr path, PointF[] points, int count, float tension) => GdipAddPathClosedCurve2_ptr.Delegate(path, points, count, tension); + internal static int GdipAddPathClosedCurve2(IntPtr path, PointF[] points, int count, float tension) => GdipAddPathClosedCurve2_ptr.Delegate(path, points, count, tension); - private delegate Status GdipAddPathClosedCurve2I_delegate(IntPtr path, Point[] points, int count, float tension); + private delegate int GdipAddPathClosedCurve2I_delegate(IntPtr path, Point[] points, int count, float tension); private static FunctionWrapper GdipAddPathClosedCurve2I_ptr; - internal static Status GdipAddPathClosedCurve2I(IntPtr path, Point[] points, int count, float tension) => GdipAddPathClosedCurve2I_ptr.Delegate(path, points, count, tension); + internal static int GdipAddPathClosedCurve2I(IntPtr path, Point[] points, int count, float tension) => GdipAddPathClosedCurve2I_ptr.Delegate(path, points, count, tension); - private delegate Status GdipAddPathRectangle_delegate(IntPtr path, float x, float y, float width, float height); + private delegate int GdipAddPathRectangle_delegate(IntPtr path, float x, float y, float width, float height); private static FunctionWrapper GdipAddPathRectangle_ptr; - internal static Status GdipAddPathRectangle(IntPtr path, float x, float y, float width, float height) => GdipAddPathRectangle_ptr.Delegate(path, x, y, width, height); + internal static int GdipAddPathRectangle(IntPtr path, float x, float y, float width, float height) => GdipAddPathRectangle_ptr.Delegate(path, x, y, width, height); - private delegate Status GdipAddPathRectangles_delegate(IntPtr path, RectangleF[] rects, int count); + private delegate int GdipAddPathRectangles_delegate(IntPtr path, RectangleF[] rects, int count); private static FunctionWrapper GdipAddPathRectangles_ptr; - internal static Status GdipAddPathRectangles(IntPtr path, RectangleF[] rects, int count) => GdipAddPathRectangles_ptr.Delegate(path, rects, count); + internal static int GdipAddPathRectangles(IntPtr path, RectangleF[] rects, int count) => GdipAddPathRectangles_ptr.Delegate(path, rects, count); - private delegate Status GdipAddPathEllipse_delegate(IntPtr path, float x, float y, float width, float height); + private delegate int GdipAddPathEllipse_delegate(IntPtr path, float x, float y, float width, float height); private static FunctionWrapper GdipAddPathEllipse_ptr; - internal static Status GdipAddPathEllipse(IntPtr path, float x, float y, float width, float height) => GdipAddPathEllipse_ptr.Delegate(path, x, y, width, height); + internal static int GdipAddPathEllipse(IntPtr path, float x, float y, float width, float height) => GdipAddPathEllipse_ptr.Delegate(path, x, y, width, height); - private delegate Status GdipAddPathEllipseI_delegate(IntPtr path, int x, int y, int width, int height); + private delegate int GdipAddPathEllipseI_delegate(IntPtr path, int x, int y, int width, int height); private static FunctionWrapper GdipAddPathEllipseI_ptr; - internal static Status GdipAddPathEllipseI(IntPtr path, int x, int y, int width, int height) => GdipAddPathEllipseI_ptr.Delegate(path, x, y, width, height); + internal static int GdipAddPathEllipseI(IntPtr path, int x, int y, int width, int height) => GdipAddPathEllipseI_ptr.Delegate(path, x, y, width, height); - private delegate Status GdipAddPathPie_delegate(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle); + private delegate int GdipAddPathPie_delegate(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle); private static FunctionWrapper GdipAddPathPie_ptr; - internal static Status GdipAddPathPie(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipAddPathPie_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle); + internal static int GdipAddPathPie(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipAddPathPie_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle); - private delegate Status GdipAddPathPieI_delegate(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle); + private delegate int GdipAddPathPieI_delegate(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle); private static FunctionWrapper GdipAddPathPieI_ptr; - internal static Status GdipAddPathPieI(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipAddPathPieI_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle); + internal static int GdipAddPathPieI(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipAddPathPieI_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle); - private delegate Status GdipAddPathPolygon_delegate(IntPtr path, PointF[] points, int count); + private delegate int GdipAddPathPolygon_delegate(IntPtr path, PointF[] points, int count); private static FunctionWrapper GdipAddPathPolygon_ptr; - internal static Status GdipAddPathPolygon(IntPtr path, PointF[] points, int count) => GdipAddPathPolygon_ptr.Delegate(path, points, count); + internal static int GdipAddPathPolygon(IntPtr path, PointF[] points, int count) => GdipAddPathPolygon_ptr.Delegate(path, points, count); - private delegate Status GdipAddPathPath_delegate(IntPtr path, IntPtr addingPath, bool connect); + private delegate int GdipAddPathPath_delegate(IntPtr path, IntPtr addingPath, bool connect); private static FunctionWrapper GdipAddPathPath_ptr; - internal static Status GdipAddPathPath(IntPtr path, IntPtr addingPath, bool connect) => GdipAddPathPath_ptr.Delegate(path, addingPath, connect); + internal static int GdipAddPathPath(IntPtr path, IntPtr addingPath, bool connect) => GdipAddPathPath_ptr.Delegate(path, addingPath, connect); - private delegate Status GdipAddPathLineI_delegate(IntPtr path, int x1, int y1, int x2, int y2); + private delegate int GdipAddPathLineI_delegate(IntPtr path, int x1, int y1, int x2, int y2); private static FunctionWrapper GdipAddPathLineI_ptr; - internal static Status GdipAddPathLineI(IntPtr path, int x1, int y1, int x2, int y2) => GdipAddPathLineI_ptr.Delegate(path, x1, y1, x2, y2); + internal static int GdipAddPathLineI(IntPtr path, int x1, int y1, int x2, int y2) => GdipAddPathLineI_ptr.Delegate(path, x1, y1, x2, y2); - private delegate Status GdipAddPathArcI_delegate(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle); + private delegate int GdipAddPathArcI_delegate(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle); private static FunctionWrapper GdipAddPathArcI_ptr; - internal static Status GdipAddPathArcI(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipAddPathArcI_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle); + internal static int GdipAddPathArcI(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipAddPathArcI_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle); - private delegate Status GdipAddPathBezierI_delegate(IntPtr path, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4); + private delegate int GdipAddPathBezierI_delegate(IntPtr path, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4); private static FunctionWrapper GdipAddPathBezierI_ptr; - internal static Status GdipAddPathBezierI(IntPtr path, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) => GdipAddPathBezierI_ptr.Delegate(path, x1, y1, x2, y2, x3, y3, x4, y4); + internal static int GdipAddPathBezierI(IntPtr path, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) => GdipAddPathBezierI_ptr.Delegate(path, x1, y1, x2, y2, x3, y3, x4, y4); - private delegate Status GdipAddPathBeziersI_delegate(IntPtr path, Point[] points, int count); + private delegate int GdipAddPathBeziersI_delegate(IntPtr path, Point[] points, int count); private static FunctionWrapper GdipAddPathBeziersI_ptr; - internal static Status GdipAddPathBeziersI(IntPtr path, Point[] points, int count) => GdipAddPathBeziersI_ptr.Delegate(path, points, count); + internal static int GdipAddPathBeziersI(IntPtr path, Point[] points, int count) => GdipAddPathBeziersI_ptr.Delegate(path, points, count); - private delegate Status GdipAddPathPolygonI_delegate(IntPtr path, Point[] points, int count); + private delegate int GdipAddPathPolygonI_delegate(IntPtr path, Point[] points, int count); private static FunctionWrapper GdipAddPathPolygonI_ptr; - internal static Status GdipAddPathPolygonI(IntPtr path, Point[] points, int count) => GdipAddPathPolygonI_ptr.Delegate(path, points, count); + internal static int GdipAddPathPolygonI(IntPtr path, Point[] points, int count) => GdipAddPathPolygonI_ptr.Delegate(path, points, count); - private delegate Status GdipAddPathRectangleI_delegate(IntPtr path, int x, int y, int width, int height); + private delegate int GdipAddPathRectangleI_delegate(IntPtr path, int x, int y, int width, int height); private static FunctionWrapper GdipAddPathRectangleI_ptr; - internal static Status GdipAddPathRectangleI(IntPtr path, int x, int y, int width, int height) => GdipAddPathRectangleI_ptr.Delegate(path, x, y, width, height); + internal static int GdipAddPathRectangleI(IntPtr path, int x, int y, int width, int height) => GdipAddPathRectangleI_ptr.Delegate(path, x, y, width, height); - private delegate Status GdipAddPathRectanglesI_delegate(IntPtr path, Rectangle[] rects, int count); + private delegate int GdipAddPathRectanglesI_delegate(IntPtr path, Rectangle[] rects, int count); private static FunctionWrapper GdipAddPathRectanglesI_ptr; - internal static Status GdipAddPathRectanglesI(IntPtr path, Rectangle[] rects, int count) => GdipAddPathRectanglesI_ptr.Delegate(path, rects, count); + internal static int GdipAddPathRectanglesI(IntPtr path, Rectangle[] rects, int count) => GdipAddPathRectanglesI_ptr.Delegate(path, rects, count); - private delegate Status GdipFlattenPath_delegate(IntPtr path, IntPtr matrix, float floatness); + private delegate int GdipFlattenPath_delegate(IntPtr path, IntPtr matrix, float floatness); private static FunctionWrapper GdipFlattenPath_ptr; - internal static Status GdipFlattenPath(IntPtr path, IntPtr matrix, float floatness) => GdipFlattenPath_ptr.Delegate(path, matrix, floatness); + internal static int GdipFlattenPath(IntPtr path, IntPtr matrix, float floatness) => GdipFlattenPath_ptr.Delegate(path, matrix, floatness); - private delegate Status GdipTransformPath_delegate(IntPtr path, IntPtr matrix); + private delegate int GdipTransformPath_delegate(IntPtr path, IntPtr matrix); private static FunctionWrapper GdipTransformPath_ptr; - internal static Status GdipTransformPath(IntPtr path, IntPtr matrix) => GdipTransformPath_ptr.Delegate(path, matrix); + internal static int GdipTransformPath(IntPtr path, IntPtr matrix) => GdipTransformPath_ptr.Delegate(path, matrix); - private delegate Status GdipWarpPath_delegate(IntPtr path, IntPtr matrix, PointF[] points, int count, float srcx, float srcy, float srcwidth, float srcheight, WarpMode mode, float flatness); + private delegate int GdipWarpPath_delegate(IntPtr path, IntPtr matrix, PointF[] points, int count, float srcx, float srcy, float srcwidth, float srcheight, WarpMode mode, float flatness); private static FunctionWrapper GdipWarpPath_ptr; - internal static Status GdipWarpPath(IntPtr path, IntPtr matrix, PointF[] points, int count, float srcx, float srcy, float srcwidth, float srcheight, WarpMode mode, float flatness) => GdipWarpPath_ptr.Delegate(path, matrix, points, count, srcx, srcy, srcwidth, srcheight, mode, flatness); + internal static int GdipWarpPath(IntPtr path, IntPtr matrix, PointF[] points, int count, float srcx, float srcy, float srcwidth, float srcheight, WarpMode mode, float flatness) => GdipWarpPath_ptr.Delegate(path, matrix, points, count, srcx, srcy, srcwidth, srcheight, mode, flatness); - private delegate Status GdipWidenPath_delegate(IntPtr path, IntPtr pen, IntPtr matrix, float flatness); + private delegate int GdipWidenPath_delegate(IntPtr path, IntPtr pen, IntPtr matrix, float flatness); private static FunctionWrapper GdipWidenPath_ptr; - internal static Status GdipWidenPath(IntPtr path, IntPtr pen, IntPtr matrix, float flatness) => GdipWidenPath_ptr.Delegate(path, pen, matrix, flatness); + internal static int GdipWidenPath(IntPtr path, IntPtr pen, IntPtr matrix, float flatness) => GdipWidenPath_ptr.Delegate(path, pen, matrix, flatness); - private delegate Status GdipGetPathWorldBounds_delegate(IntPtr path, out RectangleF bounds, IntPtr matrix, IntPtr pen); + private delegate int GdipGetPathWorldBounds_delegate(IntPtr path, out RectangleF bounds, IntPtr matrix, IntPtr pen); private static FunctionWrapper GdipGetPathWorldBounds_ptr; - internal static Status GdipGetPathWorldBounds(IntPtr path, out RectangleF bounds, IntPtr matrix, IntPtr pen) => GdipGetPathWorldBounds_ptr.Delegate(path, out bounds, matrix, pen); + internal static int GdipGetPathWorldBounds(IntPtr path, out RectangleF bounds, IntPtr matrix, IntPtr pen) => GdipGetPathWorldBounds_ptr.Delegate(path, out bounds, matrix, pen); - private delegate Status GdipGetPathWorldBoundsI_delegate(IntPtr path, out Rectangle bounds, IntPtr matrix, IntPtr pen); + private delegate int GdipGetPathWorldBoundsI_delegate(IntPtr path, out Rectangle bounds, IntPtr matrix, IntPtr pen); private static FunctionWrapper GdipGetPathWorldBoundsI_ptr; - internal static Status GdipGetPathWorldBoundsI(IntPtr path, out Rectangle bounds, IntPtr matrix, IntPtr pen) => GdipGetPathWorldBoundsI_ptr.Delegate(path, out bounds, matrix, pen); + internal static int GdipGetPathWorldBoundsI(IntPtr path, out Rectangle bounds, IntPtr matrix, IntPtr pen) => GdipGetPathWorldBoundsI_ptr.Delegate(path, out bounds, matrix, pen); - private delegate Status GdipIsVisiblePathPoint_delegate(IntPtr path, float x, float y, IntPtr graphics, out bool result); + private delegate int GdipIsVisiblePathPoint_delegate(IntPtr path, float x, float y, IntPtr graphics, out bool result); private static FunctionWrapper GdipIsVisiblePathPoint_ptr; - internal static Status GdipIsVisiblePathPoint(IntPtr path, float x, float y, IntPtr graphics, out bool result) => GdipIsVisiblePathPoint_ptr.Delegate(path, x, y, graphics, out result); + internal static int GdipIsVisiblePathPoint(IntPtr path, float x, float y, IntPtr graphics, out bool result) => GdipIsVisiblePathPoint_ptr.Delegate(path, x, y, graphics, out result); - private delegate Status GdipIsVisiblePathPointI_delegate(IntPtr path, int x, int y, IntPtr graphics, out bool result); + private delegate int GdipIsVisiblePathPointI_delegate(IntPtr path, int x, int y, IntPtr graphics, out bool result); private static FunctionWrapper GdipIsVisiblePathPointI_ptr; - internal static Status GdipIsVisiblePathPointI(IntPtr path, int x, int y, IntPtr graphics, out bool result) => GdipIsVisiblePathPointI_ptr.Delegate(path, x, y, graphics, out result); + internal static int GdipIsVisiblePathPointI(IntPtr path, int x, int y, IntPtr graphics, out bool result) => GdipIsVisiblePathPointI_ptr.Delegate(path, x, y, graphics, out result); - private delegate Status GdipIsOutlineVisiblePathPoint_delegate(IntPtr path, float x, float y, IntPtr pen, IntPtr graphics, out bool result); + private delegate int GdipIsOutlineVisiblePathPoint_delegate(IntPtr path, float x, float y, IntPtr pen, IntPtr graphics, out bool result); private static FunctionWrapper GdipIsOutlineVisiblePathPoint_ptr; - internal static Status GdipIsOutlineVisiblePathPoint(IntPtr path, float x, float y, IntPtr pen, IntPtr graphics, out bool result) => GdipIsOutlineVisiblePathPoint_ptr.Delegate(path, x, y, pen, graphics, out result); + internal static int GdipIsOutlineVisiblePathPoint(IntPtr path, float x, float y, IntPtr pen, IntPtr graphics, out bool result) => GdipIsOutlineVisiblePathPoint_ptr.Delegate(path, x, y, pen, graphics, out result); - private delegate Status GdipIsOutlineVisiblePathPointI_delegate(IntPtr path, int x, int y, IntPtr pen, IntPtr graphics, out bool result); + private delegate int GdipIsOutlineVisiblePathPointI_delegate(IntPtr path, int x, int y, IntPtr pen, IntPtr graphics, out bool result); private static FunctionWrapper GdipIsOutlineVisiblePathPointI_ptr; - internal static Status GdipIsOutlineVisiblePathPointI(IntPtr path, int x, int y, IntPtr pen, IntPtr graphics, out bool result) => GdipIsOutlineVisiblePathPointI_ptr.Delegate(path, x, y, pen, graphics, out result); + internal static int GdipIsOutlineVisiblePathPointI(IntPtr path, int x, int y, IntPtr pen, IntPtr graphics, out bool result) => GdipIsOutlineVisiblePathPointI_ptr.Delegate(path, x, y, pen, graphics, out result); - private delegate Status GdipCreateFont_delegate(IntPtr fontFamily, float emSize, FontStyle style, GraphicsUnit unit, out IntPtr font); + private delegate int GdipCreateFont_delegate(IntPtr fontFamily, float emSize, FontStyle style, GraphicsUnit unit, out IntPtr font); private static FunctionWrapper GdipCreateFont_ptr; - internal static Status GdipCreateFont(IntPtr fontFamily, float emSize, FontStyle style, GraphicsUnit unit, out IntPtr font) => GdipCreateFont_ptr.Delegate(fontFamily, emSize, style, unit, out font); + internal static int GdipCreateFont(IntPtr fontFamily, float emSize, FontStyle style, GraphicsUnit unit, out IntPtr font) => GdipCreateFont_ptr.Delegate(fontFamily, emSize, style, unit, out font); - private delegate Status GdipDeleteFont_delegate(IntPtr font); + private delegate int GdipDeleteFont_delegate(IntPtr font); private static FunctionWrapper GdipDeleteFont_ptr; - internal static Status GdipDeleteFont(IntPtr font) => GdipDeleteFont_ptr.Delegate(font); + internal static int GdipDeleteFont(IntPtr font) => GdipDeleteFont_ptr.Delegate(font); internal static int IntGdipDeleteFont(HandleRef font) => (int)GdipDeleteFont_ptr.Delegate(font.Handle); #pragma warning disable CS0618 // Legacy code: We don't care about using obsolete API's. - private delegate Status GdipGetLogFont_delegate(IntPtr font, IntPtr graphics, [MarshalAs(UnmanagedType.AsAny), Out] object logfontA); + private delegate int GdipGetLogFont_delegate(IntPtr font, IntPtr graphics, [MarshalAs(UnmanagedType.AsAny), Out] object logfontA); #pragma warning restore CS0618 private static FunctionWrapper GdipGetLogFont_ptr; - internal static Status GdipGetLogFont(IntPtr font, IntPtr graphics, [Out] object logfontA) => GdipGetLogFont_ptr.Delegate(font, graphics, logfontA); + internal static int GdipGetLogFont(IntPtr font, IntPtr graphics, [Out] object logfontA) => GdipGetLogFont_ptr.Delegate(font, graphics, logfontA); - private delegate Status GdipCreateFontFromDC_delegate(IntPtr hdc, out IntPtr font); + private delegate int GdipCreateFontFromDC_delegate(IntPtr hdc, out IntPtr font); private static FunctionWrapper GdipCreateFontFromDC_ptr; - internal static Status GdipCreateFontFromDC(IntPtr hdc, out IntPtr font) => GdipCreateFontFromDC_ptr.Delegate(hdc, out font); + internal static int GdipCreateFontFromDC(IntPtr hdc, out IntPtr font) => GdipCreateFontFromDC_ptr.Delegate(hdc, out font); - private delegate Status GdipCreateFontFromLogfont_delegate(IntPtr hdc, ref LOGFONT lf, out IntPtr ptr); + private delegate int GdipCreateFontFromLogfont_delegate(IntPtr hdc, ref LOGFONT lf, out IntPtr ptr); private static FunctionWrapper GdipCreateFontFromLogfont_ptr; - internal static Status GdipCreateFontFromLogfont(IntPtr hdc, ref LOGFONT lf, out IntPtr ptr) => GdipCreateFontFromLogfont_ptr.Delegate(hdc, ref lf, out ptr); + internal static int GdipCreateFontFromLogfont(IntPtr hdc, ref LOGFONT lf, out IntPtr ptr) => GdipCreateFontFromLogfont_ptr.Delegate(hdc, ref lf, out ptr); - private delegate Status GdipCreateFontFromHfont_delegate(IntPtr hdc, out IntPtr font, ref LOGFONT lf); + private delegate int GdipCreateFontFromHfont_delegate(IntPtr hdc, out IntPtr font, ref LOGFONT lf); private static FunctionWrapper GdipCreateFontFromHfont_ptr; - internal static Status GdipCreateFontFromHfont(IntPtr hdc, out IntPtr font, ref LOGFONT lf) => GdipCreateFontFromHfont_ptr.Delegate(hdc, out font, ref lf); + internal static int GdipCreateFontFromHfont(IntPtr hdc, out IntPtr font, ref LOGFONT lf) => GdipCreateFontFromHfont_ptr.Delegate(hdc, out font, ref lf); - private delegate Status GdipGetFontSize_delegate(IntPtr font, out float size); + private delegate int GdipGetFontSize_delegate(IntPtr font, out float size); private static FunctionWrapper GdipGetFontSize_ptr; - internal static Status GdipGetFontSize(IntPtr font, out float size) => GdipGetFontSize_ptr.Delegate(font, out size); + internal static int GdipGetFontSize(IntPtr font, out float size) => GdipGetFontSize_ptr.Delegate(font, out size); - private delegate Status GdipGetFontHeight_delegate(IntPtr font, IntPtr graphics, out float height); + private delegate int GdipGetFontHeight_delegate(IntPtr font, IntPtr graphics, out float height); private static FunctionWrapper GdipGetFontHeight_ptr; - internal static Status GdipGetFontHeight(IntPtr font, IntPtr graphics, out float height) => GdipGetFontHeight_ptr.Delegate(font, graphics, out height); + internal static int GdipGetFontHeight(IntPtr font, IntPtr graphics, out float height) => GdipGetFontHeight_ptr.Delegate(font, graphics, out height); - private delegate Status GdipGetFontHeightGivenDPI_delegate(IntPtr font, float dpi, out float height); + private delegate int GdipGetFontHeightGivenDPI_delegate(IntPtr font, float dpi, out float height); private static FunctionWrapper GdipGetFontHeightGivenDPI_ptr; - internal static Status GdipGetFontHeightGivenDPI(IntPtr font, float dpi, out float height) => GdipGetFontHeightGivenDPI_ptr.Delegate(font, dpi, out height); + internal static int GdipGetFontHeightGivenDPI(IntPtr font, float dpi, out float height) => GdipGetFontHeightGivenDPI_ptr.Delegate(font, dpi, out height); - private delegate Status GdipCreateMetafileFromFile_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr metafile); + private delegate int GdipCreateMetafileFromFile_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr metafile); private static FunctionWrapper GdipCreateMetafileFromFile_ptr; - internal static Status GdipCreateMetafileFromFile(string filename, out IntPtr metafile) => GdipCreateMetafileFromFile_ptr.Delegate(filename, out metafile); + internal static int GdipCreateMetafileFromFile(string filename, out IntPtr metafile) => GdipCreateMetafileFromFile_ptr.Delegate(filename, out metafile); - private delegate Status GdipCreateMetafileFromEmf_delegate(IntPtr hEmf, bool deleteEmf, out IntPtr metafile); + private delegate int GdipCreateMetafileFromEmf_delegate(IntPtr hEmf, bool deleteEmf, out IntPtr metafile); private static FunctionWrapper GdipCreateMetafileFromEmf_ptr; - internal static Status GdipCreateMetafileFromEmf(IntPtr hEmf, bool deleteEmf, out IntPtr metafile) => GdipCreateMetafileFromEmf_ptr.Delegate(hEmf, deleteEmf, out metafile); + internal static int GdipCreateMetafileFromEmf(IntPtr hEmf, bool deleteEmf, out IntPtr metafile) => GdipCreateMetafileFromEmf_ptr.Delegate(hEmf, deleteEmf, out metafile); - private delegate Status GdipCreateMetafileFromWmf_delegate(IntPtr hWmf, bool deleteWmf, WmfPlaceableFileHeader wmfPlaceableFileHeader, out IntPtr metafile); + private delegate int GdipCreateMetafileFromWmf_delegate(IntPtr hWmf, bool deleteWmf, WmfPlaceableFileHeader wmfPlaceableFileHeader, out IntPtr metafile); private static FunctionWrapper GdipCreateMetafileFromWmf_ptr; - internal static Status GdipCreateMetafileFromWmf(IntPtr hWmf, bool deleteWmf, WmfPlaceableFileHeader wmfPlaceableFileHeader, out IntPtr metafile) => GdipCreateMetafileFromWmf_ptr.Delegate(hWmf, deleteWmf, wmfPlaceableFileHeader, out metafile); + internal static int GdipCreateMetafileFromWmf(IntPtr hWmf, bool deleteWmf, WmfPlaceableFileHeader wmfPlaceableFileHeader, out IntPtr metafile) => GdipCreateMetafileFromWmf_ptr.Delegate(hWmf, deleteWmf, wmfPlaceableFileHeader, out metafile); - private delegate Status GdipGetMetafileHeaderFromFile_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, IntPtr header); + private delegate int GdipGetMetafileHeaderFromFile_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, IntPtr header); private static FunctionWrapper GdipGetMetafileHeaderFromFile_ptr; - internal static Status GdipGetMetafileHeaderFromFile(string filename, IntPtr header) => GdipGetMetafileHeaderFromFile_ptr.Delegate(filename, header); + internal static int GdipGetMetafileHeaderFromFile(string filename, IntPtr header) => GdipGetMetafileHeaderFromFile_ptr.Delegate(filename, header); - private delegate Status GdipGetMetafileHeaderFromMetafile_delegate(IntPtr metafile, IntPtr header); + private delegate int GdipGetMetafileHeaderFromMetafile_delegate(IntPtr metafile, IntPtr header); private static FunctionWrapper GdipGetMetafileHeaderFromMetafile_ptr; - internal static Status GdipGetMetafileHeaderFromMetafile(IntPtr metafile, IntPtr header) => GdipGetMetafileHeaderFromMetafile_ptr.Delegate(metafile, header); + internal static int GdipGetMetafileHeaderFromMetafile(IntPtr metafile, IntPtr header) => GdipGetMetafileHeaderFromMetafile_ptr.Delegate(metafile, header); - private delegate Status GdipGetMetafileHeaderFromEmf_delegate(IntPtr hEmf, IntPtr header); + private delegate int GdipGetMetafileHeaderFromEmf_delegate(IntPtr hEmf, IntPtr header); private static FunctionWrapper GdipGetMetafileHeaderFromEmf_ptr; - internal static Status GdipGetMetafileHeaderFromEmf(IntPtr hEmf, IntPtr header) => GdipGetMetafileHeaderFromEmf_ptr.Delegate(hEmf, header); + internal static int GdipGetMetafileHeaderFromEmf(IntPtr hEmf, IntPtr header) => GdipGetMetafileHeaderFromEmf_ptr.Delegate(hEmf, header); - private delegate Status GdipGetMetafileHeaderFromWmf_delegate(IntPtr hWmf, IntPtr wmfPlaceableFileHeader, IntPtr header); + private delegate int GdipGetMetafileHeaderFromWmf_delegate(IntPtr hWmf, IntPtr wmfPlaceableFileHeader, IntPtr header); private static FunctionWrapper GdipGetMetafileHeaderFromWmf_ptr; - internal static Status GdipGetMetafileHeaderFromWmf(IntPtr hWmf, IntPtr wmfPlaceableFileHeader, IntPtr header) => GdipGetMetafileHeaderFromWmf_ptr.Delegate(hWmf, wmfPlaceableFileHeader, header); + internal static int GdipGetMetafileHeaderFromWmf(IntPtr hWmf, IntPtr wmfPlaceableFileHeader, IntPtr header) => GdipGetMetafileHeaderFromWmf_ptr.Delegate(hWmf, wmfPlaceableFileHeader, header); - private delegate Status GdipGetHemfFromMetafile_delegate(IntPtr metafile, out IntPtr hEmf); + private delegate int GdipGetHemfFromMetafile_delegate(IntPtr metafile, out IntPtr hEmf); private static FunctionWrapper GdipGetHemfFromMetafile_ptr; - internal static Status GdipGetHemfFromMetafile(IntPtr metafile, out IntPtr hEmf) => GdipGetHemfFromMetafile_ptr.Delegate(metafile, out hEmf); + internal static int GdipGetHemfFromMetafile(IntPtr metafile, out IntPtr hEmf) => GdipGetHemfFromMetafile_ptr.Delegate(metafile, out hEmf); - private delegate Status GdipGetMetafileDownLevelRasterizationLimit_delegate(IntPtr metafile, ref uint metafileRasterizationLimitDpi); + private delegate int GdipGetMetafileDownLevelRasterizationLimit_delegate(IntPtr metafile, ref uint metafileRasterizationLimitDpi); private static FunctionWrapper GdipGetMetafileDownLevelRasterizationLimit_ptr; - internal static Status GdipGetMetafileDownLevelRasterizationLimit(IntPtr metafile, ref uint metafileRasterizationLimitDpi) => GdipGetMetafileDownLevelRasterizationLimit_ptr.Delegate(metafile, ref metafileRasterizationLimitDpi); + internal static int GdipGetMetafileDownLevelRasterizationLimit(IntPtr metafile, ref uint metafileRasterizationLimitDpi) => GdipGetMetafileDownLevelRasterizationLimit_ptr.Delegate(metafile, ref metafileRasterizationLimitDpi); - private delegate Status GdipSetMetafileDownLevelRasterizationLimit_delegate(IntPtr metafile, uint metafileRasterizationLimitDpi); + private delegate int GdipSetMetafileDownLevelRasterizationLimit_delegate(IntPtr metafile, uint metafileRasterizationLimitDpi); private static FunctionWrapper GdipSetMetafileDownLevelRasterizationLimit_ptr; - internal static Status GdipSetMetafileDownLevelRasterizationLimit(IntPtr metafile, uint metafileRasterizationLimitDpi) => GdipSetMetafileDownLevelRasterizationLimit_ptr.Delegate(metafile, metafileRasterizationLimitDpi); + internal static int GdipSetMetafileDownLevelRasterizationLimit(IntPtr metafile, uint metafileRasterizationLimitDpi) => GdipSetMetafileDownLevelRasterizationLimit_ptr.Delegate(metafile, metafileRasterizationLimitDpi); - private delegate Status GdipPlayMetafileRecord_delegate(IntPtr metafile, EmfPlusRecordType recordType, int flags, int dataSize, byte[] data); + private delegate int GdipPlayMetafileRecord_delegate(IntPtr metafile, EmfPlusRecordType recordType, int flags, int dataSize, byte[] data); private static FunctionWrapper GdipPlayMetafileRecord_ptr; - internal static Status GdipPlayMetafileRecord(IntPtr metafile, EmfPlusRecordType recordType, int flags, int dataSize, byte[] data) => GdipPlayMetafileRecord_ptr.Delegate(metafile, recordType, flags, dataSize, data); + internal static int GdipPlayMetafileRecord(IntPtr metafile, EmfPlusRecordType recordType, int flags, int dataSize, byte[] data) => GdipPlayMetafileRecord_ptr.Delegate(metafile, recordType, flags, dataSize, data); - private delegate Status GdipRecordMetafile_delegate(IntPtr hdc, EmfType type, ref RectangleF frameRect, MetafileFrameUnit frameUnit, [MarshalAs(UnmanagedType.LPWStr)]string description, out IntPtr metafile); + private delegate int GdipRecordMetafile_delegate(IntPtr hdc, EmfType type, ref RectangleF frameRect, MetafileFrameUnit frameUnit, [MarshalAs(UnmanagedType.LPWStr)]string description, out IntPtr metafile); private static FunctionWrapper GdipRecordMetafile_ptr; - internal static Status GdipRecordMetafile(IntPtr hdc, EmfType type, ref RectangleF frameRect, MetafileFrameUnit frameUnit, string description, out IntPtr metafile) => GdipRecordMetafile_ptr.Delegate(hdc, type, ref frameRect, frameUnit, description, out metafile); + internal static int GdipRecordMetafile(IntPtr hdc, EmfType type, ref RectangleF frameRect, MetafileFrameUnit frameUnit, string description, out IntPtr metafile) => GdipRecordMetafile_ptr.Delegate(hdc, type, ref frameRect, frameUnit, description, out metafile); - private delegate Status GdipRecordMetafileI_delegate(IntPtr hdc, EmfType type, ref Rectangle frameRect, MetafileFrameUnit frameUnit, [MarshalAs(UnmanagedType.LPWStr)]string description, out IntPtr metafile); + private delegate int GdipRecordMetafileI_delegate(IntPtr hdc, EmfType type, ref Rectangle frameRect, MetafileFrameUnit frameUnit, [MarshalAs(UnmanagedType.LPWStr)]string description, out IntPtr metafile); private static FunctionWrapper GdipRecordMetafileI_ptr; - internal static Status GdipRecordMetafileI(IntPtr hdc, EmfType type, ref Rectangle frameRect, MetafileFrameUnit frameUnit, string description, out IntPtr metafile) => GdipRecordMetafileI_ptr.Delegate(hdc, type, ref frameRect, frameUnit, description, out metafile); + internal static int GdipRecordMetafileI(IntPtr hdc, EmfType type, ref Rectangle frameRect, MetafileFrameUnit frameUnit, string description, out IntPtr metafile) => GdipRecordMetafileI_ptr.Delegate(hdc, type, ref frameRect, frameUnit, description, out metafile); - private delegate Status GdipRecordMetafileFileName_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, IntPtr hdc, EmfType type, ref RectangleF frameRect, MetafileFrameUnit frameUnit, [MarshalAs(UnmanagedType.LPWStr)]string description, out IntPtr metafile); + private delegate int GdipRecordMetafileFileName_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, IntPtr hdc, EmfType type, ref RectangleF frameRect, MetafileFrameUnit frameUnit, [MarshalAs(UnmanagedType.LPWStr)]string description, out IntPtr metafile); private static FunctionWrapper GdipRecordMetafileFileName_ptr; - internal static Status GdipRecordMetafileFileName(string filename, IntPtr hdc, EmfType type, ref RectangleF frameRect, MetafileFrameUnit frameUnit, string description, out IntPtr metafile) => GdipRecordMetafileFileName_ptr.Delegate(filename, hdc, type, ref frameRect, frameUnit, description, out metafile); + internal static int GdipRecordMetafileFileName(string filename, IntPtr hdc, EmfType type, ref RectangleF frameRect, MetafileFrameUnit frameUnit, string description, out IntPtr metafile) => GdipRecordMetafileFileName_ptr.Delegate(filename, hdc, type, ref frameRect, frameUnit, description, out metafile); - private delegate Status GdipRecordMetafileFileNameI_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, IntPtr hdc, EmfType type, ref Rectangle frameRect, MetafileFrameUnit frameUnit, [MarshalAs(UnmanagedType.LPWStr)]string description, out IntPtr metafile); + private delegate int GdipRecordMetafileFileNameI_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, IntPtr hdc, EmfType type, ref Rectangle frameRect, MetafileFrameUnit frameUnit, [MarshalAs(UnmanagedType.LPWStr)]string description, out IntPtr metafile); private static FunctionWrapper GdipRecordMetafileFileNameI_ptr; - internal static Status GdipRecordMetafileFileNameI(string filename, IntPtr hdc, EmfType type, ref Rectangle frameRect, MetafileFrameUnit frameUnit, string description, out IntPtr metafile) => GdipRecordMetafileFileNameI_ptr.Delegate(filename, hdc, type, ref frameRect, frameUnit, description, out metafile); - - private delegate Status GdipCreateMetafileFromStream_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ComIStreamMarshaler))]IStream stream, out IntPtr metafile); - private static FunctionWrapper GdipCreateMetafileFromStream_ptr; - internal static Status GdipCreateMetafileFromStream(IStream stream, out IntPtr metafile) => GdipCreateMetafileFromStream_ptr.Delegate(stream, out metafile); - - private delegate Status GdipGetMetafileHeaderFromStream_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ComIStreamMarshaler))]IStream stream, IntPtr header); - private static FunctionWrapper GdipGetMetafileHeaderFromStream_ptr; - internal static Status GdipGetMetafileHeaderFromStream(IStream stream, IntPtr header) => GdipGetMetafileHeaderFromStream_ptr.Delegate(stream, header); - - private delegate Status GdipRecordMetafileStream_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ComIStreamMarshaler))]IStream stream, IntPtr hdc, EmfType type, ref RectangleF frameRect, MetafileFrameUnit frameUnit, [MarshalAs(UnmanagedType.LPWStr)]string description, out IntPtr metafile); - private static FunctionWrapper GdipRecordMetafileStream_ptr; - internal static Status GdipRecordMetafileStream(IStream stream, IntPtr hdc, EmfType type, ref RectangleF frameRect, MetafileFrameUnit frameUnit, string description, out IntPtr metafile) => GdipRecordMetafileStream_ptr.Delegate(stream, hdc, type, ref frameRect, frameUnit, description, out metafile); - - private delegate Status GdipRecordMetafileStreamI_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ComIStreamMarshaler))]IStream stream, IntPtr hdc, EmfType type, ref Rectangle frameRect, MetafileFrameUnit frameUnit, [MarshalAs(UnmanagedType.LPWStr)]string description, out IntPtr metafile); - private static FunctionWrapper GdipRecordMetafileStreamI_ptr; - internal static Status GdipRecordMetafileStreamI(IStream stream, IntPtr hdc, EmfType type, ref Rectangle frameRect, MetafileFrameUnit frameUnit, string description, out IntPtr metafile) => GdipRecordMetafileStreamI_ptr.Delegate(stream, hdc, type, ref frameRect, frameUnit, description, out metafile); + internal static int GdipRecordMetafileFileNameI(string filename, IntPtr hdc, EmfType type, ref Rectangle frameRect, MetafileFrameUnit frameUnit, string description, out IntPtr metafile) => GdipRecordMetafileFileNameI_ptr.Delegate(filename, hdc, type, ref frameRect, frameUnit, description, out metafile); - private delegate Status GdipCreateFromContext_macosx_delegate(IntPtr cgref, int width, int height, out IntPtr graphics); + private delegate int GdipCreateFromContext_macosx_delegate(IntPtr cgref, int width, int height, out IntPtr graphics); private static FunctionWrapper GdipCreateFromContext_macosx_ptr; - internal static Status GdipCreateFromContext_macosx(IntPtr cgref, int width, int height, out IntPtr graphics) => GdipCreateFromContext_macosx_ptr.Delegate(cgref, width, height, out graphics); + internal static int GdipCreateFromContext_macosx(IntPtr cgref, int width, int height, out IntPtr graphics) => GdipCreateFromContext_macosx_ptr.Delegate(cgref, width, height, out graphics); - private delegate Status GdipSetVisibleClip_linux_delegate(IntPtr graphics, ref Rectangle rect); + private delegate int GdipSetVisibleClip_linux_delegate(IntPtr graphics, ref Rectangle rect); private static FunctionWrapper GdipSetVisibleClip_linux_ptr; - internal static Status GdipSetVisibleClip_linux(IntPtr graphics, ref Rectangle rect) => GdipSetVisibleClip_linux_ptr.Delegate(graphics, ref rect); + internal static int GdipSetVisibleClip_linux(IntPtr graphics, ref Rectangle rect) => GdipSetVisibleClip_linux_ptr.Delegate(graphics, ref rect); - private delegate Status GdipCreateFromXDrawable_linux_delegate(IntPtr drawable, IntPtr display, out IntPtr graphics); + private delegate int GdipCreateFromXDrawable_linux_delegate(IntPtr drawable, IntPtr display, out IntPtr graphics); private static FunctionWrapper GdipCreateFromXDrawable_linux_ptr; - internal static Status GdipCreateFromXDrawable_linux(IntPtr drawable, IntPtr display, out IntPtr graphics) => GdipCreateFromXDrawable_linux_ptr.Delegate(drawable, display, out graphics); + internal static int GdipCreateFromXDrawable_linux(IntPtr drawable, IntPtr display, out IntPtr graphics) => GdipCreateFromXDrawable_linux_ptr.Delegate(drawable, display, out graphics); // Stream functions for non-Win32 (libgdiplus specific) - private delegate Status GdipLoadImageFromDelegate_linux_delegate(StreamGetHeaderDelegate getHeader, + private delegate int GdipLoadImageFromDelegate_linux_delegate(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, out IntPtr image); private static FunctionWrapper GdipLoadImageFromDelegate_linux_ptr; - internal static Status GdipLoadImageFromDelegate_linux(StreamGetHeaderDelegate getHeader, + internal static int GdipLoadImageFromDelegate_linux(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, out IntPtr image) => GdipLoadImageFromDelegate_linux_ptr.Delegate(getHeader, getBytes, putBytes, doSeek, close, size, out image); - private delegate Status GdipSaveImageToDelegate_linux_delegate(IntPtr image, StreamGetBytesDelegate getBytes, + private delegate int GdipSaveImageToDelegate_linux_delegate(IntPtr image, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, ref Guid encoderClsID, IntPtr encoderParameters); private static FunctionWrapper GdipSaveImageToDelegate_linux_ptr; - internal static Status GdipSaveImageToDelegate_linux(IntPtr image, StreamGetBytesDelegate getBytes, + internal static int GdipSaveImageToDelegate_linux(IntPtr image, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, ref Guid encoderClsID, IntPtr encoderParameters) => GdipSaveImageToDelegate_linux_ptr.Delegate(image, getBytes, putBytes, doSeek, close, size, ref encoderClsID, encoderParameters); - private delegate Status GdipCreateMetafileFromDelegate_linux_delegate(StreamGetHeaderDelegate getHeader, + private delegate int GdipCreateMetafileFromDelegate_linux_delegate(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, out IntPtr metafile); private static FunctionWrapper GdipCreateMetafileFromDelegate_linux_ptr; - internal static Status GdipCreateMetafileFromDelegate_linux(StreamGetHeaderDelegate getHeader, + internal static int GdipCreateMetafileFromDelegate_linux(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, out IntPtr metafile) => GdipCreateMetafileFromDelegate_linux_ptr.Delegate(getHeader, getBytes, putBytes, doSeek, close, size, out metafile); - private delegate Status GdipGetMetafileHeaderFromDelegate_linux_delegate(StreamGetHeaderDelegate getHeader, + private delegate int GdipGetMetafileHeaderFromDelegate_linux_delegate(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr header); private static FunctionWrapper GdipGetMetafileHeaderFromDelegate_linux_ptr; - internal static Status GdipGetMetafileHeaderFromDelegate_linux(StreamGetHeaderDelegate getHeader, + internal static int GdipGetMetafileHeaderFromDelegate_linux(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr header) => GdipGetMetafileHeaderFromDelegate_linux_ptr.Delegate(getHeader, getBytes, putBytes, doSeek, close, size, header); - private delegate Status GdipRecordMetafileFromDelegate_linux_delegate(StreamGetHeaderDelegate getHeader, + private delegate int GdipRecordMetafileFromDelegate_linux_delegate(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr hdc, EmfType type, ref RectangleF frameRect, MetafileFrameUnit frameUnit, [MarshalAs(UnmanagedType.LPWStr)] string description, out IntPtr metafile); private static FunctionWrapper GdipRecordMetafileFromDelegate_linux_ptr; - internal static Status GdipRecordMetafileFromDelegate_linux(StreamGetHeaderDelegate getHeader, + internal static int GdipRecordMetafileFromDelegate_linux(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr hdc, EmfType type, ref RectangleF frameRect, MetafileFrameUnit frameUnit, string description, out IntPtr metafile) => GdipRecordMetafileFromDelegate_linux_ptr.Delegate(getHeader, getBytes, putBytes, doSeek, close, size, hdc, type, ref frameRect, frameUnit, description, out metafile); - private delegate Status GdipRecordMetafileFromDelegateI_linux_delegate(StreamGetHeaderDelegate getHeader, + private delegate int GdipRecordMetafileFromDelegateI_linux_delegate(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr hdc, EmfType type, ref Rectangle frameRect, MetafileFrameUnit frameUnit, [MarshalAs(UnmanagedType.LPWStr)] string description, out IntPtr metafile); private static FunctionWrapper GdipRecordMetafileFromDelegateI_linux_ptr; - internal static Status GdipRecordMetafileFromDelegateI_linux(StreamGetHeaderDelegate getHeader, + internal static int GdipRecordMetafileFromDelegateI_linux(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr hdc, EmfType type, ref Rectangle frameRect, MetafileFrameUnit frameUnit, string description, out IntPtr metafile) diff --git a/src/System.Drawing.Common/src/System/Drawing/GdiplusNative.Windows.cs b/src/System.Drawing.Common/src/System/Drawing/GdiplusNative.Windows.cs index 4296b4713cdc..ed059bc8ab0f 100644 --- a/src/System.Drawing.Common/src/System/Drawing/GdiplusNative.Windows.cs +++ b/src/System.Drawing.Common/src/System/Drawing/GdiplusNative.Windows.cs @@ -24,7 +24,12 @@ private static IntPtr LoadNativeLibrary() return s_gdipHandle.DangerousGetHandle(); } - private static void LoadPlatformFunctionPointers() + private static void PlatformInitialize() + { + LoadFunctionPointers(); + } + + private static void LoadFunctionPointers() { GdiplusStartup_ptr = FunctionWrapper.Load(s_gdipModule, "GdiplusStartup"); GdipCreatePath_ptr = FunctionWrapper.Load(s_gdipModule, "GdipCreatePath"); diff --git a/src/System.Drawing.Common/src/System/Drawing/Graphics.Unix.cs b/src/System.Drawing.Common/src/System/Drawing/Graphics.Unix.cs index 5df01b6cc2a5..4cf0917f634f 100644 --- a/src/System.Drawing.Common/src/System/Drawing/Graphics.Unix.cs +++ b/src/System.Drawing.Common/src/System/Drawing/Graphics.Unix.cs @@ -162,7 +162,7 @@ public GraphicsContainer BeginContainer(RectangleF dstrect, RectangleF srcrect, public void Clear(Color color) { - Status status; + int status; status = SafeNativeMethods.Gdip.GdipGraphicsClear(nativeObject, color.ToArgb()); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -193,34 +193,18 @@ public void CopyFromScreen(int sourceX, int sourceY, int destinationX, int desti if (!Enum.IsDefined(typeof(CopyPixelOperation), copyPixelOperation)) throw new InvalidEnumArgumentException(string.Format("Enum argument value '{0}' is not valid for CopyPixelOperation", copyPixelOperation)); - if (GDIPlus.UseX11Drawable) + if (SafeNativeMethods.Gdip.UseX11Drawable) { CopyFromScreenX11(sourceX, sourceY, destinationX, destinationY, blockRegionSize, copyPixelOperation); } - else if (GDIPlus.UseCarbonDrawable) + else if (SafeNativeMethods.Gdip.UseCarbonDrawable) { CopyFromScreenMac(sourceX, sourceY, destinationX, destinationY, blockRegionSize, copyPixelOperation); } - else if (GDIPlus.UseCocoaDrawable) + else if (SafeNativeMethods.Gdip.UseCocoaDrawable) { CopyFromScreenMac(sourceX, sourceY, destinationX, destinationY, blockRegionSize, copyPixelOperation); } - else - { - CopyFromScreenWin32(sourceX, sourceY, destinationX, destinationY, blockRegionSize, copyPixelOperation); - } - } - - private void CopyFromScreenWin32(int sourceX, int sourceY, int destinationX, int destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation) - { - IntPtr window = GDIPlus.GetDesktopWindow(); - IntPtr srcDC = GDIPlus.GetDC(window); - IntPtr dstDC = GetHdc(); - GDIPlus.BitBlt(dstDC, destinationX, destinationY, blockRegionSize.Width, - blockRegionSize.Height, srcDC, sourceX, sourceY, (int)copyPixelOperation); - - GDIPlus.ReleaseDC(IntPtr.Zero, srcDC); - ReleaseHdc(dstDC); } private void CopyFromScreenMac(int sourceX, int sourceY, int destinationX, int destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation) @@ -236,18 +220,18 @@ private void CopyFromScreenX11(int sourceX, int sourceY, int destinationX, int d if (copyPixelOperation != CopyPixelOperation.SourceCopy) throw new NotImplementedException("Operation not implemented under X11"); - if (GDIPlus.Display == IntPtr.Zero) + if (SafeNativeMethods.Gdip.Display == IntPtr.Zero) { - GDIPlus.Display = LibX11Functions.XOpenDisplay(IntPtr.Zero); + SafeNativeMethods.Gdip.Display = LibX11Functions.XOpenDisplay(IntPtr.Zero); } - window = LibX11Functions.XRootWindow(GDIPlus.Display, 0); - defvisual = LibX11Functions.XDefaultVisual(GDIPlus.Display, 0); + window = LibX11Functions.XRootWindow(SafeNativeMethods.Gdip.Display, 0); + defvisual = LibX11Functions.XDefaultVisual(SafeNativeMethods.Gdip.Display, 0); XVisualInfo visual = new XVisualInfo(); /* Get XVisualInfo for this visual */ visual.visualid = LibX11Functions.XVisualIDFromVisual(defvisual); - vPtr = LibX11Functions.XGetVisualInfo(GDIPlus.Display, 0x1 /* VisualIDMask */, ref visual, ref nitems); + vPtr = LibX11Functions.XGetVisualInfo(SafeNativeMethods.Gdip.Display, 0x1 /* VisualIDMask */, ref visual, ref nitems); visual = (XVisualInfo)Marshal.PtrToStructure(vPtr, typeof(XVisualInfo)); #if false Console.WriteLine ("visual\t{0}", visual.visual); @@ -261,7 +245,7 @@ private void CopyFromScreenX11(int sourceX, int sourceY, int destinationX, int d Console.WriteLine ("colormap_size\t{0}", visual.colormap_size); Console.WriteLine ("bits_per_rgb\t{0}", visual.bits_per_rgb); #endif - image = LibX11Functions.XGetImage(GDIPlus.Display, window, sourceX, sourceY, blockRegionSize.Width, + image = LibX11Functions.XGetImage(SafeNativeMethods.Gdip.Display, window, sourceX, sourceY, blockRegionSize.Width, blockRegionSize.Height, AllPlanes, 2 /* ZPixmap*/); if (image == IntPtr.Zero) { @@ -311,10 +295,10 @@ private void CopyFromScreenX11(int sourceX, int sourceY, int destinationX, int d public void Dispose() { - Status status; + int status; if (!disposed) { - if (GDIPlus.UseCarbonDrawable || GDIPlus.UseCocoaDrawable) + if (SafeNativeMethods.Gdip.UseCarbonDrawable || SafeNativeMethods.Gdip.UseCocoaDrawable) { Flush(); if (maccontext != null) @@ -345,7 +329,7 @@ public void DrawArc(Pen pen, RectangleF rect, float startAngle, float sweepAngle public void DrawArc(Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle) { - Status status; + int status; if (pen == null) throw new ArgumentNullException("pen"); @@ -359,7 +343,7 @@ public void DrawArc(Pen pen, float x, float y, float width, float height, float // int sweepAngle. However, GdipDrawArcI uses also float for the startAngle and sweepAngle params public void DrawArc(Pen pen, int x, int y, int width, int height, int startAngle, int sweepAngle) { - Status status; + int status; if (pen == null) throw new ArgumentNullException("pen"); status = SafeNativeMethods.Gdip.GdipDrawArcI(nativeObject, pen.NativePen, @@ -369,7 +353,7 @@ public void DrawArc(Pen pen, int x, int y, int width, int height, int startAngle public void DrawBezier(Pen pen, PointF pt1, PointF pt2, PointF pt3, PointF pt4) { - Status status; + int status; if (pen == null) throw new ArgumentNullException("pen"); status = SafeNativeMethods.Gdip.GdipDrawBezier(nativeObject, pen.NativePen, @@ -380,7 +364,7 @@ public void DrawBezier(Pen pen, PointF pt1, PointF pt2, PointF pt3, PointF pt4) public void DrawBezier(Pen pen, Point pt1, Point pt2, Point pt3, Point pt4) { - Status status; + int status; if (pen == null) throw new ArgumentNullException("pen"); status = SafeNativeMethods.Gdip.GdipDrawBezierI(nativeObject, pen.NativePen, @@ -391,7 +375,7 @@ public void DrawBezier(Pen pen, Point pt1, Point pt2, Point pt3, Point pt4) public void DrawBezier(Pen pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) { - Status status; + int status; if (pen == null) throw new ArgumentNullException("pen"); status = SafeNativeMethods.Gdip.GdipDrawBezier(nativeObject, pen.NativePen, x1, @@ -407,7 +391,7 @@ public void DrawBeziers(Pen pen, Point[] points) throw new ArgumentNullException("points"); int length = points.Length; - Status status; + int status; if (length < 4) return; @@ -435,7 +419,7 @@ public void DrawBeziers(Pen pen, PointF[] points) throw new ArgumentNullException("points"); int length = points.Length; - Status status; + int status; if (length < 4) return; @@ -463,7 +447,7 @@ public void DrawClosedCurve(Pen pen, PointF[] points) if (points == null) throw new ArgumentNullException("points"); - Status status; + int status; status = SafeNativeMethods.Gdip.GdipDrawClosedCurve(nativeObject, pen.NativePen, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -475,7 +459,7 @@ public void DrawClosedCurve(Pen pen, Point[] points) if (points == null) throw new ArgumentNullException("points"); - Status status; + int status; status = SafeNativeMethods.Gdip.GdipDrawClosedCurveI(nativeObject, pen.NativePen, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -489,7 +473,7 @@ public void DrawClosedCurve(Pen pen, Point[] points, float tension, FillMode fil if (points == null) throw new ArgumentNullException("points"); - Status status; + int status; status = SafeNativeMethods.Gdip.GdipDrawClosedCurve2I(nativeObject, pen.NativePen, points, points.Length, tension); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -503,7 +487,7 @@ public void DrawClosedCurve(Pen pen, PointF[] points, float tension, FillMode fi if (points == null) throw new ArgumentNullException("points"); - Status status; + int status; status = SafeNativeMethods.Gdip.GdipDrawClosedCurve2(nativeObject, pen.NativePen, points, points.Length, tension); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -515,7 +499,7 @@ public void DrawCurve(Pen pen, Point[] points) if (points == null) throw new ArgumentNullException("points"); - Status status; + int status; status = SafeNativeMethods.Gdip.GdipDrawCurveI(nativeObject, pen.NativePen, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -527,7 +511,7 @@ public void DrawCurve(Pen pen, PointF[] points) if (points == null) throw new ArgumentNullException("points"); - Status status; + int status; status = SafeNativeMethods.Gdip.GdipDrawCurve(nativeObject, pen.NativePen, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -539,7 +523,7 @@ public void DrawCurve(Pen pen, PointF[] points, float tension) if (points == null) throw new ArgumentNullException("points"); - Status status; + int status; status = SafeNativeMethods.Gdip.GdipDrawCurve2(nativeObject, pen.NativePen, points, points.Length, tension); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -551,7 +535,7 @@ public void DrawCurve(Pen pen, Point[] points, float tension) if (points == null) throw new ArgumentNullException("points"); - Status status; + int status; status = SafeNativeMethods.Gdip.GdipDrawCurve2I(nativeObject, pen.NativePen, points, points.Length, tension); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -563,7 +547,7 @@ public void DrawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments if (points == null) throw new ArgumentNullException("points"); - Status status; + int status; status = SafeNativeMethods.Gdip.GdipDrawCurve3(nativeObject, pen.NativePen, points, points.Length, offset, numberOfSegments, 0.5f); @@ -577,7 +561,7 @@ public void DrawCurve(Pen pen, Point[] points, int offset, int numberOfSegments, if (points == null) throw new ArgumentNullException("points"); - Status status; + int status; status = SafeNativeMethods.Gdip.GdipDrawCurve3I(nativeObject, pen.NativePen, points, points.Length, offset, numberOfSegments, tension); @@ -591,7 +575,7 @@ public void DrawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments if (points == null) throw new ArgumentNullException("points"); - Status status; + int status; status = SafeNativeMethods.Gdip.GdipDrawCurve3(nativeObject, pen.NativePen, points, points.Length, offset, numberOfSegments, tension); @@ -617,7 +601,7 @@ public void DrawEllipse(Pen pen, int x, int y, int width, int height) { if (pen == null) throw new ArgumentNullException("pen"); - Status status; + int status; status = SafeNativeMethods.Gdip.GdipDrawEllipseI(nativeObject, pen.NativePen, x, y, width, height); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -626,7 +610,7 @@ public void DrawEllipse(Pen pen, float x, float y, float width, float height) { if (pen == null) throw new ArgumentNullException("pen"); - Status status = SafeNativeMethods.Gdip.GdipDrawEllipse(nativeObject, pen.NativePen, x, y, width, height); + int status = SafeNativeMethods.Gdip.GdipDrawEllipse(nativeObject, pen.NativePen, x, y, width, height); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -659,7 +643,7 @@ public void DrawImage(Image image, RectangleF rect) if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImageRect(nativeObject, image.NativeObject, rect.X, rect.Y, rect.Width, rect.Height); + int status = SafeNativeMethods.Gdip.GdipDrawImageRect(nativeObject, image.NativeObject, rect.X, rect.Y, rect.Width, rect.Height); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -668,7 +652,7 @@ public void DrawImage(Image image, PointF point) if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImage(nativeObject, image.NativeObject, point.X, point.Y); + int status = SafeNativeMethods.Gdip.GdipDrawImage(nativeObject, image.NativeObject, point.X, point.Y); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -679,7 +663,7 @@ public void DrawImage(Image image, Point[] destPoints) if (destPoints == null) throw new ArgumentNullException("destPoints"); - Status status = SafeNativeMethods.Gdip.GdipDrawImagePointsI(nativeObject, image.NativeObject, destPoints, destPoints.Length); + int status = SafeNativeMethods.Gdip.GdipDrawImagePointsI(nativeObject, image.NativeObject, destPoints, destPoints.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -703,7 +687,7 @@ public void DrawImage(Image image, PointF[] destPoints) throw new ArgumentNullException("image"); if (destPoints == null) throw new ArgumentNullException("destPoints"); - Status status = SafeNativeMethods.Gdip.GdipDrawImagePoints(nativeObject, image.NativeObject, destPoints, destPoints.Length); + int status = SafeNativeMethods.Gdip.GdipDrawImagePoints(nativeObject, image.NativeObject, destPoints, destPoints.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -711,7 +695,7 @@ public void DrawImage(Image image, int x, int y) { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImageI(nativeObject, image.NativeObject, x, y); + int status = SafeNativeMethods.Gdip.GdipDrawImageI(nativeObject, image.NativeObject, x, y); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -719,7 +703,7 @@ public void DrawImage(Image image, float x, float y) { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImage(nativeObject, image.NativeObject, x, y); + int status = SafeNativeMethods.Gdip.GdipDrawImage(nativeObject, image.NativeObject, x, y); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -727,7 +711,7 @@ public void DrawImage(Image image, Rectangle destRect, Rectangle srcRect, Graphi { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImageRectRectI(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImageRectRectI(nativeObject, image.NativeObject, destRect.X, destRect.Y, destRect.Width, destRect.Height, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, IntPtr.Zero, null, IntPtr.Zero); @@ -738,7 +722,7 @@ public void DrawImage(Image image, RectangleF destRect, RectangleF srcRect, Grap { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImageRectRect(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImageRectRect(nativeObject, image.NativeObject, destRect.X, destRect.Y, destRect.Width, destRect.Height, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, IntPtr.Zero, null, IntPtr.Zero); @@ -752,7 +736,7 @@ public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, Graphi if (destPoints == null) throw new ArgumentNullException("destPoints"); - Status status = SafeNativeMethods.Gdip.GdipDrawImagePointsRectI(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImagePointsRectI(nativeObject, image.NativeObject, destPoints, destPoints.Length, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, IntPtr.Zero, null, IntPtr.Zero); @@ -766,7 +750,7 @@ public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, Grap if (destPoints == null) throw new ArgumentNullException("destPoints"); - Status status = SafeNativeMethods.Gdip.GdipDrawImagePointsRect(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImagePointsRect(nativeObject, image.NativeObject, destPoints, destPoints.Length, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, IntPtr.Zero, null, IntPtr.Zero); @@ -780,7 +764,7 @@ public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, Graphi throw new ArgumentNullException("image"); if (destPoints == null) throw new ArgumentNullException("destPoints"); - Status status = SafeNativeMethods.Gdip.GdipDrawImagePointsRectI(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImagePointsRectI(nativeObject, image.NativeObject, destPoints, destPoints.Length, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero, null, IntPtr.Zero); @@ -791,7 +775,7 @@ public void DrawImage(Image image, float x, float y, float width, float height) { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImageRect(nativeObject, image.NativeObject, x, y, + int status = SafeNativeMethods.Gdip.GdipDrawImageRect(nativeObject, image.NativeObject, x, y, width, height); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -803,7 +787,7 @@ public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, Grap throw new ArgumentNullException("image"); if (destPoints == null) throw new ArgumentNullException("destPoints"); - Status status = SafeNativeMethods.Gdip.GdipDrawImagePointsRect(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImagePointsRect(nativeObject, image.NativeObject, destPoints, destPoints.Length, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero, null, IntPtr.Zero); @@ -814,7 +798,7 @@ public void DrawImage(Image image, int x, int y, Rectangle srcRect, GraphicsUnit { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImagePointRectI(nativeObject, image.NativeObject, x, y, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit); + int status = SafeNativeMethods.Gdip.GdipDrawImagePointRectI(nativeObject, image.NativeObject, x, y, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -822,7 +806,7 @@ public void DrawImage(Image image, int x, int y, int width, int height) { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImageRectI(nativeObject, image.nativeObject, x, y, width, height); + int status = SafeNativeMethods.Gdip.GdipDrawImageRectI(nativeObject, image.nativeObject, x, y, width, height); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -830,7 +814,7 @@ public void DrawImage(Image image, float x, float y, RectangleF srcRect, Graphic { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImagePointRect(nativeObject, image.nativeObject, x, y, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit); + int status = SafeNativeMethods.Gdip.GdipDrawImagePointRect(nativeObject, image.nativeObject, x, y, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -840,7 +824,7 @@ public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, Grap throw new ArgumentNullException("image"); if (destPoints == null) throw new ArgumentNullException("destPoints"); - Status status = SafeNativeMethods.Gdip.GdipDrawImagePointsRect(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImagePointsRect(nativeObject, image.NativeObject, destPoints, destPoints.Length, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero, callback, IntPtr.Zero); @@ -854,7 +838,7 @@ public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, Graphi if (destPoints == null) throw new ArgumentNullException("destPoints"); - Status status = SafeNativeMethods.Gdip.GdipDrawImagePointsRectI(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImagePointsRectI(nativeObject, image.NativeObject, destPoints, destPoints.Length, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero, callback, IntPtr.Zero); @@ -868,7 +852,7 @@ public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, Graphi if (destPoints == null) throw new ArgumentNullException("destPoints"); - Status status = SafeNativeMethods.Gdip.GdipDrawImagePointsRectI(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImagePointsRectI(nativeObject, image.NativeObject, destPoints, destPoints.Length, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero, callback, (IntPtr)callbackData); @@ -879,7 +863,7 @@ public void DrawImage(Image image, Rectangle destRect, float srcX, float srcY, f { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImageRectRect(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImageRectRect(nativeObject, image.NativeObject, destRect.X, destRect.Y, destRect.Width, destRect.Height, srcX, srcY, srcWidth, srcHeight, srcUnit, IntPtr.Zero, null, IntPtr.Zero); @@ -888,7 +872,7 @@ public void DrawImage(Image image, Rectangle destRect, float srcX, float srcY, f public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, int callbackData) { - Status status = SafeNativeMethods.Gdip.GdipDrawImagePointsRect(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImagePointsRect(nativeObject, image.NativeObject, destPoints, destPoints.Length, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero, callback, (IntPtr)callbackData); @@ -899,7 +883,7 @@ public void DrawImage(Image image, Rectangle destRect, int srcX, int srcY, int s { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImageRectRectI(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImageRectRectI(nativeObject, image.NativeObject, destRect.X, destRect.Y, destRect.Width, destRect.Height, srcX, srcY, srcWidth, srcHeight, srcUnit, IntPtr.Zero, null, IntPtr.Zero); @@ -910,7 +894,7 @@ public void DrawImage(Image image, Rectangle destRect, float srcX, float srcY, f { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImageRectRect(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImageRectRect(nativeObject, image.NativeObject, destRect.X, destRect.Y, destRect.Width, destRect.Height, srcX, srcY, srcWidth, srcHeight, srcUnit, imageAttrs != null ? imageAttrs.nativeImageAttributes : IntPtr.Zero, null, IntPtr.Zero); @@ -921,7 +905,7 @@ public void DrawImage(Image image, Rectangle destRect, int srcX, int srcY, int s { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImageRectRectI(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImageRectRectI(nativeObject, image.NativeObject, destRect.X, destRect.Y, destRect.Width, destRect.Height, srcX, srcY, srcWidth, srcHeight, srcUnit, imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero, null, IntPtr.Zero); @@ -932,7 +916,7 @@ public void DrawImage(Image image, Rectangle destRect, int srcX, int srcY, int s { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImageRectRectI(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImageRectRectI(nativeObject, image.NativeObject, destRect.X, destRect.Y, destRect.Width, destRect.Height, srcX, srcY, srcWidth, srcHeight, srcUnit, imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero, callback, @@ -944,7 +928,7 @@ public void DrawImage(Image image, Rectangle destRect, float srcX, float srcY, f { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImageRectRect(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImageRectRect(nativeObject, image.NativeObject, destRect.X, destRect.Y, destRect.Width, destRect.Height, srcX, srcY, srcWidth, srcHeight, srcUnit, imageAttrs != null ? imageAttrs.nativeImageAttributes : IntPtr.Zero, @@ -956,7 +940,7 @@ public void DrawImage(Image image, Rectangle destRect, float srcX, float srcY, f { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImageRectRect(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImageRectRect(nativeObject, image.NativeObject, destRect.X, destRect.Y, destRect.Width, destRect.Height, srcX, srcY, srcWidth, srcHeight, srcUnit, imageAttrs != null ? imageAttrs.nativeImageAttributes : IntPtr.Zero, callback, callbackData); @@ -967,7 +951,7 @@ public void DrawImage(Image image, Rectangle destRect, int srcX, int srcY, int s { if (image == null) throw new ArgumentNullException("image"); - Status status = SafeNativeMethods.Gdip.GdipDrawImageRectRect(nativeObject, image.NativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImageRectRect(nativeObject, image.NativeObject, destRect.X, destRect.Y, destRect.Width, destRect.Height, srcX, srcY, srcWidth, srcHeight, srcUnit, imageAttrs != null ? imageAttrs.nativeImageAttributes : IntPtr.Zero, callback, callbackData); @@ -1025,7 +1009,7 @@ public void DrawLine(Pen pen, PointF pt1, PointF pt2) { if (pen == null) throw new ArgumentNullException("pen"); - Status status = SafeNativeMethods.Gdip.GdipDrawLine(nativeObject, pen.NativePen, + int status = SafeNativeMethods.Gdip.GdipDrawLine(nativeObject, pen.NativePen, pt1.X, pt1.Y, pt2.X, pt2.Y); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1034,7 +1018,7 @@ public void DrawLine(Pen pen, Point pt1, Point pt2) { if (pen == null) throw new ArgumentNullException("pen"); - Status status = SafeNativeMethods.Gdip.GdipDrawLineI(nativeObject, pen.NativePen, + int status = SafeNativeMethods.Gdip.GdipDrawLineI(nativeObject, pen.NativePen, pt1.X, pt1.Y, pt2.X, pt2.Y); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1043,7 +1027,7 @@ public void DrawLine(Pen pen, int x1, int y1, int x2, int y2) { if (pen == null) throw new ArgumentNullException("pen"); - Status status = SafeNativeMethods.Gdip.GdipDrawLineI(nativeObject, pen.NativePen, x1, y1, x2, y2); + int status = SafeNativeMethods.Gdip.GdipDrawLineI(nativeObject, pen.NativePen, x1, y1, x2, y2); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1054,7 +1038,7 @@ public void DrawLine(Pen pen, float x1, float y1, float x2, float y2) if (!float.IsNaN(x1) && !float.IsNaN(y1) && !float.IsNaN(x2) && !float.IsNaN(y2)) { - Status status = SafeNativeMethods.Gdip.GdipDrawLine(nativeObject, pen.NativePen, x1, y1, x2, y2); + int status = SafeNativeMethods.Gdip.GdipDrawLine(nativeObject, pen.NativePen, x1, y1, x2, y2); SafeNativeMethods.Gdip.CheckStatus(status); } } @@ -1065,7 +1049,7 @@ public void DrawLines(Pen pen, PointF[] points) throw new ArgumentNullException("pen"); if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipDrawLines(nativeObject, pen.NativePen, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipDrawLines(nativeObject, pen.NativePen, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1075,7 +1059,7 @@ public void DrawLines(Pen pen, Point[] points) throw new ArgumentNullException("pen"); if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipDrawLinesI(nativeObject, pen.NativePen, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipDrawLinesI(nativeObject, pen.NativePen, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1085,7 +1069,7 @@ public void DrawPath(Pen pen, GraphicsPath path) throw new ArgumentNullException("pen"); if (path == null) throw new ArgumentNullException("path"); - Status status = SafeNativeMethods.Gdip.GdipDrawPath(nativeObject, pen.NativePen, path.nativePath); + int status = SafeNativeMethods.Gdip.GdipDrawPath(nativeObject, pen.NativePen, path.nativePath); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1107,7 +1091,7 @@ public void DrawPie(Pen pen, float x, float y, float width, float height, float { if (pen == null) throw new ArgumentNullException("pen"); - Status status = SafeNativeMethods.Gdip.GdipDrawPie(nativeObject, pen.NativePen, x, y, width, height, startAngle, sweepAngle); + int status = SafeNativeMethods.Gdip.GdipDrawPie(nativeObject, pen.NativePen, x, y, width, height, startAngle, sweepAngle); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1118,7 +1102,7 @@ public void DrawPie(Pen pen, int x, int y, int width, int height, int startAngle { if (pen == null) throw new ArgumentNullException("pen"); - Status status = SafeNativeMethods.Gdip.GdipDrawPieI(nativeObject, pen.NativePen, x, y, width, height, startAngle, sweepAngle); + int status = SafeNativeMethods.Gdip.GdipDrawPieI(nativeObject, pen.NativePen, x, y, width, height, startAngle, sweepAngle); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1128,7 +1112,7 @@ public void DrawPolygon(Pen pen, Point[] points) throw new ArgumentNullException("pen"); if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipDrawPolygonI(nativeObject, pen.NativePen, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipDrawPolygonI(nativeObject, pen.NativePen, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1138,7 +1122,7 @@ public void DrawPolygon(Pen pen, PointF[] points) throw new ArgumentNullException("pen"); if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipDrawPolygon(nativeObject, pen.NativePen, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipDrawPolygon(nativeObject, pen.NativePen, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1153,7 +1137,7 @@ public void DrawRectangle(Pen pen, float x, float y, float width, float height) { if (pen == null) throw new ArgumentNullException("pen"); - Status status = SafeNativeMethods.Gdip.GdipDrawRectangle(nativeObject, pen.NativePen, x, y, width, height); + int status = SafeNativeMethods.Gdip.GdipDrawRectangle(nativeObject, pen.NativePen, x, y, width, height); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1161,7 +1145,7 @@ public void DrawRectangle(Pen pen, int x, int y, int width, int height) { if (pen == null) throw new ArgumentNullException("pen"); - Status status = SafeNativeMethods.Gdip.GdipDrawRectangleI(nativeObject, pen.NativePen, x, y, width, height); + int status = SafeNativeMethods.Gdip.GdipDrawRectangleI(nativeObject, pen.NativePen, x, y, width, height); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1171,7 +1155,7 @@ public void DrawRectangles(Pen pen, RectangleF[] rects) throw new ArgumentNullException("image"); if (rects == null) throw new ArgumentNullException("rects"); - Status status = SafeNativeMethods.Gdip.GdipDrawRectangles(nativeObject, pen.NativePen, rects, rects.Length); + int status = SafeNativeMethods.Gdip.GdipDrawRectangles(nativeObject, pen.NativePen, rects, rects.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1181,7 +1165,7 @@ public void DrawRectangles(Pen pen, Rectangle[] rects) throw new ArgumentNullException("image"); if (rects == null) throw new ArgumentNullException("rects"); - Status status = SafeNativeMethods.Gdip.GdipDrawRectanglesI(nativeObject, pen.NativePen, rects, rects.Length); + int status = SafeNativeMethods.Gdip.GdipDrawRectanglesI(nativeObject, pen.NativePen, rects, rects.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1219,7 +1203,7 @@ public void DrawString(string s, Font font, Brush brush, RectangleF layoutRectan if (s == null || s.Length == 0) return; - Status status = SafeNativeMethods.Gdip.GdipDrawString(nativeObject, s, s.Length, font.NativeObject, ref layoutRectangle, format != null ? format.nativeFormat : IntPtr.Zero, brush.NativeBrush); + int status = SafeNativeMethods.Gdip.GdipDrawString(nativeObject, s, s.Length, font.NativeObject, ref layoutRectangle, format != null ? format.nativeFormat : IntPtr.Zero, brush.NativeBrush); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1455,7 +1439,7 @@ public void FillClosedCurve(Brush brush, PointF[] points) throw new ArgumentNullException("brush"); if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipFillClosedCurve(nativeObject, brush.NativeBrush, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipFillClosedCurve(nativeObject, brush.NativeBrush, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1465,7 +1449,7 @@ public void FillClosedCurve(Brush brush, Point[] points) throw new ArgumentNullException("brush"); if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipFillClosedCurveI(nativeObject, brush.NativeBrush, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipFillClosedCurveI(nativeObject, brush.NativeBrush, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1494,7 +1478,7 @@ public void FillClosedCurve(Brush brush, PointF[] points, FillMode fillmode, flo throw new ArgumentNullException("brush"); if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipFillClosedCurve2(nativeObject, brush.NativeBrush, points, points.Length, tension, fillmode); + int status = SafeNativeMethods.Gdip.GdipFillClosedCurve2(nativeObject, brush.NativeBrush, points, points.Length, tension, fillmode); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1504,7 +1488,7 @@ public void FillClosedCurve(Brush brush, Point[] points, FillMode fillmode, floa throw new ArgumentNullException("brush"); if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipFillClosedCurve2I(nativeObject, brush.NativeBrush, points, points.Length, tension, fillmode); + int status = SafeNativeMethods.Gdip.GdipFillClosedCurve2I(nativeObject, brush.NativeBrush, points, points.Length, tension, fillmode); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1526,7 +1510,7 @@ public void FillEllipse(Brush brush, float x, float y, float width, float height { if (brush == null) throw new ArgumentNullException("brush"); - Status status = SafeNativeMethods.Gdip.GdipFillEllipse(nativeObject, brush.NativeBrush, x, y, width, height); + int status = SafeNativeMethods.Gdip.GdipFillEllipse(nativeObject, brush.NativeBrush, x, y, width, height); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1534,7 +1518,7 @@ public void FillEllipse(Brush brush, int x, int y, int width, int height) { if (brush == null) throw new ArgumentNullException("brush"); - Status status = SafeNativeMethods.Gdip.GdipFillEllipseI(nativeObject, brush.NativeBrush, x, y, width, height); + int status = SafeNativeMethods.Gdip.GdipFillEllipseI(nativeObject, brush.NativeBrush, x, y, width, height); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1544,7 +1528,7 @@ public void FillPath(Brush brush, GraphicsPath path) throw new ArgumentNullException("brush"); if (path == null) throw new ArgumentNullException("path"); - Status status = SafeNativeMethods.Gdip.GdipFillPath(nativeObject, brush.NativeBrush, path.nativePath); + int status = SafeNativeMethods.Gdip.GdipFillPath(nativeObject, brush.NativeBrush, path.nativePath); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1552,7 +1536,7 @@ public void FillPie(Brush brush, Rectangle rect, float startAngle, float sweepAn { if (brush == null) throw new ArgumentNullException("brush"); - Status status = SafeNativeMethods.Gdip.GdipFillPie(nativeObject, brush.NativeBrush, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); + int status = SafeNativeMethods.Gdip.GdipFillPie(nativeObject, brush.NativeBrush, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1560,7 +1544,7 @@ public void FillPie(Brush brush, int x, int y, int width, int height, int startA { if (brush == null) throw new ArgumentNullException("brush"); - Status status = SafeNativeMethods.Gdip.GdipFillPieI(nativeObject, brush.NativeBrush, x, y, width, height, startAngle, sweepAngle); + int status = SafeNativeMethods.Gdip.GdipFillPieI(nativeObject, brush.NativeBrush, x, y, width, height, startAngle, sweepAngle); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1568,7 +1552,7 @@ public void FillPie(Brush brush, float x, float y, float width, float height, fl { if (brush == null) throw new ArgumentNullException("brush"); - Status status = SafeNativeMethods.Gdip.GdipFillPie(nativeObject, brush.NativeBrush, x, y, width, height, startAngle, sweepAngle); + int status = SafeNativeMethods.Gdip.GdipFillPie(nativeObject, brush.NativeBrush, x, y, width, height, startAngle, sweepAngle); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1578,7 +1562,7 @@ public void FillPolygon(Brush brush, PointF[] points) throw new ArgumentNullException("brush"); if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipFillPolygon2(nativeObject, brush.NativeBrush, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipFillPolygon2(nativeObject, brush.NativeBrush, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1588,7 +1572,7 @@ public void FillPolygon(Brush brush, Point[] points) throw new ArgumentNullException("brush"); if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipFillPolygon2I(nativeObject, brush.NativeBrush, points, points.Length); + int status = SafeNativeMethods.Gdip.GdipFillPolygon2I(nativeObject, brush.NativeBrush, points, points.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1598,7 +1582,7 @@ public void FillPolygon(Brush brush, Point[] points, FillMode fillMode) throw new ArgumentNullException("brush"); if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipFillPolygonI(nativeObject, brush.NativeBrush, points, points.Length, fillMode); + int status = SafeNativeMethods.Gdip.GdipFillPolygonI(nativeObject, brush.NativeBrush, points, points.Length, fillMode); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1608,7 +1592,7 @@ public void FillPolygon(Brush brush, PointF[] points, FillMode fillMode) throw new ArgumentNullException("brush"); if (points == null) throw new ArgumentNullException("points"); - Status status = SafeNativeMethods.Gdip.GdipFillPolygon(nativeObject, brush.NativeBrush, points, points.Length, fillMode); + int status = SafeNativeMethods.Gdip.GdipFillPolygon(nativeObject, brush.NativeBrush, points, points.Length, fillMode); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1631,7 +1615,7 @@ public void FillRectangle(Brush brush, int x, int y, int width, int height) if (brush == null) throw new ArgumentNullException("brush"); - Status status = SafeNativeMethods.Gdip.GdipFillRectangleI(nativeObject, brush.NativeBrush, x, y, width, height); + int status = SafeNativeMethods.Gdip.GdipFillRectangleI(nativeObject, brush.NativeBrush, x, y, width, height); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1640,7 +1624,7 @@ public void FillRectangle(Brush brush, float x, float y, float width, float heig if (brush == null) throw new ArgumentNullException("brush"); - Status status = SafeNativeMethods.Gdip.GdipFillRectangle(nativeObject, brush.NativeBrush, x, y, width, height); + int status = SafeNativeMethods.Gdip.GdipFillRectangle(nativeObject, brush.NativeBrush, x, y, width, height); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1651,7 +1635,7 @@ public void FillRectangles(Brush brush, Rectangle[] rects) if (rects == null) throw new ArgumentNullException("rects"); - Status status = SafeNativeMethods.Gdip.GdipFillRectanglesI(nativeObject, brush.NativeBrush, rects, rects.Length); + int status = SafeNativeMethods.Gdip.GdipFillRectanglesI(nativeObject, brush.NativeBrush, rects, rects.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1662,7 +1646,7 @@ public void FillRectangles(Brush brush, RectangleF[] rects) if (rects == null) throw new ArgumentNullException("rects"); - Status status = SafeNativeMethods.Gdip.GdipFillRectangles(nativeObject, brush.NativeBrush, rects, rects.Length); + int status = SafeNativeMethods.Gdip.GdipFillRectangles(nativeObject, brush.NativeBrush, rects, rects.Length); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1674,7 +1658,7 @@ public void FillRegion(Brush brush, Region region) if (region == null) throw new ArgumentNullException("region"); - Status status = (Status)SafeNativeMethods.Gdip.GdipFillRegion(new HandleRef(this, nativeObject), new HandleRef(brush, brush.NativeBrush), new HandleRef(region, region._nativeRegion)); + int status = (int)SafeNativeMethods.Gdip.GdipFillRegion(new HandleRef(this, nativeObject), new HandleRef(brush, brush.NativeBrush), new HandleRef(region, region._nativeRegion)); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1692,7 +1676,7 @@ public void Flush(FlushIntention intention) return; } - Status status = SafeNativeMethods.Gdip.GdipFlush(nativeObject, intention); + int status = SafeNativeMethods.Gdip.GdipFlush(nativeObject, intention); SafeNativeMethods.Gdip.CheckStatus(status); if (maccontext != null) @@ -1703,7 +1687,7 @@ public void Flush(FlushIntention intention) public static Graphics FromHdc(IntPtr hdc) { IntPtr graphics; - Status status = SafeNativeMethods.Gdip.GdipCreateFromHDC(hdc, out graphics); + int status = SafeNativeMethods.Gdip.GdipCreateFromHDC(hdc, out graphics); SafeNativeMethods.Gdip.CheckStatus(status); return new Graphics(graphics); } @@ -1718,7 +1702,7 @@ public static Graphics FromHdc(IntPtr hdc, IntPtr hdevice) [EditorBrowsable(EditorBrowsableState.Advanced)] public static Graphics FromHdcInternal(IntPtr hdc) { - GDIPlus.Display = hdc; + SafeNativeMethods.Gdip.Display = hdc; return null; } @@ -1727,7 +1711,7 @@ public static Graphics FromHwnd(IntPtr hwnd) { IntPtr graphics; - if (GDIPlus.UseCocoaDrawable) + if (SafeNativeMethods.Gdip.UseCocoaDrawable) { CocoaContext context = MacSupport.GetCGContextForNSView(hwnd); SafeNativeMethods.Gdip.GdipCreateFromContext_macosx(context.ctx, context.width, context.height, out graphics); @@ -1738,7 +1722,7 @@ public static Graphics FromHwnd(IntPtr hwnd) return g; } - if (GDIPlus.UseCarbonDrawable) + if (SafeNativeMethods.Gdip.UseCarbonDrawable) { CarbonContext context = MacSupport.GetCGContextForView(hwnd); SafeNativeMethods.Gdip.GdipCreateFromContext_macosx(context.ctx, context.width, context.height, out graphics); @@ -1748,24 +1732,24 @@ public static Graphics FromHwnd(IntPtr hwnd) return g; } - if (GDIPlus.UseX11Drawable) + if (SafeNativeMethods.Gdip.UseX11Drawable) { - if (GDIPlus.Display == IntPtr.Zero) + if (SafeNativeMethods.Gdip.Display == IntPtr.Zero) { - GDIPlus.Display = LibX11Functions.XOpenDisplay(IntPtr.Zero); - if (GDIPlus.Display == IntPtr.Zero) + SafeNativeMethods.Gdip.Display = LibX11Functions.XOpenDisplay(IntPtr.Zero); + if (SafeNativeMethods.Gdip.Display == IntPtr.Zero) throw new NotSupportedException("Could not open display (X-Server required. Check your DISPLAY environment variable)"); } if (hwnd == IntPtr.Zero) { - hwnd = LibX11Functions.XRootWindow(GDIPlus.Display, LibX11Functions.XDefaultScreen(GDIPlus.Display)); + hwnd = LibX11Functions.XRootWindow(SafeNativeMethods.Gdip.Display, LibX11Functions.XDefaultScreen(SafeNativeMethods.Gdip.Display)); } - return FromXDrawable(hwnd, GDIPlus.Display); + return FromXDrawable(hwnd, SafeNativeMethods.Gdip.Display); } - Status status = SafeNativeMethods.Gdip.GdipCreateFromHWND(hwnd, out graphics); + int status = SafeNativeMethods.Gdip.GdipCreateFromHWND(hwnd, out graphics); SafeNativeMethods.Gdip.CheckStatus(status); return new Graphics(graphics); @@ -1787,15 +1771,12 @@ public static Graphics FromImage(Image image) if ((image.PixelFormat & PixelFormat.Indexed) != 0) throw new Exception("Cannot create Graphics from an indexed bitmap."); - Status status = SafeNativeMethods.Gdip.GdipGetImageGraphicsContext(image.nativeObject, out graphics); + int status = SafeNativeMethods.Gdip.GdipGetImageGraphicsContext(image.nativeObject, out graphics); SafeNativeMethods.Gdip.CheckStatus(status); Graphics result = new Graphics(graphics); - if (GDIPlus.RunningOnUnix()) - { - Rectangle rect = new Rectangle(0, 0, image.Width, image.Height); - SafeNativeMethods.Gdip.GdipSetVisibleClip_linux(result.NativeObject, ref rect); - } + Rectangle rect = new Rectangle(0, 0, image.Width, image.Height); + SafeNativeMethods.Gdip.GdipSetVisibleClip_linux(result.NativeObject, ref rect); return result; } @@ -1804,7 +1785,7 @@ internal static Graphics FromXDrawable(IntPtr drawable, IntPtr display) { IntPtr graphics; - Status s = SafeNativeMethods.Gdip.GdipCreateFromXDrawable_linux(drawable, display, out graphics); + int s = SafeNativeMethods.Gdip.GdipCreateFromXDrawable_linux(drawable, display, out graphics); SafeNativeMethods.Gdip.CheckStatus(s); return new Graphics(graphics); } @@ -1825,7 +1806,7 @@ public Color GetNearestColor(Color color) { int argb; - Status status = SafeNativeMethods.Gdip.GdipGetNearestColor(nativeObject, out argb); + int status = SafeNativeMethods.Gdip.GdipGetNearestColor(nativeObject, out argb); SafeNativeMethods.Gdip.CheckStatus(status); return Color.FromArgb(argb); @@ -1855,7 +1836,7 @@ public Region[] MeasureCharacterRanges(string text, Font font, RectangleF layout native_regions[i] = regions[i]._nativeRegion; } - Status status = SafeNativeMethods.Gdip.GdipMeasureCharacterRanges(nativeObject, text, text.Length, + int status = SafeNativeMethods.Gdip.GdipMeasureCharacterRanges(nativeObject, text, text.Length, font.NativeObject, ref layoutRect, stringFormat.nativeFormat, regcount, out native_regions[0]); SafeNativeMethods.Gdip.CheckStatus(status); @@ -1873,7 +1854,7 @@ private unsafe SizeF GdipMeasureString(IntPtr graphics, string text, Font font, RectangleF boundingBox = new RectangleF(); - Status status = SafeNativeMethods.Gdip.GdipMeasureString(nativeObject, text, text.Length, font.NativeObject, + int status = SafeNativeMethods.Gdip.GdipMeasureString(nativeObject, text, text.Length, font.NativeObject, ref layoutRect, stringFormat, out boundingBox, null, null); SafeNativeMethods.Gdip.CheckStatus(status); @@ -1939,7 +1920,7 @@ public SizeF MeasureString(string text, Font font, SizeF layoutArea, StringForma { fixed (int* pc = &charactersFitted, pl = &linesFilled) { - Status status = SafeNativeMethods.Gdip.GdipMeasureString(nativeObject, text, text.Length, + int status = SafeNativeMethods.Gdip.GdipMeasureString(nativeObject, text, text.Length, font.NativeObject, ref rect, format, out boundingBox, pc, pl); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -1962,7 +1943,7 @@ public void ReleaseHdc() [EditorBrowsable(EditorBrowsableState.Never)] public void ReleaseHdcInternal(IntPtr hdc) { - Status status = Status.InvalidParameter; + int status = SafeNativeMethods.Gdip.InvalidParameter; if (hdc == deviceContextHdc) { status = SafeNativeMethods.Gdip.GdipReleaseDC(nativeObject, deviceContextHdc); @@ -1974,14 +1955,14 @@ public void ReleaseHdcInternal(IntPtr hdc) public void Restore(GraphicsState gstate) { // the possible NRE thrown by gstate.nativeState match MS behaviour - Status status = SafeNativeMethods.Gdip.GdipRestoreGraphics(nativeObject, (uint)gstate.nativeState); + int status = SafeNativeMethods.Gdip.GdipRestoreGraphics(nativeObject, (uint)gstate.nativeState); SafeNativeMethods.Gdip.CheckStatus(status); } public GraphicsState Save() { uint saveState; - Status status = SafeNativeMethods.Gdip.GdipSaveGraphics(nativeObject, out saveState); + int status = SafeNativeMethods.Gdip.GdipSaveGraphics(nativeObject, out saveState); SafeNativeMethods.Gdip.CheckStatus(status); GraphicsState state = new GraphicsState((int)saveState); @@ -1996,7 +1977,7 @@ public void TransformPoints(CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr ptrPt = MarshallingHelpers.FromPointToUnManagedMemory(pts); - Status status = SafeNativeMethods.Gdip.GdipTransformPoints(nativeObject, destSpace, srcSpace, ptrPt, pts.Length); + int status = SafeNativeMethods.Gdip.GdipTransformPoints(nativeObject, destSpace, srcSpace, ptrPt, pts.Length); SafeNativeMethods.Gdip.CheckStatus(status); MarshallingHelpers.FromUnManagedMemoryToPoint(ptrPt, pts); @@ -2009,7 +1990,7 @@ public void TransformPoints(CoordinateSpace destSpace, CoordinateSpace srcSpace, throw new ArgumentNullException("pts"); IntPtr ptrPt = MarshallingHelpers.FromPointToUnManagedMemoryI(pts); - Status status = SafeNativeMethods.Gdip.GdipTransformPointsI(nativeObject, destSpace, srcSpace, ptrPt, pts.Length); + int status = SafeNativeMethods.Gdip.GdipTransformPointsI(nativeObject, destSpace, srcSpace, ptrPt, pts.Length); SafeNativeMethods.Gdip.CheckStatus(status); MarshallingHelpers.FromUnManagedMemoryToPointI(ptrPt, pts); @@ -2020,14 +2001,14 @@ public CompositingMode CompositingMode get { CompositingMode mode; - Status status = SafeNativeMethods.Gdip.GdipGetCompositingMode(nativeObject, out mode); + int status = SafeNativeMethods.Gdip.GdipGetCompositingMode(nativeObject, out mode); SafeNativeMethods.Gdip.CheckStatus(status); return mode; } set { - Status status = SafeNativeMethods.Gdip.GdipSetCompositingMode(nativeObject, value); + int status = SafeNativeMethods.Gdip.GdipSetCompositingMode(nativeObject, value); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -2039,13 +2020,13 @@ public CompositingQuality CompositingQuality { CompositingQuality quality; - Status status = SafeNativeMethods.Gdip.GdipGetCompositingQuality(nativeObject, out quality); + int status = SafeNativeMethods.Gdip.GdipGetCompositingQuality(nativeObject, out quality); SafeNativeMethods.Gdip.CheckStatus(status); return quality; } set { - Status status = SafeNativeMethods.Gdip.GdipSetCompositingQuality(nativeObject, value); + int status = SafeNativeMethods.Gdip.GdipSetCompositingQuality(nativeObject, value); SafeNativeMethods.Gdip.CheckStatus(status); } } @@ -2056,7 +2037,7 @@ public float DpiX { float x; - Status status = SafeNativeMethods.Gdip.GdipGetDpiX(nativeObject, out x); + int status = SafeNativeMethods.Gdip.GdipGetDpiX(nativeObject, out x); SafeNativeMethods.Gdip.CheckStatus(status); return x; } @@ -2068,7 +2049,7 @@ public float DpiY { float y; - Status status = SafeNativeMethods.Gdip.GdipGetDpiY(nativeObject, out y); + int status = SafeNativeMethods.Gdip.GdipGetDpiY(nativeObject, out y); SafeNativeMethods.Gdip.CheckStatus(status); return y; } @@ -2079,13 +2060,13 @@ public InterpolationMode InterpolationMode get { InterpolationMode imode = InterpolationMode.Invalid; - Status status = SafeNativeMethods.Gdip.GdipGetInterpolationMode(nativeObject, out imode); + int status = SafeNativeMethods.Gdip.GdipGetInterpolationMode(nativeObject, out imode); SafeNativeMethods.Gdip.CheckStatus(status); return imode; } set { - Status status = SafeNativeMethods.Gdip.GdipSetInterpolationMode(nativeObject, value); + int status = SafeNativeMethods.Gdip.GdipSetInterpolationMode(nativeObject, value); SafeNativeMethods.Gdip.CheckStatus(status); } } @@ -2096,13 +2077,13 @@ public float PageScale { float scale; - Status status = SafeNativeMethods.Gdip.GdipGetPageScale(nativeObject, out scale); + int status = SafeNativeMethods.Gdip.GdipGetPageScale(nativeObject, out scale); SafeNativeMethods.Gdip.CheckStatus(status); return scale; } set { - Status status = SafeNativeMethods.Gdip.GdipSetPageScale(nativeObject, value); + int status = SafeNativeMethods.Gdip.GdipSetPageScale(nativeObject, value); SafeNativeMethods.Gdip.CheckStatus(status); } } @@ -2113,13 +2094,13 @@ public GraphicsUnit PageUnit { GraphicsUnit unit; - Status status = SafeNativeMethods.Gdip.GdipGetPageUnit(nativeObject, out unit); + int status = SafeNativeMethods.Gdip.GdipGetPageUnit(nativeObject, out unit); SafeNativeMethods.Gdip.CheckStatus(status); return unit; } set { - Status status = SafeNativeMethods.Gdip.GdipSetPageUnit(nativeObject, value); + int status = SafeNativeMethods.Gdip.GdipSetPageUnit(nativeObject, value); SafeNativeMethods.Gdip.CheckStatus(status); } } @@ -2131,13 +2112,13 @@ public PixelOffsetMode PixelOffsetMode { PixelOffsetMode pixelOffset = PixelOffsetMode.Invalid; - Status status = SafeNativeMethods.Gdip.GdipGetPixelOffsetMode(nativeObject, out pixelOffset); + int status = SafeNativeMethods.Gdip.GdipGetPixelOffsetMode(nativeObject, out pixelOffset); SafeNativeMethods.Gdip.CheckStatus(status); return pixelOffset; } set { - Status status = SafeNativeMethods.Gdip.GdipSetPixelOffsetMode(nativeObject, value); + int status = SafeNativeMethods.Gdip.GdipSetPixelOffsetMode(nativeObject, value); SafeNativeMethods.Gdip.CheckStatus(status); } } @@ -2147,14 +2128,14 @@ public Point RenderingOrigin get { int x, y; - Status status = SafeNativeMethods.Gdip.GdipGetRenderingOrigin(nativeObject, out x, out y); + int status = SafeNativeMethods.Gdip.GdipGetRenderingOrigin(nativeObject, out x, out y); SafeNativeMethods.Gdip.CheckStatus(status); return new Point(x, y); } set { - Status status = SafeNativeMethods.Gdip.GdipSetRenderingOrigin(nativeObject, value.X, value.Y); + int status = SafeNativeMethods.Gdip.GdipSetRenderingOrigin(nativeObject, value.X, value.Y); SafeNativeMethods.Gdip.CheckStatus(status); } } @@ -2165,14 +2146,14 @@ public SmoothingMode SmoothingMode { SmoothingMode mode = SmoothingMode.Invalid; - Status status = SafeNativeMethods.Gdip.GdipGetSmoothingMode(nativeObject, out mode); + int status = SafeNativeMethods.Gdip.GdipGetSmoothingMode(nativeObject, out mode); SafeNativeMethods.Gdip.CheckStatus(status); return mode; } set { - Status status = SafeNativeMethods.Gdip.GdipSetSmoothingMode(nativeObject, value); + int status = SafeNativeMethods.Gdip.GdipSetSmoothingMode(nativeObject, value); SafeNativeMethods.Gdip.CheckStatus(status); } } @@ -2184,14 +2165,14 @@ public int TextContrast { int contrast; - Status status = SafeNativeMethods.Gdip.GdipGetTextContrast(nativeObject, out contrast); + int status = SafeNativeMethods.Gdip.GdipGetTextContrast(nativeObject, out contrast); SafeNativeMethods.Gdip.CheckStatus(status); return contrast; } set { - Status status = SafeNativeMethods.Gdip.GdipSetTextContrast(nativeObject, value); + int status = SafeNativeMethods.Gdip.GdipSetTextContrast(nativeObject, value); SafeNativeMethods.Gdip.CheckStatus(status); } } @@ -2202,14 +2183,14 @@ public TextRenderingHint TextRenderingHint { TextRenderingHint hint; - Status status = SafeNativeMethods.Gdip.GdipGetTextRenderingHint(nativeObject, out hint); + int status = SafeNativeMethods.Gdip.GdipGetTextRenderingHint(nativeObject, out hint); SafeNativeMethods.Gdip.CheckStatus(status); return hint; } set { - Status status = SafeNativeMethods.Gdip.GdipSetTextRenderingHint(nativeObject, value); + int status = SafeNativeMethods.Gdip.GdipSetTextRenderingHint(nativeObject, value); SafeNativeMethods.Gdip.CheckStatus(status); } } diff --git a/src/System.Drawing.Common/src/System/Drawing/Unit.cs b/src/System.Drawing.Common/src/System/Drawing/GraphicsUnit.cs similarity index 100% rename from src/System.Drawing.Common/src/System/Drawing/Unit.cs rename to src/System.Drawing.Common/src/System/Drawing/GraphicsUnit.cs diff --git a/src/System.Drawing.Common/src/System/Drawing/Icon.Unix.cs b/src/System.Drawing.Common/src/System/Drawing/Icon.Unix.cs index 91724678a281..26f6f183e3ad 100644 --- a/src/System.Drawing.Common/src/System/Drawing/Icon.Unix.cs +++ b/src/System.Drawing.Common/src/System/Drawing/Icon.Unix.cs @@ -130,23 +130,9 @@ private Icon(IntPtr handle) this.handle = handle; bitmap = Bitmap.FromHicon(handle); iconSize = new Size(bitmap.Width, bitmap.Height); - if (GDIPlus.RunningOnUnix()) - { - bitmap = Bitmap.FromHicon(handle); - iconSize = new Size(bitmap.Width, bitmap.Height); - // FIXME: we need to convert the bitmap into an icon - } - else - { - IconInfo ii; - GDIPlus.GetIconInfo(handle, out ii); - if (!ii.IsIcon) - throw new NotImplementedException("Handle doesn't represent an ICON."); - - // If this structure defines an icon, the hot spot is always in the center of the icon - iconSize = new Size(ii.xHotspot * 2, ii.yHotspot * 2); - bitmap = (Bitmap)Image.FromHbitmap(ii.hbmColor); - } + bitmap = Bitmap.FromHicon(handle); + iconSize = new Size(bitmap.Width, bitmap.Height); + // FIXME: we need to convert the bitmap into an icon undisposable = true; } #endif @@ -327,13 +313,6 @@ public void Dispose() if (!disposed) { -#if !MONOTOUCH - if (GDIPlus.RunningOnWindows() && (handle != IntPtr.Zero)) - { - GDIPlus.DestroyIcon(handle); - handle = IntPtr.Zero; - } -#endif if (bitmap != null) { bitmap.Dispose(); @@ -624,24 +603,15 @@ internal Bitmap GetInternalBitmap() { if (bitmap == null) { - if (GDIPlus.RunningOnUnix()) + // Mono's libgdiplus doesn't require to keep the stream alive when loading images + using (MemoryStream ms = new MemoryStream()) { - // Mono's libgdiplus doesn't require to keep the stream alive when loading images - using (MemoryStream ms = new MemoryStream()) - { - // save the current icon - Save(ms, Width, Height); - ms.Position = 0; + // save the current icon + Save(ms, Width, Height); + ms.Position = 0; - // libgdiplus can now decode icons - bitmap = (Bitmap)Image.LoadFromStream(ms, false); - } - } - else - { - // MS GDI+ ICO codec is more limited than the MS Icon class - // so we can't, reliably, get bitmap using it. We need to do this the "slow" way - bitmap = BuildBitmapOnWin32(); + // libgdiplus can now decode icons + bitmap = (Bitmap)Image.LoadFromStream(ms, false); } } return bitmap; @@ -680,19 +650,7 @@ public IntPtr Handle // note: this handle doesn't survive the lifespan of the icon instance if (handle == IntPtr.Zero) { - if (GDIPlus.RunningOnUnix()) - { - handle = GetInternalBitmap().NativeObject; - } - else - { - // remember that this block executes only with MS GDI+ - IconInfo ii = new IconInfo(); - ii.IsIcon = true; - ii.hbmColor = ToBitmap().GetHbitmap(); - ii.hbmMask = ii.hbmColor; - handle = GDIPlus.CreateIconIndirect(ref ii); - } + handle = GetInternalBitmap().NativeObject; } return handle; } diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/Image.cs b/src/System.Drawing.Common/src/System/Drawing/Image.Unix.cs similarity index 81% rename from src/System.Drawing.Common/src/Unix/System.Drawing/Image.cs rename to src/System.Drawing.Common/src/System/Drawing/Image.Unix.cs index 7c8d2cb645cb..30b1ed2a6eb3 100644 --- a/src/System.Drawing.Common/src/Unix/System.Drawing/Image.cs +++ b/src/System.Drawing.Common/src/System/Drawing/Image.Unix.cs @@ -57,10 +57,6 @@ public abstract class Image : MarshalByRefObject, IDisposable, ICloneable, ISeri private object tag; internal IntPtr nativeObject = IntPtr.Zero; - // when using MS GDI+ and IStream we must ensure the stream stays alive for all the life of the Image - // http://groups.google.com/group/microsoft.public.win32.programmer.gdi/browse_thread/thread/4967097db1469a27/4d36385b83532126?lnk=st&q=IStream+gdi&rnum=3&hl=en#4d36385b83532126 - internal Stream stream; - // constructor internal Image() @@ -83,9 +79,6 @@ internal Image (SerializationInfo info, StreamingContext context) { MemoryStream ms = new MemoryStream(bytes); nativeObject = InitFromStream(ms); - // under Win32 stream is owned by SD/GDI+ code - if (GDIPlus.RunningOnWindows()) - stream = ms; } } } @@ -119,7 +112,7 @@ public static Image FromFile(string filename) public static Image FromFile(string filename, bool useEmbeddedColorManagement) { IntPtr imagePtr; - Status st; + int st; if (!File.Exists(filename)) throw new FileNotFoundException(filename); @@ -141,7 +134,7 @@ public static Bitmap FromHbitmap(IntPtr hbitmap) public static Bitmap FromHbitmap(IntPtr hbitmap, IntPtr hpalette) { IntPtr imagePtr; - Status st; + int st; st = SafeNativeMethods.Gdip.GdipCreateBitmapFromHBITMAP(hbitmap, hpalette, out imagePtr); @@ -175,12 +168,6 @@ internal static Image LoadFromStream(Stream stream, bool keepAlive) throw new ArgumentNullException("stream"); Image img = CreateFromHandle(InitFromStream(stream)); - - // Under Windows, we may need to keep a reference on the stream as long as the image is alive - // (GDI+ seems to use a lazy loader) - if (keepAlive && GDIPlus.RunningOnWindows()) - img.stream = stream; - return img; } @@ -283,10 +270,10 @@ public static bool IsExtendedPixelFormat(PixelFormat pixfmt) internal static IntPtr InitFromStream(Stream stream) { if (stream == null) - throw new ArgumentException("stream"); + throw new ArgumentNullException(nameof(stream)); IntPtr imagePtr; - Status st; + int st; // Seeking required if (!stream.CanSeek) @@ -311,23 +298,16 @@ internal static IntPtr InitFromStream(Stream stream) stream = new MemoryStream(buffer, 0, index); } - if (GDIPlus.RunningOnUnix()) - { - // Unix, with libgdiplus - // We use a custom API for this, because there's no easy way - // to get the Stream down to libgdiplus. So, we wrap the stream - // with a set of delegates. - GdiPlusStreamHelper sh = new GdiPlusStreamHelper(stream, true); + // Unix, with libgdiplus + // We use a custom API for this, because there's no easy way + // to get the Stream down to libgdiplus. So, we wrap the stream + // with a set of delegates. + GdiPlusStreamHelper sh = new GdiPlusStreamHelper(stream, true); - st = SafeNativeMethods.Gdip.GdipLoadImageFromDelegate_linux(sh.GetHeaderDelegate, sh.GetBytesDelegate, - sh.PutBytesDelegate, sh.SeekDelegate, sh.CloseDelegate, sh.SizeDelegate, out imagePtr); - } - else - { - st = SafeNativeMethods.Gdip.GdipLoadImageFromStream(new ComIStreamWrapper(stream), out imagePtr); - } + st = SafeNativeMethods.Gdip.GdipLoadImageFromDelegate_linux(sh.GetHeaderDelegate, sh.GetBytesDelegate, + sh.PutBytesDelegate, sh.SeekDelegate, sh.CloseDelegate, sh.SizeDelegate, out imagePtr); - return st == Status.Ok ? imagePtr : IntPtr.Zero; + return st == SafeNativeMethods.Gdip.Ok ? imagePtr : IntPtr.Zero; } // non-static @@ -335,7 +315,7 @@ public RectangleF GetBounds(ref GraphicsUnit pageUnit) { RectangleF source; - Status status = SafeNativeMethods.Gdip.GdipGetImageBounds(nativeObject, out source, ref pageUnit); + int status = SafeNativeMethods.Gdip.GdipGetImageBounds(nativeObject, out source, ref pageUnit); SafeNativeMethods.Gdip.CheckStatus(status); return source; @@ -343,7 +323,7 @@ public RectangleF GetBounds(ref GraphicsUnit pageUnit) public EncoderParameters GetEncoderParameterList(Guid encoder) { - Status status; + int status; uint sz; status = SafeNativeMethods.Gdip.GdipGetEncoderParameterListSize(nativeObject, ref encoder, out sz); @@ -371,7 +351,7 @@ public int GetFrameCount(FrameDimension dimension) uint count; Guid guid = dimension.Guid; - Status status = SafeNativeMethods.Gdip.GdipImageGetFrameCount(nativeObject, ref guid, out count); + int status = SafeNativeMethods.Gdip.GdipImageGetFrameCount(nativeObject, ref guid, out count); SafeNativeMethods.Gdip.CheckStatus(status); return (int)count; @@ -383,7 +363,7 @@ public PropertyItem GetPropertyItem(int propid) IntPtr property; PropertyItem item = new PropertyItem(); GdipPropertyItem gdipProperty = new GdipPropertyItem(); - Status status; + int status; status = SafeNativeMethods.Gdip.GdipGetPropertyItemSize(nativeObject, propid, out propSize); @@ -415,7 +395,7 @@ public Image GetThumbnailImage(int thumbWidth, int thumbHeight, Image.GetThumbna using (Graphics g = Graphics.FromImage(ThumbNail)) { - Status status = SafeNativeMethods.Gdip.GdipDrawImageRectRectI(g.nativeObject, nativeObject, + int status = SafeNativeMethods.Gdip.GdipDrawImageRectRectI(g.nativeObject, nativeObject, 0, 0, thumbWidth, thumbHeight, 0, 0, this.Width, this.Height, GraphicsUnit.Pixel, IntPtr.Zero, null, IntPtr.Zero); @@ -429,13 +409,13 @@ public Image GetThumbnailImage(int thumbWidth, int thumbHeight, Image.GetThumbna public void RemovePropertyItem(int propid) { - Status status = SafeNativeMethods.Gdip.GdipRemovePropertyItem(nativeObject, propid); + int status = SafeNativeMethods.Gdip.GdipRemovePropertyItem(nativeObject, propid); SafeNativeMethods.Gdip.CheckStatus(status); } public void RotateFlip(RotateFlipType rotateFlipType) { - Status status = SafeNativeMethods.Gdip.GdipImageRotateFlip(nativeObject, rotateFlipType); + int status = SafeNativeMethods.Gdip.GdipImageRotateFlip(nativeObject, rotateFlipType); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -483,7 +463,7 @@ public void Save(string filename, ImageFormat format) public void Save(string filename, ImageCodecInfo encoder, EncoderParameters encoderParams) { - Status st; + int st; Guid guid = encoder.Clsid; if (encoderParams == null) @@ -512,7 +492,7 @@ public void Save(Stream stream, ImageFormat format) public void Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams) { - Status st; + int st; IntPtr nativeEncoderParams; Guid guid = encoder.Clsid; @@ -523,17 +503,9 @@ public void Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encode try { - if (GDIPlus.RunningOnUnix()) - { - GdiPlusStreamHelper sh = new GdiPlusStreamHelper(stream, false); - st = SafeNativeMethods.Gdip.GdipSaveImageToDelegate_linux(nativeObject, sh.GetBytesDelegate, sh.PutBytesDelegate, - sh.SeekDelegate, sh.CloseDelegate, sh.SizeDelegate, ref guid, nativeEncoderParams); - } - else - { - st = SafeNativeMethods.Gdip.GdipSaveImageToStream(new HandleRef(this, nativeObject), - new ComIStreamWrapper(stream), ref guid, new HandleRef(encoderParams, nativeEncoderParams)); - } + GdiPlusStreamHelper sh = new GdiPlusStreamHelper(stream, false); + st = SafeNativeMethods.Gdip.GdipSaveImageToDelegate_linux(nativeObject, sh.GetBytesDelegate, sh.PutBytesDelegate, + sh.SeekDelegate, sh.CloseDelegate, sh.SizeDelegate, ref guid, nativeEncoderParams); } finally { @@ -546,7 +518,7 @@ public void Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encode public void SaveAdd(EncoderParameters encoderParams) { - Status st; + int st; IntPtr nativeEncoderParams = encoderParams.ConvertToMemory(); st = SafeNativeMethods.Gdip.GdipSaveAdd(nativeObject, nativeEncoderParams); @@ -556,7 +528,7 @@ public void SaveAdd(EncoderParameters encoderParams) public void SaveAdd(Image image, EncoderParameters encoderParams) { - Status st; + int st; IntPtr nativeEncoderParams = encoderParams.ConvertToMemory(); st = SafeNativeMethods.Gdip.GdipSaveAddImage(nativeObject, image.NativeObject, nativeEncoderParams); @@ -567,7 +539,7 @@ public void SaveAdd(Image image, EncoderParameters encoderParams) public int SelectActiveFrame(FrameDimension dimension, int frameIndex) { Guid guid = dimension.Guid; - Status st = SafeNativeMethods.Gdip.GdipImageSelectActiveFrame(nativeObject, ref guid, frameIndex); + int st = SafeNativeMethods.Gdip.GdipImageSelectActiveFrame(nativeObject, ref guid, frameIndex); SafeNativeMethods.Gdip.CheckStatus(st); @@ -594,7 +566,7 @@ public void SetPropertyItem(PropertyItem propitem) unsafe { - Status status = SafeNativeMethods.Gdip.GdipSetPropertyItem(nativeObject, &pi); + int status = SafeNativeMethods.Gdip.GdipSetPropertyItem(nativeObject, &pi); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -613,7 +585,7 @@ public int Flags { int flags; - Status status = SafeNativeMethods.Gdip.GdipGetImageFlags(nativeObject, out flags); + int status = SafeNativeMethods.Gdip.GdipGetImageFlags(nativeObject, out flags); SafeNativeMethods.Gdip.CheckStatus(status); return flags; } @@ -625,7 +597,7 @@ public Guid[] FrameDimensionsList get { uint found; - Status status = SafeNativeMethods.Gdip.GdipImageGetFrameDimensionsCount(nativeObject, out found); + int status = SafeNativeMethods.Gdip.GdipImageGetFrameDimensionsCount(nativeObject, out found); SafeNativeMethods.Gdip.CheckStatus(status); Guid[] guid = new Guid[found]; status = SafeNativeMethods.Gdip.GdipImageGetFrameDimensionsList(nativeObject, guid, found); @@ -642,7 +614,7 @@ public int Height get { uint height; - Status status = SafeNativeMethods.Gdip.GdipGetImageHeight(nativeObject, out height); + int status = SafeNativeMethods.Gdip.GdipGetImageHeight(nativeObject, out height); SafeNativeMethods.Gdip.CheckStatus(status); return (int)height; @@ -655,7 +627,7 @@ public float HorizontalResolution { float resolution; - Status status = SafeNativeMethods.Gdip.GdipGetImageHorizontalResolution(nativeObject, out resolution); + int status = SafeNativeMethods.Gdip.GdipGetImageHorizontalResolution(nativeObject, out resolution); SafeNativeMethods.Gdip.CheckStatus(status); return resolution; @@ -680,7 +652,7 @@ internal ColorPalette retrieveGDIPalette() int bytes; ColorPalette ret = new ColorPalette(); - Status st = SafeNativeMethods.Gdip.GdipGetImagePaletteSize(nativeObject, out bytes); + int st = SafeNativeMethods.Gdip.GdipGetImagePaletteSize(nativeObject, out bytes); SafeNativeMethods.Gdip.CheckStatus(st); IntPtr palette_data = Marshal.AllocHGlobal(bytes); try @@ -711,7 +683,7 @@ internal void storeGDIPalette(ColorPalette palette) try { - Status st = SafeNativeMethods.Gdip.GdipSetImagePalette(nativeObject, palette_data); + int st = SafeNativeMethods.Gdip.GdipSetImagePalette(nativeObject, palette_data); SafeNativeMethods.Gdip.CheckStatus(st); } @@ -727,7 +699,7 @@ public SizeF PhysicalDimension get { float width, height; - Status status = SafeNativeMethods.Gdip.GdipGetImageDimension(nativeObject, out width, out height); + int status = SafeNativeMethods.Gdip.GdipGetImageDimension(nativeObject, out width, out height); SafeNativeMethods.Gdip.CheckStatus(status); return new SizeF(width, height); @@ -739,7 +711,7 @@ public PixelFormat PixelFormat get { PixelFormat pixFormat; - Status status = SafeNativeMethods.Gdip.GdipGetImagePixelFormat(nativeObject, out pixFormat); + int status = SafeNativeMethods.Gdip.GdipGetImagePixelFormat(nativeObject, out pixFormat); SafeNativeMethods.Gdip.CheckStatus(status); return pixFormat; @@ -753,7 +725,7 @@ public int[] PropertyIdList { uint propNumbers; - Status status = SafeNativeMethods.Gdip.GdipGetPropertyCount(nativeObject, + int status = SafeNativeMethods.Gdip.GdipGetPropertyCount(nativeObject, out propNumbers); SafeNativeMethods.Gdip.CheckStatus(status); @@ -775,7 +747,7 @@ public PropertyItem[] PropertyItems IntPtr properties, propPtr; PropertyItem[] items; GdipPropertyItem gdipProperty = new GdipPropertyItem(); - Status status; + int status; status = SafeNativeMethods.Gdip.GdipGetPropertySize(nativeObject, out propsSize, out propNums); SafeNativeMethods.Gdip.CheckStatus(status); @@ -817,7 +789,7 @@ public ImageFormat RawFormat get { Guid guid; - Status st = SafeNativeMethods.Gdip.GdipGetImageRawFormat(nativeObject, out guid); + int st = SafeNativeMethods.Gdip.GdipGetImageRawFormat(nativeObject, out guid); SafeNativeMethods.Gdip.CheckStatus(st); return new ImageFormat(guid); @@ -849,7 +821,7 @@ public float VerticalResolution { float resolution; - Status status = SafeNativeMethods.Gdip.GdipGetImageVerticalResolution(nativeObject, out resolution); + int status = SafeNativeMethods.Gdip.GdipGetImageVerticalResolution(nativeObject, out resolution); SafeNativeMethods.Gdip.CheckStatus(status); return resolution; @@ -864,7 +836,7 @@ public int Width get { uint width; - Status status = SafeNativeMethods.Gdip.GdipGetImageWidth(nativeObject, out width); + int status = SafeNativeMethods.Gdip.GdipGetImageWidth(nativeObject, out width); SafeNativeMethods.Gdip.CheckStatus(status); return (int)width; @@ -906,13 +878,7 @@ protected virtual void Dispose(bool disposing) { if (nativeObject != IntPtr.Zero) { - Status status = SafeNativeMethods.Gdip.GdipDisposeImage(nativeObject); - // dispose the stream (set under Win32 only if SD owns the stream) and ... - if (stream != null) - { - stream.Dispose(); - stream = null; - } + int status = SafeNativeMethods.Gdip.GdipDisposeImage(nativeObject); // ... set nativeObject to null before (possibly) throwing an exception nativeObject = IntPtr.Zero; SafeNativeMethods.Gdip.CheckStatus(status); @@ -921,11 +887,8 @@ protected virtual void Dispose(bool disposing) public object Clone() { - if (GDIPlus.RunningOnWindows() && stream != null) - return CloneFromStream(); - IntPtr newimage = IntPtr.Zero; - Status status = SafeNativeMethods.Gdip.GdipCloneImage(NativeObject, out newimage); + int status = SafeNativeMethods.Gdip.GdipCloneImage(NativeObject, out newimage); SafeNativeMethods.Gdip.CheckStatus(status); if (this is Bitmap) @@ -933,32 +896,6 @@ public object Clone() else return new Metafile(newimage); } - - // On win32, when cloning images that were originally created from a stream, we need to - // clone both the image and the stream to make sure the gc doesn't kill it - // (when using MS GDI+ and IStream we must ensure the stream stays alive for all the life of the Image) - object CloneFromStream() - { - byte[] bytes = new byte[stream.Length]; - MemoryStream ms = new MemoryStream(bytes); - int count = (stream.Length < 4096 ? (int)stream.Length : 4096); - byte[] buffer = new byte[count]; - stream.Position = 0; - do - { - count = stream.Read(buffer, 0, count); - ms.Write(buffer, 0, count); - } while (count == 4096); - - IntPtr newimage = IntPtr.Zero; - newimage = InitFromStream(ms); - - if (this is Bitmap) - return new Bitmap(newimage, ms); - else - return new Metafile(newimage, ms); - } - } } diff --git a/src/System.Drawing.Common/src/System/Drawing/Image.cs b/src/System.Drawing.Common/src/System/Drawing/Image.Windows.cs similarity index 99% rename from src/System.Drawing.Common/src/System/Drawing/Image.cs rename to src/System.Drawing.Common/src/System/Drawing/Image.Windows.cs index f827c4c2dea3..80c3821f202d 100644 --- a/src/System.Drawing.Common/src/System/Drawing/Image.cs +++ b/src/System.Drawing.Common/src/System/Drawing/Image.Windows.cs @@ -355,12 +355,6 @@ internal static void EnsureSave(Image image, string filename, Stream dataStream) } } - private enum ImageTypeEnum - { - Bitmap = 1, - Metafile = 2, - } - internal static Image CreateImageObject(IntPtr nativeImage) { Image image; @@ -372,13 +366,13 @@ internal static Image CreateImageObject(IntPtr nativeImage) if (status != SafeNativeMethods.Gdip.Ok) throw SafeNativeMethods.Gdip.StatusException(status); - switch ((ImageTypeEnum)type) + switch ((ImageType)type) { - case ImageTypeEnum.Bitmap: + case ImageType.Bitmap: image = Bitmap.FromGDIplus(nativeImage); break; - case ImageTypeEnum.Metafile: + case ImageType.Metafile: image = Metafile.FromGDIplus(nativeImage); break; diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/ImageAnimator.cs b/src/System.Drawing.Common/src/System/Drawing/ImageAnimator.Unix.cs similarity index 100% rename from src/System.Drawing.Common/src/Unix/System.Drawing/ImageAnimator.cs rename to src/System.Drawing.Common/src/System/Drawing/ImageAnimator.Unix.cs diff --git a/src/System.Drawing.Common/src/System/Drawing/ImageAnimator.cs b/src/System.Drawing.Common/src/System/Drawing/ImageAnimator.Windows.cs similarity index 100% rename from src/System.Drawing.Common/src/System/Drawing/ImageAnimator.cs rename to src/System.Drawing.Common/src/System/Drawing/ImageAnimator.Windows.cs diff --git a/src/System.Drawing.Common/src/System/Drawing/ImageType.cs b/src/System.Drawing.Common/src/System/Drawing/ImageType.cs new file mode 100644 index 000000000000..439576ce9e5c --- /dev/null +++ b/src/System.Drawing.Common/src/System/Drawing/ImageType.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Drawing +{ + internal enum ImageType + { + Unknown = 0, + Bitmap = 1, + Metafile = 2, + } +} diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing.Imaging/BitmapData.cs b/src/System.Drawing.Common/src/System/Drawing/Imaging/BitmapData.Unix.cs similarity index 100% rename from src/System.Drawing.Common/src/Unix/System.Drawing.Imaging/BitmapData.cs rename to src/System.Drawing.Common/src/System/Drawing/Imaging/BitmapData.Unix.cs diff --git a/src/System.Drawing.Common/src/System/Drawing/Imaging/BitmapData.cs b/src/System.Drawing.Common/src/System/Drawing/Imaging/BitmapData.Windows.cs similarity index 100% rename from src/System.Drawing.Common/src/System/Drawing/Imaging/BitmapData.cs rename to src/System.Drawing.Common/src/System/Drawing/Imaging/BitmapData.Windows.cs diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing.Imaging/MetaHeader.cs b/src/System.Drawing.Common/src/System/Drawing/Imaging/MetaHeader.Unix.cs similarity index 100% rename from src/System.Drawing.Common/src/Unix/System.Drawing.Imaging/MetaHeader.cs rename to src/System.Drawing.Common/src/System/Drawing/Imaging/MetaHeader.Unix.cs diff --git a/src/System.Drawing.Common/src/System/Drawing/Imaging/METAHEADER.cs b/src/System.Drawing.Common/src/System/Drawing/Imaging/MetaHeader.Windows.cs similarity index 100% rename from src/System.Drawing.Common/src/System/Drawing/Imaging/METAHEADER.cs rename to src/System.Drawing.Common/src/System/Drawing/Imaging/MetaHeader.Windows.cs diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing.Imaging/Metafile.cs b/src/System.Drawing.Common/src/System/Drawing/Imaging/Metafile.Unix.cs similarity index 73% rename from src/System.Drawing.Common/src/Unix/System.Drawing.Imaging/Metafile.cs rename to src/System.Drawing.Common/src/System/Drawing/Imaging/Metafile.Unix.cs index d7d81ee9a2b5..39a625b7d16e 100644 --- a/src/System.Drawing.Common/src/Unix/System.Drawing.Imaging/Metafile.cs +++ b/src/System.Drawing.Common/src/System/Drawing/Imaging/Metafile.Unix.cs @@ -59,49 +59,37 @@ internal Metafile(IntPtr ptr) // (when using MS GDI+ and IStream we must ensure the stream stays alive for all the life of the Image) internal Metafile(IntPtr ptr, Stream stream) { - // under Win32 stream is owned by SD/GDI+ code - if (GDIPlus.RunningOnWindows()) - this.stream = stream; nativeObject = ptr; } public Metafile(Stream stream) { if (stream == null) - throw new ArgumentException("stream"); - - Status status; - if (GDIPlus.RunningOnUnix()) - { - // With libgdiplus we use a custom API for this, because there's no easy way - // to get the Stream down to libgdiplus. So, we wrap the stream with a set of delegates. - GdiPlusStreamHelper sh = new GdiPlusStreamHelper(stream, false); - status = SafeNativeMethods.Gdip.GdipCreateMetafileFromDelegate_linux(sh.GetHeaderDelegate, sh.GetBytesDelegate, - sh.PutBytesDelegate, sh.SeekDelegate, sh.CloseDelegate, sh.SizeDelegate, out nativeObject); - } - else - { - status = SafeNativeMethods.Gdip.GdipCreateMetafileFromStream(new ComIStreamWrapper(stream), out nativeObject); - } + throw new ArgumentNullException("stream"); + + int status; + // With libgdiplus we use a custom API for this, because there's no easy way + // to get the Stream down to libgdiplus. So, we wrap the stream with a set of delegates. + GdiPlusStreamHelper sh = new GdiPlusStreamHelper(stream, false); + status = SafeNativeMethods.Gdip.GdipCreateMetafileFromDelegate_linux(sh.GetHeaderDelegate, sh.GetBytesDelegate, + sh.PutBytesDelegate, sh.SeekDelegate, sh.CloseDelegate, sh.SizeDelegate, out nativeObject); SafeNativeMethods.Gdip.CheckStatus(status); } public Metafile(string filename) { - if (filename == null) - throw new ArgumentNullException("filename"); - if (filename.Length == 0) - throw new ArgumentException("filename"); + // Called in order to emulate exception behavior from netfx related to invalid file paths. + Path.GetFullPath(filename); - Status status = SafeNativeMethods.Gdip.GdipCreateMetafileFromFile(filename, out nativeObject); - if (status == Status.GenericError) + int status = SafeNativeMethods.Gdip.GdipCreateMetafileFromFile(filename, out nativeObject); + if (status == SafeNativeMethods.Gdip.GenericError) throw new ExternalException("Couldn't load specified file."); SafeNativeMethods.Gdip.CheckStatus(status); } public Metafile(IntPtr henhmetafile, bool deleteEmf) { - Status status = SafeNativeMethods.Gdip.GdipCreateMetafileFromEmf(henhmetafile, deleteEmf, out nativeObject); + int status = SafeNativeMethods.Gdip.GdipCreateMetafileFromEmf(henhmetafile, deleteEmf, out nativeObject); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -122,7 +110,7 @@ public Metafile(IntPtr referenceHdc, RectangleF frameRect) : public Metafile(IntPtr hmetafile, WmfPlaceableFileHeader wmfHeader) { - Status status = SafeNativeMethods.Gdip.GdipCreateMetafileFromEmf(hmetafile, false, out nativeObject); + int status = SafeNativeMethods.Gdip.GdipCreateMetafileFromEmf(hmetafile, false, out nativeObject); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -154,7 +142,7 @@ public Metafile(IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit fra public Metafile(IntPtr hmetafile, WmfPlaceableFileHeader wmfHeader, bool deleteWmf) { - Status status = SafeNativeMethods.Gdip.GdipCreateMetafileFromEmf(hmetafile, deleteWmf, out nativeObject); + int status = SafeNativeMethods.Gdip.GdipCreateMetafileFromEmf(hmetafile, deleteWmf, out nativeObject); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -231,7 +219,7 @@ public Metafile(string fileName, IntPtr referenceHdc, RectangleF frameRect, Meta public Metafile(IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type, string desc) { - Status status = SafeNativeMethods.Gdip.GdipRecordMetafileI(referenceHdc, type, ref frameRect, frameUnit, + int status = SafeNativeMethods.Gdip.GdipRecordMetafileI(referenceHdc, type, ref frameRect, frameUnit, desc, out nativeObject); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -239,7 +227,7 @@ public Metafile(IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit fram public Metafile(IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type, string description) { - Status status = SafeNativeMethods.Gdip.GdipRecordMetafile(referenceHdc, type, ref frameRect, frameUnit, + int status = SafeNativeMethods.Gdip.GdipRecordMetafile(referenceHdc, type, ref frameRect, frameUnit, description, out nativeObject); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -281,21 +269,13 @@ public Metafile(Stream stream, IntPtr referenceHdc, Rectangle frameRect, Metafil if (stream == null) throw new NullReferenceException("stream"); - Status status = Status.NotImplemented; - if (GDIPlus.RunningOnUnix()) - { - // With libgdiplus we use a custom API for this, because there's no easy way - // to get the Stream down to libgdiplus. So, we wrap the stream with a set of delegates. - GdiPlusStreamHelper sh = new GdiPlusStreamHelper(stream, false); - status = SafeNativeMethods.Gdip.GdipRecordMetafileFromDelegateI_linux(sh.GetHeaderDelegate, sh.GetBytesDelegate, - sh.PutBytesDelegate, sh.SeekDelegate, sh.CloseDelegate, sh.SizeDelegate, referenceHdc, - type, ref frameRect, frameUnit, description, out nativeObject); - } - else - { - status = SafeNativeMethods.Gdip.GdipRecordMetafileStreamI(new ComIStreamWrapper(stream), referenceHdc, - type, ref frameRect, frameUnit, description, out nativeObject); - } + int status = SafeNativeMethods.Gdip.NotImplemented; + // With libgdiplus we use a custom API for this, because there's no easy way + // to get the Stream down to libgdiplus. So, we wrap the stream with a set of delegates. + GdiPlusStreamHelper sh = new GdiPlusStreamHelper(stream, false); + status = SafeNativeMethods.Gdip.GdipRecordMetafileFromDelegateI_linux(sh.GetHeaderDelegate, sh.GetBytesDelegate, + sh.PutBytesDelegate, sh.SeekDelegate, sh.CloseDelegate, sh.SizeDelegate, referenceHdc, + type, ref frameRect, frameUnit, description, out nativeObject); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -305,28 +285,20 @@ public Metafile(Stream stream, IntPtr referenceHdc, RectangleF frameRect, Metafi if (stream == null) throw new NullReferenceException("stream"); - Status status = Status.NotImplemented; - if (GDIPlus.RunningOnUnix()) - { - // With libgdiplus we use a custom API for this, because there's no easy way - // to get the Stream down to libgdiplus. So, we wrap the stream with a set of delegates. - GdiPlusStreamHelper sh = new GdiPlusStreamHelper(stream, false); - status = SafeNativeMethods.Gdip.GdipRecordMetafileFromDelegate_linux(sh.GetHeaderDelegate, sh.GetBytesDelegate, - sh.PutBytesDelegate, sh.SeekDelegate, sh.CloseDelegate, sh.SizeDelegate, referenceHdc, - type, ref frameRect, frameUnit, description, out nativeObject); - } - else - { - status = SafeNativeMethods.Gdip.GdipRecordMetafileStream(new ComIStreamWrapper(stream), referenceHdc, - type, ref frameRect, frameUnit, description, out nativeObject); - } + int status = SafeNativeMethods.Gdip.NotImplemented; + // With libgdiplus we use a custom API for this, because there's no easy way + // to get the Stream down to libgdiplus. So, we wrap the stream with a set of delegates. + GdiPlusStreamHelper sh = new GdiPlusStreamHelper(stream, false); + status = SafeNativeMethods.Gdip.GdipRecordMetafileFromDelegate_linux(sh.GetHeaderDelegate, sh.GetBytesDelegate, + sh.PutBytesDelegate, sh.SeekDelegate, sh.CloseDelegate, sh.SizeDelegate, referenceHdc, + type, ref frameRect, frameUnit, description, out nativeObject); SafeNativeMethods.Gdip.CheckStatus(status); } public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type, string description) { - Status status = SafeNativeMethods.Gdip.GdipRecordMetafileFileNameI(fileName, referenceHdc, type, ref frameRect, + int status = SafeNativeMethods.Gdip.GdipRecordMetafileFileNameI(fileName, referenceHdc, type, ref frameRect, frameUnit, description, out nativeObject); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -334,7 +306,7 @@ public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect, Metaf public Metafile(string fileName, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type, string description) { - Status status = SafeNativeMethods.Gdip.GdipRecordMetafileFileName(fileName, referenceHdc, type, ref frameRect, frameUnit, + int status = SafeNativeMethods.Gdip.GdipRecordMetafileFileName(fileName, referenceHdc, type, ref frameRect, frameUnit, description, out nativeObject); SafeNativeMethods.Gdip.CheckStatus(status); } @@ -352,7 +324,7 @@ public MetafileHeader GetMetafileHeader() IntPtr header = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(MetafileHeader))); try { - Status status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromMetafile(nativeObject, header); + int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromMetafile(nativeObject, header); SafeNativeMethods.Gdip.CheckStatus(status); return new MetafileHeader(header); } @@ -368,7 +340,7 @@ public static MetafileHeader GetMetafileHeader(IntPtr henhmetafile) IntPtr header = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(MetafileHeader))); try { - Status status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromEmf(henhmetafile, header); + int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromEmf(henhmetafile, header); SafeNativeMethods.Gdip.CheckStatus(status); return new MetafileHeader(header); } @@ -387,21 +359,13 @@ public static MetafileHeader GetMetafileHeader(Stream stream) IntPtr header = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(MetafileHeader))); try { - Status status; - - if (GDIPlus.RunningOnUnix()) - { - // With libgdiplus we use a custom API for this, because there's no easy way - // to get the Stream down to libgdiplus. So, we wrap the stream with a set of delegates. - GdiPlusStreamHelper sh = new GdiPlusStreamHelper(stream, false); - status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromDelegate_linux(sh.GetHeaderDelegate, - sh.GetBytesDelegate, sh.PutBytesDelegate, sh.SeekDelegate, sh.CloseDelegate, - sh.SizeDelegate, header); - } - else - { - status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromStream(new ComIStreamWrapper(stream), header); - } + int status; + // With libgdiplus we use a custom API for this, because there's no easy way + // to get the Stream down to libgdiplus. So, we wrap the stream with a set of delegates. + GdiPlusStreamHelper sh = new GdiPlusStreamHelper(stream, false); + status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromDelegate_linux(sh.GetHeaderDelegate, + sh.GetBytesDelegate, sh.PutBytesDelegate, sh.SeekDelegate, sh.CloseDelegate, + sh.SizeDelegate, header); SafeNativeMethods.Gdip.CheckStatus(status); return new MetafileHeader(header); } @@ -420,7 +384,7 @@ public static MetafileHeader GetMetafileHeader(string fileName) IntPtr header = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(MetafileHeader))); try { - Status status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromFile(fileName, header); + int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromFile(fileName, header); SafeNativeMethods.Gdip.CheckStatus(status); return new MetafileHeader(header); } @@ -436,7 +400,7 @@ public static MetafileHeader GetMetafileHeader(IntPtr hmetafile, WmfPlaceableFil IntPtr header = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(MetafileHeader))); try { - Status status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromEmf(hmetafile, header); + int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromEmf(hmetafile, header); SafeNativeMethods.Gdip.CheckStatus(status); return new MetafileHeader(header); } @@ -449,7 +413,7 @@ public static MetafileHeader GetMetafileHeader(IntPtr hmetafile, WmfPlaceableFil [MonoLimitation("Metafiles aren't only partially supported by libgdiplus.")] public void PlayRecord(EmfPlusRecordType recordType, int flags, int dataSize, byte[] data) { - Status status = SafeNativeMethods.Gdip.GdipPlayMetafileRecord(nativeObject, recordType, flags, dataSize, data); + int status = SafeNativeMethods.Gdip.GdipPlayMetafileRecord(nativeObject, recordType, flags, dataSize, data); SafeNativeMethods.Gdip.CheckStatus(status); } } diff --git a/src/System.Drawing.Common/src/System/Drawing/Imaging/Metafile.cs b/src/System.Drawing.Common/src/System/Drawing/Imaging/Metafile.Windows.cs similarity index 100% rename from src/System.Drawing.Common/src/System/Drawing/Imaging/Metafile.cs rename to src/System.Drawing.Common/src/System/Drawing/Imaging/Metafile.Windows.cs diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing.Imaging/MetafileHeader.cs b/src/System.Drawing.Common/src/System/Drawing/Imaging/MetafileHeader.Unix.cs similarity index 94% rename from src/System.Drawing.Common/src/Unix/System.Drawing.Imaging/MetafileHeader.cs rename to src/System.Drawing.Common/src/System/Drawing/Imaging/MetafileHeader.Unix.cs index 8efaab27cb6d..f4f2cdd7d72d 100644 --- a/src/System.Drawing.Common/src/Unix/System.Drawing.Imaging/MetafileHeader.cs +++ b/src/System.Drawing.Common/src/System/Drawing/Imaging/MetafileHeader.Unix.cs @@ -153,7 +153,16 @@ public bool IsWmfPlaceable() public Rectangle Bounds { - get { return new Rectangle(header.x, header.y, header.width, header.height); } + get + { + if (this.MetafileSize == 0) + { + // GDI+ compatibility; + return new Rectangle(); + } + + return new Rectangle(header.x, header.y, header.width, header.height); + } } public float DpiX diff --git a/src/System.Drawing.Common/src/System/Drawing/Imaging/MetafileHeader.cs b/src/System.Drawing.Common/src/System/Drawing/Imaging/MetafileHeader.Windows.cs similarity index 100% rename from src/System.Drawing.Common/src/System/Drawing/Imaging/MetafileHeader.cs rename to src/System.Drawing.Common/src/System/Drawing/Imaging/MetafileHeader.Windows.cs diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/LibX11Functions.cs b/src/System.Drawing.Common/src/System/Drawing/LibX11Functions.cs similarity index 100% rename from src/System.Drawing.Common/src/Unix/System.Drawing/LibX11Functions.cs rename to src/System.Drawing.Common/src/System/Drawing/LibX11Functions.cs diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/MarshallingHelpers.cs b/src/System.Drawing.Common/src/System/Drawing/MarshallingHelpers.cs similarity index 100% rename from src/System.Drawing.Common/src/Unix/System.Drawing/MarshallingHelpers.cs rename to src/System.Drawing.Common/src/System/Drawing/MarshallingHelpers.cs diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/NativeStructs.Unix.cs b/src/System.Drawing.Common/src/System/Drawing/NativeStructs.Unix.cs similarity index 100% rename from src/System.Drawing.Common/src/Unix/System.Drawing/NativeStructs.Unix.cs rename to src/System.Drawing.Common/src/System/Drawing/NativeStructs.Unix.cs diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/SRDescriptionAttribute.cs b/src/System.Drawing.Common/src/System/Drawing/SRDescriptionAttribute.cs similarity index 100% rename from src/System.Drawing.Common/src/Unix/System.Drawing/SRDescriptionAttribute.cs rename to src/System.Drawing.Common/src/System/Drawing/SRDescriptionAttribute.cs diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/SystemIcons.cs b/src/System.Drawing.Common/src/System/Drawing/SystemIcons.Unix.cs similarity index 100% rename from src/System.Drawing.Common/src/Unix/System.Drawing/SystemIcons.cs rename to src/System.Drawing.Common/src/System/Drawing/SystemIcons.Unix.cs diff --git a/src/System.Drawing.Common/src/System/Drawing/SystemIcons.cs b/src/System.Drawing.Common/src/System/Drawing/SystemIcons.Windows.cs similarity index 100% rename from src/System.Drawing.Common/src/System/Drawing/SystemIcons.cs rename to src/System.Drawing.Common/src/System/Drawing/SystemIcons.Windows.cs diff --git a/src/System.Drawing.Common/src/System/Drawing/TextureBrush.cs b/src/System.Drawing.Common/src/System/Drawing/TextureBrush.cs index c39f329afc10..1710dfb4dc43 100644 --- a/src/System.Drawing.Common/src/System/Drawing/TextureBrush.cs +++ b/src/System.Drawing.Common/src/System/Drawing/TextureBrush.cs @@ -168,7 +168,7 @@ public Matrix Transform { if (value == null) { - throw new ArgumentNullException("value"); + throw new ArgumentNullException(nameof(value)); } int status = SafeNativeMethods.Gdip.GdipSetTextureTransform(new HandleRef(this, NativeBrush), new HandleRef(value, value.nativeMatrix)); @@ -225,6 +225,13 @@ public void MultiplyTransform(Matrix matrix, MatrixOrder order) throw new ArgumentNullException(nameof(matrix)); } + // Multiplying the transform by a disposed matrix is a nop in GDI+, but throws + // with the libgdiplus backend. Simulate a nop for compatability with GDI+. + if (matrix.nativeMatrix == IntPtr.Zero) + { + return; + } + int status = SafeNativeMethods.Gdip.GdipMultiplyTextureTransform(new HandleRef(this, NativeBrush), new HandleRef(matrix, matrix.nativeMatrix), order); diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/ToolboxBitmapAttribute.cs b/src/System.Drawing.Common/src/System/Drawing/ToolboxBitmapAttribute.Unix.cs similarity index 100% rename from src/System.Drawing.Common/src/Unix/System.Drawing/ToolboxBitmapAttribute.cs rename to src/System.Drawing.Common/src/System/Drawing/ToolboxBitmapAttribute.Unix.cs diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/macFunctions.cs b/src/System.Drawing.Common/src/System/Drawing/macFunctions.cs similarity index 100% rename from src/System.Drawing.Common/src/Unix/System.Drawing/macFunctions.cs rename to src/System.Drawing.Common/src/System/Drawing/macFunctions.cs diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing.Imaging/ImageFormat.cs b/src/System.Drawing.Common/src/Unix/System.Drawing.Imaging/ImageFormat.cs deleted file mode 100644 index 1618926ae9f6..000000000000 --- a/src/System.Drawing.Common/src/Unix/System.Drawing.Imaging/ImageFormat.cs +++ /dev/null @@ -1,259 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// See the LICENSE file in the project root for more information. -// -// System.Drawing.Imaging.ImageFormat.cs -// -// Authors: -// Everaldo Canuto (everaldo.canuto@bol.com.br) -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// Dennis Hayes (dennish@raytek.com) -// Jordi Mas i Hernandez (jordi@ximian.com) -// Sebastien Pouliot -// -// (C) 2002-4 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.ComponentModel; - -namespace System.Drawing.Imaging -{ -#if !NETCORE - [TypeConverter (typeof (ImageFormatConverter))] -#endif - public sealed class ImageFormat - { - - private Guid guid; - private string name; - - private const string BmpGuid = "b96b3cab-0728-11d3-9d7b-0000f81ef32e"; - private const string EmfGuid = "b96b3cac-0728-11d3-9d7b-0000f81ef32e"; - private const string ExifGuid = "b96b3cb2-0728-11d3-9d7b-0000f81ef32e"; - private const string GifGuid = "b96b3cb0-0728-11d3-9d7b-0000f81ef32e"; - private const string TiffGuid = "b96b3cb1-0728-11d3-9d7b-0000f81ef32e"; - private const string PngGuid = "b96b3caf-0728-11d3-9d7b-0000f81ef32e"; - private const string MemoryBmpGuid = "b96b3caa-0728-11d3-9d7b-0000f81ef32e"; - private const string IconGuid = "b96b3cb5-0728-11d3-9d7b-0000f81ef32e"; - private const string JpegGuid = "b96b3cae-0728-11d3-9d7b-0000f81ef32e"; - private const string WmfGuid = "b96b3cad-0728-11d3-9d7b-0000f81ef32e"; - - // lock(this) is bad - // http://msdn.microsoft.com/library/en-us/dnaskdr/html/askgui06032003.asp?frame=true - private static object locker = new object(); - - private static ImageFormat BmpImageFormat; - private static ImageFormat EmfImageFormat; - private static ImageFormat ExifImageFormat; - private static ImageFormat GifImageFormat; - private static ImageFormat TiffImageFormat; - private static ImageFormat PngImageFormat; - private static ImageFormat MemoryBmpImageFormat; - private static ImageFormat IconImageFormat; - private static ImageFormat JpegImageFormat; - private static ImageFormat WmfImageFormat; - - - // constructors - public ImageFormat(Guid guid) - { - this.guid = guid; - } - - private ImageFormat(string name, string guid) - { - this.name = name; - this.guid = new Guid(guid); - } - - - // methods - public override bool Equals(object o) - { - ImageFormat f = (o as ImageFormat); - if (f == null) - return false; - - return f.Guid.Equals(guid); - } - - - public override int GetHashCode() - { - return guid.GetHashCode(); - } - - - public override string ToString() - { - if (name != null) - return name; - - return ("[ImageFormat: " + guid.ToString() + "]"); - } - - // properties - public Guid Guid - { - get { return guid; } - } - - - public static ImageFormat Bmp - { - get - { - lock (locker) - { - if (BmpImageFormat == null) - BmpImageFormat = new ImageFormat("Bmp", BmpGuid); - return BmpImageFormat; - } - } - } - - public static ImageFormat Emf - { - get - { - lock (locker) - { - if (EmfImageFormat == null) - EmfImageFormat = new ImageFormat("Emf", EmfGuid); - return EmfImageFormat; - } - } - } - - - public static ImageFormat Exif - { - get - { - lock (locker) - { - if (ExifImageFormat == null) - ExifImageFormat = new ImageFormat("Exif", ExifGuid); - return ExifImageFormat; - } - } - } - - - public static ImageFormat Gif - { - get - { - lock (locker) - { - if (GifImageFormat == null) - GifImageFormat = new ImageFormat("Gif", GifGuid); - return GifImageFormat; - } - } - } - - - public static ImageFormat Icon - { - get - { - lock (locker) - { - if (IconImageFormat == null) - IconImageFormat = new ImageFormat("Icon", IconGuid); - return IconImageFormat; - } - } - } - - - public static ImageFormat Jpeg - { - get - { - lock (locker) - { - if (JpegImageFormat == null) - JpegImageFormat = new ImageFormat("Jpeg", JpegGuid); - return JpegImageFormat; - } - } - } - - - public static ImageFormat MemoryBmp - { - get - { - lock (locker) - { - if (MemoryBmpImageFormat == null) - MemoryBmpImageFormat = new ImageFormat("MemoryBMP", MemoryBmpGuid); - return MemoryBmpImageFormat; - } - } - } - - - public static ImageFormat Png - { - get - { - lock (locker) - { - if (PngImageFormat == null) - PngImageFormat = new ImageFormat("Png", PngGuid); - return PngImageFormat; - } - } - } - - - public static ImageFormat Tiff - { - get - { - lock (locker) - { - if (TiffImageFormat == null) - TiffImageFormat = new ImageFormat("Tiff", TiffGuid); - return TiffImageFormat; - } - } - } - - - public static ImageFormat Wmf - { - get - { - lock (locker) - { - if (WmfImageFormat == null) - WmfImageFormat = new ImageFormat("Wmf", WmfGuid); - return WmfImageFormat; - } - } - } - } -} diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/ComIStreamMarshaler.cs b/src/System.Drawing.Common/src/Unix/System.Drawing/ComIStreamMarshaler.cs deleted file mode 100644 index 24c690a1bb45..000000000000 --- a/src/System.Drawing.Common/src/Unix/System.Drawing/ComIStreamMarshaler.cs +++ /dev/null @@ -1,718 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// See the LICENSE file in the project root for more information. -// -// System.Drawing.ComIStreamMarshaler.cs -// -// Author: -// Kornél Pál -// -// Copyright (C) 2005-2006 Kornél Pál -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -// Undefine to debug the protected blocks -#define MAP_EX_TO_HR - -// Define to debug wrappers recursively -// #define RECURSIVE_WRAPPING - -using System; -using System.IO; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; -using STATSTG = System.Runtime.InteropServices.ComTypes.STATSTG; - -namespace System.Drawing -{ - // Mono does not implement COM interface marshaling - // This custom marshaler should be replaced with UnmanagedType.Interface - // Provides identical behaviour under Mono and .NET Framework - internal sealed class ComIStreamMarshaler : ICustomMarshaler - { - private const int S_OK = 0x00000000; - private const int E_NOINTERFACE = unchecked((int)0x80004002); - - private delegate int QueryInterfaceDelegate(IntPtr @this, [In()] ref Guid riid, IntPtr ppvObject); - private delegate int AddRefDelegate(IntPtr @this); - private delegate int ReleaseDelegate(IntPtr @this); - private delegate int ReadDelegate(IntPtr @this, [Out(), MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] pv, int cb, IntPtr pcbRead); - private delegate int WriteDelegate(IntPtr @this, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] pv, int cb, IntPtr pcbWritten); - private delegate int SeekDelegate(IntPtr @this, long dlibMove, int dwOrigin, IntPtr plibNewPosition); - private delegate int SetSizeDelegate(IntPtr @this, long libNewSize); - private delegate int CopyToDelegate(IntPtr @this, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ComIStreamMarshaler))] IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten); - private delegate int CommitDelegate(IntPtr @this, int grfCommitFlags); - private delegate int RevertDelegate(IntPtr @this); - private delegate int LockRegionDelegate(IntPtr @this, long libOffset, long cb, int dwLockType); - private delegate int UnlockRegionDelegate(IntPtr @this, long libOffset, long cb, int dwLockType); - private delegate int StatDelegate(IntPtr @this, out STATSTG pstatstg, int grfStatFlag); - private delegate int CloneDelegate(IntPtr @this, out IntPtr ppstm); - - [StructLayout(LayoutKind.Sequential)] - private sealed class IStreamInterface - { - internal IntPtr lpVtbl; - internal IntPtr gcHandle; - } - - [StructLayout(LayoutKind.Sequential)] - private sealed class IStreamVtbl - { - internal QueryInterfaceDelegate QueryInterface; - internal AddRefDelegate AddRef; - internal ReleaseDelegate Release; - internal ReadDelegate Read; - internal WriteDelegate Write; - internal SeekDelegate Seek; - internal SetSizeDelegate SetSize; - internal CopyToDelegate CopyTo; - internal CommitDelegate Commit; - internal RevertDelegate Revert; - internal LockRegionDelegate LockRegion; - internal UnlockRegionDelegate UnlockRegion; - internal StatDelegate Stat; - internal CloneDelegate Clone; - } - - // Managed COM Callable Wrapper implementation - // Reference counting is thread safe - private sealed class ManagedToNativeWrapper - { - // Mono does not implement Marshal.Release - [StructLayout(LayoutKind.Sequential)] - private sealed class ReleaseSlot - { - internal ReleaseDelegate Release; - } - - private static readonly Guid IID_IUnknown = new Guid("00000000-0000-0000-C000-000000000046"); - private static readonly Guid IID_IStream = new Guid("0000000C-0000-0000-C000-000000000046"); - private static readonly MethodInfo exceptionGetHResult = typeof(Exception).GetTypeInfo().GetProperty("HResult", BindingFlags.GetProperty | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.ExactBinding, null, typeof(int), new Type[] { }, null).GetGetMethod(true); - // Keeps delegates alive while they are marshaled - private static readonly IStreamVtbl managedVtable; - private static IntPtr comVtable; - private static int vtableRefCount; - - private IStream managedInterface; - private IntPtr comInterface; - // Keeps the object alive when it has no managed references - private GCHandle gcHandle; - private int refCount = 1; - - static ManagedToNativeWrapper() - { - EventHandler onShutdown; - AppDomain currentDomain; - IStreamVtbl newVtable; - - onShutdown = new EventHandler(OnShutdown); - currentDomain = AppDomain.CurrentDomain; - currentDomain.DomainUnload += onShutdown; - currentDomain.ProcessExit += onShutdown; - - newVtable = new IStreamVtbl(); - newVtable.QueryInterface = new QueryInterfaceDelegate(QueryInterface); - newVtable.AddRef = new AddRefDelegate(AddRef); - newVtable.Release = new ReleaseDelegate(Release); - newVtable.Read = new ReadDelegate(Read); - newVtable.Write = new WriteDelegate(Write); - newVtable.Seek = new SeekDelegate(Seek); - newVtable.SetSize = new SetSizeDelegate(SetSize); - newVtable.CopyTo = new CopyToDelegate(CopyTo); - newVtable.Commit = new CommitDelegate(Commit); - newVtable.Revert = new RevertDelegate(Revert); - newVtable.LockRegion = new LockRegionDelegate(LockRegion); - newVtable.UnlockRegion = new UnlockRegionDelegate(UnlockRegion); - newVtable.Stat = new StatDelegate(Stat); - newVtable.Clone = new CloneDelegate(Clone); - managedVtable = newVtable; - - CreateVtable(); - } - - private ManagedToNativeWrapper(IStream managedInterface) - { - IStreamInterface newInterface; - - lock (managedVtable) - { - // Vtable may have been disposed when shutting down - if (vtableRefCount == 0 && comVtable == IntPtr.Zero) - CreateVtable(); - vtableRefCount++; - } - - try - { - this.managedInterface = managedInterface; - gcHandle = GCHandle.Alloc(this); - - newInterface = new IStreamInterface(); - newInterface.lpVtbl = comVtable; - newInterface.gcHandle = (IntPtr)gcHandle; - comInterface = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IStreamInterface))); - Marshal.StructureToPtr(newInterface, comInterface, false); - } - catch - { - this.Dispose(); - throw; - } - } - - private void Dispose() - { - if (gcHandle.IsAllocated) - gcHandle.Free(); - - if (comInterface != IntPtr.Zero) - { - Marshal.FreeHGlobal(comInterface); - comInterface = IntPtr.Zero; - } - - managedInterface = null; - - lock (managedVtable) - { - // Dispose vtable when shutting down - if (--vtableRefCount == 0 && Environment.HasShutdownStarted) - DisposeVtable(); - } - } - - private static void OnShutdown(object sender, EventArgs e) - { - lock (managedVtable) - { - // There may be object instances when shutting down - if (vtableRefCount == 0 && comVtable != IntPtr.Zero) - DisposeVtable(); - } - } - - private static void CreateVtable() - { - comVtable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IStreamVtbl))); - Marshal.StructureToPtr(managedVtable, comVtable, false); - } - - private static void DisposeVtable() - { - Marshal.DestroyStructure(comVtable, typeof(IStreamVtbl)); - Marshal.FreeHGlobal(comVtable); - comVtable = IntPtr.Zero; - } - - internal static IStream GetUnderlyingInterface(IntPtr comInterface, bool outParam) - { - if (Marshal.ReadIntPtr(comInterface) == comVtable) - { - IStream managedInterface = GetObject(comInterface).managedInterface; - - if (outParam) - Release(comInterface); - - return managedInterface; - } - else - return null; - } - - internal static IntPtr GetInterface(IStream managedInterface) - { - IntPtr comInterface; - - if (managedInterface == null) - return IntPtr.Zero; -#if !RECURSIVE_WRAPPING - else if ((comInterface = NativeToManagedWrapper.GetUnderlyingInterface(managedInterface)) == IntPtr.Zero) -#endif - comInterface = new ManagedToNativeWrapper(managedInterface).comInterface; - - return comInterface; - } - - internal static void ReleaseInterface(IntPtr comInterface) - { - if (comInterface != IntPtr.Zero) - { - IntPtr vtable = Marshal.ReadIntPtr(comInterface); - - if (vtable == comVtable) - Release(comInterface); - else - { - ReleaseSlot releaseSlot = (ReleaseSlot)Marshal.PtrToStructure((IntPtr)((long)vtable + (long)(IntPtr.Size * 2)), typeof(ReleaseSlot)); - releaseSlot.Release(comInterface); - } - } - } - - // Mono does not implement Marshal.GetHRForException - private static int GetHRForException(Exception e) - { - return (int)exceptionGetHResult.Invoke(e, null); - } - - private static ManagedToNativeWrapper GetObject(IntPtr @this) - { - return (ManagedToNativeWrapper)((GCHandle)Marshal.ReadIntPtr(@this, IntPtr.Size)).Target; - } - - private static int QueryInterface(IntPtr @this, ref Guid riid, IntPtr ppvObject) - { -#if MAP_EX_TO_HR - try - { -#endif - if (IID_IUnknown.Equals(riid) || IID_IStream.Equals(riid)) - { - Marshal.WriteIntPtr(ppvObject, @this); - AddRef(@this); - return S_OK; - } - else - { - Marshal.WriteIntPtr(ppvObject, IntPtr.Zero); - return E_NOINTERFACE; - } -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int AddRef(IntPtr @this) - { -#if MAP_EX_TO_HR - try - { -#endif - ManagedToNativeWrapper thisObject = GetObject(@this); - - lock (thisObject) - { - return ++thisObject.refCount; - } -#if MAP_EX_TO_HR - } - catch - { - return 0; - } -#endif - } - - private static int Release(IntPtr @this) - { -#if MAP_EX_TO_HR - try - { -#endif - ManagedToNativeWrapper thisObject = GetObject(@this); - - lock (thisObject) - { - if ((thisObject.refCount != 0) && (--thisObject.refCount == 0)) - thisObject.Dispose(); - - return thisObject.refCount; - } -#if MAP_EX_TO_HR - } - catch - { - return 0; - } -#endif - } - - private static int Read(IntPtr @this, byte[] pv, int cb, IntPtr pcbRead) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.Read(pv, cb, pcbRead); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int Write(IntPtr @this, byte[] pv, int cb, IntPtr pcbWritten) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.Write(pv, cb, pcbWritten); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int Seek(IntPtr @this, long dlibMove, int dwOrigin, IntPtr plibNewPosition) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.Seek(dlibMove, dwOrigin, plibNewPosition); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int SetSize(IntPtr @this, long libNewSize) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.SetSize(libNewSize); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int CopyTo(IntPtr @this, IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.CopyTo(pstm, cb, pcbRead, pcbWritten); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int Commit(IntPtr @this, int grfCommitFlags) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.Commit(grfCommitFlags); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int Revert(IntPtr @this) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.Revert(); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int LockRegion(IntPtr @this, long libOffset, long cb, int dwLockType) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.LockRegion(libOffset, cb, dwLockType); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int UnlockRegion(IntPtr @this, long libOffset, long cb, int dwLockType) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.UnlockRegion(libOffset, cb, dwLockType); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - - private static int Stat(IntPtr @this, out STATSTG pstatstg, int grfStatFlag) - { -#if MAP_EX_TO_HR - try - { -#endif - GetObject(@this).managedInterface.Stat(out pstatstg, grfStatFlag); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - pstatstg = new STATSTG(); - return GetHRForException(e); - } -#endif - } - - private static int Clone(IntPtr @this, out IntPtr ppstm) - { - ppstm = IntPtr.Zero; -#if MAP_EX_TO_HR - try - { -#endif - IStream newInterface; - - GetObject(@this).managedInterface.Clone(out newInterface); - ppstm = ManagedToNativeWrapper.GetInterface(newInterface); - return S_OK; -#if MAP_EX_TO_HR - } - catch (Exception e) - { - return GetHRForException(e); - } -#endif - } - } - - // Managed Runtime Callable Wrapper implementation - private sealed class NativeToManagedWrapper : IStream - { - private IntPtr comInterface; - private IStreamVtbl managedVtable; - - private NativeToManagedWrapper(IntPtr comInterface, bool outParam) - { - this.comInterface = comInterface; - managedVtable = (IStreamVtbl)Marshal.PtrToStructure(Marshal.ReadIntPtr(comInterface), typeof(IStreamVtbl)); - if (!outParam) - managedVtable.AddRef(comInterface); - } - - ~NativeToManagedWrapper() - { - Dispose(false); - } - - private void Dispose(bool disposing) - { - managedVtable.Release(comInterface); - if (disposing) - { - comInterface = IntPtr.Zero; - managedVtable = null; - GC.SuppressFinalize(this); - } - } - - internal static IntPtr GetUnderlyingInterface(IStream managedInterface) - { - if (managedInterface is NativeToManagedWrapper) - { - NativeToManagedWrapper wrapper = (NativeToManagedWrapper)managedInterface; - - wrapper.managedVtable.AddRef(wrapper.comInterface); - return wrapper.comInterface; - } - else - return IntPtr.Zero; - } - - internal static IStream GetInterface(IntPtr comInterface, bool outParam) - { - IStream managedInterface; - - if (comInterface == IntPtr.Zero) - return null; -#if !RECURSIVE_WRAPPING - else if ((managedInterface = ManagedToNativeWrapper.GetUnderlyingInterface(comInterface, outParam)) == null) -#endif - managedInterface = (IStream)new NativeToManagedWrapper(comInterface, outParam); - - return managedInterface; - } - - internal static void ReleaseInterface(IStream managedInterface) - { - if (managedInterface is NativeToManagedWrapper) - ((NativeToManagedWrapper)managedInterface).Dispose(true); - } - - // Mono does not implement Marshal.ThrowExceptionForHR - private static void ThrowExceptionForHR(int result) - { - if (result < 0) - throw new COMException(null, result); - } - - public void Read(byte[] pv, int cb, IntPtr pcbRead) - { - ThrowExceptionForHR(managedVtable.Read(comInterface, pv, cb, pcbRead)); - } - - public void Write(byte[] pv, int cb, IntPtr pcbWritten) - { - ThrowExceptionForHR(managedVtable.Write(comInterface, pv, cb, pcbWritten)); - } - - public void Seek(long dlibMove, int dwOrigin, IntPtr plibNewPosition) - { - ThrowExceptionForHR(managedVtable.Seek(comInterface, dlibMove, dwOrigin, plibNewPosition)); - } - - public void SetSize(long libNewSize) - { - ThrowExceptionForHR(managedVtable.SetSize(comInterface, libNewSize)); - } - - public void CopyTo(IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten) - { - ThrowExceptionForHR(managedVtable.CopyTo(comInterface, pstm, cb, pcbRead, pcbWritten)); - } - - public void Commit(int grfCommitFlags) - { - ThrowExceptionForHR(managedVtable.Commit(comInterface, grfCommitFlags)); - } - - public void Revert() - { - ThrowExceptionForHR(managedVtable.Revert(comInterface)); - } - - public void LockRegion(long libOffset, long cb, int dwLockType) - { - ThrowExceptionForHR(managedVtable.LockRegion(comInterface, libOffset, cb, dwLockType)); - } - - public void UnlockRegion(long libOffset, long cb, int dwLockType) - { - ThrowExceptionForHR(managedVtable.UnlockRegion(comInterface, libOffset, cb, dwLockType)); - } - - public void Stat(out STATSTG pstatstg, int grfStatFlag) - { - ThrowExceptionForHR(managedVtable.Stat(comInterface, out pstatstg, grfStatFlag)); - } - - public void Clone(out IStream ppstm) - { - IntPtr newInterface; - - ThrowExceptionForHR(managedVtable.Clone(comInterface, out newInterface)); - ppstm = NativeToManagedWrapper.GetInterface(newInterface, true); - } - } - - private static readonly ComIStreamMarshaler defaultInstance = new ComIStreamMarshaler(); - - private ComIStreamMarshaler() - { - } - - private static ICustomMarshaler GetInstance(string cookie) - { - return defaultInstance; - } - - public IntPtr MarshalManagedToNative(object managedObj) - { -#if RECURSIVE_WRAPPING - managedObj = NativeToManagedWrapper.GetInterface(ManagedToNativeWrapper.GetInterface((IStream)managedObj), true); -#endif - return ManagedToNativeWrapper.GetInterface((IStream)managedObj); - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - ManagedToNativeWrapper.ReleaseInterface(pNativeData); - } - - public object MarshalNativeToManaged(IntPtr pNativeData) - { -#if RECURSIVE_WRAPPING - pNativeData = ManagedToNativeWrapper.GetInterface(NativeToManagedWrapper.GetInterface(pNativeData, true)); -#endif - return NativeToManagedWrapper.GetInterface(pNativeData, false); - } - - public void CleanUpManagedData(object managedObj) - { - NativeToManagedWrapper.ReleaseInterface((IStream)managedObj); - } - - public int GetNativeDataSize() - { - return -1; - } - } -} diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/ComIStreamWrapper.cs b/src/System.Drawing.Common/src/Unix/System.Drawing/ComIStreamWrapper.cs deleted file mode 100644 index 37ef6c03b81c..000000000000 --- a/src/System.Drawing.Common/src/Unix/System.Drawing/ComIStreamWrapper.cs +++ /dev/null @@ -1,199 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// See the LICENSE file in the project root for more information. -// -// System.Drawing.ComIStreamWrapper.cs -// -// Author: -// Kornél Pál -// -// Copyright (C) 2005-2008 Kornél Pál -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.IO; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; -using STATSTG = System.Runtime.InteropServices.ComTypes.STATSTG; - -namespace System.Drawing -{ - // Stream to IStream wrapper for COM interop - internal sealed class ComIStreamWrapper : IStream - { - private const int STG_E_INVALIDFUNCTION = unchecked((int)0x80030001); - - private readonly Stream baseStream; - private long position = -1; - - internal ComIStreamWrapper(Stream stream) - { - baseStream = stream; - } - - private void SetSizeToPosition() - { - if (position != -1) - { - if (position > baseStream.Length) - baseStream.SetLength(position); - baseStream.Position = position; - position = -1; - } - } - - public void Read(byte[] pv, int cb, IntPtr pcbRead) - { - int read = 0; - - if (cb != 0) - { - SetSizeToPosition(); - read = baseStream.Read(pv, 0, cb); - } - - if (pcbRead != IntPtr.Zero) - Marshal.WriteInt32(pcbRead, read); - } - - public void Write(byte[] pv, int cb, IntPtr pcbWritten) - { - if (cb != 0) - { - SetSizeToPosition(); - baseStream.Write(pv, 0, cb); - } - - if (pcbWritten != IntPtr.Zero) - Marshal.WriteInt32(pcbWritten, cb); - } - - public void Seek(long dlibMove, int dwOrigin, IntPtr plibNewPosition) - { - long length = baseStream.Length; - long newPosition; - - switch ((SeekOrigin)dwOrigin) - { - case SeekOrigin.Begin: - newPosition = dlibMove; - break; - case SeekOrigin.Current: - if (position == -1) - newPosition = baseStream.Position + dlibMove; - else - newPosition = position + dlibMove; - break; - case SeekOrigin.End: - newPosition = length + dlibMove; - break; - default: - throw new ExternalException(null, STG_E_INVALIDFUNCTION); - } - - if (newPosition > length) - position = newPosition; - else - { - baseStream.Position = newPosition; - position = -1; - } - - if (plibNewPosition != IntPtr.Zero) - Marshal.WriteInt64(plibNewPosition, newPosition); - } - - public void SetSize(long libNewSize) - { - baseStream.SetLength(libNewSize); - } - - public void CopyTo(IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten) - { - byte[] buffer; - long written = 0; - int read; - int count; - - if (cb != 0) - { - if (cb < 4096) - count = (int)cb; - else - count = 4096; - buffer = new byte[count]; - SetSizeToPosition(); - while (true) - { - if ((read = baseStream.Read(buffer, 0, count)) == 0) - break; - pstm.Write(buffer, read, IntPtr.Zero); - written += read; - if (written >= cb) - break; - if (cb - written < 4096) - count = (int)(cb - written); - } - } - - if (pcbRead != IntPtr.Zero) - Marshal.WriteInt64(pcbRead, written); - if (pcbWritten != IntPtr.Zero) - Marshal.WriteInt64(pcbWritten, written); - } - - public void Commit(int grfCommitFlags) - { - baseStream.Flush(); - SetSizeToPosition(); - } - - public void Revert() - { - throw new ExternalException(null, STG_E_INVALIDFUNCTION); - } - - public void LockRegion(long libOffset, long cb, int dwLockType) - { - throw new ExternalException(null, STG_E_INVALIDFUNCTION); - } - - public void UnlockRegion(long libOffset, long cb, int dwLockType) - { - throw new ExternalException(null, STG_E_INVALIDFUNCTION); - } - - public void Stat(out STATSTG pstatstg, int grfStatFlag) - { - pstatstg = new STATSTG(); - pstatstg.cbSize = baseStream.Length; - } - - public void Clone(out IStream ppstm) - { - ppstm = null; - throw new ExternalException(null, STG_E_INVALIDFUNCTION); - } - } -} \ No newline at end of file diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/GraphicsUnit.cs b/src/System.Drawing.Common/src/Unix/System.Drawing/GraphicsUnit.cs deleted file mode 100644 index 41963d45543d..000000000000 --- a/src/System.Drawing.Common/src/Unix/System.Drawing/GraphicsUnit.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// See the LICENSE file in the project root for more information. -// -// System.Drawing.GraphicsUnit.cs -// -// Author: Dennis Hayes (dennish@raytek.com) -// -// (C) 2001 Ximian, Inc. http://www.ximian.com -// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -namespace System.Drawing -{ - - public enum GraphicsUnit - { - World = 0, - Display = 1, - Pixel = 2, - Point = 3, - Inch = 4, - Document = 5, - Millimeter = 6 - } -} diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/gdipEnums.cs b/src/System.Drawing.Common/src/Unix/System.Drawing/gdipEnums.cs deleted file mode 100644 index dbf28bfd6796..000000000000 --- a/src/System.Drawing.Common/src/Unix/System.Drawing/gdipEnums.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// See the LICENSE file in the project root for more information. -// -// System.Drawing.gdipEnums.cs -// -// Authors: -// Alexandre Pigolkine (pigolkine@gmx.de) -// Sebastien Pouliot -// -// Copyright (C) 2004, 2007 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -namespace System.Drawing -{ - - internal enum Status - { - Ok = 0, - GenericError = 1, - InvalidParameter = 2, - OutOfMemory = 3, - ObjectBusy = 4, - InsufficientBuffer = 5, - NotImplemented = 6, - Win32Error = 7, - WrongState = 8, - Aborted = 9, - FileNotFound = 10, - ValueOverflow = 11, - AccessDenied = 12, - UnknownImageFormat = 13, - FontFamilyNotFound = 14, - FontStyleNotFound = 15, - NotTrueTypeFont = 16, - UnsupportedGdiplusVersion = 17, - GdiplusNotInitialized = 18, - PropertyNotFound = 19, - PropertyNotSupported = 20, - ProfileNotFound = 21 - } - - internal enum BrushType - { - BrushTypeSolidColor = 0, - BrushTypeHatchFill = 1, - BrushTypeTextureFill = 2, - BrushTypePathGradient = 3, - BrushTypeLinearGradient = 4 - } - - internal enum ImageType - { - Unknown = 0, - Bitmap = 1, - Metafile = 2 - } - - internal enum GetSysColorIndex - { - COLOR_SCROLLBAR = 0, - COLOR_BACKGROUND = 1, - COLOR_ACTIVECAPTION = 2, - COLOR_INACTIVECAPTION = 3, - COLOR_MENU = 4, - COLOR_WINDOW = 5, - COLOR_WINDOWFRAME = 6, - COLOR_MENUTEXT = 7, - COLOR_WINDOWTEXT = 8, - COLOR_CAPTIONTEXT = 9, - COLOR_ACTIVEBORDER = 10, - COLOR_INACTIVEBORDER = 11, - COLOR_APPWORKSPACE = 12, - COLOR_HIGHLIGHT = 13, - COLOR_HIGHLIGHTTEXT = 14, - COLOR_BTNFACE = 15, - COLOR_BTNSHADOW = 16, - COLOR_GRAYTEXT = 17, - COLOR_BTNTEXT = 18, - COLOR_INACTIVECAPTIONTEXT = 19, - COLOR_BTNHIGHLIGHT = 20, - COLOR_3DDKSHADOW = 21, - COLOR_3DLIGHT = 22, - COLOR_INFOTEXT = 23, - COLOR_INFOBK = 24, - - COLOR_HOTLIGHT = 26, - COLOR_GRADIENTACTIVECAPTION = 27, - COLOR_GRADIENTINACTIVECAPTION = 28, - COLOR_MENUHIGHLIGHT = 29, - COLOR_MENUBAR = 30, - - COLOR_DESKTOP = 1, - COLOR_3DFACE = 16, - COLOR_3DSHADOW = 16, - COLOR_3DHIGHLIGHT = 20, - COLOR_3DHILIGHT = 20, - COLOR_BTNHILIGHT = 20, - - COLOR_MAXVALUE = 30,/* Maximum value */ - } -} diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/gdipFunctions.cs b/src/System.Drawing.Common/src/Unix/System.Drawing/gdipFunctions.cs deleted file mode 100644 index 0ca726ab4601..000000000000 --- a/src/System.Drawing.Common/src/Unix/System.Drawing/gdipFunctions.cs +++ /dev/null @@ -1,174 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// See the LICENSE file in the project root for more information. -// -// System.Drawing.gdipFunctions.cs -// -// Authors: -// Alexandre Pigolkine (pigolkine@gmx.de) -// Jordi Mas i Hernandez (jordi@ximian.com) -// Sanjay Gupta (gsanjay@novell.com) -// Ravindra (rkumar@novell.com) -// Peter Dennis Bartok (pbartok@novell.com) -// Sebastien Pouliot -// -// Copyright (C) 2004 - 2007 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.IO; -using System.Runtime.InteropServices; -using System.Text; -using System.Drawing.Drawing2D; -using System.Drawing.Imaging; -using System.Drawing.Text; -using System.Globalization; -using System.Security; -using System.Runtime.InteropServices.ComTypes; - -namespace System.Drawing -{ - /// - /// GDI+ API Functions - /// - internal static partial class GDIPlus - { - public const int FACESIZE = 32; - public const int LANG_NEUTRAL = 0; - public static IntPtr Display = IntPtr.Zero; - public static bool UseX11Drawable = false; - public static bool UseCarbonDrawable = false; - public static bool UseCocoaDrawable = false; - - private const string GdiPlus = "gdiplus"; - - #region gdiplus.dll functions - - internal static ulong GdiPlusToken = 0; - - static void ProcessExit(object sender, EventArgs e) - { - // Called all pending objects and claim any pending handle before - // shutting down - GC.Collect(); - GC.WaitForPendingFinalizers(); -#if false - GdiPlusToken = 0; - - // This causes crashes in because this call occurs before all - // managed GDI+ objects are finalized. When they are finalized - // they call into a shutdown GDI+ and we crash. - GdiplusShutdown (ref GdiPlusToken); - - // This causes crashes in Mono libgdiplus because this call - // occurs before all managed GDI objects are finalized - // When they are finalized they use the closed display and - // crash - if (UseX11Drawable && Display != IntPtr.Zero) { - XCloseDisplay (Display); - } -#endif - } - - static GDIPlus() - { -#if NETSTANDARD1_6 - bool isUnix = !RuntimeInformation.IsOSPlatform (OSPlatform.Windows); -#else - int platform = (int)Environment.OSVersion.Platform; - bool isUnix = (platform == 4) || (platform == 6) || (platform == 128); -#endif - - if (isUnix) - { - if (Environment.GetEnvironmentVariable("not_supported_MONO_MWF_USE_NEW_X11_BACKEND") != null || Environment.GetEnvironmentVariable("MONO_MWF_MAC_FORCE_X11") != null) - { - UseX11Drawable = true; - } - else - { - IntPtr buf = Marshal.AllocHGlobal(8192); - // This is kind of a hack but gets us sysname from uname (struct utsname *name) on - // linux and darwin - if (uname(buf) != 0) - { - // WTH: We couldn't detect the OS; lets default to X11 - UseX11Drawable = true; - } - else - { - string os = Marshal.PtrToStringAnsi(buf); - if (os == "Darwin") - UseCarbonDrawable = true; - else - UseX11Drawable = true; - } - Marshal.FreeHGlobal(buf); - } - } - - // under MS 1.x this event is raised only for the default application domain -#if !NETSTANDARD1_6 - AppDomain.CurrentDomain.ProcessExit += new EventHandler(ProcessExit); -#endif - } - - static public bool RunningOnWindows() - { - return !UseX11Drawable && !UseCarbonDrawable && !UseCocoaDrawable; - } - - static public bool RunningOnUnix() - { - return UseX11Drawable || UseCarbonDrawable || UseCocoaDrawable; - } - - // This is win32/gdi, not gdiplus, but it's easier to keep in here, also see above comment - [DllImport("gdi32.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Auto)] - internal static extern IntPtr CreateFontIndirect(ref LOGFONT logfont); - [DllImport("user32.dll", EntryPoint = "GetDC", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)] - internal static extern IntPtr GetDC(IntPtr hwnd); - [DllImport("user32.dll", EntryPoint = "ReleaseDC", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)] - internal static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC); - [DllImport("gdi32.dll", EntryPoint = "SelectObject", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)] - internal static extern IntPtr SelectObject(IntPtr hdc, IntPtr obj); - [DllImport("user32.dll", SetLastError = true)] - internal static extern bool GetIconInfo(IntPtr hIcon, out IconInfo iconinfo); - [DllImport("user32.dll", CallingConvention = CallingConvention.StdCall, SetLastError = true)] - internal static extern IntPtr CreateIconIndirect([In] ref IconInfo piconinfo); - [DllImport("user32.dll", CallingConvention = CallingConvention.StdCall, SetLastError = true)] - internal static extern bool DestroyIcon(IntPtr hIcon); - [DllImport("gdi32.dll")] - internal static extern bool DeleteObject(IntPtr hObject); - [DllImport("user32.dll")] - internal static extern IntPtr GetDesktopWindow(); - - [DllImport("gdi32.dll", SetLastError = true)] - public static extern int BitBlt(IntPtr hdcDest, int nXDest, int nYDest, - int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, int dwRop); - - [DllImport("user32.dll", EntryPoint = "GetSysColor", CallingConvention = CallingConvention.StdCall)] - public static extern uint Win32GetSysColor(GetSysColorIndex index); - - [DllImport("libc")] - static extern int uname(IntPtr buf); - #endregion - } -} diff --git a/src/System.Drawing.Common/tests/Drawing2D/HatchBrushTests.cs b/src/System.Drawing.Common/tests/Drawing2D/HatchBrushTests.cs index e1eb51602d01..4aff17f43c31 100644 --- a/src/System.Drawing.Common/tests/Drawing2D/HatchBrushTests.cs +++ b/src/System.Drawing.Common/tests/Drawing2D/HatchBrushTests.cs @@ -47,14 +47,13 @@ public void Ctor_HatchStyle_ForeColor_BackColor(HatchStyle hatchStyle, Color for Assert.Equal(backColor.ToArgb(), brush.BackgroundColor.ToArgb()); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] - [ConditionalTheory(Helpers.GdiplusIsAvailable)] + [Theory] [InlineData(HatchStyle.Horizontal -1 )] [InlineData(HatchStyle.SolidDiamond + 1)] public void Ctor_InvalidHatchStyle_ThrowsArgumentException(HatchStyle hatchStyle) { - AssertExtensions.Throws(null, () => new HatchBrush(hatchStyle, Color.Empty)); - AssertExtensions.Throws(null, () => new HatchBrush(hatchStyle, Color.Empty, Color.Empty)); + AssertExtensions.Throws("hatchstyle", null, () => new HatchBrush(hatchStyle, Color.Empty)); + AssertExtensions.Throws("hatchstyle", null, () => new HatchBrush(hatchStyle, Color.Empty, Color.Empty)); } [ConditionalFact(Helpers.GdiplusIsAvailable)] diff --git a/src/System.Drawing.Common/tests/Drawing2D/LinearGradientBrushTests.cs b/src/System.Drawing.Common/tests/Drawing2D/LinearGradientBrushTests.cs index 5704a8062338..37f67b393382 100644 --- a/src/System.Drawing.Common/tests/Drawing2D/LinearGradientBrushTests.cs +++ b/src/System.Drawing.Common/tests/Drawing2D/LinearGradientBrushTests.cs @@ -236,7 +236,6 @@ public void Ctor_ZeroHeight_ThrowsArgumentException() AssertExtensions.Throws(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, 0, true)); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalTheory(Helpers.GdiplusIsAvailable)] [InlineData(LinearGradientMode.Horizontal - 1)] [InlineData(LinearGradientMode.BackwardDiagonal + 1)] @@ -246,36 +245,6 @@ public void Ctor_InvalidLinearGradientMode_ThrowsEnumArgumentException(LinearGra Assert.ThrowsAny(() => new LinearGradientBrush(new RectangleF(1, 2, 3, 4), Color.Empty, Color.Empty, linearGradientMode)); } - public static IEnumerable Ctor_HatchStyle_ForeColor_BackColor_TestData() - { - yield return new object[] { HatchStyle.Horizontal, new Color(), new Color() }; - yield return new object[] { HatchStyle.SolidDiamond, Color.PapayaWhip, Color.Plum }; - } - - [ConditionalTheory(Helpers.GdiplusIsAvailable)] - [MemberData(nameof(Ctor_HatchStyle_ForeColor_BackColor_TestData))] - public void Ctor_HatchStyle_ForeColor_BackColor(HatchStyle hatchStyle, Color foreColor, Color backColor) - { - var brush = new HatchBrush(hatchStyle, foreColor, backColor); - Assert.Equal(hatchStyle, brush.HatchStyle); - - Assert.NotEqual(foreColor, brush.ForegroundColor); - Assert.Equal(foreColor.ToArgb(), brush.ForegroundColor.ToArgb()); - - Assert.NotEqual(backColor, brush.BackgroundColor); - Assert.Equal(backColor.ToArgb(), brush.BackgroundColor.ToArgb()); - } - - [ActiveIssue(20884, TestPlatforms.AnyUnix)] - [ConditionalTheory(Helpers.GdiplusIsAvailable)] - [InlineData(HatchStyle.Horizontal - 1)] - [InlineData(HatchStyle.SolidDiamond + 1)] - public void Ctor_InvalidHatchStyle_ThrowsArgumentException(HatchStyle hatchStyle) - { - AssertExtensions.Throws(null, () => new HatchBrush(hatchStyle, Color.Empty)); - AssertExtensions.Throws(null, () => new HatchBrush(hatchStyle, Color.Empty, Color.Empty)); - } - [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Clone_Brush_ReturnsClone() { @@ -369,7 +338,6 @@ public void Blend_SetNullBlendFactors_ThrowsNullReferenceException() Assert.Throws(() => brush.Blend = new Blend { Factors = null }); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Blend_SetNullBlendPositions_ThrowsArgumentNullException() { @@ -377,7 +345,6 @@ public void Blend_SetNullBlendPositions_ThrowsArgumentNullException() AssertExtensions.Throws("source", () => brush.Blend = new Blend { Factors = new float[2], Positions = null }); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Blend_SetFactorsLengthGreaterThanPositionsLength_ThrowsArgumentOutOfRangeException() { @@ -632,12 +599,11 @@ public void Transform_SetValid_GetReturnsExpected() Assert.Equal(transform, brush.Transform); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Transform_SetNull_ThrowsArgumentNullException() { var brush = new LinearGradientBrush(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); - AssertExtensions.Throws("matrix", () => brush.Transform = null); + AssertExtensions.Throws("value", "matrix", () => brush.Transform = null); } [ConditionalFact(Helpers.GdiplusIsAvailable)] @@ -661,7 +627,6 @@ public void WrapMode_SetValid_GetReturnsExpected(WrapMode wrapMode) Assert.Equal(wrapMode, brush.WrapMode); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalTheory(Helpers.GdiplusIsAvailable)] [InlineData(WrapMode.Tile - 1)] [InlineData(WrapMode.Clamp + 1)] @@ -748,25 +713,27 @@ public void MultiplyTransform_Order_Success(MatrixOrder order) [ConditionalFact(Helpers.GdiplusIsAvailable)] public void MultiplyTransform_NullMatrix_ThrowsArgumentNullException() { - var brush = new LinearGradientBrush(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); - AssertExtensions.Throws("matrix", () => brush.MultiplyTransform(null)); - AssertExtensions.Throws("matrix", () => brush.MultiplyTransform(null, MatrixOrder.Append)); + using (var brush = new LinearGradientBrush(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true)) + { + AssertExtensions.Throws("matrix", () => brush.MultiplyTransform(null)); + AssertExtensions.Throws("matrix", () => brush.MultiplyTransform(null, MatrixOrder.Append)); + } } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void MultiplyTransform_DisposedMatrix_Nop() { - var brush = new LinearGradientBrush(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); - Matrix transform = brush.Transform; + using (var brush = new LinearGradientBrush(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true)) + using (Matrix transform = brush.Transform) + { + var matrix = new Matrix(); + matrix.Dispose(); - var matrix = new Matrix(); - matrix.Dispose(); + brush.MultiplyTransform(matrix); + brush.MultiplyTransform(matrix, MatrixOrder.Append); - brush.MultiplyTransform(matrix); - brush.MultiplyTransform(matrix, MatrixOrder.Append); - - Assert.Equal(transform, brush.Transform); + Assert.Equal(transform, brush.Transform); + } } [ConditionalFact(Helpers.GdiplusIsAvailable)] @@ -959,8 +926,8 @@ public void SetSigmalBellShape(float focus) public void SetSigmalBellShape_InvalidFocus_ThrowsArgumentException(float focus) { var brush = new LinearGradientBrush(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); - AssertExtensions.Throws(null, () => brush.SetSigmaBellShape(focus)); - AssertExtensions.Throws(null, () => brush.SetSigmaBellShape(focus, 1)); + AssertExtensions.Throws("focus", null, () => brush.SetSigmaBellShape(focus)); + AssertExtensions.Throws("focus", null, () => brush.SetSigmaBellShape(focus, 1)); } [ConditionalTheory(Helpers.GdiplusIsAvailable)] @@ -971,7 +938,7 @@ public void SetSigmalBellShape_InvalidFocus_ThrowsArgumentException(float focus) public void SetSigmalBellShape_InvalidScale_ThrowsArgumentException(float scale) { var brush = new LinearGradientBrush(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); - AssertExtensions.Throws(null, () => brush.SetSigmaBellShape(0.1f, scale)); + AssertExtensions.Throws("scale", null, () => brush.SetSigmaBellShape(0.1f, scale)); } [ConditionalFact(Helpers.GdiplusIsAvailable)] @@ -1019,8 +986,8 @@ public void SetBlendTriangularShape_Scale_Success(float focus, float scale, floa public void SetBlendTriangularShape_InvalidFocus_ThrowsArgumentException(float focus) { var brush = new LinearGradientBrush(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); - AssertExtensions.Throws(null, () => brush.SetBlendTriangularShape(focus)); - AssertExtensions.Throws(null, () => brush.SetBlendTriangularShape(focus, 1)); + AssertExtensions.Throws("focus", null, () => brush.SetBlendTriangularShape(focus)); + AssertExtensions.Throws("focus", null, () => brush.SetBlendTriangularShape(focus, 1)); } [ConditionalTheory(Helpers.GdiplusIsAvailable)] @@ -1031,7 +998,7 @@ public void SetBlendTriangularShape_InvalidFocus_ThrowsArgumentException(float f public void SetBlendTriangularShape_InvalidScale_ThrowsArgumentException(float scale) { var brush = new LinearGradientBrush(new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red, 45, true); - AssertExtensions.Throws(null, () => brush.SetBlendTriangularShape(0.1f, scale)); + AssertExtensions.Throws("scale", null, () => brush.SetBlendTriangularShape(0.1f, scale)); } [ConditionalFact(Helpers.GdiplusIsAvailable)] diff --git a/src/System.Drawing.Common/tests/Drawing2D/PathGradientBrushTests.cs b/src/System.Drawing.Common/tests/Drawing2D/PathGradientBrushTests.cs index 7edf6ea8dd7f..27e9e060db44 100644 --- a/src/System.Drawing.Common/tests/Drawing2D/PathGradientBrushTests.cs +++ b/src/System.Drawing.Common/tests/Drawing2D/PathGradientBrushTests.cs @@ -92,7 +92,6 @@ public void Ctor_PointsLengthLessThenTwo_ThrowsOutOfMemoryException(int pointsLe Assert.Throws(() => new PathGradientBrush(new PointF[pointsLength], WrapMode.Clamp)); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Ctor_InvalidWrapMode_ThrowsInvalidEnumArgumentException() { @@ -350,7 +349,6 @@ public void Blend_InvalidFactorPositions_ThrowsArgumentException(Blend blend) } } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Blend_InvalidFactorPositionsLengthMismatch_ThrowsArgumentOutOfRangeException() { @@ -373,7 +371,6 @@ public void Blend_Null_ThrowsNullReferenceException() } } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Blend_NullBlendProperites_ThrowsArgumentNullException() { @@ -485,8 +482,8 @@ public void SetSigmaBellShape_InvalidFocus_ThrowsArgumentException(float focus) { using (PathGradientBrush brush = new PathGradientBrush(_defaultFloatPoints)) { - AssertExtensions.Throws(null, () => brush.SetSigmaBellShape(focus)); - AssertExtensions.Throws(null, () => brush.SetSigmaBellShape(focus, 1f)); + AssertExtensions.Throws("focus", null, () => brush.SetSigmaBellShape(focus)); + AssertExtensions.Throws("focus", null, () => brush.SetSigmaBellShape(focus, 1f)); } } @@ -497,7 +494,7 @@ public void SetSigmaBellShape_InvalidScale_ThrowsArgumentException(float scale) { using (PathGradientBrush brush = new PathGradientBrush(_defaultFloatPoints)) { - AssertExtensions.Throws(null, () => brush.SetSigmaBellShape(1f, scale)); + AssertExtensions.Throws("scale", null, () => brush.SetSigmaBellShape(1f, scale)); } } @@ -583,8 +580,8 @@ public void SetBlendTriangularShape_InvalidFocus_ThrowsArgumentException(float f { using (PathGradientBrush brush = new PathGradientBrush(_defaultFloatPoints)) { - AssertExtensions.Throws(null, () => brush.SetBlendTriangularShape(focus)); - AssertExtensions.Throws(null, () => brush.SetBlendTriangularShape(focus, 1f)); + AssertExtensions.Throws("focus", null, () => brush.SetBlendTriangularShape(focus)); + AssertExtensions.Throws("focus", null, () => brush.SetBlendTriangularShape(focus, 1f)); } } @@ -595,7 +592,7 @@ public void SetBlendTriangularShape_InvalidScale_ThrowsArgumentException(float s { using (PathGradientBrush brush = new PathGradientBrush(_defaultFloatPoints)) { - AssertExtensions.Throws(null, () => brush.SetBlendTriangularShape(1f, scale)); + AssertExtensions.Throws("scale", null, () => brush.SetBlendTriangularShape(1f, scale)); } } @@ -672,7 +669,6 @@ public void InterpolationColors_NullColors_ThrowsNullReferenceException() } } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void InterpolationColors_NullPoints_ArgumentNullException() { @@ -712,7 +708,6 @@ public void InterpolationColors_PointsLengthGreaterThenColorsLength_ArgumentExce } } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void InterpolationColors_ColorsLengthGreaterThenPointsLength_ThrowsArgumentOutOfRangeException() { @@ -756,13 +751,12 @@ public void Transform_Disposed_ThrowsArgumentException() AssertExtensions.Throws(null, () => brush.Transform); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Transform_Null_ArgumentNullException() { using (PathGradientBrush brush = new PathGradientBrush(_defaultFloatPoints)) { - AssertExtensions.Throws("matrix", () => brush.Transform = null); + AssertExtensions.Throws("value", "matrix", () => brush.Transform = null); } } @@ -841,15 +835,31 @@ public void MultiplyTransform_Disposed_ThrowsArgumentException() } [ConditionalFact(Helpers.GdiplusIsAvailable)] - public void MultiplyTransform_Null_ArgumentNullException() + public void MultiplyTransform_NullMatrix_ThrowsArgumentNullException() { - using (PathGradientBrush brush = new PathGradientBrush(_defaultFloatPoints)) + using (var brush = new PathGradientBrush(_defaultFloatPoints)) { AssertExtensions.Throws("matrix", () => brush.MultiplyTransform(null)); AssertExtensions.Throws("matrix", () => brush.MultiplyTransform(null, MatrixOrder.Append)); } } + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MultiplyTransform_DisposedMatrix_Nop() + { + using (var brush = new PathGradientBrush(_defaultFloatPoints)) + using (Matrix transform = brush.Transform) + { + var matrix = new Matrix(); + matrix.Dispose(); + + brush.MultiplyTransform(matrix); + brush.MultiplyTransform(matrix, MatrixOrder.Append); + + Assert.Equal(transform, brush.Transform); + } + } + [ConditionalFact(Helpers.GdiplusIsAvailable)] public void MultiplyTransform_InvalidMatrixOrder_ArgumentException() { @@ -1059,7 +1069,6 @@ public void WrapMode_Disposed_ThrowsArgumentException() AssertExtensions.Throws(null, () => brush.WrapMode); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void WrapMode_Invalid_InvalidEnumArgumentException() { diff --git a/src/System.Drawing.Common/tests/Helpers.cs b/src/System.Drawing.Common/tests/Helpers.cs index e6dc987a81e7..d1c90912aed1 100644 --- a/src/System.Drawing.Common/tests/Helpers.cs +++ b/src/System.Drawing.Common/tests/Helpers.cs @@ -13,6 +13,8 @@ namespace System.Drawing public static class Helpers { public const string GdiplusIsAvailable = nameof(Helpers) + "." + nameof(GetGdiplusIsAvailable); + public const string RecentGdiplusIsAvailable = nameof(Helpers) + "." + nameof(GetRecentGdiPlusIsAvailable); + public const string GdiPlusIsAvailableNotRedhat73 = nameof(Helpers) + "." + nameof(GetGdiPlusIsAvailableNotRedhat73); public const string AnyInstalledPrinters = nameof(Helpers) + "." + nameof(IsAnyInstalledPrinters); public static bool GetGdiplusIsAvailable() @@ -23,16 +25,45 @@ public static bool GetGdiplusIsAvailable() } else { - IntPtr nativeLib = dlopen("libgdiplus.so", RTLD_NOW); - if (nativeLib == IntPtr.Zero) + IntPtr nativeLib; + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { - nativeLib = dlopen("libgdiplus.so.0", RTLD_NOW); + nativeLib = dlopen("libgdiplus.dylib", RTLD_NOW); + } + else + { + nativeLib = dlopen("libgdiplus.so", RTLD_NOW); + if (nativeLib == IntPtr.Zero) + { + nativeLib = dlopen("libgdiplus.so.0", RTLD_NOW); + } } return nativeLib != IntPtr.Zero; } } + public static bool GetGdiPlusIsAvailableNotRedhat73() + { + if (PlatformDetection.IsRedHat) + { + return false; + } + + return GetGdiplusIsAvailable(); + } + + public static bool GetRecentGdiPlusIsAvailable() + { + // CentOS 7, RHEL 7 and Ubuntu 14.04 are running outdated versions of libgdiplus + if (PlatformDetection.IsCentos7 || PlatformDetection.IsRedHat || PlatformDetection.IsUbuntu1404) + { + return false; + } + + return GetGdiplusIsAvailable(); + } + public static bool IsAnyInstalledPrinters() { return PrinterSettings.InstalledPrinters.Count > 0; diff --git a/src/System.Drawing.Common/tests/Imaging/MetafileTests.cs b/src/System.Drawing.Common/tests/Imaging/MetafileTests.cs index 919b90cb017c..25b22b798e67 100644 --- a/src/System.Drawing.Common/tests/Imaging/MetafileTests.cs +++ b/src/System.Drawing.Common/tests/Imaging/MetafileTests.cs @@ -37,7 +37,6 @@ public class MetafileTests private readonly Rectangle _rectangle = new Rectangle(0, 0, 64, 64); private readonly RectangleF _rectangleF = new RectangleF(0, 0, 64, 64); - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Ctor_IntPtrZero_ThrowsArgumentException() { @@ -64,21 +63,18 @@ public void Ctor_String_Success() } } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Ctor_Bitmap_ThrowsExternalException() { Assert.Throws(() => new Metafile(GetPath(BmpFile))); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Ctor_NullString_ThrowsArgumentNullException() { AssertExtensions.Throws("path", () => new Metafile((string)null)); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Ctor_InvalidPath_ThrowsExternalException() { @@ -112,7 +108,6 @@ public void Ctor_Stream_Success() } } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Ctor_NullStream_ThrowsArgumentException() { @@ -136,13 +131,13 @@ public static IEnumerable EmfType_TestData() yield return new object[] { EmfType.EmfPlusOnly }; } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalTheory(Helpers.GdiplusIsAvailable)] [MemberData(nameof(EmfType_TestData))] public void Ctor_IntPtrEmfType_Success(EmfType emfType) { - using (var bufferGraphics = Graphics.FromHwndInternal(IntPtr.Zero)) - using (var metafile = new Metafile(bufferGraphics.GetHdc(), emfType)) + using (Bitmap bmp = new Bitmap(10, 10, PixelFormat.Format32bppArgb)) + using (Graphics g = Graphics.FromImage(bmp)) + using (var metafile = new Metafile(g.GetHdc(), emfType)) { AssertMetafileIsBlank(metafile); AssertEmfType(metafile.GetMetafileHeader(), emfType); @@ -157,14 +152,14 @@ public static IEnumerable EmfType_Invalid_TestData() yield return new object[] { (EmfType)int.MinValue }; } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalTheory(Helpers.GdiplusIsAvailable)] [MemberData(nameof(EmfType_Invalid_TestData))] public void Ctor_IntPtrInvalidEmfType_ThrowsArgumentException(EmfType emfType) { - using (var bufferGraphics = Graphics.FromHwndInternal(IntPtr.Zero)) + using (Bitmap bmp = new Bitmap(10, 10, PixelFormat.Format32bppArgb)) + using (Graphics g = Graphics.FromImage(bmp)) { - AssertExtensions.Throws(null, () => new Metafile(bufferGraphics.GetHdc(), emfType)); + AssertExtensions.Throws(null, () => new Metafile(g.GetHdc(), emfType)); } } @@ -175,7 +170,6 @@ public void Ctor_NullEmfType_ThrowsArgumentException() AssertExtensions.Throws(null, () => new Metafile((IntPtr)null, EmfType.EmfOnly)); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Ctor_ZeroPointerEmfType_ThrowsArgumentException() { @@ -314,7 +308,6 @@ public void Ctor_IntPtrRectangleMetafileFrameUnitEmfTypeString_Success(string de } } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Ctor_IntPtrZeroI_ThrowsArgumentException() { @@ -396,14 +389,14 @@ public void Ctor_StringIntPtr_Success() File.Delete(fileName); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalTheory(Helpers.GdiplusIsAvailable)] [MemberData(nameof(EmfType_TestData))] public void Ctor_StringIntPtrEmfType_Success(EmfType emfType) { string fileName = GetPath("newTestImage.wmf"); - using (var bufferGraphics = Graphics.FromHwndInternal(IntPtr.Zero)) - using (var metafile = new Metafile(fileName, bufferGraphics.GetHdc(), emfType)) + using (Bitmap bmp = new Bitmap(10, 10, PixelFormat.Format32bppArgb)) + using (Graphics g = Graphics.FromImage(bmp)) + using (var metafile = new Metafile(fileName, g.GetHdc(), emfType)) { AssertMetafileIsBlank(metafile); AssertEmfType(metafile.GetMetafileHeader(), emfType); @@ -925,7 +918,6 @@ public void Ctor_NullStream_ThrowsNullReferenceException() } } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Static_GetMetafileHeader_String_ReturnsExpected() { @@ -933,7 +925,6 @@ public void Static_GetMetafileHeader_String_ReturnsExpected() AssertMetafileHeader(header); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Static_GetMetafileHeader_IntPtr_ThrowsArgumentException() { @@ -960,7 +951,6 @@ public void Static_GetMetafileHeader_NullString_ThrowsArgumentNullException() AssertExtensions.Throws("path", () => Metafile.GetMetafileHeader((string)null)); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Static_GetMetafileHeader_Stream_ReturnsExpected() { @@ -971,7 +961,6 @@ public void Static_GetMetafileHeader_Stream_ReturnsExpected() } } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Static_GetMetafileHeader_NullStream_ThrowsNullReferenceException() { @@ -988,7 +977,6 @@ public void Static_GetMetafileHeader_EmptyStream_ArgumentException() } } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void GetMetafileHeader_ReturnsExpected() { @@ -997,7 +985,7 @@ public void GetMetafileHeader_ReturnsExpected() MetafileHeader headerA = metafile.GetMetafileHeader(); MetafileHeader headerB = metafile.GetMetafileHeader(); AssertMetafileHeader(headerA); - Assert.False(ReferenceEquals(headerA, headerB)); + Assert.NotSame(headerA, headerB); } } @@ -1076,8 +1064,13 @@ private void AssertMetafileIsBlank(Metafile metafile) GraphicsUnit graphicsUnit = (GraphicsUnit)int.MaxValue; AssertMetafileHeaderIsBlank(metafile.GetMetafileHeader()); - Assert.Equal(new Rectangle(0, 0, 1, 1), metafile.GetBounds(ref graphicsUnit)); - Assert.Equal(GraphicsUnit.Pixel, graphicsUnit); + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + // This values are incorrect on libgdiplus. + Assert.Equal(new Rectangle(0, 0, 1, 1), metafile.GetBounds(ref graphicsUnit)); + Assert.Equal(GraphicsUnit.Pixel, graphicsUnit); + } } private void AssertMetafileHeaderIsBlank(MetafileHeader metafileHeader) diff --git a/src/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj b/src/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj index 2e3ba2b0688f..7a6dd0e5c980 100644 --- a/src/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj +++ b/src/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj @@ -31,6 +31,8 @@ + + @@ -74,19 +76,19 @@ - + %(RecursiveDir)%(Filename)%(Extension) - + System.Drawing.Tests.48x48_multiple_entries_4bit.ico - + System.Drawing.Tests.bitmap_173x183_indexed_8bit.bmp - + System.Drawing.Tests.empty.file - + System.Drawing.Tests.invalid.ico diff --git a/src/System.Drawing.Common/tests/TextureBrushTests.cs b/src/System.Drawing.Common/tests/TextureBrushTests.cs index bb93324f0d0a..02e3e4cc3916 100644 --- a/src/System.Drawing.Common/tests/TextureBrushTests.cs +++ b/src/System.Drawing.Common/tests/TextureBrushTests.cs @@ -294,7 +294,6 @@ public void Ctor_DisposedImage_ThrowsArgumentException() AssertExtensions.Throws(null, () => new TextureBrush(image, WrapMode.Tile, Rectangle.Empty)); } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalTheory(Helpers.GdiplusIsAvailable)] [InlineData(WrapMode.Tile - 1)] [InlineData(WrapMode.Clamp + 1)] @@ -431,7 +430,6 @@ public void MultiplyTransform_NotInvertibleMatrix_ThrowsArgumentException() } } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void MultiplyTransform_DisposedMatrix_Nop() { @@ -662,7 +660,6 @@ public void Transform_SetValid_GetReturnsExpected() } } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalFact(Helpers.GdiplusIsAvailable)] public void Transform_SetNull_ThrowsArgumentNullException() { @@ -786,7 +783,6 @@ public void WrapMode_SetValid_GetReturnsExpected(WrapMode wrapMode) } } - [ActiveIssue(20884, TestPlatforms.AnyUnix)] [ConditionalTheory(Helpers.GdiplusIsAvailable)] [InlineData(WrapMode.Tile - 1)] [InlineData(WrapMode.Clamp + 1)] diff --git a/src/System.Drawing.Common/tests/mono/System.Drawing/GraphicsTests.cs b/src/System.Drawing.Common/tests/mono/System.Drawing/GraphicsTests.cs new file mode 100644 index 000000000000..a87fb83b6b53 --- /dev/null +++ b/src/System.Drawing.Common/tests/mono/System.Drawing/GraphicsTests.cs @@ -0,0 +1,3251 @@ +// Licensed to the .NET Foundation under one or more agreements. +// See the LICENSE file in the project root for more information. +// +// Graphics class testing unit +// +// Authors: +// Jordi Mas, jordi@ximian.com +// Sebastien Pouliot +// +// Copyright (C) 2005-2008 Novell, Inc (http://www.novell.com) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Drawing.Imaging; +using System.Drawing.Text; +using Xunit; + +namespace MonoTests.System.Drawing +{ + public class GraphicsTest : IDisposable + { + private RectangleF[] rects; + private Font font; + + public GraphicsTest() + { + try + { + font = new Font("Arial", 12); + } + catch + { + } + } + + public void Dispose() + { + if (font != null) + font.Dispose(); + } + + private bool IsEmptyBitmap(Bitmap bitmap, out int x, out int y) + { + bool result = true; + int empty = Color.Empty.ToArgb(); + for (y = 0; y < bitmap.Height; y++) + { + for (x = 0; x < bitmap.Width; x++) + { + if (bitmap.GetPixel(x, y).ToArgb() != empty) + return false; + } + } + + x = -1; + y = -1; + return result; + } + + private void CheckForEmptyBitmap(Bitmap bitmap) + { + int x, y; + if (!IsEmptyBitmap(bitmap, out x, out y)) + Assert.True(false, String.Format("Position {0},{1}", x, y)); + } + + private void CheckForNonEmptyBitmap(Bitmap bitmap) + { + int x, y; + if (IsEmptyBitmap(bitmap, out x, out y)) + Assert.True(false); + } + + private void AssertEquals(string msg, object expected, object actual) + { + Assert.Equal(expected, actual); + } + + private void AssertEquals(string msg, double expected, double actual, int precision) + { + Assert.Equal(expected, actual, precision); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DefaultProperties() + { + using (Bitmap bmp = new Bitmap(200, 200)) + using (Graphics g = Graphics.FromImage(bmp)) + using (Region r = new Region()) + { + Assert.Equal(r.GetBounds(g), g.ClipBounds); + Assert.Equal(CompositingMode.SourceOver, g.CompositingMode); + Assert.Equal(CompositingQuality.Default, g.CompositingQuality); + Assert.Equal(InterpolationMode.Bilinear, g.InterpolationMode); + Assert.Equal(1, g.PageScale); + Assert.Equal(GraphicsUnit.Display, g.PageUnit); + Assert.Equal(PixelOffsetMode.Default, g.PixelOffsetMode); + Assert.Equal(new Point(0, 0), g.RenderingOrigin); + Assert.Equal(SmoothingMode.None, g.SmoothingMode); + Assert.Equal(TextRenderingHint.SystemDefault, g.TextRenderingHint); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void SetGetProperties() + { + using (Bitmap bmp = new Bitmap(200, 200)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.CompositingMode = CompositingMode.SourceCopy; + g.CompositingQuality = CompositingQuality.GammaCorrected; + g.InterpolationMode = InterpolationMode.HighQualityBilinear; + g.PageScale = 2; + g.PageUnit = GraphicsUnit.Inch; + g.PixelOffsetMode = PixelOffsetMode.Half; + g.RenderingOrigin = new Point(10, 20); + g.SmoothingMode = SmoothingMode.AntiAlias; + g.TextRenderingHint = TextRenderingHint.SystemDefault; + + //Clipping set/get tested in clipping functions + Assert.Equal(CompositingMode.SourceCopy, g.CompositingMode); + Assert.Equal(CompositingQuality.GammaCorrected, g.CompositingQuality); + Assert.Equal(InterpolationMode.HighQualityBilinear, g.InterpolationMode); + Assert.Equal(2, g.PageScale); + Assert.Equal(GraphicsUnit.Inch, g.PageUnit); + Assert.Equal(PixelOffsetMode.Half, g.PixelOffsetMode); + Assert.Equal(new Point(10, 20), g.RenderingOrigin); + Assert.Equal(SmoothingMode.AntiAlias, g.SmoothingMode); + Assert.Equal(TextRenderingHint.SystemDefault, g.TextRenderingHint); + } + } + + // Properties + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Clip() + { + RectangleF[] rects; + using (Bitmap bmp = new Bitmap(200, 200)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.Clip = new Region(new Rectangle(50, 40, 210, 220)); + rects = g.Clip.GetRegionScans(new Matrix()); + + Assert.Equal(1, rects.Length); + Assert.Equal(50, rects[0].X); + Assert.Equal(40, rects[0].Y); + Assert.Equal(210, rects[0].Width); + Assert.Equal(220, rects[0].Height); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Clip_NotAReference() + { + using (Bitmap bmp = new Bitmap(200, 200)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.True(g.Clip.IsInfinite(g)); + g.Clip.IsEmpty(g); + Assert.False(g.Clip.IsEmpty(g)); + Assert.True(g.Clip.IsInfinite(g)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void ExcludeClip() + { + using (Bitmap bmp = new Bitmap(200, 200)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.Clip = new Region(new RectangleF(10, 10, 100, 100)); + g.ExcludeClip(new Rectangle(40, 60, 100, 20)); + rects = g.Clip.GetRegionScans(new Matrix()); + + Assert.Equal(3, rects.Length); + + Assert.Equal(10, rects[0].X); + Assert.Equal(10, rects[0].Y); + Assert.Equal(100, rects[0].Width); + Assert.Equal(50, rects[0].Height); + + Assert.Equal(10, rects[1].X); + Assert.Equal(60, rects[1].Y); + Assert.Equal(30, rects[1].Width); + Assert.Equal(20, rects[1].Height); + + Assert.Equal(10, rects[2].X); + Assert.Equal(80, rects[2].Y); + Assert.Equal(100, rects[2].Width); + Assert.Equal(30, rects[2].Height); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void IntersectClip() + { + using (Bitmap bmp = new Bitmap(200, 200)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.Clip = new Region(new RectangleF(260, 30, 60, 80)); + g.IntersectClip(new Rectangle(290, 40, 60, 80)); + rects = g.Clip.GetRegionScans(new Matrix()); + + Assert.Equal(1, rects.Length); + + Assert.Equal(290, rects[0].X); + Assert.Equal(40, rects[0].Y); + Assert.Equal(30, rects[0].Width); + Assert.Equal(70, rects[0].Height); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void ResetClip() + { + using (Bitmap bmp = new Bitmap(200, 200)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.Clip = new Region(new RectangleF(260, 30, 60, 80)); + g.IntersectClip(new Rectangle(290, 40, 60, 80)); + g.ResetClip(); + rects = g.Clip.GetRegionScans(new Matrix()); + + Assert.Equal(1, rects.Length); + + Assert.Equal(-4194304, rects[0].X); + Assert.Equal(-4194304, rects[0].Y); + Assert.Equal(8388608, rects[0].Width); + Assert.Equal(8388608, rects[0].Height); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void SetClip() + { + RectangleF[] rects; + using (Bitmap bmp = new Bitmap(200, 200)) + { + Graphics g = Graphics.FromImage(bmp); + // Region + g.SetClip(new Region(new Rectangle(50, 40, 210, 220)), CombineMode.Replace); + rects = g.Clip.GetRegionScans(new Matrix()); + Assert.Equal(1, rects.Length); + Assert.Equal(50, rects[0].X); + Assert.Equal(40, rects[0].Y); + Assert.Equal(210, rects[0].Width); + Assert.Equal(220, rects[0].Height); + g.Dispose(); + + // RectangleF + g = Graphics.FromImage(bmp); + g.SetClip(new RectangleF(50, 40, 210, 220)); + rects = g.Clip.GetRegionScans(new Matrix()); + Assert.Equal(1, rects.Length); + Assert.Equal(50, rects[0].X); + Assert.Equal(40, rects[0].Y); + Assert.Equal(210, rects[0].Width); + Assert.Equal(220, rects[0].Height); + g.Dispose(); + + // Rectangle + g = Graphics.FromImage(bmp); + g.SetClip(new Rectangle(50, 40, 210, 220)); + rects = g.Clip.GetRegionScans(new Matrix()); + Assert.Equal(1, rects.Length); + Assert.Equal(50, rects[0].X); + Assert.Equal(40, rects[0].Y); + Assert.Equal(210, rects[0].Width); + Assert.Equal(220, rects[0].Height); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void SetSaveReset() + { + using (Bitmap bmp = new Bitmap(200, 200)) + using (Graphics g = Graphics.FromImage(bmp)) + { + GraphicsState state_default, state_modified; + + state_default = g.Save(); // Default + + g.CompositingMode = CompositingMode.SourceCopy; + g.CompositingQuality = CompositingQuality.GammaCorrected; + g.InterpolationMode = InterpolationMode.HighQualityBilinear; + g.PageScale = 2; + g.PageUnit = GraphicsUnit.Inch; + g.PixelOffsetMode = PixelOffsetMode.Half; + g.Clip = new Region(new Rectangle(0, 0, 100, 100)); + g.RenderingOrigin = new Point(10, 20); + g.SmoothingMode = SmoothingMode.AntiAlias; + g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; + + + state_modified = g.Save(); // Modified + + g.CompositingMode = CompositingMode.SourceOver; + g.CompositingQuality = CompositingQuality.Default; + g.InterpolationMode = InterpolationMode.Bilinear; + g.PageScale = 5; + g.PageUnit = GraphicsUnit.Display; + g.PixelOffsetMode = PixelOffsetMode.Default; + g.Clip = new Region(new Rectangle(1, 2, 20, 25)); + g.RenderingOrigin = new Point(5, 6); + g.SmoothingMode = SmoothingMode.None; + g.TextRenderingHint = TextRenderingHint.SystemDefault; + + g.Restore(state_modified); + + Assert.Equal(CompositingMode.SourceCopy, g.CompositingMode); + Assert.Equal(CompositingQuality.GammaCorrected, g.CompositingQuality); + Assert.Equal(InterpolationMode.HighQualityBilinear, g.InterpolationMode); + Assert.Equal(2, g.PageScale); + Assert.Equal(GraphicsUnit.Inch, g.PageUnit); + Assert.Equal(PixelOffsetMode.Half, g.PixelOffsetMode); + Assert.Equal(new Point(10, 20), g.RenderingOrigin); + Assert.Equal(SmoothingMode.AntiAlias, g.SmoothingMode); + Assert.Equal(TextRenderingHint.ClearTypeGridFit, g.TextRenderingHint); + Assert.Equal(0, (int)g.ClipBounds.X); + Assert.Equal(0, (int)g.ClipBounds.Y); + + g.Restore(state_default); + + Assert.Equal(CompositingMode.SourceOver, g.CompositingMode); + Assert.Equal(CompositingQuality.Default, g.CompositingQuality); + Assert.Equal(InterpolationMode.Bilinear, g.InterpolationMode); + Assert.Equal(1, g.PageScale); + Assert.Equal(GraphicsUnit.Display, g.PageUnit); + Assert.Equal(PixelOffsetMode.Default, g.PixelOffsetMode); + Assert.Equal(new Point(0, 0), g.RenderingOrigin); + Assert.Equal(SmoothingMode.None, g.SmoothingMode); + Assert.Equal(TextRenderingHint.SystemDefault, g.TextRenderingHint); + + Region r = new Region(); + Assert.Equal(r.GetBounds(g), g.ClipBounds); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void LoadIndexed_BmpFile() + { + // Tests that we can load an indexed file, but... + string sInFile = Helpers.GetTestBitmapPath("almogaver1bit.bmp"); + // note: file is misnamed (it's a 4bpp bitmap) + using (Image img = Image.FromFile(sInFile)) + { + Assert.Equal(PixelFormat.Format4bppIndexed, img.PixelFormat); + Assert.Throws(() => Graphics.FromImage(img)); + } + } + + class BitmapAndGraphics : IDisposable + { + private readonly Bitmap _bitmap; + public Graphics Graphics { get; } + public BitmapAndGraphics(int width, int height) + { + _bitmap = new Bitmap(width, height); + Graphics = Graphics.FromImage(_bitmap); + Graphics.Clip = new Region(new Rectangle(0, 0, width, height)); + } + public void Dispose() { Graphics.Dispose(); _bitmap.Dispose(); } + } + + private void Compare(string msg, RectangleF b1, RectangleF b2) + { + AssertEquals(msg + ".compare.X", b1.X, b2.X); + AssertEquals(msg + ".compare.Y", b1.Y, b2.Y); + AssertEquals(msg + ".compare.Width", b1.Width, b2.Width); + AssertEquals(msg + ".compare.Height", b1.Height, b2.Height); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Clip_GetBounds() + { + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + RectangleF bounds = g.Clip.GetBounds(g); + Assert.Equal(0, bounds.X); + Assert.Equal(0, bounds.Y); + Assert.Equal(16, bounds.Width); + Assert.Equal(16, bounds.Height); + Assert.True(g.Transform.IsIdentity); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Clip_TranslateTransform() + { + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + g.TranslateTransform(12.22f, 10.10f); + RectangleF bounds = g.Clip.GetBounds(g); + Compare("translate", bounds, g.ClipBounds); + Assert.Equal(-12.2200003f, bounds.X); + Assert.Equal(-10.1000004f, bounds.Y); + Assert.Equal(16, bounds.Width); + Assert.Equal(16, bounds.Height); + float[] elements = g.Transform.Elements; + Assert.Equal(1, elements[0]); + Assert.Equal(0, elements[1]); + Assert.Equal(0, elements[2]); + Assert.Equal(1, elements[3]); + Assert.Equal(12.2200003f, elements[4]); + Assert.Equal(10.1000004f, elements[5]); + + g.ResetTransform(); + bounds = g.Clip.GetBounds(g); + Compare("reset", bounds, g.ClipBounds); + Assert.Equal(0, bounds.X); + Assert.Equal(0, bounds.Y); + Assert.Equal(16, bounds.Width); + Assert.Equal(16, bounds.Height); + Assert.True(g.Transform.IsIdentity); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Transform_NonInvertibleMatrix() + { + Matrix matrix = new Matrix(123, 24, 82, 16, 47, 30); + Assert.False(matrix.IsInvertible); + + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + Assert.Throws(() => g.Transform = matrix); + } + } + + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Multiply_NonInvertibleMatrix() + { + Matrix matrix = new Matrix(123, 24, 82, 16, 47, 30); + Assert.False(matrix.IsInvertible); + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + Assert.Throws(() => g.MultiplyTransform(matrix)); + } + } + + private void CheckBounds(string msg, RectangleF bounds, float x, float y, float w, float h) + { + AssertEquals(msg + ".X", x, bounds.X, 1); + AssertEquals(msg + ".Y", y, bounds.Y, 1); + AssertEquals(msg + ".Width", w, bounds.Width, 1); + AssertEquals(msg + ".Height", h, bounds.Height, 1); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void ClipBounds() + { + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + CheckBounds("graphics.ClipBounds", g.ClipBounds, 0, 0, 16, 16); + CheckBounds("graphics.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 16, 16); + + g.Clip = new Region(new Rectangle(0, 0, 8, 8)); + CheckBounds("clip.ClipBounds", g.ClipBounds, 0, 0, 8, 8); + CheckBounds("clip.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 8, 8); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void ClipBounds_Rotate() + { + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + g.Clip = new Region(new Rectangle(0, 0, 8, 8)); + g.RotateTransform(90); + CheckBounds("rotate.ClipBounds", g.ClipBounds, 0, -8, 8, 8); + CheckBounds("rotate.Clip.GetBounds", g.Clip.GetBounds(g), 0, -8, 8, 8); + + g.Transform = new Matrix(); + CheckBounds("identity.ClipBounds", g.Clip.GetBounds(g), 0, 0, 8, 8); + CheckBounds("identity.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 8, 8); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void ClipBounds_Scale() + { + RectangleF clip = new Rectangle(0, 0, 8, 8); + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + g.Clip = new Region(clip); + g.ScaleTransform(0.25f, 0.5f); + CheckBounds("scale.ClipBounds", g.ClipBounds, 0, 0, 32, 16); + CheckBounds("scale.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 32, 16); + + g.SetClip(clip); + CheckBounds("setclip.ClipBounds", g.ClipBounds, 0, 0, 8, 8); + CheckBounds("setclip.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 8, 8); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void ClipBounds_Translate() + { + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + g.Clip = new Region(new Rectangle(0, 0, 8, 8)); + Region clone = g.Clip.Clone(); + g.TranslateTransform(8, 8); + CheckBounds("translate.ClipBounds", g.ClipBounds, -8, -8, 8, 8); + CheckBounds("translate.Clip.GetBounds", g.Clip.GetBounds(g), -8, -8, 8, 8); + + g.SetClip(clone, CombineMode.Replace); + CheckBounds("setclip.ClipBounds", g.Clip.GetBounds(g), 0, 0, 8, 8); + CheckBounds("setclip.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 8, 8); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void ClipBounds_Transform_Translation() + { + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + g.Clip = new Region(new Rectangle(0, 0, 8, 8)); + g.Transform = new Matrix(1, 0, 0, 1, 8, 8); + CheckBounds("transform.ClipBounds", g.ClipBounds, -8, -8, 8, 8); + CheckBounds("transform.Clip.GetBounds", g.Clip.GetBounds(g), -8, -8, 8, 8); + + g.ResetTransform(); + CheckBounds("reset.ClipBounds", g.ClipBounds, 0, 0, 8, 8); + CheckBounds("reset.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 8, 8); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void ClipBounds_Transform_Scale() + { + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + g.Clip = new Region(new Rectangle(0, 0, 8, 8)); + g.Transform = new Matrix(0.5f, 0, 0, 0.25f, 0, 0); + CheckBounds("scale.ClipBounds", g.ClipBounds, 0, 0, 16, 32); + CheckBounds("scale.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 16, 32); + + g.ResetClip(); + // see next test for ClipBounds + CheckBounds("resetclip.Clip.GetBounds", g.Clip.GetBounds(g), -4194304, -4194304, 8388608, 8388608); + Assert.True(g.Clip.IsInfinite(g)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void ClipBounds_Multiply() + { + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + g.Clip = new Region(new Rectangle(0, 0, 8, 8)); + g.Transform = new Matrix(1, 0, 0, 1, 8, 8); + g.MultiplyTransform(g.Transform); + CheckBounds("multiply.ClipBounds", g.ClipBounds, -16, -16, 8, 8); + CheckBounds("multiply.Clip.GetBounds", g.Clip.GetBounds(g), -16, -16, 8, 8); + + g.ResetTransform(); + CheckBounds("reset.ClipBounds", g.ClipBounds, 0, 0, 8, 8); + CheckBounds("reset.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 8, 8); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void ClipBounds_Cumulative_Effects() + { + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + CheckBounds("graphics.ClipBounds", g.ClipBounds, 0, 0, 16, 16); + CheckBounds("graphics.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 16, 16); + + g.Clip = new Region(new Rectangle(0, 0, 8, 8)); + CheckBounds("clip.ClipBounds", g.ClipBounds, 0, 0, 8, 8); + CheckBounds("clip.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 8, 8); + + g.RotateTransform(90); + CheckBounds("rotate.ClipBounds", g.ClipBounds, 0, -8, 8, 8); + CheckBounds("rotate.Clip.GetBounds", g.Clip.GetBounds(g), 0, -8, 8, 8); + + g.ScaleTransform(0.25f, 0.5f); + CheckBounds("scale.ClipBounds", g.ClipBounds, 0, -16, 32, 16); + CheckBounds("scale.Clip.GetBounds", g.Clip.GetBounds(g), 0, -16, 32, 16); + + g.TranslateTransform(8, 8); + CheckBounds("translate.ClipBounds", g.ClipBounds, -8, -24, 32, 16); + CheckBounds("translate.Clip.GetBounds", g.Clip.GetBounds(g), -8, -24, 32, 16); + + g.MultiplyTransform(g.Transform); + CheckBounds("multiply.ClipBounds", g.ClipBounds, -104, -56, 64, 64); + CheckBounds("multiply.Clip.GetBounds", g.Clip.GetBounds(g), -104, -56, 64, 64); + + g.ResetTransform(); + CheckBounds("reset.ClipBounds", g.ClipBounds, 0, 0, 8, 8); + CheckBounds("reset.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 8, 8); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Clip_TranslateTransform_BoundsChange() + { + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + CheckBounds("graphics.ClipBounds", g.ClipBounds, 0, 0, 16, 16); + CheckBounds("graphics.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 16, 16); + g.TranslateTransform(-16, -16); + CheckBounds("translated.ClipBounds", g.ClipBounds, 16, 16, 16, 16); + CheckBounds("translated.Clip.GetBounds", g.Clip.GetBounds(g), 16, 16, 16, 16); + + g.Clip = new Region(new Rectangle(0, 0, 8, 8)); + // ClipBounds isn't affected by a previous translation + CheckBounds("rectangle.ClipBounds", g.ClipBounds, 0, 0, 8, 8); + // Clip.GetBounds isn't affected by a previous translation + CheckBounds("rectangle.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 8, 8); + + g.ResetTransform(); + CheckBounds("reseted.ClipBounds", g.ClipBounds, -16, -16, 8, 8); + CheckBounds("reseted.Clip.GetBounds", g.Clip.GetBounds(g), -16, -16, 8, 8); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Clip_RotateTransform_BoundsChange() + { + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + CheckBounds("graphics.ClipBounds", g.ClipBounds, 0, 0, 16, 16); + CheckBounds("graphics.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 16, 16); + // we select a "simple" angle because the region will be converted into + // a bitmap (well for libgdiplus) and we would lose precision after that + g.RotateTransform(90); + CheckBounds("rotated.ClipBounds", g.ClipBounds, 0, -16, 16, 16); + CheckBounds("rotated.Clip.GetBounds", g.Clip.GetBounds(g), 0, -16, 16, 16); + g.Clip = new Region(new Rectangle(0, 0, 8, 8)); + // ClipBounds isn't affected by a previous rotation (90) + CheckBounds("rectangle.ClipBounds", g.ClipBounds, 0, 0, 8, 8); + // Clip.GetBounds isn't affected by a previous rotation + CheckBounds("rectangle.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 8, 8); + + g.ResetTransform(); + CheckBounds("reseted.ClipBounds", g.ClipBounds, -8, 0, 8, 8); + CheckBounds("reseted.Clip.GetBounds", g.Clip.GetBounds(g), -8, 0, 8, 8); + } + } + + private void CheckBoundsInt(string msg, RectangleF bounds, int x, int y, int w, int h) + { + // currently bounds are rounded at 8 pixels (FIXME - we can go down to 1 pixel) + AssertEquals(msg + ".X", x, bounds.X, -1); + AssertEquals(msg + ".Y", y, bounds.Y, -1); + AssertEquals(msg + ".Width", w, bounds.Width, -1); + AssertEquals(msg + ".Height", h, bounds.Height, -1); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Clip_ScaleTransform_NoBoundsChange() + { + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + CheckBounds("graphics.ClipBounds", g.ClipBounds, 0, 0, 16, 16); + CheckBounds("graphics.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 16, 16); + g.ScaleTransform(2, 0.5f); + CheckBounds("scaled.ClipBounds", g.ClipBounds, 0, 0, 8, 32); + CheckBounds("scaled.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 8, 32); + g.Clip = new Region(new Rectangle(0, 0, 8, 8)); + // ClipBounds isn't affected by a previous scaling + CheckBounds("rectangle.ClipBounds", g.ClipBounds, 0, 0, 8, 8); + // Clip.GetBounds isn't affected by a previous scaling + CheckBounds("rectangle.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 8, 8); + + g.ResetTransform(); + CheckBounds("reseted.ClipBounds", g.ClipBounds, 0, 0, 16, 4); + CheckBounds("reseted.Clip.GetBounds", g.Clip.GetBounds(g), 0, 0, 16, 4); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void ScaleTransform_X0() + { + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + Assert.Throws(() => g.ScaleTransform(0, 1)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void ScaleTransform_Y0() + { + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + Assert.Throws(() => g.ScaleTransform(1, 0)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void TranslateTransform_Order() + { + using (var b = new BitmapAndGraphics(16, 16)) + { + var g = b.Graphics; + g.Transform = new Matrix(1, 2, 3, 4, 5, 6); + g.TranslateTransform(3, -3); + float[] elements = g.Transform.Elements; + Assert.Equal(1, elements[0]); + Assert.Equal(2, elements[1]); + Assert.Equal(3, elements[2]); + Assert.Equal(4, elements[3]); + Assert.Equal(-1, elements[4]); + Assert.Equal(0, elements[5]); + + g.Transform = new Matrix(1, 2, 3, 4, 5, 6); + g.TranslateTransform(3, -3, MatrixOrder.Prepend); + elements = g.Transform.Elements; + Assert.Equal(1, elements[0]); + Assert.Equal(2, elements[1]); + Assert.Equal(3, elements[2]); + Assert.Equal(4, elements[3]); + Assert.Equal(-1, elements[4]); + Assert.Equal(0, elements[5]); + + g.Transform = new Matrix(1, 2, 3, 4, 5, 6); + g.TranslateTransform(3, -3, MatrixOrder.Append); + elements = g.Transform.Elements; + Assert.Equal(1, elements[0]); + Assert.Equal(2, elements[1]); + Assert.Equal(3, elements[2]); + Assert.Equal(4, elements[3]); + Assert.Equal(8, elements[4]); + Assert.Equal(3, elements[5]); + } + } + + static Point[] SmallCurve = new Point[3] { new Point(0, 0), new Point(15, 5), new Point(5, 15) }; + static PointF[] SmallCurveF = new PointF[3] { new PointF(0, 0), new PointF(15, 5), new PointF(5, 15) }; + + static Point[] TooSmallCurve = new Point[2] { new Point(0, 0), new Point(15, 5) }; + static PointF[] LargeCurveF = new PointF[4] { new PointF(0, 0), new PointF(15, 5), new PointF(5, 15), new PointF(0, 20) }; + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawCurve_NotEnoughPoints() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + CheckForEmptyBitmap(bitmap); + g.DrawCurve(Pens.Black, TooSmallCurve, 0.5f); + CheckForNonEmptyBitmap(bitmap); + // so a "curve" can be drawn with less than 3 points! + // actually I used to call that a line... (and it's not related to tension) + g.Dispose(); + bitmap.Dispose(); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawCurve_SinglePoint() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Assert.Throws(() => g.DrawCurve(Pens.Black, new Point[1] { new Point(10, 10) }, 0.5f)); + // a single point isn't enough + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawCurve3_NotEnoughPoints() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Assert.Throws(() => g.DrawCurve(Pens.Black, TooSmallCurve, 0, 2, 0.5f)); + // aha, this is API dependent + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawCurve_NegativeTension() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + // documented as bigger (or equals) to 0 + g.DrawCurve(Pens.Black, SmallCurveF, -0.9f); + CheckForNonEmptyBitmap(bitmap); + g.Dispose(); + bitmap.Dispose(); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawCurve_PositiveTension() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + g.DrawCurve(Pens.Black, SmallCurveF, 0.9f); + // this is not the same as -1 + CheckForNonEmptyBitmap(bitmap); + g.Dispose(); + bitmap.Dispose(); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawCurve_ZeroSegments() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Assert.Throws(() => g.DrawCurve(Pens.Black, SmallCurveF, 0, 0)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawCurve_NegativeSegments() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Assert.Throws(() => g.DrawCurve(Pens.Black, SmallCurveF, 0, -1)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawCurve_OffsetTooLarge() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + // starting offset 1 doesn't give 3 points to make a curve + Assert.Throws(() => g.DrawCurve(Pens.Black, SmallCurveF, 1, 2)); + // and in this case 2 points aren't enough to draw something + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawCurve_Offset_0() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + g.DrawCurve(Pens.Black, LargeCurveF, 0, 2, 0.5f); + CheckForNonEmptyBitmap(bitmap); + g.Dispose(); + bitmap.Dispose(); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawCurve_Offset_1() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + g.DrawCurve(Pens.Black, LargeCurveF, 1, 2, 0.5f); + CheckForNonEmptyBitmap(bitmap); + g.Dispose(); + bitmap.Dispose(); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawCurve_Offset_2() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + // it works even with two points because we know the previous ones + g.DrawCurve(Pens.Black, LargeCurveF, 2, 1, 0.5f); + CheckForNonEmptyBitmap(bitmap); + g.Dispose(); + bitmap.Dispose(); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawRectangle_Negative() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + using (Pen pen = new Pen(Color.Red)) + { + g.DrawRectangle(pen, 5, 5, -10, -10); + g.DrawRectangle(pen, 0.0f, 0.0f, 5.0f, -10.0f); + g.DrawRectangle(pen, new Rectangle(15, 0, -10, 5)); + CheckForEmptyBitmap(bitmap); + pen.Dispose(); + g.Dispose(); + bitmap.Dispose(); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawRectangles_Negative() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + using (Pen pen = new Pen(Color.Red)) + { + Rectangle[] rects = new Rectangle[2] + { + new Rectangle (5, 5, -10, -10), + new Rectangle (0, 0, 5, -10) + }; + RectangleF[] rectf = new RectangleF[2] + { + new RectangleF (0.0f, 5.0f, -10.0f, -10.0f), + new RectangleF (15.0f, 0.0f, -10.0f, 5.0f) + }; + g.DrawRectangles(pen, rects); + g.DrawRectangles(pen, rectf); + CheckForEmptyBitmap(bitmap); + pen.Dispose(); + g.Dispose(); + bitmap.Dispose(); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void FillRectangle_Negative() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + using (SolidBrush brush = new SolidBrush(Color.Red)) + { + g.FillRectangle(brush, 5, 5, -10, -10); + g.FillRectangle(brush, 0.0f, 0.0f, 5.0f, -10.0f); + g.FillRectangle(brush, new Rectangle(15, 0, -10, 5)); + CheckForEmptyBitmap(bitmap); + brush.Dispose(); + g.Dispose(); + bitmap.Dispose(); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void FillRectangles_Negative() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + using (SolidBrush brush = new SolidBrush(Color.Red)) + { + Rectangle[] rects = new Rectangle[2] + { + new Rectangle (5, 5, -10, -10), + new Rectangle (0, 0, 5, -10) + }; + + RectangleF[] rectf = new RectangleF[2] + { + new RectangleF (0.0f, 5.0f, -10.0f, -10.0f), + new RectangleF (15.0f, 0.0f, -10.0f, 5.0f) + }; + + g.FillRectangles(brush, rects); + g.FillRectangles(brush, rectf); + CheckForEmptyBitmap(bitmap); + brush.Dispose(); + g.Dispose(); + bitmap.Dispose(); + } + } + + private void CheckDefaultProperties(string message, Graphics g) + { + Assert.True(g.Clip.IsInfinite(g), message + ".Clip.IsInfinite"); + AssertEquals(message + ".CompositingMode", CompositingMode.SourceOver, g.CompositingMode); + AssertEquals(message + ".CompositingQuality", CompositingQuality.Default, g.CompositingQuality); + AssertEquals(message + ".InterpolationMode", InterpolationMode.Bilinear, g.InterpolationMode); + AssertEquals(message + ".PageScale", 1.0f, g.PageScale); + AssertEquals(message + ".PageUnit", GraphicsUnit.Display, g.PageUnit); + AssertEquals(message + ".PixelOffsetMode", PixelOffsetMode.Default, g.PixelOffsetMode); + AssertEquals(message + ".SmoothingMode", SmoothingMode.None, g.SmoothingMode); + AssertEquals(message + ".TextContrast", 4, g.TextContrast); + AssertEquals(message + ".TextRenderingHint", TextRenderingHint.SystemDefault, g.TextRenderingHint); + Assert.True(g.Transform.IsIdentity, message + ".Transform.IsIdentity"); + } + + private void CheckCustomProperties(string message, Graphics g) + { + Assert.False(g.Clip.IsInfinite(g), message + ".Clip.IsInfinite"); + AssertEquals(message + ".CompositingMode", CompositingMode.SourceCopy, g.CompositingMode); + AssertEquals(message + ".CompositingQuality", CompositingQuality.HighQuality, g.CompositingQuality); + AssertEquals(message + ".InterpolationMode", InterpolationMode.HighQualityBicubic, g.InterpolationMode); + AssertEquals(message + ".PageScale", 0.5f, g.PageScale); + AssertEquals(message + ".PageUnit", GraphicsUnit.Inch, g.PageUnit); + AssertEquals(message + ".PixelOffsetMode", PixelOffsetMode.Half, g.PixelOffsetMode); + AssertEquals(message + ".RenderingOrigin", new Point(-1, -1), g.RenderingOrigin); + AssertEquals(message + ".SmoothingMode", SmoothingMode.AntiAlias, g.SmoothingMode); + AssertEquals(message + ".TextContrast", 0, g.TextContrast); + AssertEquals(message + ".TextRenderingHint", TextRenderingHint.AntiAlias, g.TextRenderingHint); + Assert.False(g.Transform.IsIdentity, message + ".Transform.IsIdentity"); + } + + private void CheckMatrix(string message, Matrix m, float xx, float yx, float xy, float yy, float x0, float y0) + { + float[] elements = m.Elements; + AssertEquals(message + ".Matrix.xx", xx, elements[0], 2); + AssertEquals(message + ".Matrix.yx", yx, elements[1], 2); + AssertEquals(message + ".Matrix.xy", xy, elements[2], 2); + AssertEquals(message + ".Matrix.yy", yy, elements[3], 2); + AssertEquals(message + ".Matrix.x0", x0, elements[4], 2); + AssertEquals(message + ".Matrix.y0", y0, elements[5], 2); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void BeginContainer() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + + CheckDefaultProperties("default", g); + Assert.Equal(new Point(0, 0), g.RenderingOrigin); + + g.Clip = new Region(new Rectangle(10, 10, 10, 10)); + g.CompositingMode = CompositingMode.SourceCopy; + g.CompositingQuality = CompositingQuality.HighQuality; + g.InterpolationMode = InterpolationMode.HighQualityBicubic; + g.PageScale = 0.5f; + g.PageUnit = GraphicsUnit.Inch; + g.PixelOffsetMode = PixelOffsetMode.Half; + g.RenderingOrigin = new Point(-1, -1); + g.RotateTransform(45); + g.SmoothingMode = SmoothingMode.AntiAlias; + g.TextContrast = 0; + g.TextRenderingHint = TextRenderingHint.AntiAlias; + CheckCustomProperties("modified", g); + CheckMatrix("modified.Transform", g.Transform, 0.707f, 0.707f, -0.707f, 0.707f, 0, 0); + + GraphicsContainer gc = g.BeginContainer(); + // things gets reseted after calling BeginContainer + CheckDefaultProperties("BeginContainer", g); + // but not everything + Assert.Equal(new Point(-1, -1), g.RenderingOrigin); + + g.EndContainer(gc); + CheckCustomProperties("EndContainer", g); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void BeginContainer_Rect() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + CheckDefaultProperties("default", g); + Assert.Equal(new Point(0, 0), g.RenderingOrigin); + + g.Clip = new Region(new Rectangle(10, 10, 10, 10)); + g.CompositingMode = CompositingMode.SourceCopy; + g.CompositingQuality = CompositingQuality.HighQuality; + g.InterpolationMode = InterpolationMode.HighQualityBicubic; + g.PageScale = 0.5f; + g.PageUnit = GraphicsUnit.Inch; + g.PixelOffsetMode = PixelOffsetMode.Half; + g.RenderingOrigin = new Point(-1, -1); + g.RotateTransform(45); + g.SmoothingMode = SmoothingMode.AntiAlias; + g.TextContrast = 0; + g.TextRenderingHint = TextRenderingHint.AntiAlias; + CheckCustomProperties("modified", g); + CheckMatrix("modified.Transform", g.Transform, 0.707f, 0.707f, -0.707f, 0.707f, 0, 0); + + GraphicsContainer gc = g.BeginContainer(new Rectangle(10, 20, 30, 40), new Rectangle(10, 20, 300, 400), GraphicsUnit.Millimeter); + // things gets reseted after calling BeginContainer + CheckDefaultProperties("BeginContainer", g); + // but not everything + Assert.Equal(new Point(-1, -1), g.RenderingOrigin); + + g.EndContainer(gc); + CheckCustomProperties("EndContainer", g); + CheckMatrix("EndContainer.Transform", g.Transform, 0.707f, 0.707f, -0.707f, 0.707f, 0, 0); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void BeginContainer_RectF() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + CheckDefaultProperties("default", g); + Assert.Equal(new Point(0, 0), g.RenderingOrigin); + + g.Clip = new Region(new Rectangle(10, 10, 10, 10)); + g.CompositingMode = CompositingMode.SourceCopy; + g.CompositingQuality = CompositingQuality.HighQuality; + g.InterpolationMode = InterpolationMode.HighQualityBicubic; + g.PageScale = 0.5f; + g.PageUnit = GraphicsUnit.Inch; + g.PixelOffsetMode = PixelOffsetMode.Half; + g.RenderingOrigin = new Point(-1, -1); + g.RotateTransform(45); + g.SmoothingMode = SmoothingMode.AntiAlias; + g.TextContrast = 0; + g.TextRenderingHint = TextRenderingHint.AntiAlias; + CheckCustomProperties("modified", g); + CheckMatrix("modified.Transform", g.Transform, 0.707f, 0.707f, -0.707f, 0.707f, 0, 0); + + GraphicsContainer gc = g.BeginContainer(new RectangleF(40, 30, 20, 10), new RectangleF(10, 20, 30, 40), GraphicsUnit.Inch); + // things gets reseted after calling BeginContainer + CheckDefaultProperties("BeginContainer", g); + // but not everything + Assert.Equal(new Point(-1, -1), g.RenderingOrigin); + + g.EndContainer(gc); + CheckCustomProperties("EndContainer", g); + } + } + + private void BeginContainer_GraphicsUnit(GraphicsUnit unit) + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + g.BeginContainer(new RectangleF(40, 30, 20, 10), new RectangleF(10, 20, 30, 40), unit); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void BeginContainer_GraphicsUnit_Display() + { + Assert.Throws(() => BeginContainer_GraphicsUnit(GraphicsUnit.Display)); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void BeginContainer_GraphicsUnit_Valid() + { + BeginContainer_GraphicsUnit(GraphicsUnit.Document); + BeginContainer_GraphicsUnit(GraphicsUnit.Inch); + BeginContainer_GraphicsUnit(GraphicsUnit.Millimeter); + BeginContainer_GraphicsUnit(GraphicsUnit.Pixel); + BeginContainer_GraphicsUnit(GraphicsUnit.Point); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void BeginContainer_GraphicsUnit_World() + { + Assert.Throws(() => BeginContainer_GraphicsUnit(GraphicsUnit.World)); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void BeginContainer_GraphicsUnit_Bad() + { + Assert.Throws(() => BeginContainer_GraphicsUnit((GraphicsUnit)Int32.MinValue)); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void EndContainer_Null() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Assert.Throws(() => g.EndContainer(null)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Save() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + CheckDefaultProperties("default", g); + Assert.Equal(new Point(0, 0), g.RenderingOrigin); + + GraphicsState gs1 = g.Save(); + // nothing is changed after a save + CheckDefaultProperties("save1", g); + Assert.Equal(new Point(0, 0), g.RenderingOrigin); + + g.Clip = new Region(new Rectangle(10, 10, 10, 10)); + g.CompositingMode = CompositingMode.SourceCopy; + g.CompositingQuality = CompositingQuality.HighQuality; + g.InterpolationMode = InterpolationMode.HighQualityBicubic; + g.PageScale = 0.5f; + g.PageUnit = GraphicsUnit.Inch; + g.PixelOffsetMode = PixelOffsetMode.Half; + g.RenderingOrigin = new Point(-1, -1); + g.RotateTransform(45); + g.SmoothingMode = SmoothingMode.AntiAlias; + g.TextContrast = 0; + g.TextRenderingHint = TextRenderingHint.AntiAlias; + CheckCustomProperties("modified", g); + CheckMatrix("modified.Transform", g.Transform, 0.707f, 0.707f, -0.707f, 0.707f, 0, 0); + + GraphicsState gs2 = g.Save(); + CheckCustomProperties("save2", g); + + g.Restore(gs2); + CheckCustomProperties("restored1", g); + CheckMatrix("restored1.Transform", g.Transform, 0.707f, 0.707f, -0.707f, 0.707f, 0, 0); + + g.Restore(gs1); + CheckDefaultProperties("restored2", g); + Assert.Equal(new Point(0, 0), g.RenderingOrigin); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Restore_Null() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Assert.Throws(() => g.Restore(null)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void FillRectangles_BrushNull_Rectangle() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Assert.Throws(() => g.FillRectangles(null, new Rectangle[1])); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void FillRectangles_Rectangle_Null() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Assert.Throws(() => g.FillRectangles(Brushes.Red, (Rectangle[])null)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void FillRectanglesZeroRectangle() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Assert.Throws(() => g.FillRectangles(Brushes.Red, new Rectangle[0])); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void FillRectangles_BrushNull_RectangleF() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Assert.Throws(() => g.FillRectangles(null, new RectangleF[1])); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void FillRectangles_RectangleF_Null() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Assert.Throws(() => g.FillRectangles(Brushes.Red, (RectangleF[])null)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void FillRectanglesZeroRectangleF() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Assert.Throws(() => g.FillRectangles(Brushes.Red, new RectangleF[0])); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void FillRectangles_NormalBehavior() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + { + using (Graphics g = Graphics.FromImage(bitmap)) + { + g.Clear(Color.Fuchsia); + Rectangle rect = new Rectangle(5, 5, 10, 10); + g.Clip = new Region(rect); + g.FillRectangle(Brushes.Red, rect); + } + Assert.Equal(Color.Red.ToArgb(), bitmap.GetPixel(5, 5).ToArgb()); + Assert.Equal(Color.Red.ToArgb(), bitmap.GetPixel(14, 5).ToArgb()); + Assert.Equal(Color.Red.ToArgb(), bitmap.GetPixel(5, 14).ToArgb()); + Assert.Equal(Color.Red.ToArgb(), bitmap.GetPixel(14, 14).ToArgb()); + + Assert.Equal(Color.Fuchsia.ToArgb(), bitmap.GetPixel(15, 5).ToArgb()); + Assert.Equal(Color.Fuchsia.ToArgb(), bitmap.GetPixel(5, 15).ToArgb()); + Assert.Equal(Color.Fuchsia.ToArgb(), bitmap.GetPixel(15, 15).ToArgb()); + } + } + + private Bitmap FillDrawRectangle(float width) + { + Bitmap bitmap = new Bitmap(20, 20); + using (Graphics g = Graphics.FromImage(bitmap)) + { + g.Clear(Color.Red); + Rectangle rect = new Rectangle(5, 5, 10, 10); + g.FillRectangle(Brushes.Green, rect); + if (width >= 0) + { + using (Pen pen = new Pen(Color.Blue, width)) + { + g.DrawRectangle(pen, rect); + } + } + else + { + g.DrawRectangle(Pens.Blue, rect); + } + } + return bitmap; + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void FillDrawRectangle_Width_Default() + { + // default pen size + using (Bitmap bitmap = FillDrawRectangle(Single.MinValue)) + { + // NW + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(4, 4).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(5, 5).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(6, 6).ToArgb()); + // N + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(9, 4).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 5).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(9, 6).ToArgb()); + // NE + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 4).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 5).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(14, 6).ToArgb()); + // E + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 9).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(14, 9).ToArgb()); + // SE + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 15).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(14, 14).ToArgb()); + // S + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(9, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 15).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(9, 14).ToArgb()); + // SW + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(4, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(5, 15).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(6, 14).ToArgb()); + // W + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(4, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(5, 9).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(6, 9).ToArgb()); + } + } + + [ConditionalFact(Helpers.RecentGdiplusIsAvailable)] + public void FillDrawRectangle_Width_2() + { + // even pen size + using (Bitmap bitmap = FillDrawRectangle(2.0f)) + { + // NW + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(3, 3).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(4, 4).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(5, 5).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(6, 6).ToArgb()); + // N + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(9, 3).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 4).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 5).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(9, 6).ToArgb()); + // NE + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 3).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 4).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(14, 5).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(13, 6).ToArgb()); + // E + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(14, 9).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(13, 9).ToArgb()); + // SE + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 15).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(14, 14).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(13, 13).ToArgb()); + // S + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(9, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 15).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 14).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(9, 13).ToArgb()); + // SW + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(3, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(4, 15).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(5, 14).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(6, 13).ToArgb()); + // W + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(3, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(4, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(5, 9).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(6, 9).ToArgb()); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void FillDrawRectangle_Width_3() + { + // odd pen size + using (Bitmap bitmap = FillDrawRectangle(3.0f)) + { + // NW + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(3, 3).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(4, 4).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(5, 5).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(6, 6).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(7, 7).ToArgb()); + // N + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(9, 3).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 4).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 5).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 6).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(9, 7).ToArgb()); + // NE + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(17, 3).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(16, 4).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 5).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(14, 6).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(13, 7).ToArgb()); + // E + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(17, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(16, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(14, 9).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(13, 9).ToArgb()); + // SE + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(17, 17).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(16, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 15).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(14, 14).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(13, 13).ToArgb()); + // S + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(9, 17).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 15).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 14).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(9, 13).ToArgb()); + // SW + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(3, 17).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(4, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(5, 15).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(6, 14).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(7, 13).ToArgb()); + // W + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(3, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(4, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(5, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(6, 9).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(7, 9).ToArgb()); + } + } + + // reverse, draw the fill over + private Bitmap DrawFillRectangle(float width) + { + Bitmap bitmap = new Bitmap(20, 20); + using (Graphics g = Graphics.FromImage(bitmap)) + { + g.Clear(Color.Red); + Rectangle rect = new Rectangle(5, 5, 10, 10); + if (width >= 0) + { + using (Pen pen = new Pen(Color.Blue, width)) + { + g.DrawRectangle(pen, rect); + } + } + else + { + g.DrawRectangle(Pens.Blue, rect); + } + g.FillRectangle(Brushes.Green, rect); + } + return bitmap; + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawFillRectangle_Width_Default() + { + // default pen size + using (Bitmap bitmap = DrawFillRectangle(Single.MinValue)) + { + // NW - no blue border + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(4, 4).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(5, 5).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(6, 6).ToArgb()); + // N - no blue border + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(9, 4).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(9, 5).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(9, 6).ToArgb()); + // NE + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 4).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 5).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(14, 6).ToArgb()); + // E + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 9).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(14, 9).ToArgb()); + // SE + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 15).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(14, 14).ToArgb()); + // S + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(9, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 15).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(9, 14).ToArgb()); + // SW + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(4, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(5, 15).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(6, 14).ToArgb()); + // W - no blue border + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(4, 9).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(5, 9).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(6, 9).ToArgb()); + } + } + + [ConditionalFact(Helpers.RecentGdiplusIsAvailable)] + public void DrawFillRectangle_Width_2() + { + // even pen size + using (Bitmap bitmap = DrawFillRectangle(2.0f)) + { + // looks like a one pixel border - but enlarged + // NW + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(3, 3).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(4, 4).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(5, 5).ToArgb()); + // N + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(9, 3).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 4).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(9, 5).ToArgb()); + // NE + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 3).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 4).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(14, 5).ToArgb()); + // E + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 9).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(14, 9).ToArgb()); + // SE + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 15).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(14, 14).ToArgb()); + // S + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(9, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 15).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(9, 14).ToArgb()); + // SW + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(3, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(4, 15).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(5, 14).ToArgb()); + // W + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(3, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(4, 9).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(5, 9).ToArgb()); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawFillRectangle_Width_3() + { + // odd pen size + using (Bitmap bitmap = DrawFillRectangle(3.0f)) + { + // NW + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(3, 3).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(4, 4).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(5, 5).ToArgb()); + // N + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(9, 3).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 4).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(9, 5).ToArgb()); + // NE + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(17, 3).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(16, 4).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 4).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(14, 5).ToArgb()); + // E + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(17, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(16, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 9).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(14, 9).ToArgb()); + // SE + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(17, 17).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(16, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 15).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(14, 14).ToArgb()); + // S + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(9, 17).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(9, 15).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(9, 14).ToArgb()); + // SW + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(3, 17).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(4, 16).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(5, 15).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(6, 14).ToArgb()); + // W + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(3, 9).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(4, 9).ToArgb()); + Assert.Equal(0xFF008000, (uint)bitmap.GetPixel(5, 9).ToArgb()); + } + } + + private Bitmap DrawLines(float width) + { + Bitmap bitmap = new Bitmap(20, 20); + using (Graphics g = Graphics.FromImage(bitmap)) + { + g.Clear(Color.Red); + Point[] pts = new Point[3] { new Point(5, 5), new Point(15, 5), new Point(15, 15) }; + if (width >= 0) + { + using (Pen pen = new Pen(Color.Blue, width)) + { + g.DrawLines(pen, pts); + } + } + else + { + g.DrawLines(Pens.Blue, pts); + } + } + return bitmap; + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawLines_Width_Default() + { + // default pen size + using (Bitmap bitmap = DrawLines(Single.MinValue)) + { + // start + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(4, 4).ToArgb()); + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(4, 5).ToArgb()); + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(4, 6).ToArgb()); + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(5, 4).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(5, 5).ToArgb()); + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(5, 6).ToArgb()); + // middle + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(14, 4).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(14, 5).ToArgb()); + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(14, 6).ToArgb()); + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(15, 4).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 5).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 6).ToArgb()); + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 4).ToArgb()); + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 5).ToArgb()); + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 6).ToArgb()); + //end + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(14, 15).ToArgb()); + Assert.Equal(0xFF0000FF, (uint)bitmap.GetPixel(15, 15).ToArgb()); + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 15).ToArgb()); + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(14, 16).ToArgb()); + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(15, 16).ToArgb()); + Assert.Equal(0xFFFF0000, (uint)bitmap.GetPixel(16, 16).ToArgb()); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureString_StringFont() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + { + using (Graphics g = Graphics.FromImage(bitmap)) + { + SizeF size = g.MeasureString(null, font); + Assert.True(size.IsEmpty); + size = g.MeasureString(String.Empty, font); + Assert.True(size.IsEmpty); + // null font + size = g.MeasureString(null, null); + Assert.True(size.IsEmpty); + size = g.MeasureString(String.Empty, null); + Assert.True(size.IsEmpty); + } + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureString_StringFont_Null() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Assert.Throws(() => g.MeasureString("a", null)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureString_StringFontSizeF() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + SizeF size = g.MeasureString("a", font, SizeF.Empty); + Assert.False(size.IsEmpty); + + size = g.MeasureString(String.Empty, font, SizeF.Empty); + Assert.True(size.IsEmpty); + } + } + + private void MeasureString_StringFontInt(string s) + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + SizeF size0 = g.MeasureString(s, font, 0); + SizeF sizeN = g.MeasureString(s, font, Int32.MinValue); + SizeF sizeP = g.MeasureString(s, font, Int32.MaxValue); + Assert.Equal(size0, sizeN); + Assert.Equal(size0, sizeP); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureString_StringFontInt_ShortString() + { + MeasureString_StringFontInt("a"); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureString_StringFontInt_LongString() + { + MeasureString_StringFontInt("A very long string..."); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureString_StringFormat_Alignment() + { + string text = "Hello Mono::"; + StringFormat string_format = new StringFormat(); + + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + string_format.Alignment = StringAlignment.Near; + SizeF near = g.MeasureString(text, font, Int32.MaxValue, string_format); + + string_format.Alignment = StringAlignment.Center; + SizeF center = g.MeasureString(text, font, Int32.MaxValue, string_format); + + string_format.Alignment = StringAlignment.Far; + SizeF far = g.MeasureString(text, font, Int32.MaxValue, string_format); + + Assert.Equal(near.Width, center.Width, 1); + Assert.Equal(near.Height, center.Height, 1); + + Assert.Equal(center.Width, far.Width, 1); + Assert.Equal(center.Height, far.Height, 1); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureString_StringFormat_Alignment_DirectionVertical() + { + string text = "Hello Mono::"; + StringFormat string_format = new StringFormat(); + string_format.FormatFlags = StringFormatFlags.DirectionVertical; + + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + string_format.Alignment = StringAlignment.Near; + SizeF near = g.MeasureString(text, font, Int32.MaxValue, string_format); + + string_format.Alignment = StringAlignment.Center; + SizeF center = g.MeasureString(text, font, Int32.MaxValue, string_format); + + string_format.Alignment = StringAlignment.Far; + SizeF far = g.MeasureString(text, font, Int32.MaxValue, string_format); + + Assert.Equal(near.Width, center.Width, 0); + Assert.Equal(near.Height, center.Height, 0); + + Assert.Equal(center.Width, far.Width, 0); + Assert.Equal(center.Height, far.Height, 0); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureString_StringFormat_LineAlignment() + { + string text = "Hello Mono::"; + StringFormat string_format = new StringFormat(); + + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + string_format.LineAlignment = StringAlignment.Near; + SizeF near = g.MeasureString(text, font, Int32.MaxValue, string_format); + + string_format.LineAlignment = StringAlignment.Center; + SizeF center = g.MeasureString(text, font, Int32.MaxValue, string_format); + + string_format.LineAlignment = StringAlignment.Far; + SizeF far = g.MeasureString(text, font, Int32.MaxValue, string_format); + + Assert.Equal(near.Width, center.Width, 1); + Assert.Equal(near.Height, center.Height, 1); + + Assert.Equal(center.Width, far.Width, 1); + Assert.Equal(center.Height, far.Height, 1); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureString_StringFormat_LineAlignment_DirectionVertical() + { + string text = "Hello Mono::"; + StringFormat string_format = new StringFormat(); + string_format.FormatFlags = StringFormatFlags.DirectionVertical; + + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + string_format.LineAlignment = StringAlignment.Near; + SizeF near = g.MeasureString(text, font, Int32.MaxValue, string_format); + + string_format.LineAlignment = StringAlignment.Center; + SizeF center = g.MeasureString(text, font, Int32.MaxValue, string_format); + + string_format.LineAlignment = StringAlignment.Far; + SizeF far = g.MeasureString(text, font, Int32.MaxValue, string_format); + + Assert.Equal(near.Width, center.Width, 1); + Assert.Equal(near.Height, center.Height, 1); + + Assert.Equal(center.Width, far.Width, 1); + Assert.Equal(center.Height, far.Height, 1); + } + } + + [ActiveIssue(20844)] + public void MeasureString_MultlineString_Width() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + StringFormat string_format = new StringFormat(); + + string text1 = "Test\nTest123\nTest 456\nTest 1,2,3,4,5..."; + string text2 = "Test 1,2,3,4,5..."; + + SizeF size1 = g.MeasureString(text1, font, SizeF.Empty, string_format); + SizeF size2 = g.MeasureString(text2, font, SizeF.Empty, string_format); + + Assert.Equal((int)size1.Width, (int)size2.Width); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureString_CharactersFitted() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + string s = "aaa aa aaaa a aaa"; + SizeF size = g.MeasureString(s, font); + + int chars, lines; + SizeF size2 = g.MeasureString(s, font, new SizeF(80, size.Height), null, out chars, out lines); + + // in pixels + Assert.True(size2.Width < size.Width); + Assert.Equal(size2.Height, size.Height); + + Assert.Equal(1, lines); + // LAMESPEC: documentation seems to suggest chars is total length + Assert.True(chars < s.Length); + } + } + + [ConditionalFact(Helpers.GdiPlusIsAvailableNotRedhat73)] + public void MeasureString_Whitespace() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + string s = String.Empty; + SizeF size = g.MeasureString(s, font); + Assert.Equal(0, size.Height); + Assert.Equal(0, size.Width); + + s += " "; + SizeF expected = g.MeasureString(s, font); + for (int i = 1; i < 10; i++) + { + s += " "; + size = g.MeasureString(s, font); + Assert.Equal(expected.Height, size.Height, 1); + Assert.Equal(expected.Width, size.Width, 1); + } + + s = "a"; + expected = g.MeasureString(s, font); + s = " " + s; + size = g.MeasureString(s, font); + float space_width = size.Width - expected.Width; + for (int i = 1; i < 10; i++) + { + size = g.MeasureString(s, font); + Assert.Equal(expected.Height, size.Height, 1); + Assert.Equal(expected.Width + i * space_width, size.Width, 1); + s = " " + s; + } + + s = "a"; + expected = g.MeasureString(s, font); + for (int i = 1; i < 10; i++) + { + s = s + " "; + size = g.MeasureString(s, font); + Assert.Equal(expected.Height, size.Height, 1); + Assert.Equal(expected.Width, size.Width, 1); + } + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureCharacterRanges_NullOrEmptyText() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Region[] regions = g.MeasureCharacterRanges(null, font, new RectangleF(), null); + Assert.Equal(0, regions.Length); + regions = g.MeasureCharacterRanges(String.Empty, font, new RectangleF(), null); + Assert.Equal(0, regions.Length); + // null font is ok with null or empty string + regions = g.MeasureCharacterRanges(null, null, new RectangleF(), null); + Assert.Equal(0, regions.Length); + regions = g.MeasureCharacterRanges(String.Empty, null, new RectangleF(), null); + Assert.Equal(0, regions.Length); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureCharacterRanges_EmptyStringFormat() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + // string format without character ranges + Region[] regions = g.MeasureCharacterRanges("Mono", font, new RectangleF(), new StringFormat()); + Assert.Equal(0, regions.Length); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureCharacterRanges_FontNull() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Assert.Throws(() => g.MeasureCharacterRanges("a", null, new RectangleF(), null)); + } + } + + [ConditionalFact(Helpers.GdiPlusIsAvailableNotRedhat73)] + public void MeasureCharacterRanges_TwoLines() + { + string text = "this\nis a test"; + CharacterRange[] ranges = new CharacterRange[2]; + ranges[0] = new CharacterRange(0, 5); + ranges[1] = new CharacterRange(5, 9); + + StringFormat string_format = new StringFormat(); + string_format.FormatFlags = StringFormatFlags.NoClip; + string_format.SetMeasurableCharacterRanges(ranges); + + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + SizeF size = g.MeasureString(text, font, new Point(0, 0), string_format); + RectangleF layout_rect = new RectangleF(0.0f, 0.0f, size.Width, size.Height); + Region[] regions = g.MeasureCharacterRanges(text, font, layout_rect, string_format); + + Assert.Equal(2, regions.Length); + Assert.Equal(regions[0].GetBounds(g).Height, regions[1].GetBounds(g).Height); + } + } + + private void MeasureCharacterRanges(string text, int first, int length) + { + CharacterRange[] ranges = new CharacterRange[1]; + ranges[0] = new CharacterRange(first, length); + + StringFormat string_format = new StringFormat(); + string_format.FormatFlags = StringFormatFlags.NoClip; + string_format.SetMeasurableCharacterRanges(ranges); + + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + SizeF size = g.MeasureString(text, font, new Point(0, 0), string_format); + RectangleF layout_rect = new RectangleF(0.0f, 0.0f, size.Width, size.Height); + g.MeasureCharacterRanges(text, font, layout_rect, string_format); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureCharacterRanges_FirstTooFar() + { + string text = "this\nis a test"; + Assert.Throws(() => MeasureCharacterRanges(text, text.Length, 1)); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureCharacterRanges_LengthTooLong() + { + string text = "this\nis a test"; + Assert.Throws(() => MeasureCharacterRanges(text, 0, text.Length + 1)); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureCharacterRanges_Prefix() + { + string text = "Hello &Mono::"; + CharacterRange[] ranges = new CharacterRange[1]; + ranges[0] = new CharacterRange(5, 4); + + StringFormat string_format = new StringFormat(); + string_format.SetMeasurableCharacterRanges(ranges); + + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + SizeF size = g.MeasureString(text, font, new Point(0, 0), string_format); + RectangleF layout_rect = new RectangleF(0.0f, 0.0f, size.Width, size.Height); + + // here & is part of the measure and visible + string_format.HotkeyPrefix = HotkeyPrefix.None; + Region[] regions = g.MeasureCharacterRanges(text, font, layout_rect, string_format); + RectangleF bounds_none = regions[0].GetBounds(g); + + // here & is part of the measure (range) but visible as an underline + string_format.HotkeyPrefix = HotkeyPrefix.Show; + regions = g.MeasureCharacterRanges(text, font, layout_rect, string_format); + RectangleF bounds_show = regions[0].GetBounds(g); + Assert.True(bounds_show.Width < bounds_none.Width); + + // here & is part of the measure (range) but invisible + string_format.HotkeyPrefix = HotkeyPrefix.Hide; + regions = g.MeasureCharacterRanges(text, font, layout_rect, string_format); + RectangleF bounds_hide = regions[0].GetBounds(g); + Assert.Equal(bounds_hide.Width, bounds_show.Width); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureCharacterRanges_NullStringFormat() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Assert.Throws(() => g.MeasureCharacterRanges("Mono", font, new RectangleF(), null)); + } + } + + static CharacterRange[] ranges = new CharacterRange[] { + new CharacterRange (0, 1), + new CharacterRange (1, 1), + new CharacterRange (2, 1) + }; + + Region[] Measure(Graphics gfx, RectangleF rect) + { + using (StringFormat format = StringFormat.GenericTypographic) + { + format.SetMeasurableCharacterRanges(ranges); + + using (Font font = new Font(FontFamily.GenericSerif, 11.0f)) + { + return gfx.MeasureCharacterRanges("abc", font, rect, format); + } + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Measure() + { + using (Graphics gfx = Graphics.FromImage(new Bitmap(1, 1))) + { + Region[] zero = Measure(gfx, new RectangleF(0, 0, 0, 0)); + Assert.Equal(3, zero.Length); + + Region[] small = Measure(gfx, new RectangleF(0, 0, 100, 100)); + Assert.Equal(3, small.Length); + for (int i = 0; i < 3; i++) + { + RectangleF zb = zero[i].GetBounds(gfx); + RectangleF sb = small[i].GetBounds(gfx); + Assert.Equal(sb.X, zb.X); + Assert.Equal(sb.Y, zb.Y); + Assert.Equal(sb.Width, zb.Width); + Assert.Equal(sb.Height, zb.Height); + } + + Region[] max = Measure(gfx, new RectangleF(0, 0, Single.MaxValue, Single.MaxValue)); + Assert.Equal(3, max.Length); + for (int i = 0; i < 3; i++) + { + RectangleF zb = zero[i].GetBounds(gfx); + RectangleF mb = max[i].GetBounds(gfx); + Assert.Equal(mb.X, zb.X); + Assert.Equal(mb.Y, zb.Y); + Assert.Equal(mb.Width, zb.Width); + Assert.Equal(mb.Height, zb.Height); + } + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void MeasureLimits() + { + using (Graphics gfx = Graphics.FromImage(new Bitmap(1, 1))) + { + Region[] min = Measure(gfx, new RectangleF(0, 0, Single.MinValue, Single.MinValue)); + Assert.Equal(3, min.Length); + for (int i = 0; i < 3; i++) + { + RectangleF mb = min[i].GetBounds(gfx); + Assert.Equal(-4194304.0f, mb.X); + Assert.Equal(-4194304.0f, mb.Y); + Assert.Equal(8388608.0f, mb.Width); + Assert.Equal(8388608.0f, mb.Height); + } + + Region[] neg = Measure(gfx, new RectangleF(0, 0, -20, -20)); + Assert.Equal(3, neg.Length); + for (int i = 0; i < 3; i++) + { + RectangleF mb = neg[i].GetBounds(gfx); + Assert.Equal(-4194304.0f, mb.X); + Assert.Equal(-4194304.0f, mb.Y); + Assert.Equal(8388608.0f, mb.Width); + Assert.Equal(8388608.0f, mb.Height); + } + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawString_EndlessLoop() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Rectangle rect = Rectangle.Empty; + rect.Location = new Point(10, 10); + rect.Size = new Size(1, 20); + StringFormat fmt = new StringFormat(); + fmt.Alignment = StringAlignment.Center; + fmt.LineAlignment = StringAlignment.Center; + fmt.FormatFlags = StringFormatFlags.NoWrap; + fmt.Trimming = StringTrimming.EllipsisWord; + g.DrawString("Test String", font, Brushes.Black, rect, fmt); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawString_EndlessLoop_Wrapping() + { + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + Rectangle rect = Rectangle.Empty; + rect.Location = new Point(10, 10); + rect.Size = new Size(1, 20); + StringFormat fmt = new StringFormat(); + fmt.Alignment = StringAlignment.Center; + fmt.LineAlignment = StringAlignment.Center; + fmt.Trimming = StringTrimming.EllipsisWord; + g.DrawString("Test String", font, Brushes.Black, rect, fmt); + } + } + + [ConditionalFact(Helpers.RecentGdiplusIsAvailable)] + public void MeasureString_Wrapping_Dots() + { + string text = "this is really long text........................................... with a lot o periods."; + using (Bitmap bitmap = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bitmap)) + { + using (StringFormat format = new StringFormat()) + { + format.Alignment = StringAlignment.Center; + SizeF sz = g.MeasureString(text, font, 80, format); + Assert.True(sz.Width <= 80); + Assert.True(sz.Height > font.Height * 2); + } + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void GetReleaseHdcInternal() + { + using (Bitmap b = new Bitmap(10, 10)) + using (Graphics g = Graphics.FromImage(b)) + { + IntPtr hdc1 = g.GetHdc(); + g.ReleaseHdcInternal(hdc1); + IntPtr hdc2 = g.GetHdc(); + g.ReleaseHdcInternal(hdc2); + Assert.Equal(hdc1, hdc2); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void ReleaseHdcInternal_IntPtrZero() + { + using (Bitmap b = new Bitmap(10, 10)) + using (Graphics g = Graphics.FromImage(b)) + { + Assert.Throws(() => g.ReleaseHdcInternal(IntPtr.Zero)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void ReleaseHdcInternal_TwoTimes() + { + using (Bitmap b = new Bitmap(10, 10)) + using (Graphics g = Graphics.FromImage(b)) + { + IntPtr hdc = g.GetHdc(); + g.ReleaseHdcInternal(hdc); + Assert.Throws(() => g.ReleaseHdcInternal(hdc)); + } + } + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void TestReleaseHdc() + { + using (Bitmap b = new Bitmap(10, 10)) + using (Graphics g = Graphics.FromImage(b)) + { + IntPtr hdc1 = g.GetHdc(); + g.ReleaseHdc(); + IntPtr hdc2 = g.GetHdc(); + g.ReleaseHdc(); + Assert.Equal(hdc1, hdc2); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void TestReleaseHdcException() + { + using (Bitmap b = new Bitmap(10, 10)) + using (Graphics g = Graphics.FromImage(b)) + { + Assert.Throws(() => g.ReleaseHdc()); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void TestReleaseHdcException2() + { + using (Bitmap b = new Bitmap(10, 10)) + using (Graphics g = Graphics.FromImage(b)) + { + g.GetHdc(); + g.ReleaseHdc(); + Assert.Throws(() => g.ReleaseHdc()); + } + } + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void VisibleClipBound() + { + // see #78958 + using (Bitmap bmp = new Bitmap(100, 100)) + using (Graphics g = Graphics.FromImage(bmp)) + { + RectangleF noclip = g.VisibleClipBounds; + Assert.Equal(0, noclip.X); + Assert.Equal(0, noclip.Y); + Assert.Equal(100, noclip.Width); + Assert.Equal(100, noclip.Height); + + // note: libgdiplus regions are precise to multiple of multiple of 8 + g.Clip = new Region(new RectangleF(0, 0, 32, 32)); + RectangleF clip = g.VisibleClipBounds; + Assert.Equal(0, clip.X); + Assert.Equal(0, clip.Y); + Assert.Equal(32, clip.Width, 4); + Assert.Equal(32, clip.Height, 4); + + g.RotateTransform(90); + RectangleF rotclip = g.VisibleClipBounds; + Assert.Equal(0, rotclip.X); + Assert.Equal(-32, rotclip.Y, 4); + Assert.Equal(32, rotclip.Width, 4); + Assert.Equal(32, rotclip.Height, 4); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void VisibleClipBound_BigClip() + { + using (Bitmap bmp = new Bitmap(100, 100)) + using (Graphics g = Graphics.FromImage(bmp)) + { + RectangleF noclip = g.VisibleClipBounds; + Assert.Equal(0, noclip.X); + Assert.Equal(0, noclip.Y); + Assert.Equal(100, noclip.Width); + Assert.Equal(100, noclip.Height); + + // clip is larger than bitmap + g.Clip = new Region(new RectangleF(0, 0, 200, 200)); + RectangleF clipbound = g.ClipBounds; + Assert.Equal(0, clipbound.X); + Assert.Equal(0, clipbound.Y); + Assert.Equal(200, clipbound.Width); + Assert.Equal(200, clipbound.Height); + + RectangleF clip = g.VisibleClipBounds; + Assert.Equal(0, clip.X); + Assert.Equal(0, clip.Y); + Assert.Equal(100, clip.Width); + Assert.Equal(100, clip.Height); + + g.RotateTransform(90); + RectangleF rotclipbound = g.ClipBounds; + Assert.Equal(0, rotclipbound.X); + Assert.Equal(-200, rotclipbound.Y, 4); + Assert.Equal(200, rotclipbound.Width, 4); + Assert.Equal(200, rotclipbound.Height, 4); + + RectangleF rotclip = g.VisibleClipBounds; + Assert.Equal(0, rotclip.X); + Assert.Equal(-100, rotclip.Y, 4); + Assert.Equal(100, rotclip.Width, 4); + Assert.Equal(100, rotclip.Height, 4); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Rotate() + { + using (Bitmap bmp = new Bitmap(100, 50)) + using (Graphics g = Graphics.FromImage(bmp)) + { + RectangleF vcb = g.VisibleClipBounds; + Assert.Equal(0, vcb.X); + Assert.Equal(0, vcb.Y); + Assert.Equal(100, vcb.Width, 4); + Assert.Equal(50, vcb.Height, 4); + + g.RotateTransform(90); + RectangleF rvcb = g.VisibleClipBounds; + Assert.Equal(0, rvcb.X); + Assert.Equal(-100, rvcb.Y, 4); + Assert.Equal(50.0f, rvcb.Width, 4); + Assert.Equal(100, rvcb.Height, 4); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Scale() + { + using (Bitmap bmp = new Bitmap(100, 50)) + using (Graphics g = Graphics.FromImage(bmp)) + { + RectangleF vcb = g.VisibleClipBounds; + Assert.Equal(0, vcb.X); + Assert.Equal(0, vcb.Y); + Assert.Equal(100, vcb.Width); + Assert.Equal(50, vcb.Height); + + g.ScaleTransform(2, 0.5f); + RectangleF svcb = g.VisibleClipBounds; + Assert.Equal(0, svcb.X); + Assert.Equal(0, svcb.Y); + Assert.Equal(50, svcb.Width); + Assert.Equal(100, svcb.Height); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Translate() + { + using (Bitmap bmp = new Bitmap(100, 50)) + using (Graphics g = Graphics.FromImage(bmp)) + { + RectangleF vcb = g.VisibleClipBounds; + Assert.Equal(0, vcb.X); + Assert.Equal(0, vcb.Y); + Assert.Equal(100, vcb.Width); + Assert.Equal(50, vcb.Height); + + g.TranslateTransform(-25, 25); + RectangleF tvcb = g.VisibleClipBounds; + Assert.Equal(25, tvcb.X); + Assert.Equal(-25, tvcb.Y); + Assert.Equal(100, tvcb.Width); + Assert.Equal(50, tvcb.Height); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawIcon_NullRectangle() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawIcon(null, new Rectangle(0, 0, 32, 32))); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawIcon_IconRectangle() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawIcon(SystemIcons.Application, new Rectangle(0, 0, 40, 20)); + // Rectangle is empty when X, Y, Width and Height == 0 + // (yep X and Y too, RectangleF only checks for Width and Height) + g.DrawIcon(SystemIcons.Asterisk, new Rectangle(0, 0, 0, 0)); + // so this one is half-empty ;-) + g.DrawIcon(SystemIcons.Error, new Rectangle(20, 40, 0, 0)); + // negative width or height isn't empty (for Rectangle) + g.DrawIconUnstretched(SystemIcons.WinLogo, new Rectangle(10, 20, -1, 0)); + g.DrawIconUnstretched(SystemIcons.WinLogo, new Rectangle(20, 10, 0, -1)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawIcon_NullIntInt() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawIcon(null, 4, 2)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawIcon_IconIntInt() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawIcon(SystemIcons.Exclamation, 4, 2); + g.DrawIcon(SystemIcons.Hand, 0, 0); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawIconUnstretched_NullRectangle() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawIconUnstretched(null, new Rectangle(0, 0, 40, 20))); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawIconUnstretched_IconRectangle() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawIconUnstretched(SystemIcons.Information, new Rectangle(0, 0, 40, 20)); + // Rectangle is empty when X, Y, Width and Height == 0 + // (yep X and Y too, RectangleF only checks for Width and Height) + g.DrawIconUnstretched(SystemIcons.Question, new Rectangle(0, 0, 0, 0)); + // so this one is half-empty ;-) + g.DrawIconUnstretched(SystemIcons.Warning, new Rectangle(20, 40, 0, 0)); + // negative width or height isn't empty (for Rectangle) + g.DrawIconUnstretched(SystemIcons.WinLogo, new Rectangle(10, 20, -1, 0)); + g.DrawIconUnstretched(SystemIcons.WinLogo, new Rectangle(20, 10, 0, -1)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_NullRectangleF() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(null, new RectangleF(0, 0, 0, 0))); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImageRectangleF() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawImage(bmp, new RectangleF(0, 0, 0, 0)); + g.DrawImage(bmp, new RectangleF(20, 40, 0, 0)); + g.DrawImage(bmp, new RectangleF(10, 20, -1, 0)); + g.DrawImage(bmp, new RectangleF(20, 10, 0, -1)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_NullPointF() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(null, new PointF(0, 0))); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePointF() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawImage(bmp, new PointF(0, 0)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_NullPointFArray() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(null, new PointF[0])); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePointFArrayNull() + { + using (Bitmap bmp = new Bitmap(40, 40)) + { + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(bmp, (PointF[])null)); + } + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePointFArrayEmpty() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(bmp, new PointF[0])); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePointFArray() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawImage(bmp, new PointF[] { + new PointF (0, 0), new PointF (1, 1), new PointF (2, 2) }); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_NullRectangle() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(null, new Rectangle(0, 0, 0, 0))); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImageRectangle() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + // Rectangle is empty when X, Y, Width and Height == 0 + // (yep X and Y too, RectangleF only checks for Width and Height) + g.DrawImage(bmp, new Rectangle(0, 0, 0, 0)); + // so this one is half-empty ;-) + g.DrawImage(bmp, new Rectangle(20, 40, 0, 0)); + // negative width or height isn't empty (for Rectangle) + g.DrawImage(bmp, new Rectangle(10, 20, -1, 0)); + g.DrawImage(bmp, new Rectangle(20, 10, 0, -1)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_NullPoint() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(null, new Point(0, 0))); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePoint() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawImage(bmp, new Point(0, 0)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_NullPointArray() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(null, new Point[0])); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePointArrayNull() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(bmp, (Point[])null)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePointArrayEmpty() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(bmp, new Point[0])); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePointArray() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawImage(bmp, new Point[] { + new Point (0, 0), new Point (1, 1), new Point (2, 2) }); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_NullIntInt() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(null, Int32.MaxValue, Int32.MinValue)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImageIntInt_Overflow() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(bmp, Int32.MaxValue, Int32.MinValue)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImageIntInt() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawImage(bmp, -40, -40); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_NullFloat() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(null, Single.MaxValue, Single.MinValue)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImageFloatFloat_Overflow() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(bmp, Single.MaxValue, Single.MinValue)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImageFloatFloat() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawImage(bmp, -40.0f, -40.0f); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_NullRectangleRectangleGraphicsUnit() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(null, new Rectangle(), new Rectangle(), GraphicsUnit.Display)); + } + } + + private void DrawImage_ImageRectangleRectangleGraphicsUnit(GraphicsUnit unit) + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Rectangle r = new Rectangle(0, 0, 40, 40); + g.DrawImage(bmp, r, r, unit); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImageRectangleRectangleGraphicsUnit_Display() + { + Assert.Throws(() => DrawImage_ImageRectangleRectangleGraphicsUnit(GraphicsUnit.Display)); + } + + [ActiveIssue(20844, TestPlatforms.Any)] + public void DrawImage_ImageRectangleRectangleGraphicsUnit_Document() + { + Assert.Throws(() => DrawImage_ImageRectangleRectangleGraphicsUnit(GraphicsUnit.Document)); + } + + [ActiveIssue(20844)] + public void DrawImage_ImageRectangleRectangleGraphicsUnit_Inch() + { + Assert.Throws(() => DrawImage_ImageRectangleRectangleGraphicsUnit(GraphicsUnit.Inch)); + } + + [ActiveIssue(20844, TestPlatforms.Any)] + public void DrawImage_ImageRectangleRectangleGraphicsUnit_Millimeter() + { + Assert.Throws(() => DrawImage_ImageRectangleRectangleGraphicsUnit(GraphicsUnit.Millimeter)); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImageRectangleRectangleGraphicsUnit_Pixel() + { + // this unit works + DrawImage_ImageRectangleRectangleGraphicsUnit(GraphicsUnit.Pixel); + } + + [ActiveIssue(20844, TestPlatforms.Any)] + public void DrawImage_ImageRectangleRectangleGraphicsUnit_Point() + { + Assert.Throws(() => DrawImage_ImageRectangleRectangleGraphicsUnit(GraphicsUnit.Point)); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImageRectangleRectangleGraphicsUnit_World() + { + Assert.Throws(() => DrawImage_ImageRectangleRectangleGraphicsUnit(GraphicsUnit.World)); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_NullPointRectangleGraphicsUnit() + { + Rectangle r = new Rectangle(1, 2, 3, 4); + Point[] pts = new Point[3] { new Point(1, 1), new Point(2, 2), new Point(3, 3) }; + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(null, pts, r, GraphicsUnit.Pixel)); + } + } + + private void DrawImage_ImagePointRectangleGraphicsUnit(Point[] pts) + { + Rectangle r = new Rectangle(1, 2, 3, 4); + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawImage(bmp, pts, r, GraphicsUnit.Pixel); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImageNullRectangleGraphicsUnit() + { + Assert.Throws(() => DrawImage_ImagePointRectangleGraphicsUnit(null)); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePoint0RectangleGraphicsUnit() + { + Assert.Throws(() => DrawImage_ImagePointRectangleGraphicsUnit(new Point[0])); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePoint1RectangleGraphicsUnit() + { + Point p = new Point(1, 1); + Assert.Throws(() => DrawImage_ImagePointRectangleGraphicsUnit(new Point[1] { p })); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePoint2RectangleGraphicsUnit() + { + Point p = new Point(1, 1); + Assert.Throws(() => DrawImage_ImagePointRectangleGraphicsUnit(new Point[2] { p, p })); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePoint3RectangleGraphicsUnit() + { + Point p = new Point(1, 1); + DrawImage_ImagePointRectangleGraphicsUnit(new Point[3] { p, p, p }); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePoint4RectangleGraphicsUnit() + { + Point p = new Point(1, 1); + Assert.Throws(() => DrawImage_ImagePointRectangleGraphicsUnit(new Point[4] { p, p, p, p })); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_NullPointFRectangleGraphicsUnit() + { + Rectangle r = new Rectangle(1, 2, 3, 4); + PointF[] pts = new PointF[3] { new PointF(1, 1), new PointF(2, 2), new PointF(3, 3) }; + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImage(null, pts, r, GraphicsUnit.Pixel)); + } + } + + private void DrawImage_ImagePointFRectangleGraphicsUnit(PointF[] pts) + { + Rectangle r = new Rectangle(1, 2, 3, 4); + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawImage(bmp, pts, r, GraphicsUnit.Pixel); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImageNullFRectangleGraphicsUnit() + { + Assert.Throws(() => DrawImage_ImagePointFRectangleGraphicsUnit(null)); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePointF0RectangleGraphicsUnit() + { + Assert.Throws(() => DrawImage_ImagePointFRectangleGraphicsUnit(new PointF[0])); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePointF1RectangleGraphicsUnit() + { + PointF p = new PointF(1, 1); + Assert.Throws(() => DrawImage_ImagePointFRectangleGraphicsUnit(new PointF[1] { p })); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePointF2RectangleGraphicsUnit() + { + PointF p = new PointF(1, 1); + Assert.Throws(() => DrawImage_ImagePointFRectangleGraphicsUnit(new PointF[2] { p, p })); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePointF3RectangleGraphicsUnit() + { + PointF p = new PointF(1, 1); + DrawImage_ImagePointFRectangleGraphicsUnit(new PointF[3] { p, p, p }); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePointF4RectangleGraphicsUnit() + { + PointF p = new PointF(1, 1); + Assert.Throws(() => DrawImage_ImagePointFRectangleGraphicsUnit(new PointF[4] { p, p, p, p })); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePointRectangleGraphicsUnitNull() + { + Point p = new Point(1, 1); + Point[] pts = new Point[3] { p, p, p }; + Rectangle r = new Rectangle(1, 2, 3, 4); + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawImage(bmp, pts, r, GraphicsUnit.Pixel, null); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImage_ImagePointRectangleGraphicsUnitAttributes() + { + Point p = new Point(1, 1); + Point[] pts = new Point[3] { p, p, p }; + Rectangle r = new Rectangle(1, 2, 3, 4); + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + ImageAttributes ia = new ImageAttributes(); + g.DrawImage(bmp, pts, r, GraphicsUnit.Pixel, ia); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImageUnscaled_NullPoint() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImageUnscaled(null, new Point(0, 0))); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImageUnscaled_ImagePoint() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawImageUnscaled(bmp, new Point(0, 0)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImageUnscaled_NullRectangle() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImageUnscaled(null, new Rectangle(0, 0, -1, -1))); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImageUnscaled_ImageRectangle() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawImageUnscaled(bmp, new Rectangle(0, 0, -1, -1)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImageUnscaled_NullIntInt() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImageUnscaled(null, 0, 0)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImageUnscaled_ImageIntInt() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawImageUnscaled(bmp, 0, 0); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImageUnscaled_NullIntIntIntInt() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImageUnscaled(null, 0, 0, -1, -1)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImageUnscaled_ImageIntIntIntInt() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + g.DrawImageUnscaled(bmp, 0, 0, -1, -1); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImageUnscaledAndClipped_Null() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawImageUnscaledAndClipped(null, new Rectangle(0, 0, 0, 0))); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawImageUnscaledAndClipped() + { + using (Bitmap bmp = new Bitmap(40, 40)) + using (Graphics g = Graphics.FromImage(bmp)) + { + // Rectangle is empty when X, Y, Width and Height == 0 + // (yep X and Y too, RectangleF only checks for Width and Height) + g.DrawImageUnscaledAndClipped(bmp, new Rectangle(0, 0, 0, 0)); + // so this one is half-empty ;-) + g.DrawImageUnscaledAndClipped(bmp, new Rectangle(20, 40, 0, 0)); + // negative width or height isn't empty (for Rectangle) + g.DrawImageUnscaledAndClipped(bmp, new Rectangle(10, 20, -1, 0)); + g.DrawImageUnscaledAndClipped(bmp, new Rectangle(20, 10, 0, -1)); + // smaller + g.DrawImageUnscaledAndClipped(bmp, new Rectangle(0, 0, 10, 20)); + g.DrawImageUnscaledAndClipped(bmp, new Rectangle(0, 0, 40, 10)); + g.DrawImageUnscaledAndClipped(bmp, new Rectangle(0, 0, 80, 20)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawPath_Pen_Null() + { + using (Bitmap bmp = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bmp)) + using (GraphicsPath path = new GraphicsPath()) + { + Assert.Throws(() => g.DrawPath(null, path)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawPath_Path_Null() + { + using (Bitmap bmp = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.DrawPath(Pens.Black, null)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void DrawPath_Arcs() + { + using (Bitmap bmp = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bmp)) + using (GraphicsPath path = new GraphicsPath()) + { + int d = 5; + Rectangle baserect = new Rectangle(0, 0, 19, 19); + Rectangle arcrect = new Rectangle(baserect.Location, new Size(d, d)); + + path.AddArc(arcrect, 180, 90); + arcrect.X = baserect.Right - d; + path.AddArc(arcrect, 270, 90); + arcrect.Y = baserect.Bottom - d; + path.AddArc(arcrect, 0, 90); + arcrect.X = baserect.Left; + path.AddArc(arcrect, 90, 90); + path.CloseFigure(); + g.Clear(Color.White); + g.DrawPath(Pens.SteelBlue, path); + + Assert.Equal(-12156236, bmp.GetPixel(0, 9).ToArgb()); + Assert.Equal(-1, bmp.GetPixel(1, 9).ToArgb()); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void FillPath_Brush_Null() + { + using (Bitmap bmp = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bmp)) + using (GraphicsPath path = new GraphicsPath()) + { + Assert.Throws(() => g.FillPath(null, path)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void FillPath_Path_Null() + { + using (Bitmap bmp = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Throws(() => g.FillPath(Brushes.Black, null)); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void FillPath_Arcs() + { + using (Bitmap bmp = new Bitmap(20, 20)) + using (Graphics g = Graphics.FromImage(bmp)) + using (GraphicsPath path = new GraphicsPath()) + { + int d = 5; + Rectangle baserect = new Rectangle(0, 0, 19, 19); + Rectangle arcrect = new Rectangle(baserect.Location, new Size(d, d)); + + path.AddArc(arcrect, 180, 90); + arcrect.X = baserect.Right - d; + path.AddArc(arcrect, 270, 90); + arcrect.Y = baserect.Bottom - d; + path.AddArc(arcrect, 0, 90); + arcrect.X = baserect.Left; + path.AddArc(arcrect, 90, 90); + path.CloseFigure(); + g.Clear(Color.White); + g.FillPath(Brushes.SteelBlue, path); + + Assert.Equal(-12156236, bmp.GetPixel(0, 9).ToArgb()); + Assert.Equal(-12156236, bmp.GetPixel(1, 9).ToArgb()); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void TransformPoints() + { + using (Bitmap bmp = new Bitmap(10, 10)) + using (Graphics g = Graphics.FromImage(bmp)) + { + Point[] pts = new Point[5]; + PointF[] ptf = new PointF[5]; + for (int i = 0; i < 5; i++) + { + pts[i] = new Point(i, i); + ptf[i] = new PointF(i, i); + } + + g.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Device, pts); + g.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Device, ptf); + + for (int i = 0; i < 5; i++) + { + Assert.Equal(i, pts[i].X); + Assert.Equal(i, pts[i].Y); + Assert.Equal(i, ptf[i].X); + Assert.Equal(i, ptf[i].Y); + } + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Dpi() + { + float x, y; + using (Bitmap bmp = new Bitmap(10, 10)) + { + using (Graphics g = Graphics.FromImage(bmp)) + { + x = g.DpiX - 10; + y = g.DpiY + 10; + } + bmp.SetResolution(x, y); + using (Graphics g = Graphics.FromImage(bmp)) + { + Assert.Equal(x, g.DpiX); + Assert.Equal(y, g.DpiY); + } + } + } + } + + public class GraphicsFullTrustTest + { + // note: this test would fail, on ReleaseHdc, without fulltrust + // i.e. it's a demand and not a linkdemand + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void GetReleaseHdc() + { + using (Bitmap b = new Bitmap(100, 100)) + { + using (Graphics g = Graphics.FromImage(b)) + { + IntPtr hdc1 = g.GetHdc(); + g.ReleaseHdc(hdc1); + IntPtr hdc2 = g.GetHdc(); + g.ReleaseHdc(hdc2); + Assert.Equal(hdc1, hdc2); + } + } + } + } +} diff --git a/src/System.Drawing.Common/tests/mono/System.Imaging/MetafileTest.cs b/src/System.Drawing.Common/tests/mono/System.Imaging/MetafileTest.cs new file mode 100644 index 000000000000..f58f13d1d7dd --- /dev/null +++ b/src/System.Drawing.Common/tests/mono/System.Imaging/MetafileTest.cs @@ -0,0 +1,485 @@ +// Licensed to the .NET Foundation under one or more agreements. +// See the LICENSE file in the project root for more information. +// +// Metafile class unit tests +// +// Authors: +// Sebastien Pouliot +// +// Copyright (C) 2007 Novell, Inc (http://www.novell.com) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Drawing.Imaging; +using System.IO; +using System.Runtime.InteropServices; +using System.Security.Permissions; +using Xunit; + +namespace MonoTests.System.Drawing.Imaging +{ + + public class MetafileTest + { + + public const string Bitmap = "non-inverted.bmp"; + public const string WmfPlaceable = "telescope_01.wmf"; + public const string Emf = "milkmateya01.emf"; + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Metafile_String() + { + string filename = Helpers.GetTestBitmapPath(WmfPlaceable); + using (Metafile mf = new Metafile(filename)) + using (Metafile clone = (Metafile)mf.Clone()) + { + } + } + + static public void Check_MetaHeader_WmfPlaceable(MetaHeader mh) + { + Assert.Equal(9, mh.HeaderSize); + Assert.Equal(98, mh.MaxRecord); + Assert.Equal(3, mh.NoObjects); + Assert.Equal(0, mh.NoParameters); + Assert.Equal(1737, mh.Size); + Assert.Equal(1, mh.Type); + Assert.Equal(0x300, mh.Version); + } + + public static void Check_MetafileHeader_WmfPlaceable(MetafileHeader header) + { + Assert.Equal(MetafileType.WmfPlaceable, header.Type); + Assert.Equal(0x300, header.Version); + // filesize - 22, which happens to be the size (22) of a PLACEABLEMETAHEADER struct + Assert.Equal(3474, header.MetafileSize); + + Assert.Equal(-30, header.Bounds.X); + Assert.Equal(-40, header.Bounds.Y); + Assert.Equal(3096, header.Bounds.Width); + Assert.Equal(4127, header.Bounds.Height); + Assert.Equal(606, header.DpiX); + Assert.Equal(606, header.DpiY); + Assert.Equal(0, header.EmfPlusHeaderSize); + Assert.Equal(0, header.LogicalDpiX); + Assert.Equal(0, header.LogicalDpiY); + + Assert.NotNull(header.WmfHeader); + Check_MetaHeader_WmfPlaceable(header.WmfHeader); + + Assert.False(header.IsDisplay()); + Assert.False(header.IsEmf()); + Assert.False(header.IsEmfOrEmfPlus()); + Assert.False(header.IsEmfPlus()); + Assert.False(header.IsEmfPlusDual()); + Assert.False(header.IsEmfPlusOnly()); + Assert.True(header.IsWmf()); + Assert.True(header.IsWmfPlaceable()); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void GetMetafileHeader_FromFile_WmfPlaceable() + { + using (Metafile mf = new Metafile(Helpers.GetTestBitmapPath(WmfPlaceable))) + { + MetafileHeader header1 = mf.GetMetafileHeader(); + Check_MetafileHeader_WmfPlaceable(header1); + + MetaHeader mh1 = header1.WmfHeader; + Check_MetaHeader_WmfPlaceable(mh1); + + MetaHeader mh2 = mf.GetMetafileHeader().WmfHeader; + Assert.NotSame(mh1, mh2); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void GetMetafileHeader_FromFileStream_WmfPlaceable() + { + using (FileStream fs = File.OpenRead(Helpers.GetTestBitmapPath(WmfPlaceable))) + using (Metafile mf = new Metafile(fs)) + { + MetafileHeader header1 = mf.GetMetafileHeader(); + Check_MetafileHeader_WmfPlaceable(header1); + + MetaHeader mh1 = header1.WmfHeader; + Check_MetaHeader_WmfPlaceable(mh1); + + MetaHeader mh2 = mf.GetMetafileHeader().WmfHeader; + Assert.NotSame(mh1, mh2); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void GetMetafileHeader_FromMemoryStream_WmfPlaceable() + { + string filename = Helpers.GetTestBitmapPath(WmfPlaceable); + using (MemoryStream ms = new MemoryStream(File.ReadAllBytes(filename))) + using (Metafile mf = new Metafile(ms)) + { + MetafileHeader header1 = mf.GetMetafileHeader(); + Check_MetafileHeader_WmfPlaceable(header1); + + MetaHeader mh1 = header1.WmfHeader; + Check_MetaHeader_WmfPlaceable(mh1); + + MetaHeader mh2 = mf.GetMetafileHeader().WmfHeader; + Assert.NotSame(mh1, mh2); + } + } + + public static void Check_MetafileHeader_Emf(MetafileHeader header) + { + Assert.Equal(MetafileType.Emf, header.Type); + Assert.Equal(65536, header.Version); + // extactly the filesize + Assert.Equal(20456, header.MetafileSize); + + Assert.Equal(0, header.Bounds.X); + Assert.Equal(0, header.Bounds.Y); + + Assert.Throws(() => header.WmfHeader); + + Assert.False(header.IsDisplay()); + Assert.True(header.IsEmf()); + Assert.True(header.IsEmfOrEmfPlus()); + Assert.False(header.IsEmfPlus()); + Assert.False(header.IsEmfPlusDual()); + Assert.False(header.IsEmfPlusOnly()); + Assert.False(header.IsWmf()); + Assert.False(header.IsWmfPlaceable()); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void GetMetafileHeader_FromFile_Emf() + { + using (Metafile mf = new Metafile(Helpers.GetTestBitmapPath(Emf))) + { + MetafileHeader header1 = mf.GetMetafileHeader(); + Check_MetafileHeader_Emf(header1); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void GetMetafileHeader_FromFileStream_Emf() + { + using (FileStream fs = File.OpenRead(Helpers.GetTestBitmapPath(Emf))) + using (Metafile mf = new Metafile(fs)) + { + MetafileHeader header1 = mf.GetMetafileHeader(); + Check_MetafileHeader_Emf(header1); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void GetMetafileHeader_FromMemoryStream_Emf() + { + string filename = Helpers.GetTestBitmapPath(Emf); + using (MemoryStream ms = new MemoryStream(File.ReadAllBytes(filename))) + using (Metafile mf = new Metafile(ms)) + { + MetafileHeader header1 = mf.GetMetafileHeader(); + Check_MetafileHeader_Emf(header1); + } + } + } + + public class MetafileFulltrustTest + { + private void CheckEmptyHeader(Metafile mf, EmfType type) + { + MetafileHeader mh = mf.GetMetafileHeader(); + Assert.Equal(0, mh.Bounds.X); + Assert.Equal(0, mh.Bounds.Y); + Assert.Equal(0, mh.Bounds.Width); + Assert.Equal(0, mh.Bounds.Height); + Assert.Equal(0, mh.MetafileSize); + switch (type) + { + case EmfType.EmfOnly: + Assert.Equal(MetafileType.Emf, mh.Type); + break; + case EmfType.EmfPlusDual: + Assert.Equal(MetafileType.EmfPlusDual, mh.Type); + break; + case EmfType.EmfPlusOnly: + Assert.Equal(MetafileType.EmfPlusOnly, mh.Type); + break; + default: + Assert.True(false, string.Format("Unknown EmfType '{0}'", type)); + break; + } + } + + private void Metafile_IntPtrEmfType(EmfType type) + { + using (Bitmap bmp = new Bitmap(10, 10, PixelFormat.Format32bppArgb)) + { + using (Graphics g = Graphics.FromImage(bmp)) + { + IntPtr hdc = g.GetHdc(); + try + { + Metafile mf = new Metafile(hdc, type); + CheckEmptyHeader(mf, type); + } + finally + { + g.ReleaseHdc(hdc); + } + } + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Metafile_IntPtrRectangle_Empty() + { + using (Bitmap bmp = new Bitmap(10, 10, PixelFormat.Format32bppArgb)) + using (Graphics g = Graphics.FromImage(bmp)) + { + IntPtr hdc = g.GetHdc(); + try + { + Metafile mf = new Metafile(hdc, new Rectangle()); + CheckEmptyHeader(mf, EmfType.EmfPlusDual); + } + finally + { + g.ReleaseHdc(hdc); + } + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Metafile_IntPtrRectangleF_Empty() + { + using (Bitmap bmp = new Bitmap(10, 10, PixelFormat.Format32bppArgb)) + using (Graphics g = Graphics.FromImage(bmp)) + { + IntPtr hdc = g.GetHdc(); + try + { + Metafile mf = new Metafile(hdc, new RectangleF()); + CheckEmptyHeader(mf, EmfType.EmfPlusDual); + } + finally + { + g.ReleaseHdc(hdc); + } + } + } + + private void Metafile_StreamEmfType(Stream stream, EmfType type) + { + using (Bitmap bmp = new Bitmap(10, 10, PixelFormat.Format32bppArgb)) + using (Graphics g = Graphics.FromImage(bmp)) + { + IntPtr hdc = g.GetHdc(); + try + { + Metafile mf = new Metafile(stream, hdc, type); + CheckEmptyHeader(mf, type); + } + finally + { + g.ReleaseHdc(hdc); + } + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Metafile_StreamIntPtrEmfType_Null() + { + Assert.Throws(() => Metafile_StreamEmfType(null, EmfType.EmfOnly)); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Metafile_StreamIntPtrEmfType_EmfOnly() + { + using (MemoryStream ms = new MemoryStream()) + { + Metafile_StreamEmfType(ms, EmfType.EmfOnly); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Metafile_StreamIntPtrEmfType_Invalid() + { + using (MemoryStream ms = new MemoryStream()) + { + Assert.Throws(() => Metafile_StreamEmfType(ms, (EmfType)Int32.MinValue)); + } + } + + private void CreateFilename(EmfType type, bool single) + { + string name = string.Format("{0}-{1}.emf", type, single ? "Single" : "Multiple"); + string filename = Path.Combine(Path.GetTempPath(), name); + Metafile mf; + using (Bitmap bmp = new Bitmap(100, 100, PixelFormat.Format32bppArgb)) + { + using (Graphics g = Graphics.FromImage(bmp)) + { + IntPtr hdc = g.GetHdc(); + try + { + mf = new Metafile(filename, hdc, type); + Assert.Equal(0, new FileInfo(filename).Length); + } + finally + { + g.ReleaseHdc(hdc); + } + } + long size = 0; + using (Graphics g = Graphics.FromImage(mf)) + { + g.FillRectangle(Brushes.BlueViolet, 10, 10, 80, 80); + size = new FileInfo(filename).Length; + Assert.Equal(0, size); + } + + if (!single) + { + using (Graphics g = Graphics.FromImage(mf)) + { + g.DrawRectangle(Pens.Azure, 10, 10, 80, 80); + } + } + mf.Dispose(); + Assert.Equal(size, new FileInfo(filename).Length); + } + } + + [ActiveIssue(20844)] + public void CreateFilename_SingleGraphics_EmfOnly() + { + CreateFilename(EmfType.EmfOnly, true); + } + + [ActiveIssue(20844)] + public void CreateFilename_SingleGraphics_EmfPlusDual() + { + CreateFilename(EmfType.EmfPlusDual, true); + } + + [ActiveIssue(20844)] + public void CreateFilename_SingleGraphics_EmfPlusOnly() + { + CreateFilename(EmfType.EmfPlusOnly, true); + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void Measure() + { + Font test_font = new Font(FontFamily.GenericMonospace, 12); + + Metafile mf; + using (Bitmap bmp = new Bitmap(100, 100, PixelFormat.Format32bppArgb)) + using (Graphics g = Graphics.FromImage(bmp)) + { + IntPtr hdc = g.GetHdc(); + try + { + mf = new Metafile(hdc, EmfType.EmfPlusOnly); + } + finally + { + g.ReleaseHdc(hdc); + } + } + using (Graphics g = Graphics.FromImage(mf)) + { + string text = "this\nis a test"; + CharacterRange[] ranges = new CharacterRange[2]; + ranges[0] = new CharacterRange(0, 5); + ranges[1] = new CharacterRange(5, 9); + + SizeF size = g.MeasureString(text, test_font); + Assert.False(size.IsEmpty); + + StringFormat sf = new StringFormat(); + sf.FormatFlags = StringFormatFlags.NoClip; + sf.SetMeasurableCharacterRanges(ranges); + + RectangleF rect = new RectangleF(0, 0, size.Width, size.Height); + Region[] region = g.MeasureCharacterRanges(text, test_font, rect, sf); + Assert.Equal(2, region.Length); + mf.Dispose(); + } + } + + [ConditionalFact(Helpers.GdiplusIsAvailable)] + public void WorldTransforms() + { + Metafile mf; + using (Bitmap bmp = new Bitmap(100, 100, PixelFormat.Format32bppArgb)) + { + using (Graphics g = Graphics.FromImage(bmp)) + { + IntPtr hdc = g.GetHdc(); + try + { + mf = new Metafile(hdc, EmfType.EmfPlusOnly); + } + finally + { + g.ReleaseHdc(hdc); + } + } + using (Graphics g = Graphics.FromImage(mf)) + { + Assert.True(g.Transform.IsIdentity); + g.ScaleTransform(2f, 0.5f); + Assert.False(g.Transform.IsIdentity); + g.RotateTransform(90); + g.TranslateTransform(-2, 2); + Matrix m = g.Transform; + g.MultiplyTransform(m); + // check + float[] elements = g.Transform.Elements; + Assert.Equal(-1f, elements[0], 5); + Assert.Equal(0f, elements[1], 5); + Assert.Equal(0f, elements[2], 5); + Assert.Equal(-1f, elements[3], 5); + Assert.Equal(-2f, elements[4], 5); + Assert.Equal(-3f, elements[5], 5); + + g.Transform = m; + elements = g.Transform.Elements; + Assert.Equal(0f, elements[0], 5); + Assert.Equal(0.5f, elements[1], 5); + Assert.Equal(-2f, elements[2], 5); + Assert.Equal(0f, elements[3], 5); + Assert.Equal(-4f, elements[4], 5); + Assert.Equal(-1f, elements[5], 5); + + g.ResetTransform(); + Assert.True(g.Transform.IsIdentity); + } + mf.Dispose(); + } + } + } +} diff --git a/src/System.IO.MemoryMappedFiles/src/Microsoft/Win32/SafeMemoryMappedViewHandle.Windows.cs b/src/System.IO.MemoryMappedFiles/src/Microsoft/Win32/SafeMemoryMappedViewHandle.Windows.cs index 2c4800c49265..6095bd6e2204 100644 --- a/src/System.IO.MemoryMappedFiles/src/Microsoft/Win32/SafeMemoryMappedViewHandle.Windows.cs +++ b/src/System.IO.MemoryMappedFiles/src/Microsoft/Win32/SafeMemoryMappedViewHandle.Windows.cs @@ -13,7 +13,7 @@ protected override bool ReleaseHandle() { IntPtr h = handle; handle = IntPtr.Zero; - return Interop.Kernel32.UnmapViewOfFile(h) != 0; + return Interop.Kernel32.UnmapViewOfFile(h); } } } diff --git a/src/System.IO.MemoryMappedFiles/src/System.IO.MemoryMappedFiles.csproj b/src/System.IO.MemoryMappedFiles/src/System.IO.MemoryMappedFiles.csproj index 9b57c2bd08b2..b7cd99bfd5e4 100644 --- a/src/System.IO.MemoryMappedFiles/src/System.IO.MemoryMappedFiles.csproj +++ b/src/System.IO.MemoryMappedFiles/src/System.IO.MemoryMappedFiles.csproj @@ -189,6 +189,7 @@ + diff --git a/src/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedFile.Windows.cs b/src/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedFile.Windows.cs index 8bb0d595e2a4..24ea3a4658dd 100644 --- a/src/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedFile.Windows.cs +++ b/src/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedFile.Windows.cs @@ -146,7 +146,7 @@ private static SafeMemoryMappedFileHandle CreateOrOpenCore( } else { - ThreadSleep(waitSleep); + Thread.Sleep(waitSleep); waitSleep *= 2; } } @@ -256,13 +256,5 @@ private static unsafe Interop.Kernel32.SECURITY_ATTRIBUTES GetSecAttrs(HandleInh } return secAttrs; } - - /// - /// Replacement for Thread.Sleep(milliseconds), which isn't available. - /// - internal static void ThreadSleep(int milliseconds) - { - new ManualResetEventSlim(initialState: false).Wait(milliseconds); - } } } diff --git a/src/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Windows.cs b/src/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Windows.cs index 711b40a0eb6b..5d203ea499e9 100644 --- a/src/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Windows.cs +++ b/src/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Windows.cs @@ -30,7 +30,7 @@ public static unsafe MemoryMappedView CreateView(SafeMemoryMappedFileHandle memM ulong nativeSize; long extraMemNeeded, newOffset; ValidateSizeAndOffset( - size, offset, GetSystemPageAllocationGranularity(), + size, offset, GetSystemPageAllocationGranularity(), out nativeSize, out extraMemNeeded, out newOffset); // if request is >= than total virtual, then MapViewOfFile will fail with meaningless error message @@ -107,9 +107,8 @@ public void Flush(UIntPtr capacity) { _viewHandle.AcquirePointer(ref firstPagePtr); - bool success = Interop.Kernel32.FlushViewOfFile((IntPtr)firstPagePtr, capacity) != 0; - if (success) - return; // This will visit the finally block. + if (Interop.Kernel32.FlushViewOfFile((IntPtr)firstPagePtr, capacity)) + return; // It is a known issue within the NTFS transaction log system that // causes FlushViewOfFile to intermittently fail with ERROR_LOCK_VIOLATION @@ -119,24 +118,25 @@ public void Flush(UIntPtr capacity) // this strategy successfully flushed the view after no more than 3 retries. int error = Marshal.GetLastWin32Error(); - bool canRetry = (!success && error == Interop.Errors.ERROR_LOCK_VIOLATION); + if (error != Interop.Errors.ERROR_LOCK_VIOLATION) + throw Win32Marshal.GetExceptionForWin32Error(error); SpinWait spinWait = new SpinWait(); - for (int w = 0; canRetry && w < MaxFlushWaits; w++) + for (int w = 0; w < MaxFlushWaits; w++) { int pause = (1 << w); // MaxFlushRetries should never be over 30 - MemoryMappedFile.ThreadSleep(pause); + Thread.Sleep(pause); - for (int r = 0; canRetry && r < MaxFlushRetriesPerWait; r++) + for (int r = 0; r < MaxFlushRetriesPerWait; r++) { - success = Interop.Kernel32.FlushViewOfFile((IntPtr)firstPagePtr, capacity) != 0; - if (success) - return; // This will visit the finally block. - - spinWait.SpinOnce(); + if (Interop.Kernel32.FlushViewOfFile((IntPtr)firstPagePtr, capacity)) + return; error = Marshal.GetLastWin32Error(); - canRetry = (error == Interop.Errors.ERROR_LOCK_VIOLATION); + if (error != Interop.Errors.ERROR_LOCK_VIOLATION) + throw Win32Marshal.GetExceptionForWin32Error(error); + + spinWait.SpinOnce(); } } diff --git a/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CrossProcess.cs b/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CrossProcess.cs index 867ee66ae21f..1916d09836d5 100644 --- a/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CrossProcess.cs +++ b/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CrossProcess.cs @@ -27,7 +27,7 @@ public void DataShared() acc.Flush(); // Spawn and then wait for the other process, which will verify the data and write its own known pattern - RemoteInvoke(DataShared_OtherProcess, file.Path).Dispose(); + RemoteInvoke(new Func(DataShared_OtherProcess), file.Path).Dispose(); // Now verify we're seeing the data from the other process for (int i = 0; i < capacity; i++) diff --git a/src/System.IO/tests/Stream/Stream.ReadWriteSpan.netcoreapp.cs b/src/System.IO/tests/Stream/Stream.ReadWriteSpan.netcoreapp.cs index 8825704cc13c..6bdea544b0f0 100644 --- a/src/System.IO/tests/Stream/Stream.ReadWriteSpan.netcoreapp.cs +++ b/src/System.IO/tests/Stream/Stream.ReadWriteSpan.netcoreapp.cs @@ -117,7 +117,7 @@ public async Task ReadAsyncMemory_WrapsNative_DelegatesToReadAsyncArrayWithPool_ using (var totalNativeMemory = new NativeOwnedMemory(30)) { - Memory totalMemory = totalNativeMemory.AsMemory; + Memory totalMemory = totalNativeMemory.Memory; Memory targetMemory = totalMemory.Slice(5, 20); Assert.Equal(10, await s.ReadAsync(targetMemory)); @@ -176,7 +176,7 @@ public async Task WriteAsyncMemory_WrapsNative_DelegatesToWrite_Success() using (var nativeMemory = new NativeOwnedMemory(10)) { - Memory memory = nativeMemory.AsMemory; + Memory memory = nativeMemory.Memory; memory.Span[2] = 0; memory.Span[3] = 1; memory.Span[4] = 2; diff --git a/src/System.IO/tests/StreamReader/StreamReaderTests.cs b/src/System.IO/tests/StreamReader/StreamReaderTests.cs index 0a70a82028ec..a127c809bed2 100644 --- a/src/System.IO/tests/StreamReader/StreamReaderTests.cs +++ b/src/System.IO/tests/StreamReader/StreamReaderTests.cs @@ -40,33 +40,7 @@ protected virtual Stream GetLargeStream() protected Tuple GetCharArrayStream() { - var chArr = new char[]{ - char.MinValue - ,char.MaxValue - ,'\t' - ,' ' - ,'$' - ,'@' - ,'#' - ,'\0' - ,'\v' - ,'\'' - ,'\u3190' - ,'\uC3A0' - ,'A' - ,'5' - ,'\r' - ,'\uFE70' - ,'-' - ,';' - ,'\r' - ,'\n' - ,'T' - ,'3' - ,'\n' - ,'K' - ,'\u00E6' - }; + var chArr = TestDataProvider.CharData; var ms = CreateStream(); var sw = new StreamWriter(ms); diff --git a/src/System.IO/tests/StreamWriter/StreamWriter.WriteTests.cs b/src/System.IO/tests/StreamWriter/StreamWriter.WriteTests.cs index 5c913da954f8..b36033d11833 100644 --- a/src/System.IO/tests/StreamWriter/StreamWriter.WriteTests.cs +++ b/src/System.IO/tests/StreamWriter/StreamWriter.WriteTests.cs @@ -20,7 +20,7 @@ protected virtual Stream CreateStream() [Fact] public void WriteChars() { - char[] chArr = setupArray(); + char[] chArr = TestDataProvider.CharData; // [] Write a wide variety of characters and read them back @@ -40,30 +40,6 @@ public void WriteChars() } } - private static char[] setupArray() - { - return new char[]{ - char.MinValue - ,char.MaxValue - ,'\t' - ,' ' - ,'$' - ,'@' - ,'#' - ,'\0' - ,'\v' - ,'\'' - ,'\u3190' - ,'\uC3A0' - ,'A' - ,'5' - ,'\uFE70' - ,'-' - ,';' - ,'\u00E6' - }; - } - [Fact] public void NullArray() { @@ -78,7 +54,7 @@ public void NullArray() [Fact] public void NegativeOffset() { - char[] chArr = setupArray(); + char[] chArr = TestDataProvider.CharData; // [] Exception if offset is negative Stream ms = CreateStream(); @@ -91,7 +67,7 @@ public void NegativeOffset() [Fact] public void NegativeCount() { - char[] chArr = setupArray(); + char[] chArr = TestDataProvider.CharData; // [] Exception if count is negative Stream ms = CreateStream(); @@ -104,7 +80,7 @@ public void NegativeCount() [Fact] public void WriteCustomLenghtStrings() { - char[] chArr = setupArray(); + char[] chArr = TestDataProvider.CharData; // [] Write some custom length strings Stream ms = CreateStream(); @@ -127,7 +103,7 @@ public void WriteCustomLenghtStrings() [Fact] public void WriteToStreamWriter() { - char[] chArr = setupArray(); + char[] chArr = TestDataProvider.CharData; // [] Just construct a streamwriter and write to it //------------------------------------------------- Stream ms = CreateStream(); @@ -149,7 +125,7 @@ public void WriteToStreamWriter() [Fact] public void TestWritingPastEndOfArray() { - char[] chArr = setupArray(); + char[] chArr = TestDataProvider.CharData; Stream ms = CreateStream(); StreamWriter sw = new StreamWriter(ms); @@ -160,7 +136,7 @@ public void TestWritingPastEndOfArray() [Fact] public void VerifyWrittenString() { - char[] chArr = setupArray(); + char[] chArr = TestDataProvider.CharData; // [] Write string with wide selection of characters and read it back StringBuilder sb = new StringBuilder(40); diff --git a/src/System.IO/tests/StringWriter/StringWriterTests.cs b/src/System.IO/tests/StringWriter/StringWriterTests.cs index 6655a2d54862..3e149612adb6 100644 --- a/src/System.IO/tests/StringWriter/StringWriterTests.cs +++ b/src/System.IO/tests/StringWriter/StringWriterTests.cs @@ -17,33 +17,9 @@ public class StringWriterTests static int[] iArrLargeValues = new int[] { int.MaxValue, int.MaxValue - 1, int.MaxValue / 2, int.MaxValue / 10, int.MaxValue / 100 }; static int[] iArrValidValues = new int[] { 10000, 100000, int.MaxValue / 2000, int.MaxValue / 5000, short.MaxValue }; - private static char[] getCharArray() - { - return new char[]{ - char.MinValue - ,char.MaxValue - ,'\t' - ,' ' - ,'$' - ,'@' - ,'#' - ,'\0' - ,'\v' - ,'\'' - ,'\u3190' - ,'\uC3A0' - ,'A' - ,'5' - ,'\uFE70' - ,'-' - ,';' - ,'\u00E6' - }; - } - private static StringBuilder getSb() { - var chArr = getCharArray(); + var chArr = TestDataProvider.CharData; var sb = new StringBuilder(40); for (int i = 0; i < chArr.Length; i++) sb.Append(chArr[i]); @@ -88,7 +64,7 @@ public static void SimpleWriter() [Fact] public static void WriteArray() { - var chArr = getCharArray(); + var chArr = TestDataProvider.CharData; StringBuilder sb = getSb(); StringWriter sw = new StringWriter(sb); @@ -125,7 +101,7 @@ public static void CantWriteNegativeCount() [Fact] public static void CantWriteIndexLargeValues() { - var chArr = getCharArray(); + var chArr = TestDataProvider.CharData; for (int i = 0; i < iArrLargeValues.Length; i++) { StringWriter sw = new StringWriter(); @@ -136,7 +112,7 @@ public static void CantWriteIndexLargeValues() [Fact] public static void CantWriteCountLargeValues() { - var chArr = getCharArray(); + var chArr = TestDataProvider.CharData; for (int i = 0; i < iArrLargeValues.Length; i++) { StringWriter sw = new StringWriter(); @@ -150,7 +126,7 @@ public static void WriteWithOffset() StringWriter sw = new StringWriter(); StringReader sr; - var chArr = getCharArray(); + var chArr = TestDataProvider.CharData; sw.Write(chArr, 2, 5); diff --git a/src/System.IO/tests/System.IO.Tests.csproj b/src/System.IO/tests/System.IO.Tests.csproj index fb3c81ecbe27..d54417b8cd02 100644 --- a/src/System.IO/tests/System.IO.Tests.csproj +++ b/src/System.IO/tests/System.IO.Tests.csproj @@ -65,6 +65,13 @@ Common\System\IO\WrappedMemoryStream.cs + + + + + + + diff --git a/src/System.IO/tests/TestDataProvider/TestDataProvider.cs b/src/System.IO/tests/TestDataProvider/TestDataProvider.cs new file mode 100644 index 000000000000..b7e37ddff144 --- /dev/null +++ b/src/System.IO/tests/TestDataProvider/TestDataProvider.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace System.IO.Tests +{ + public static class TestDataProvider + { + private static readonly char[] s_charData; + private static readonly char[] s_smallData; + private static readonly char[] s_largeData; + + public static object FirstObject { get; } = (object)1; + public static object SecondObject { get; } = (object)"[second object]"; + public static object ThirdObject { get; } = (object)""; + public static object[] MultipleObjects { get; } = new object[] { FirstObject, SecondObject, ThirdObject }; + + public static string FormatStringOneObject { get; } = "Object is {0}"; + public static string FormatStringTwoObjects { get; } = $"Object are '{0}', {SecondObject}"; + public static string FormatStringThreeObjects { get; } = $"Objects are {0}, {SecondObject}, {ThirdObject}"; + public static string FormatStringMultipleObjects { get; } = "Multiple Objects are: {0}, {1}, {2}"; + + static TestDataProvider() + { + s_charData = new char[] + { + char.MinValue, + char.MaxValue, + '\t', + ' ', + '$', + '@', + '#', + '\0', + '\v', + '\'', + '\u3190', + '\uC3A0', + 'A', + '5', + '\r', + '\uFE70', + '-', + ';', + '\r', + '\n', + 'T', + '3', + '\n', + 'K', + '\u00E6' + }; + + s_smallData = "HELLO".ToCharArray(); + + var data = new List(); + for (int count = 0; count < 1000; ++count) + { + data.AddRange(s_smallData); + } + s_largeData = data.ToArray(); + } + + public static char[] CharData => s_charData; + + public static char[] SmallData => s_smallData; + + public static char[] LargeData => s_largeData; + } +} diff --git a/src/System.IO/tests/TextReader/CharArrayTextReader.cs b/src/System.IO/tests/TextReader/CharArrayTextReader.cs new file mode 100644 index 000000000000..c82f2bb32188 --- /dev/null +++ b/src/System.IO/tests/TextReader/CharArrayTextReader.cs @@ -0,0 +1,37 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.IO.Tests +{ + public class CharArrayTextReader : TextReader + { + private readonly char[] _charBuffer; + private int _charPos = 0; + + public bool EndOfStream => _charPos >= _charBuffer.Length; + + public CharArrayTextReader(char[] data) + { + _charBuffer = data; + } + + public override int Peek() + { + if (_charPos == _charBuffer.Length) + { + return -1; + } + return _charBuffer[_charPos]; + } + + public override int Read() + { + if (_charPos == _charBuffer.Length) + { + return -1; + } + return _charBuffer[_charPos++]; + } + } +} diff --git a/src/System.IO/tests/TextReader/TextReaderTests.cs b/src/System.IO/tests/TextReader/TextReaderTests.cs new file mode 100644 index 000000000000..befc068cb6b1 --- /dev/null +++ b/src/System.IO/tests/TextReader/TextReaderTests.cs @@ -0,0 +1,248 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Threading.Tasks; +using Xunit; + +namespace System.IO.Tests +{ + public partial class TextReaderTests + { + protected (char[] chArr, CharArrayTextReader textReader) GetCharArray() + { + CharArrayTextReader tr = new CharArrayTextReader(TestDataProvider.CharData); + return (TestDataProvider.CharData, tr); + } + + [Fact] + public void EndOfStream() + { + using (CharArrayTextReader tr = new CharArrayTextReader(TestDataProvider.SmallData)) + { + var result = tr.ReadToEnd(); + + Assert.Equal("HELLO", result); + + Assert.True(tr.EndOfStream, "End of TextReader was not true after ReadToEnd"); + } + } + + [Fact] + public void NotEndOfStream() + { + using (CharArrayTextReader tr = new CharArrayTextReader(TestDataProvider.SmallData)) + { + char[] charBuff = new char[3]; + var result = tr.Read(charBuff, 0, 3); + + Assert.Equal(3, result); + + Assert.Equal("HEL", new string(charBuff)); + + Assert.False(tr.EndOfStream, "End of TextReader was true after ReadToEnd"); + } + } + + [Fact] + public async Task ReadToEndAsync() + { + using (CharArrayTextReader tr = new CharArrayTextReader(TestDataProvider.LargeData)) + { + var result = await tr.ReadToEndAsync(); + + Assert.Equal(5000, result.Length); + } + } + + [Fact] + public void TestRead() + { + (char[] chArr, CharArrayTextReader textReader) baseInfo = GetCharArray(); + using (CharArrayTextReader tr = baseInfo.textReader) + { + for (int count = 0; count < baseInfo.chArr.Length; ++count) + { + int tmp = tr.Read(); + Assert.Equal((int)baseInfo.chArr[count], tmp); + } + } + } + + [Fact] + public void ArgumentNullOnNullArray() + { + (char[] chArr, CharArrayTextReader textReader) baseInfo = GetCharArray(); + using (CharArrayTextReader tr = baseInfo.textReader) + { + Assert.Throws(() => tr.Read(null, 0, 0)); + } + } + + [Fact] + public void ArgumentOutOfRangeOnInvalidOffset() + { + using (CharArrayTextReader tr = GetCharArray().textReader) + { + Assert.Throws(() => tr.Read(new char[0], -1, 0)); + } + } + + [Fact] + public void ArgumentOutOfRangeOnNegativCount() + { + using (CharArrayTextReader tr = GetCharArray().textReader) + { + AssertExtensions.Throws(null, () => tr.Read(new char[0], 0, 1)); + } + } + + [Fact] + public void ArgumentExceptionOffsetAndCount() + { + using (CharArrayTextReader tr = GetCharArray().textReader) + { + AssertExtensions.Throws(null, () => tr.Read(new char[0], 2, 0)); + } + } + + [Fact] + public void EmptyInput() + { + using (CharArrayTextReader tr = new CharArrayTextReader(new char[] { })) + { + char[] buffer = new char[10]; + int read = tr.Read(buffer, 0, 1); + Assert.Equal(0, read); + } + } + + [Fact] + public void ReadCharArr() + { + (char[] chArr, CharArrayTextReader textReader) baseInfo = GetCharArray(); + using (CharArrayTextReader tr = baseInfo.textReader) + { + char[] chArr = new char[baseInfo.chArr.Length]; + + var read = tr.Read(chArr, 0, chArr.Length); + Assert.Equal(chArr.Length, read); + + for (int count = 0; count < baseInfo.chArr.Length; ++count) + { + Assert.Equal(baseInfo.chArr[count], chArr[count]); + } + } + } + + [Fact] + public void ReadBlockCharArr() + { + (char[] chArr, CharArrayTextReader textReader) baseInfo = GetCharArray(); + using (CharArrayTextReader tr = baseInfo.textReader) + { + char[] chArr = new char[baseInfo.chArr.Length]; + + var read = tr.ReadBlock(chArr, 0, chArr.Length); + Assert.Equal(chArr.Length, read); + + for (int count = 0; count < baseInfo.chArr.Length; ++count) + { + Assert.Equal(baseInfo.chArr[count], chArr[count]); + } + } + } + + [Fact] + public async void ReadBlockAsyncCharArr() + { + (char[] chArr, CharArrayTextReader textReader) baseInfo = GetCharArray(); + using (CharArrayTextReader tr = baseInfo.textReader) + { + char[] chArr = new char[baseInfo.chArr.Length]; + + var read = await tr.ReadBlockAsync(chArr, 0, chArr.Length); + Assert.Equal(chArr.Length, read); + + for (int count = 0; count < baseInfo.chArr.Length; ++count) + { + Assert.Equal(baseInfo.chArr[count], chArr[count]); + } + } + } + + [Fact] + public async Task ReadAsync() + { + (char[] chArr, CharArrayTextReader textReader) baseInfo = GetCharArray(); + using (CharArrayTextReader tr = baseInfo.textReader) + { + char[] chArr = new char[baseInfo.chArr.Length]; + + var read = await tr.ReadAsync(chArr, 4, 3); + Assert.Equal(read, 3); + + for (int count = 0; count < 3; ++count) + { + Assert.Equal(baseInfo.chArr[count], chArr[count + 4]); + } + } + } + + [Fact] + public void ReadLines() + { + (char[] chArr, CharArrayTextReader textReader) baseInfo = GetCharArray(); + using (CharArrayTextReader tr = baseInfo.textReader) + { + string valueString = new string(baseInfo.chArr); + + var data = tr.ReadLine(); + Assert.Equal(valueString.Substring(0, valueString.IndexOf('\r')), data); + + data = tr.ReadLine(); + Assert.Equal(valueString.Substring(valueString.IndexOf('\r') + 1, 3), data); + + data = tr.ReadLine(); + Assert.Equal(valueString.Substring(valueString.IndexOf('\n') + 1, 2), data); + + data = tr.ReadLine(); + Assert.Equal((valueString.Substring(valueString.LastIndexOf('\n') + 1)), data); + } + } + + [Fact] + public void ReadLines2() + { + (char[] chArr, CharArrayTextReader textReader) baseInfo = GetCharArray(); + using (CharArrayTextReader tr = baseInfo.textReader) + { + string valueString = new string(baseInfo.chArr); + + char[] temp = new char[10]; + tr.Read(temp, 0, 1); + var data = tr.ReadLine(); + + Assert.Equal(valueString.Substring(1, valueString.IndexOf('\r') - 1), data); + } + } + + [Fact] + public async Task ReadLineAsyncContinuousNewLinesAndTabs() + { + char[] newLineTabData = new char[] { '\n', '\n', '\r', '\r', '\n' }; + using (CharArrayTextReader tr = new CharArrayTextReader(newLineTabData)) + { + for (int count = 0; count < 4; ++count) + { + var data = await tr.ReadLineAsync(); + Assert.Equal(string.Empty, data); + } + + var eol = await tr.ReadLineAsync(); + Assert.Null(eol); + } + } + } +} diff --git a/src/System.IO/tests/TextReader/TextReaderTests.netcoreapp.cs b/src/System.IO/tests/TextReader/TextReaderTests.netcoreapp.cs new file mode 100644 index 000000000000..6ed515a57ee1 --- /dev/null +++ b/src/System.IO/tests/TextReader/TextReaderTests.netcoreapp.cs @@ -0,0 +1,51 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Threading.Tasks; +using Xunit; + +namespace System.IO.Tests +{ + public partial class TextReaderTests + { + [Fact] + public void ReadSpan() + { + (char[] chArr, CharArrayTextReader textReader) baseInfo = GetCharArray(); + using (CharArrayTextReader tr = baseInfo.textReader) + { + char[] chArr = new char[baseInfo.chArr.Length]; + var chSpan = new Span(chArr, 0, baseInfo.chArr.Length); + + var read = tr.Read(chSpan); + Assert.Equal(chArr.Length, read); + + for (int i = 0; i < baseInfo.chArr.Length; i++) + { + Assert.Equal(baseInfo.chArr[i], chArr[i]); + } + } + } + + [Fact] + public void ReadBlockSpan() + { + (char[] chArr, CharArrayTextReader textReader) baseInfo = GetCharArray(); + using (CharArrayTextReader tr = baseInfo.textReader) + { + char[] chArr = new char[baseInfo.chArr.Length]; + var chSpan = new Span(chArr, 0, baseInfo.chArr.Length); + + var read = tr.ReadBlock(chSpan); + Assert.Equal(chArr.Length, read); + + for (int i = 0; i < baseInfo.chArr.Length; i++) + { + Assert.Equal(baseInfo.chArr[i], chArr[i]); + } + } + } + } +} diff --git a/src/System.IO/tests/TextWriter/CharArrayTextWriter.cs b/src/System.IO/tests/TextWriter/CharArrayTextWriter.cs new file mode 100644 index 000000000000..0eb9b6194217 --- /dev/null +++ b/src/System.IO/tests/TextWriter/CharArrayTextWriter.cs @@ -0,0 +1,29 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Text; + +namespace System.IO.Tests +{ + public class CharArrayTextWriter : TextWriter + { + private StringBuilder _sb; + + public override Encoding Encoding => Encoding.Unicode; + + public CharArrayTextWriter() + { + _sb = new StringBuilder(); + } + + public override void Write(char value) + { + _sb.Append(value); + } + + public string Text => _sb.ToString(); + + public void Clear() => _sb.Clear(); + } +} diff --git a/src/System.IO/tests/TextWriter/TextWriterTests.cs b/src/System.IO/tests/TextWriter/TextWriterTests.cs new file mode 100644 index 000000000000..2a7aaf765877 --- /dev/null +++ b/src/System.IO/tests/TextWriter/TextWriterTests.cs @@ -0,0 +1,543 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Xunit; + +namespace System.IO.Tests +{ + public partial class TextWriterTests + { + protected static CharArrayTextWriter NewTextWriter => new CharArrayTextWriter() { NewLine = "---" }; + + #region Write Overloads + + [Fact] + public void WriteCharTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + for (int count = 0; count < TestDataProvider.CharData.Length; ++count) + { + tw.Write(TestDataProvider.CharData[count]); + } + Assert.Equal(new string(TestDataProvider.CharData), tw.Text); + } + } + + [Fact] + public void WriteCharArrayTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(TestDataProvider.CharData); + Assert.Equal(new string(TestDataProvider.CharData), tw.Text); + } + } + + [Fact] + public void WriteCharArrayIndexCountTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(TestDataProvider.CharData, 3, 5); + Assert.Equal(new string(TestDataProvider.CharData, 3, 5), tw.Text); + } + } + + [Fact] + public void WriteBoolTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(true); + Assert.Equal("True", tw.Text); + + tw.Clear(); + tw.Write(false); + Assert.Equal("False", tw.Text); + } + } + + [Fact] + public void WriteIntTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(int.MinValue); + Assert.Equal(int.MinValue.ToString(), tw.Text); + + tw.Clear(); + tw.Write(int.MaxValue); + Assert.Equal(int.MaxValue.ToString(), tw.Text); + } + } + + [Fact] + public void WriteUIntTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(uint.MinValue); + Assert.Equal(uint.MinValue.ToString(), tw.Text); + + tw.Clear(); + tw.Write(uint.MaxValue); + Assert.Equal(uint.MaxValue.ToString(), tw.Text); + } + } + + [Fact] + public void WriteLongTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(long.MinValue); + Assert.Equal(long.MinValue.ToString(), tw.Text); + + tw.Clear(); + tw.Write(long.MaxValue); + Assert.Equal(long.MaxValue.ToString(), tw.Text); + } + } + + [Fact] + public void WriteULongTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(ulong.MinValue); + Assert.Equal(ulong.MinValue.ToString(), tw.Text); + + tw.Clear(); + tw.Write(ulong.MaxValue); + Assert.Equal(ulong.MaxValue.ToString(), tw.Text); + + } + } + + [Fact] + public void WriteFloatTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(float.MinValue); + Assert.Equal(float.MinValue.ToString(), tw.Text); + + tw.Clear(); + tw.Write(float.MaxValue); + Assert.Equal(float.MaxValue.ToString(), tw.Text); + + tw.Clear(); + tw.Write(float.NaN); + Assert.Equal(float.NaN.ToString(), tw.Text); + } + } + + [Fact] + public void WriteDoubleTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(double.MinValue); + Assert.Equal(double.MinValue.ToString(), tw.Text); + tw.Clear(); + + tw.Write(double.MaxValue); + Assert.Equal(double.MaxValue.ToString(), tw.Text); + tw.Clear(); + + tw.Write(double.NaN); + Assert.Equal(double.NaN.ToString(), tw.Text); + tw.Clear(); + } + } + + [Fact] + public void WriteDecimalTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(decimal.MinValue); + Assert.Equal(decimal.MinValue.ToString(), tw.Text); + + tw.Clear(); + tw.Write(decimal.MaxValue); + Assert.Equal(decimal.MaxValue.ToString(), tw.Text); + } + } + + [Fact] + public void WriteStringTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(new string(TestDataProvider.CharData)); + Assert.Equal(new string(TestDataProvider.CharData), tw.Text); + } + } + + [Fact] + public void WriteObjectTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(TestDataProvider.FirstObject); + Assert.Equal(TestDataProvider.FirstObject.ToString(), tw.Text); + } + } + + [Fact] + public void WriteStringObjectTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(TestDataProvider.FormatStringOneObject, TestDataProvider.FirstObject); + Assert.Equal(string.Format(TestDataProvider.FormatStringOneObject, TestDataProvider.FirstObject), tw.Text); + } + } + + [Fact] + public void WriteStringTwoObjectsTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(TestDataProvider.FormatStringTwoObjects, TestDataProvider.FirstObject, TestDataProvider.SecondObject); + Assert.Equal(string.Format(TestDataProvider.FormatStringTwoObjects, TestDataProvider.FirstObject, TestDataProvider.SecondObject), tw.Text); + } + } + + [Fact] + public void WriteStringThreeObjectsTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(TestDataProvider.FormatStringThreeObjects, TestDataProvider.FirstObject, TestDataProvider.SecondObject, TestDataProvider.ThirdObject); + Assert.Equal(string.Format(TestDataProvider.FormatStringThreeObjects, TestDataProvider.FirstObject, TestDataProvider.SecondObject, TestDataProvider.ThirdObject), tw.Text); + } + } + + [Fact] + public void WriteStringMultipleObjectsTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.Write(TestDataProvider.FormatStringMultipleObjects, TestDataProvider.MultipleObjects); + Assert.Equal(string.Format(TestDataProvider.FormatStringMultipleObjects, TestDataProvider.MultipleObjects), tw.Text); + } + } + + #endregion + + #region WriteLine Overloads + + [Fact] + public void WriteLineTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(); + Assert.Equal(tw.NewLine, tw.Text); + } + } + + [Fact] + public void WriteLineCharTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + for (int count = 0; count < TestDataProvider.CharData.Length; ++count) + { + tw.WriteLine(TestDataProvider.CharData[count]); + } + Assert.Equal(string.Join(tw.NewLine, TestDataProvider.CharData.Select(ch => ch.ToString()).ToArray()) + tw.NewLine, tw.Text); + } + } + + [Fact] + public void WriteLineCharArrayTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(TestDataProvider.CharData); + Assert.Equal(new string(TestDataProvider.CharData) + tw.NewLine, tw.Text); + } + } + + [Fact] + public void WriteLineCharArrayIndexCountTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(TestDataProvider.CharData, 3, 5); + Assert.Equal(new string(TestDataProvider.CharData, 3, 5) + tw.NewLine, tw.Text); + } + } + + [Fact] + public void WriteLineBoolTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(true); + Assert.Equal("True" + tw.NewLine, tw.Text); + + tw.Clear(); + tw.WriteLine(false); + Assert.Equal("False" + tw.NewLine, tw.Text); + } + } + + [Fact] + public void WriteLineIntTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(int.MinValue); + Assert.Equal(int.MinValue.ToString() + tw.NewLine, tw.Text); + + tw.Clear(); + tw.WriteLine(int.MaxValue); + Assert.Equal(int.MaxValue.ToString() + tw.NewLine, tw.Text); + } + } + + [Fact] + public void WriteLineUIntTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(uint.MinValue); + Assert.Equal(uint.MinValue.ToString() + tw.NewLine, tw.Text); + + tw.Clear(); + tw.WriteLine(uint.MaxValue); + Assert.Equal(uint.MaxValue.ToString() + tw.NewLine, tw.Text); + } + } + + [Fact] + public void WriteLineLongTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(long.MinValue); + Assert.Equal(long.MinValue.ToString() + tw.NewLine, tw.Text); + + tw.Clear(); + tw.WriteLine(long.MaxValue); + Assert.Equal(long.MaxValue.ToString() + tw.NewLine, tw.Text); + } + } + + [Fact] + public void WriteLineULongTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(ulong.MinValue); + Assert.Equal(ulong.MinValue.ToString() + tw.NewLine, tw.Text); + + tw.Clear(); + tw.WriteLine(ulong.MaxValue); + Assert.Equal(ulong.MaxValue.ToString() + tw.NewLine, tw.Text); + } + } + + [Fact] + public void WriteLineFloatTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(float.MinValue); + Assert.Equal(float.MinValue.ToString() + tw.NewLine, tw.Text); + + tw.Clear(); + tw.WriteLine(float.MaxValue); + Assert.Equal(float.MaxValue.ToString() + tw.NewLine, tw.Text); + + tw.Clear(); + tw.WriteLine(float.NaN); + Assert.Equal(float.NaN.ToString() + tw.NewLine, tw.Text); + } + } + + [Fact] + public void WriteLineDoubleTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(double.MinValue); + Assert.Equal(double.MinValue.ToString() + tw.NewLine, tw.Text); + tw.Clear(); + + tw.WriteLine(double.MaxValue); + Assert.Equal(double.MaxValue.ToString() + tw.NewLine, tw.Text); + tw.Clear(); + + tw.WriteLine(double.NaN); + Assert.Equal(double.NaN.ToString() + tw.NewLine, tw.Text); + tw.Clear(); + } + } + + [Fact] + public void WriteLineDecimalTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(decimal.MinValue); + Assert.Equal(decimal.MinValue.ToString() + tw.NewLine, tw.Text); + + tw.Clear(); + tw.WriteLine(decimal.MaxValue); + Assert.Equal(decimal.MaxValue.ToString() + tw.NewLine, tw.Text); + } + } + + [Fact] + public void WriteLineStringTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(new string(TestDataProvider.CharData)); + Assert.Equal(new string(TestDataProvider.CharData) + tw.NewLine, tw.Text); + } + } + + [Fact] + public void WriteLineObjectTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(TestDataProvider.FirstObject); + Assert.Equal(TestDataProvider.FirstObject.ToString() + tw.NewLine, tw.Text); + } + } + + [Fact] + public void WriteLineStringObjectTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(TestDataProvider.FormatStringOneObject, TestDataProvider.FirstObject); + Assert.Equal(string.Format(TestDataProvider.FormatStringOneObject + tw.NewLine, TestDataProvider.FirstObject), tw.Text); + } + } + + [Fact] + public void WriteLineStringTwoObjectsTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(TestDataProvider.FormatStringTwoObjects, TestDataProvider.FirstObject, TestDataProvider.SecondObject); + Assert.Equal(string.Format(TestDataProvider.FormatStringTwoObjects + tw.NewLine, TestDataProvider.FirstObject, TestDataProvider.SecondObject), tw.Text); + } + } + + [Fact] + public void WriteLineStringThreeObjectsTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(TestDataProvider.FormatStringThreeObjects, TestDataProvider.FirstObject, TestDataProvider.SecondObject, TestDataProvider.ThirdObject); + Assert.Equal(string.Format(TestDataProvider.FormatStringThreeObjects + tw.NewLine, TestDataProvider.FirstObject, TestDataProvider.SecondObject, TestDataProvider.ThirdObject), tw.Text); + } + } + + [Fact] + public void WriteLineStringMultipleObjectsTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + tw.WriteLine(TestDataProvider.FormatStringMultipleObjects, TestDataProvider.MultipleObjects); + Assert.Equal(string.Format(TestDataProvider.FormatStringMultipleObjects + tw.NewLine, TestDataProvider.MultipleObjects), tw.Text); + } + } + + #endregion + + #region Write Async Overloads + + [Fact] + public async void WriteAsyncCharTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + await tw.WriteAsync('a'); + Assert.Equal("a", tw.Text); + } + } + + [Fact] + public async void WriteAsyncStringTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + var toWrite = new string(TestDataProvider.CharData); + await tw.WriteAsync(toWrite); + Assert.Equal(toWrite, tw.Text); + } + } + + [Fact] + public async void WriteAsyncCharArrayIndexCountTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + await tw.WriteAsync(TestDataProvider.CharData, 3, 5); + Assert.Equal(new string(TestDataProvider.CharData, 3, 5), tw.Text); + } + } + + #endregion + + #region WriteLineAsync Overloads + + [Fact] + public async void WriteLineAsyncTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + await tw.WriteLineAsync(); + Assert.Equal(tw.NewLine, tw.Text); + } + } + + [Fact] + public async void WriteLineAsyncCharTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + await tw.WriteLineAsync('a'); + Assert.Equal("a" + tw.NewLine, tw.Text); + } + } + + [Fact] + public async void WriteLineAsyncStringTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + var toWrite = new string(TestDataProvider.CharData); + await tw.WriteLineAsync(toWrite); + Assert.Equal(toWrite + tw.NewLine, tw.Text); + } + } + + [Fact] + public async void WriteLineAsyncCharArrayIndexCount() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + await tw.WriteLineAsync(TestDataProvider.CharData, 3, 5); + Assert.Equal(new string(TestDataProvider.CharData, 3, 5) + tw.NewLine, tw.Text); + } + } + + #endregion + } +} diff --git a/src/System.IO/tests/TextWriter/TextWriterTests.netcoreapp.cs b/src/System.IO/tests/TextWriter/TextWriterTests.netcoreapp.cs new file mode 100644 index 000000000000..9c53162ceb9e --- /dev/null +++ b/src/System.IO/tests/TextWriter/TextWriterTests.netcoreapp.cs @@ -0,0 +1,36 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Xunit; + +namespace System.IO.Tests +{ + public partial class TextWriterTests + { + [Fact] + public void WriteCharSpanTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + var rs = new ReadOnlySpan(TestDataProvider.CharData, 4, 6); + tw.Write(rs); + Assert.Equal(new string(rs), tw.Text); + } + } + + [Fact] + public void WriteLineCharSpanTest() + { + using (CharArrayTextWriter tw = NewTextWriter) + { + var rs = new ReadOnlySpan(TestDataProvider.CharData, 4, 6); + tw.WriteLine(rs); + Assert.Equal(new string(rs) + tw.NewLine, tw.Text); + } + } + } +} diff --git a/src/System.Memory/ref/System.Memory.cs b/src/System.Memory/ref/System.Memory.cs index a21d6c9da84f..ee6ecea323e4 100644 --- a/src/System.Memory/ref/System.Memory.cs +++ b/src/System.Memory/ref/System.Memory.cs @@ -7,7 +7,7 @@ namespace System { - public struct ReadOnlySpan + public readonly ref struct ReadOnlySpan { public static ReadOnlySpan Empty { get { throw null; } } public ReadOnlySpan(T[] array) { throw null;} @@ -39,7 +39,7 @@ public void CopyTo(Span destination) { } public bool TryCopyTo(Span destination) { throw null; } } - public struct Span + public readonly ref struct Span { public static Span Empty { get { throw null; } } public Span(T[] array) { throw null;} @@ -189,11 +189,11 @@ public interface IRetainable public abstract class OwnedMemory : IDisposable, IRetainable { - public Memory AsMemory { get { throw null; } } + public Memory Memory { get { throw null; } } public abstract bool IsDisposed { get; } protected abstract bool IsRetained { get; } public abstract int Length { get; } - public abstract Span AsSpan(); + public abstract Span Span { get; } public void Dispose() { throw null; } protected abstract void Dispose(bool disposing); public abstract MemoryHandle Pin(); diff --git a/src/System.Memory/ref/System.Memory.csproj b/src/System.Memory/ref/System.Memory.csproj index 0d0db9a2fd95..6226292ea1aa 100644 --- a/src/System.Memory/ref/System.Memory.csproj +++ b/src/System.Memory/ref/System.Memory.csproj @@ -6,6 +6,7 @@ false {E883935B-D8FD-4FC9-A189-9D9E7F7EF550} true + 7.2 diff --git a/src/System.Memory/src/System.Memory.csproj b/src/System.Memory/src/System.Memory.csproj index 1091463c00c4..04eaf96d323e 100644 --- a/src/System.Memory/src/System.Memory.csproj +++ b/src/System.Memory/src/System.Memory.csproj @@ -9,6 +9,7 @@ true $(DefineConstants);netcoreapp $(DefineConstants);netstandard11 + 7.2 diff --git a/src/System.Memory/src/System/Buffers/OwnedMemory.cs b/src/System.Memory/src/System/Buffers/OwnedMemory.cs index 446f3a8c6bb4..3daae843daec 100644 --- a/src/System.Memory/src/System/Buffers/OwnedMemory.cs +++ b/src/System.Memory/src/System/Buffers/OwnedMemory.cs @@ -22,7 +22,7 @@ public abstract class OwnedMemory : IDisposable, IRetainable /// /// Returns a span wrapping the underlying memory. /// - public abstract Span AsSpan(); + public abstract Span Span { get; } /// /// Returns a Memory if the underlying memory has not been freed. @@ -30,7 +30,7 @@ public abstract class OwnedMemory : IDisposable, IRetainable /// /// Thrown when the underlying memory has already been disposed. /// - public Memory AsMemory + public Memory Memory { get { diff --git a/src/System.Memory/src/System/Memory.cs b/src/System.Memory/src/System/Memory.cs index 29af166f5b4d..a71fc76fb2ed 100644 --- a/src/System.Memory/src/System/Memory.cs +++ b/src/System.Memory/src/System/Memory.cs @@ -176,7 +176,7 @@ public Span Span get { if (_index < 0) - return ((OwnedMemory)_arrayOrOwnedMemory).AsSpan().Slice(_index & RemoveOwnedFlagBitMask, _length); + return ((OwnedMemory)_arrayOrOwnedMemory).Span.Slice(_index & RemoveOwnedFlagBitMask, _length); return new Span((T[])_arrayOrOwnedMemory, _index, _length); } } diff --git a/src/System.Memory/src/System/ReadOnlyMemory.cs b/src/System.Memory/src/System/ReadOnlyMemory.cs index 94d3c224a03b..5d5e3bd78efc 100644 --- a/src/System.Memory/src/System/ReadOnlyMemory.cs +++ b/src/System.Memory/src/System/ReadOnlyMemory.cs @@ -161,7 +161,7 @@ public ReadOnlySpan Span get { if (_index < 0) - return ((OwnedMemory)_arrayOrOwnedMemory).AsSpan().Slice(_index & RemoveOwnedFlagBitMask, _length); + return ((OwnedMemory)_arrayOrOwnedMemory).Span.Slice(_index & RemoveOwnedFlagBitMask, _length); return new ReadOnlySpan((T[])_arrayOrOwnedMemory, _index, _length); } } diff --git a/src/System.Memory/src/System/ReadOnlySpan.cs b/src/System.Memory/src/System/ReadOnlySpan.cs index 896ad403c112..b5b0f1c567f2 100644 --- a/src/System.Memory/src/System/ReadOnlySpan.cs +++ b/src/System.Memory/src/System/ReadOnlySpan.cs @@ -15,7 +15,7 @@ namespace System /// ReadOnlySpan represents a contiguous region of arbitrary memory. Unlike arrays, it can point to either managed /// or native memory, or to memory allocated on the stack. It is type- and memory-safe. /// - public struct ReadOnlySpan + public readonly ref struct ReadOnlySpan { /// /// Creates a new read-only span over the entirety of the target array. diff --git a/src/System.Memory/src/System/Span.cs b/src/System.Memory/src/System/Span.cs index 8dee68df2da8..af2143cb2e94 100644 --- a/src/System.Memory/src/System/Span.cs +++ b/src/System.Memory/src/System/Span.cs @@ -17,7 +17,7 @@ namespace System /// [DebuggerTypeProxy(typeof(SpanDebugView<>))] [DebuggerDisplay("Length = {Length}")] - public struct Span + public readonly ref struct Span { /// /// Creates a new span over the entirety of the target array. diff --git a/src/System.Memory/tests/Memory/CustomMemoryForTest.cs b/src/System.Memory/tests/Memory/CustomMemoryForTest.cs index 1250731f3c60..ae23459eac65 100644 --- a/src/System.Memory/tests/Memory/CustomMemoryForTest.cs +++ b/src/System.Memory/tests/Memory/CustomMemoryForTest.cs @@ -29,11 +29,14 @@ public CustomMemoryForTest(T[] array) protected override bool IsRetained => _referenceCount > 0; - public override Span AsSpan() + public override Span Span { - if (IsDisposed) - throw new ObjectDisposedException(nameof(CustomMemoryForTest)); - return new Span(_array, 0, _array.Length); + get + { + if (IsDisposed) + throw new ObjectDisposedException(nameof(CustomMemoryForTest)); + return new Span(_array, 0, _array.Length); + } } public override MemoryHandle Pin() diff --git a/src/System.Memory/tests/Memory/OwnedMemory.cs b/src/System.Memory/tests/Memory/OwnedMemory.cs index c15c7f340d2e..cef1264f9151 100644 --- a/src/System.Memory/tests/Memory/OwnedMemory.cs +++ b/src/System.Memory/tests/Memory/OwnedMemory.cs @@ -18,7 +18,7 @@ public static void MemoryFromOwnedMemoryInt() { int[] a = { 91, 92, -93, 94 }; OwnedMemory owner = new CustomMemoryForTest(a); - Memory memory = owner.AsMemory; + Memory memory = owner.Memory; memory.Validate(91, 92, -93, 94); } @@ -27,7 +27,7 @@ public static void MemoryFromOwnedMemoryLong() { long[] a = { 91, -92, 93, 94, -95 }; OwnedMemory owner = new CustomMemoryForTest(a); - Memory memory = owner.AsMemory; + Memory memory = owner.Memory; memory.Validate(91, -92, 93, 94, -95); } @@ -38,7 +38,7 @@ public static void MemoryFromOwnedMemoryObject() object o2 = new object(); object[] a = { o1, o2 }; OwnedMemory owner = new CustomMemoryForTest(a); - Memory memory = owner.AsMemory; + Memory memory = owner.Memory; memory.ValidateReferenceType(o1, o2); } @@ -47,7 +47,7 @@ public static void ImplicitReadOnlyMemoryFromOwnedMemory() { long[] a = { 91, -92, 93, 94, -95 }; OwnedMemory owner = new CustomMemoryForTest(a); - Memory memory = owner.AsMemory; + Memory memory = owner.Memory; CastReadOnly(memory, 91, -92, 93, 94, -95); } @@ -67,7 +67,7 @@ public static void MemoryFromOwnedMemoryAfterDispose() int[] a = { 91, 92, -93, 94 }; OwnedMemory owner = new CustomMemoryForTest(a); owner.Dispose(); - Assert.Throws(() => owner.AsMemory); + Assert.Throws(() => owner.Memory); } [Fact] diff --git a/src/System.Memory/tests/Memory/Retain.cs b/src/System.Memory/tests/Memory/Retain.cs index 8032933bfddb..d64a9d0a7273 100644 --- a/src/System.Memory/tests/Memory/Retain.cs +++ b/src/System.Memory/tests/Memory/Retain.cs @@ -50,7 +50,7 @@ public static void OwnedMemoryRetainWithoutPinning() { int[] array = { 1, 2, 3, 4, 5 }; OwnedMemory owner = new CustomMemoryForTest(array); - Memory memory = owner.AsMemory; + Memory memory = owner.Memory; MemoryHandle handle = memory.Retain(); unsafe { @@ -65,7 +65,7 @@ public static void OwnedMemoryRetainWithPinning() { int[] array = { 1, 2, 3, 4, 5 }; OwnedMemory owner = new CustomMemoryForTest(array); - Memory memory = owner.AsMemory; + Memory memory = owner.Memory; MemoryHandle handle = memory.Retain(pin: true); unsafe { diff --git a/src/System.Memory/tests/Memory/Slice.cs b/src/System.Memory/tests/Memory/Slice.cs index 6cba89de4dea..70dcdb26e778 100644 --- a/src/System.Memory/tests/Memory/Slice.cs +++ b/src/System.Memory/tests/Memory/Slice.cs @@ -19,7 +19,7 @@ public static void SliceWithStart() Assert.True(Unsafe.AreSame(ref a[6], ref memory.Span.DangerousGetPinnableReference())); OwnedMemory owner = new CustomMemoryForTest(a); - Memory memoryFromOwner = owner.AsMemory.Slice(6); + Memory memoryFromOwner = owner.Memory.Slice(6); Assert.Equal(4, memoryFromOwner.Length); Assert.True(Unsafe.AreSame(ref a[6], ref memoryFromOwner.Span.DangerousGetPinnableReference())); @@ -34,7 +34,7 @@ public static void SliceWithStartPastEnd() Assert.True(Unsafe.AreSame(ref a[a.Length - 1], ref Unsafe.Subtract(ref memory.Span.DangerousGetPinnableReference(), 1))); OwnedMemory owner = new CustomMemoryForTest(a); - Memory memoryFromOwner = owner.AsMemory.Slice(a.Length); + Memory memoryFromOwner = owner.Memory.Slice(a.Length); Assert.Equal(0, memoryFromOwner.Length); Assert.True(Unsafe.AreSame(ref a[a.Length - 1], ref Unsafe.Subtract(ref memoryFromOwner.Span.DangerousGetPinnableReference(), 1))); @@ -49,7 +49,7 @@ public static void SliceWithStartAndLength() Assert.True(Unsafe.AreSame(ref a[3], ref memory.Span.DangerousGetPinnableReference())); OwnedMemory owner = new CustomMemoryForTest(a); - Memory memoryFromOwner = owner.AsMemory.Slice(3, 5); + Memory memoryFromOwner = owner.Memory.Slice(3, 5); Assert.Equal(5, memoryFromOwner.Length); Assert.True(Unsafe.AreSame(ref a[3], ref memoryFromOwner.Span.DangerousGetPinnableReference())); @@ -64,7 +64,7 @@ public static void SliceWithStartAndLengthUpToEnd() Assert.True(Unsafe.AreSame(ref a[4], ref memory.Span.DangerousGetPinnableReference())); OwnedMemory owner = new CustomMemoryForTest(a); - Memory memoryFromOwner = owner.AsMemory.Slice(4, 6); + Memory memoryFromOwner = owner.Memory.Slice(4, 6); Assert.Equal(6, memoryFromOwner.Length); Assert.True(Unsafe.AreSame(ref a[4], ref memoryFromOwner.Span.DangerousGetPinnableReference())); @@ -79,7 +79,7 @@ public static void SliceWithStartAndLengthPastEnd() Assert.True(Unsafe.AreSame(ref a[a.Length - 1], ref Unsafe.Subtract(ref memory.Span.DangerousGetPinnableReference(), 1))); OwnedMemory owner = new CustomMemoryForTest(a); - Memory memoryFromOwner = owner.AsMemory.Slice(a.Length, 0); + Memory memoryFromOwner = owner.Memory.Slice(a.Length, 0); Assert.Equal(0, memoryFromOwner.Length); Assert.True(Unsafe.AreSame(ref a[a.Length - 1], ref Unsafe.Subtract(ref memoryFromOwner.Span.DangerousGetPinnableReference(), 1))); @@ -98,7 +98,7 @@ public static void SliceRangeChecks() Assert.Throws(() => new Memory(a).Slice(a.Length, 1)); OwnedMemory owner = new CustomMemoryForTest(a); - Memory memory = owner.AsMemory; + Memory memory = owner.Memory; Assert.Throws(() => memory.Slice(-1)); Assert.Throws(() => memory.Slice(a.Length + 1)); diff --git a/src/System.Memory/tests/Memory/Span.cs b/src/System.Memory/tests/Memory/Span.cs index bb95fedfedf7..ec10646cc5da 100644 --- a/src/System.Memory/tests/Memory/Span.cs +++ b/src/System.Memory/tests/Memory/Span.cs @@ -22,7 +22,7 @@ public static void SpanFromCtorArrayInt() memory.Span.Validate(91, 92, -93, 94); OwnedMemory owner = new CustomMemoryForTest(a); - owner.AsMemory.Span.Validate(91, 92, -93, 94); + owner.Memory.Span.Validate(91, 92, -93, 94); } [Fact] @@ -38,7 +38,7 @@ public static void SpanFromCtorArrayLong() memory.Span.Validate(91, -92, 93, 94, -95); OwnedMemory owner = new CustomMemoryForTest(a); - owner.AsMemory.Span.Validate(91, -92, 93, 94, -95); + owner.Memory.Span.Validate(91, -92, 93, 94, -95); } [ActiveIssue(23952, TargetFrameworkMonikers.UapAot)] @@ -57,7 +57,7 @@ public static void SpanFromCtorArrayObject() memory.Span.ValidateReferenceType(o1, o2); OwnedMemory owner = new CustomMemoryForTest(a); - owner.AsMemory.Span.ValidateReferenceType(o1, o2); + owner.Memory.Span.ValidateReferenceType(o1, o2); } [Fact] @@ -73,7 +73,7 @@ public static void SpanFromCtorArrayZeroLength() memory.Span.Validate(); OwnedMemory owner = new CustomMemoryForTest(empty); - owner.AsMemory.Span.Validate(); + owner.Memory.Span.Validate(); } [Fact] @@ -92,7 +92,7 @@ public static void SpanFromCtorArrayWrongValueType() memory.Span.Validate(42, -1); OwnedMemory owner = new CustomMemoryForTest(aAsIntArray); - owner.AsMemory.Span.Validate(42, -1); + owner.Memory.Span.Validate(42, -1); } } diff --git a/src/System.Memory/tests/Memory/TryGetArray.cs b/src/System.Memory/tests/Memory/TryGetArray.cs index 2592218084ba..b2cbc098b762 100644 --- a/src/System.Memory/tests/Memory/TryGetArray.cs +++ b/src/System.Memory/tests/Memory/TryGetArray.cs @@ -28,7 +28,7 @@ public static void OwnedMemoryTryGetArray() { int[] array = new int[10]; OwnedMemory owner = new CustomMemoryForTest(array); - Memory memory = owner.AsMemory; + Memory memory = owner.Memory; Assert.True(memory.TryGetArray(out ArraySegment segment)); Assert.Equal(array.Length, segment.Count); diff --git a/src/System.Memory/tests/ReadOnlyMemory/DangerousTryGetArray.cs b/src/System.Memory/tests/ReadOnlyMemory/DangerousTryGetArray.cs index 01364cca7509..f6a9c7baf593 100644 --- a/src/System.Memory/tests/ReadOnlyMemory/DangerousTryGetArray.cs +++ b/src/System.Memory/tests/ReadOnlyMemory/DangerousTryGetArray.cs @@ -28,7 +28,7 @@ public static void OwnedMemoryTryGetArray() { int[] array = new int[10]; OwnedMemory owner = new CustomMemoryForTest(array); - ReadOnlyMemory memory = owner.AsMemory; + ReadOnlyMemory memory = owner.Memory; Assert.True(memory.DangerousTryGetArray(out ArraySegment segment)); Assert.Equal(array.Length, segment.Count); diff --git a/src/System.Memory/tests/ReadOnlyMemory/Retain.cs b/src/System.Memory/tests/ReadOnlyMemory/Retain.cs index 57ba8ec1ee6e..437b6f39b46d 100644 --- a/src/System.Memory/tests/ReadOnlyMemory/Retain.cs +++ b/src/System.Memory/tests/ReadOnlyMemory/Retain.cs @@ -50,7 +50,7 @@ public static void OwnedMemoryRetainWithoutPinning() { int[] array = { 1, 2, 3, 4, 5 }; OwnedMemory owner = new CustomMemoryForTest(array); - ReadOnlyMemory memory = owner.AsMemory; + ReadOnlyMemory memory = owner.Memory; MemoryHandle handle = memory.Retain(); unsafe { @@ -65,7 +65,7 @@ public static void OwnedMemoryRetainWithPinning() { int[] array = { 1, 2, 3, 4, 5 }; OwnedMemory owner = new CustomMemoryForTest(array); - ReadOnlyMemory memory = owner.AsMemory; + ReadOnlyMemory memory = owner.Memory; MemoryHandle handle = memory.Retain(pin: true); unsafe { diff --git a/src/System.Memory/tests/ReadOnlyMemory/Slice.cs b/src/System.Memory/tests/ReadOnlyMemory/Slice.cs index 48f032a96195..edeeb9d53f3c 100644 --- a/src/System.Memory/tests/ReadOnlyMemory/Slice.cs +++ b/src/System.Memory/tests/ReadOnlyMemory/Slice.cs @@ -19,7 +19,7 @@ public static void SliceWithStart() Assert.True(Unsafe.AreSame(ref a[6], ref memory.Span.DangerousGetPinnableReference())); OwnedMemory owner = new CustomMemoryForTest(a); - ReadOnlyMemory memoryFromOwner = ((ReadOnlyMemory)owner.AsMemory).Slice(6); + ReadOnlyMemory memoryFromOwner = ((ReadOnlyMemory)owner.Memory).Slice(6); Assert.Equal(4, memoryFromOwner.Length); Assert.True(Unsafe.AreSame(ref a[6], ref memoryFromOwner.Span.DangerousGetPinnableReference())); @@ -34,7 +34,7 @@ public static void SliceWithStartPastEnd() Assert.True(Unsafe.AreSame(ref a[a.Length - 1], ref Unsafe.Subtract(ref memory.Span.DangerousGetPinnableReference(), 1))); OwnedMemory owner = new CustomMemoryForTest(a); - ReadOnlyMemory memoryFromOwner = ((ReadOnlyMemory)owner.AsMemory).Slice(a.Length); + ReadOnlyMemory memoryFromOwner = ((ReadOnlyMemory)owner.Memory).Slice(a.Length); Assert.Equal(0, memoryFromOwner.Length); Assert.True(Unsafe.AreSame(ref a[a.Length - 1], ref Unsafe.Subtract(ref memoryFromOwner.Span.DangerousGetPinnableReference(), 1))); @@ -49,7 +49,7 @@ public static void SliceWithStartAndLength() Assert.True(Unsafe.AreSame(ref a[3], ref memory.Span.DangerousGetPinnableReference())); OwnedMemory owner = new CustomMemoryForTest(a); - ReadOnlyMemory memoryFromOwner = ((ReadOnlyMemory)owner.AsMemory).Slice(3, 5); + ReadOnlyMemory memoryFromOwner = ((ReadOnlyMemory)owner.Memory).Slice(3, 5); Assert.Equal(5, memoryFromOwner.Length); Assert.True(Unsafe.AreSame(ref a[3], ref memoryFromOwner.Span.DangerousGetPinnableReference())); @@ -64,7 +64,7 @@ public static void SliceWithStartAndLengthUpToEnd() Assert.True(Unsafe.AreSame(ref a[4], ref memory.Span.DangerousGetPinnableReference())); OwnedMemory owner = new CustomMemoryForTest(a); - ReadOnlyMemory memoryFromOwner = ((ReadOnlyMemory)owner.AsMemory).Slice(4, 6); + ReadOnlyMemory memoryFromOwner = ((ReadOnlyMemory)owner.Memory).Slice(4, 6); Assert.Equal(6, memoryFromOwner.Length); Assert.True(Unsafe.AreSame(ref a[4], ref memoryFromOwner.Span.DangerousGetPinnableReference())); @@ -79,7 +79,7 @@ public static void SliceWithStartAndLengthPastEnd() Assert.True(Unsafe.AreSame(ref a[a.Length - 1], ref Unsafe.Subtract(ref memory.Span.DangerousGetPinnableReference(), 1))); OwnedMemory owner = new CustomMemoryForTest(a); - ReadOnlyMemory memoryFromOwner = ((ReadOnlyMemory)owner.AsMemory).Slice(a.Length, 0); + ReadOnlyMemory memoryFromOwner = ((ReadOnlyMemory)owner.Memory).Slice(a.Length, 0); Assert.Equal(0, memoryFromOwner.Length); Assert.True(Unsafe.AreSame(ref a[a.Length - 1], ref Unsafe.Subtract(ref memoryFromOwner.Span.DangerousGetPinnableReference(), 1))); @@ -98,7 +98,7 @@ public static void SliceRangeChecks() Assert.Throws(() => new ReadOnlyMemory(a).Slice(a.Length, 1)); OwnedMemory owner = new CustomMemoryForTest(a); - ReadOnlyMemory memory = owner.AsMemory; + ReadOnlyMemory memory = owner.Memory; Assert.Throws(() => memory.Slice(-1)); Assert.Throws(() => memory.Slice(a.Length + 1)); diff --git a/src/System.Memory/tests/ReadOnlyMemory/Span.cs b/src/System.Memory/tests/ReadOnlyMemory/Span.cs index 5598788bd327..dd0a3b93748e 100644 --- a/src/System.Memory/tests/ReadOnlyMemory/Span.cs +++ b/src/System.Memory/tests/ReadOnlyMemory/Span.cs @@ -22,7 +22,7 @@ public static void SpanFromCtorArrayInt() memory.Span.Validate(91, 92, -93, 94); OwnedMemory owner = new CustomMemoryForTest(a); - ((ReadOnlyMemory)owner.AsMemory).Span.Validate(91, 92, -93, 94); + ((ReadOnlyMemory)owner.Memory).Span.Validate(91, 92, -93, 94); } [Fact] @@ -38,7 +38,7 @@ public static void SpanFromCtorArrayLong() memory.Span.Validate(91, -92, 93, 94, -95); OwnedMemory owner = new CustomMemoryForTest(a); - ((ReadOnlyMemory)owner.AsMemory).Span.Validate(91, -92, 93, 94, -95); + ((ReadOnlyMemory)owner.Memory).Span.Validate(91, -92, 93, 94, -95); } [ActiveIssue(23952, TargetFrameworkMonikers.UapAot)] @@ -57,7 +57,7 @@ public static void SpanFromCtorArrayObject() memory.Span.ValidateReferenceType(o1, o2); OwnedMemory owner = new CustomMemoryForTest(a); - ((ReadOnlyMemory)owner.AsMemory).Span.ValidateReferenceType(o1, o2); + ((ReadOnlyMemory)owner.Memory).Span.ValidateReferenceType(o1, o2); } [Fact] @@ -73,7 +73,7 @@ public static void SpanFromCtorArrayZeroLength() memory.Span.Validate(); OwnedMemory owner = new CustomMemoryForTest(empty); - ((ReadOnlyMemory)owner.AsMemory).Span.Validate(); + ((ReadOnlyMemory)owner.Memory).Span.Validate(); } [Fact] @@ -92,7 +92,7 @@ public static void SpanFromCtorArrayWrongValueType() memory.Span.Validate(42, -1); OwnedMemory owner = new CustomMemoryForTest(aAsIntArray); - ((ReadOnlyMemory)owner.AsMemory).Span.Validate(42, -1); + ((ReadOnlyMemory)owner.Memory).Span.Validate(42, -1); } } diff --git a/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpRequestCallback.cs b/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpRequestCallback.cs index 30c64f90c9f2..7bea4857cb7a 100644 --- a/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpRequestCallback.cs +++ b/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpRequestCallback.cs @@ -270,6 +270,7 @@ private static void OnRequestSendingRequest(WinHttpRequestState state) X509Chain chain = null; SslPolicyErrors sslPolicyErrors; + bool result = false; try { @@ -281,16 +282,16 @@ private static void OnRequestSendingRequest(WinHttpRequestState state) out chain, out sslPolicyErrors); - bool result = state.ServerCertificateValidationCallback( + result = state.ServerCertificateValidationCallback( state.RequestMessage, serverCertificate, chain, sslPolicyErrors); - if (!result) - { - throw WinHttpException.CreateExceptionUsingError( - (int)Interop.WinHttp.ERROR_WINHTTP_SECURE_FAILURE); - } + } + catch (Exception ex) + { + throw WinHttpException.CreateExceptionUsingError( + (int)Interop.WinHttp.ERROR_WINHTTP_SECURE_FAILURE, ex); } finally { @@ -301,6 +302,12 @@ private static void OnRequestSendingRequest(WinHttpRequestState state) serverCertificate.Dispose(); } + + if (!result) + { + throw WinHttpException.CreateExceptionUsingError( + (int)Interop.WinHttp.ERROR_WINHTTP_SECURE_FAILURE); + } } } diff --git a/src/System.Net.Http.WinHttpHandler/tests/FunctionalTests/ServerCertificateTest.cs b/src/System.Net.Http.WinHttpHandler/tests/FunctionalTests/ServerCertificateTest.cs index 7b7857172f91..0aad931e8997 100644 --- a/src/System.Net.Http.WinHttpHandler/tests/FunctionalTests/ServerCertificateTest.cs +++ b/src/System.Net.Http.WinHttpHandler/tests/FunctionalTests/ServerCertificateTest.cs @@ -111,14 +111,16 @@ public async Task UseCallback_CallbackReturnsFailure_ThrowsInnerSecurityFailureE [OuterLoop] // TODO: Issue #11345 [Fact] - public async Task UseCallback_CallbackThrowsSpecificException_ThrowsInnerSpecificException() + public async Task UseCallback_CallbackThrowsSpecificException_SpecificExceptionPropagatesAsBaseException() { var handler = new WinHttpHandler(); handler.ServerCertificateValidationCallback = CustomServerCertificateValidationCallback; using (var client = new HttpClient(handler)) { _validationCallbackHistory.ThrowException = true; - await Assert.ThrowsAsync(() => client.GetAsync(System.Net.Test.Common.Configuration.Http.SecureRemoteEchoServer)); + HttpRequestException ex = await Assert.ThrowsAsync(() => + client.GetAsync(System.Net.Test.Common.Configuration.Http.SecureRemoteEchoServer)); + Assert.True(ex.GetBaseException() is CustomException); } } diff --git a/src/System.Net.Http/src/System.Net.Http.csproj b/src/System.Net.Http/src/System.Net.Http.csproj index 6f26721bf00c..0ffd402c3005 100644 --- a/src/System.Net.Http/src/System.Net.Http.csproj +++ b/src/System.Net.Http/src/System.Net.Http.csproj @@ -450,6 +450,7 @@ + diff --git a/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs b/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs index 1203fb6512ee..aaadad33e3e3 100644 --- a/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs +++ b/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs @@ -2,16 +2,52 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics; using System.Net.Security; using System.Security.Cryptography.X509Certificates; +using System.Threading; namespace System.Net.Http { public partial class HttpClientHandler : HttpMessageHandler { // This partial implementation contains members common to all HttpClientHandler implementations. - - private static bool UseManagedHandler => Environment.GetEnvironmentVariable("COMPlus_UseManagedHttpClientHandler") == "true"; + private const string ManagedHandlerSettingName = "COMPlus_UseManagedHttpClientHandler"; + + private static LocalDataStoreSlot s_useManagedHandlerSlot; + + private static bool UseManagedHandler + { + get + { + // Check the environment variable to see if it's been set to true. If it has, use the managed handler. + if (Environment.GetEnvironmentVariable(ManagedHandlerSettingName) == "true") + { + return true; + } + + // Then check whether a thread local has been set with the same name. + // If it's been set to a Boolean true, also use the managed handler. + LocalDataStoreSlot slot = LazyInitializer.EnsureInitialized(ref s_useManagedHandlerSlot, () => + { + LocalDataStoreSlot local = Thread.GetNamedDataSlot(ManagedHandlerSettingName); + if (local == null) + { + try + { + local = Thread.AllocateNamedDataSlot(ManagedHandlerSettingName); + } + catch (ArgumentException) + { + local = Thread.GetNamedDataSlot(ManagedHandlerSettingName); + } + } + return local; + }); + Debug.Assert(slot != null); + return Thread.GetData(slot) is bool result && result; + } + } public static Func DangerousAcceptAnyServerCertificateValidator { get; } = delegate { return true; }; } diff --git a/src/System.Net.Http/src/System/Net/Http/Managed/HttpConnectionHandler.cs b/src/System.Net.Http/src/System/Net/Http/Managed/HttpConnectionHandler.cs index 00e498a34065..67d901083b59 100644 --- a/src/System.Net.Http/src/System/Net/Http/Managed/HttpConnectionHandler.cs +++ b/src/System.Net.Http/src/System/Net/Http/Managed/HttpConnectionHandler.cs @@ -50,7 +50,14 @@ private async ValueTask EstablishSslConnection(string host, HttpReque { callback = (object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) => { - return _settings._serverCertificateCustomValidationCallback(request, certificate as X509Certificate2, chain, sslPolicyErrors); + try + { + return _settings._serverCertificateCustomValidationCallback(request, certificate as X509Certificate2, chain, sslPolicyErrors); + } + catch (Exception e) + { + throw new HttpRequestException(SR.net_http_ssl_connection_failed, e); + } }; } diff --git a/src/System.Net.Http/tests/FunctionalTests/CancellationTest.cs b/src/System.Net.Http/tests/FunctionalTests/CancellationTest.cs index f97b8fee1ded..f29922b17c54 100644 --- a/src/System.Net.Http/tests/FunctionalTests/CancellationTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/CancellationTest.cs @@ -13,7 +13,7 @@ namespace System.Net.Http.Functional.Tests { - public class CancellationTest + public class CancellationTest : HttpClientTestBase { private readonly ITestOutputHelper _output; @@ -37,8 +37,10 @@ public async Task GetAsync_ResponseContentRead_CancelUsingTimeoutOrToken_TaskCan TimeSpan timeout = useTimeout ? new TimeSpan(0, 0, 1) : Timeout.InfiniteTimeSpan; CancellationToken cancellationToken = useTimeout ? CancellationToken.None : cts.Token; - using (var client = new HttpClient() { Timeout = timeout }) + using (HttpClient client = CreateHttpClient()) { + client.Timeout = timeout; + var triggerResponseWrite = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var triggerRequestCancel = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); @@ -107,7 +109,7 @@ public Task ReadAsStreamAsync_ReadAsync_Cancel_BodyNeverStarted_TaskCanceledQuic [InlineData(true)] public async Task ReadAsStreamAsync_ReadAsync_Cancel_TaskCanceledQuickly(bool startResponseBody) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { await LoopbackServer.CreateServerAsync(async (server, url) => { diff --git a/src/System.Net.Http/tests/FunctionalTests/DefaultCredentialsTest.cs b/src/System.Net.Http/tests/FunctionalTests/DefaultCredentialsTest.cs index cb67a527e4c5..2e003ac80b30 100644 --- a/src/System.Net.Http/tests/FunctionalTests/DefaultCredentialsTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/DefaultCredentialsTest.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Net.Test.Common; using System.Security.Principal; using System.Threading.Tasks; @@ -16,7 +15,7 @@ namespace System.Net.Http.Functional.Tests // TODO: #2383 - Consolidate the use of the environment variable settings to Common/tests. [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "dotnet/corefx #20010")] [PlatformSpecific(TestPlatforms.Windows)] - public class DefaultCredentialsTest + public class DefaultCredentialsTest : HttpClientTestBase { private static string DomainJoinedTestServer => Configuration.Http.DomainJoinedHttpHost; private static bool DomainJoinedTestsEnabled => !string.IsNullOrEmpty(DomainJoinedTestServer); @@ -51,7 +50,7 @@ public DefaultCredentialsTest(ITestOutputHelper output) [InlineData(true)] public async Task UseDefaultCredentials_DefaultValue_Unauthorized(bool useProxy) { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.UseProxy = useProxy; using (var client = new HttpClient(handler)) @@ -68,7 +67,9 @@ public async Task UseDefaultCredentials_DefaultValue_Unauthorized(bool useProxy) [InlineData(true)] public async Task UseDefaultCredentials_SetFalse_Unauthorized(bool useProxy) { - var handler = new HttpClientHandler { UseProxy = useProxy, UseDefaultCredentials = false }; + HttpClientHandler handler = CreateHttpClientHandler(); + handler.UseProxy = useProxy; + handler.UseDefaultCredentials = false; using (var client = new HttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(s_authenticatedServer)) @@ -84,7 +85,9 @@ public async Task UseDefaultCredentials_SetFalse_Unauthorized(bool useProxy) [InlineData(true)] public async Task UseDefaultCredentials_SetTrue_ConnectAsCurrentIdentity(bool useProxy) { - var handler = new HttpClientHandler { UseProxy = useProxy, UseDefaultCredentials = true }; + HttpClientHandler handler = CreateHttpClientHandler(); + handler.UseProxy = useProxy; + handler.UseDefaultCredentials = true; using (var client = new HttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(s_authenticatedServer)) @@ -105,7 +108,9 @@ public async Task UseDefaultCredentials_SetTrue_ConnectAsCurrentIdentity(bool us [InlineData(true)] public async Task UseDefaultCredentials_SetTrueAndServerOffersMultipleSchemes_Ok(bool useProxy) { - var handler = new HttpClientHandler { UseProxy = useProxy, UseDefaultCredentials = true }; + HttpClientHandler handler = CreateHttpClientHandler(); + handler.UseProxy = useProxy; + handler.UseDefaultCredentials = true; using (var client = new HttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(s_multipleSchemesAuthenticatedServer)) @@ -126,10 +131,10 @@ public async Task UseDefaultCredentials_SetTrueAndServerOffersMultipleSchemes_Ok [InlineData(true)] public async Task Credentials_SetToSpecificCredential_ConnectAsSpecificIdentity(bool useProxy) { - var handler = new HttpClientHandler { - UseProxy = useProxy, - UseDefaultCredentials = false, - Credentials = _specificCredential }; + HttpClientHandler handler = CreateHttpClientHandler(); + handler.UseProxy = useProxy; + handler.UseDefaultCredentials = false; + handler.Credentials = _specificCredential; using (var client = new HttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(s_authenticatedServer)) @@ -148,7 +153,7 @@ public async Task Credentials_SetToSpecificCredential_ConnectAsSpecificIdentity( [InlineData(true)] public async Task Credentials_SetToWrappedDefaultCredential_ConnectAsCurrentIdentity(bool useProxy) { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.UseProxy = useProxy; handler.Credentials = new CredentialWrapper { @@ -172,7 +177,7 @@ public async Task Credentials_SetToWrappedDefaultCredential_ConnectAsCurrentIden [ConditionalFact(nameof(DomainProxyTestsEnabled))] public async Task Proxy_UseAuthenticatedProxyWithNoCredentials_ProxyAuthenticationRequired() { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.Proxy = new AuthenticatedProxy(null); using (var client = new HttpClient(handler)) @@ -187,7 +192,7 @@ public async Task Proxy_UseAuthenticatedProxyWithNoCredentials_ProxyAuthenticati [ConditionalFact(nameof(DomainProxyTestsEnabled))] public async Task Proxy_UseAuthenticatedProxyWithDefaultCredentials_OK() { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.Proxy = new AuthenticatedProxy(CredentialCache.DefaultCredentials); using (var client = new HttpClient(handler)) @@ -206,7 +211,7 @@ public async Task Proxy_UseAuthenticatedProxyWithWrappedDefaultCredentials_OK() InnerCredentials = CredentialCache.DefaultCredentials }; - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.Proxy = new AuthenticatedProxy(wrappedCreds); using (var client = new HttpClient(handler)) diff --git a/src/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs b/src/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs index 562fd1e56f90..f899baa83f0c 100644 --- a/src/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs +++ b/src/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.Tracing; -using System.IO; using System.Linq; using System.Net.Http.Headers; using System.Net.Test.Common; @@ -21,7 +20,7 @@ namespace System.Net.Http.Functional.Tests [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] - public class DiagnosticsTest : RemoteExecutorTestBase + public class DiagnosticsTest : HttpClientTestBase { [Fact] public static void EventSource_ExistsWithCorrectId() @@ -48,7 +47,7 @@ public static void EventSource_ExistsWithCorrectId() [Fact] public void SendAsync_ExpectedDiagnosticSourceLogging() { - RemoteInvoke(() => + RemoteInvoke(useManagedHandlerString => { bool requestLogged = false; Guid requestGuid = Guid.Empty; @@ -90,7 +89,7 @@ public void SendAsync_ExpectedDiagnosticSourceLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable( s => !s.Contains("HttpRequestOut")); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient(useManagedHandlerString)) { client.GetAsync(Configuration.Http.RemoteEchoServer).Result.Dispose(); } @@ -105,7 +104,7 @@ public void SendAsync_ExpectedDiagnosticSourceLogging() } return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } /// @@ -116,7 +115,7 @@ public void SendAsync_ExpectedDiagnosticSourceLogging() [Fact] public void SendAsync_ExpectedDiagnosticSourceNoLogging() { - RemoteInvoke(() => + RemoteInvoke(useManagedHandlerString => { bool requestLogged = false; bool responseLogged = false; @@ -145,7 +144,7 @@ public void SendAsync_ExpectedDiagnosticSourceNoLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient(useManagedHandlerString)) { LoopbackServer.CreateServerAsync(async (server, url) => { @@ -165,7 +164,7 @@ public void SendAsync_ExpectedDiagnosticSourceNoLogging() Assert.False(activityStopLogged, "HttpRequestOut.Stop was logged while logging disabled."); } return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [ActiveIssue(23771, TestPlatforms.AnyUnix)] @@ -173,7 +172,7 @@ public void SendAsync_ExpectedDiagnosticSourceNoLogging() [Fact] public void SendAsync_HttpTracingEnabled_Succeeds() { - RemoteInvoke(async () => + RemoteInvoke(async useManagedHandlerString => { using (var listener = new TestEventListener("Microsoft-System-Net-Http", EventLevel.Verbose)) { @@ -181,7 +180,7 @@ public void SendAsync_HttpTracingEnabled_Succeeds() await listener.RunWithCallbackAsync(events.Enqueue, async () => { // Exercise various code paths to get coverage of tracing - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient(useManagedHandlerString)) { // Do a get to a loopback server await LoopbackServer.CreateServerAsync(async (server, url) => @@ -210,14 +209,14 @@ await TestHelper.WhenAllCompletedOrAnyFailed( } return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [OuterLoop] // TODO: Issue #11345 [Fact] public void SendAsync_ExpectedDiagnosticExceptionLogging() { - RemoteInvoke(() => + RemoteInvoke(useManagedHandlerString => { bool exceptionLogged = false; bool responseLogged = false; @@ -243,7 +242,7 @@ public void SendAsync_ExpectedDiagnosticExceptionLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(s => !s.Contains("HttpRequestOut")); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient(useManagedHandlerString)) { Assert.ThrowsAsync(() => client.GetAsync($"http://{Guid.NewGuid()}.com")).Wait(); } @@ -255,7 +254,7 @@ public void SendAsync_ExpectedDiagnosticExceptionLogging() } return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [ActiveIssue(23209)] @@ -263,7 +262,7 @@ public void SendAsync_ExpectedDiagnosticExceptionLogging() [Fact] public void SendAsync_ExpectedDiagnosticCancelledLogging() { - RemoteInvoke(() => + RemoteInvoke(useManagedHandlerString => { bool cancelLogged = false; var diagnosticListenerObserver = new FakeDiagnosticListenerObserver(kvp => @@ -280,7 +279,7 @@ public void SendAsync_ExpectedDiagnosticCancelledLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(s => !s.Contains("HttpRequestOut")); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient(useManagedHandlerString)) { LoopbackServer.CreateServerAsync(async (server, url) => { @@ -302,14 +301,14 @@ public void SendAsync_ExpectedDiagnosticCancelledLogging() diagnosticListenerObserver.Disable(); return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [OuterLoop] // TODO: Issue #11345 [Fact] public void SendAsync_ExpectedDiagnosticSourceActivityLogging() { - RemoteInvoke(() => + RemoteInvoke(useManagedHandlerString => { bool requestLogged = false; bool responseLogged = false; @@ -355,7 +354,7 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(s => s.Contains("HttpRequestOut")); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient(useManagedHandlerString)) { LoopbackServer.CreateServerAsync(async (server, url) => { @@ -379,14 +378,14 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLogging() } return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [OuterLoop] // TODO: Issue #11345 [Fact] public void SendAsync_ExpectedDiagnosticSourceUrlFilteredActivityLogging() { - RemoteInvoke(() => + RemoteInvoke(useManagedHandlerString => { bool activityStartLogged = false; bool activityStopLogged = false; @@ -409,7 +408,7 @@ public void SendAsync_ExpectedDiagnosticSourceUrlFilteredActivityLogging() } return true; }); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient(useManagedHandlerString)) { client.GetAsync(Configuration.Http.RemoteEchoServer).Result.Dispose(); } @@ -420,14 +419,14 @@ public void SendAsync_ExpectedDiagnosticSourceUrlFilteredActivityLogging() } return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [OuterLoop] // TODO: Issue #11345 [Fact] public void SendAsync_ExpectedDiagnosticExceptionActivityLogging() { - RemoteInvoke(() => + RemoteInvoke(useManagedHandlerString => { bool exceptionLogged = false; bool activityStopLogged = false; @@ -454,7 +453,7 @@ public void SendAsync_ExpectedDiagnosticExceptionActivityLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient(useManagedHandlerString)) { Assert.ThrowsAsync(() => client.GetAsync($"http://{Guid.NewGuid()}.com")).Wait(); } @@ -466,14 +465,14 @@ public void SendAsync_ExpectedDiagnosticExceptionActivityLogging() } return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [OuterLoop] // TODO: Issue #11345 [Fact] public void SendAsync_ExpectedDiagnosticSourceNewAndDeprecatedEventsLogging() { - RemoteInvoke(() => + RemoteInvoke(useManagedHandlerString => { bool requestLogged = false; bool responseLogged = false; @@ -491,7 +490,7 @@ public void SendAsync_ExpectedDiagnosticSourceNewAndDeprecatedEventsLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient(useManagedHandlerString)) { client.GetAsync(Configuration.Http.RemoteEchoServer).Result.Dispose(); } @@ -505,14 +504,14 @@ public void SendAsync_ExpectedDiagnosticSourceNewAndDeprecatedEventsLogging() } return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [OuterLoop] // TODO: Issue #11345 [Fact] public void SendAsync_ExpectedDiagnosticExceptionOnlyActivityLogging() { - RemoteInvoke(() => + RemoteInvoke(useManagedHandlerString => { bool exceptionLogged = false; bool activityLogged = false; @@ -531,7 +530,7 @@ public void SendAsync_ExpectedDiagnosticExceptionOnlyActivityLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(s => s.Equals("System.Net.Http.Exception")); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient(useManagedHandlerString)) { Assert.ThrowsAsync(() => client.GetAsync($"http://{Guid.NewGuid()}.com")).Wait(); } @@ -543,14 +542,14 @@ public void SendAsync_ExpectedDiagnosticExceptionOnlyActivityLogging() } return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [OuterLoop] // TODO: Issue #11345 [Fact] public void SendAsync_ExpectedDiagnosticStopOnlyActivityLogging() { - RemoteInvoke(() => + RemoteInvoke(useManagedHandlerString => { bool activityStartLogged = false; bool activityStopLogged = false; @@ -568,7 +567,7 @@ public void SendAsync_ExpectedDiagnosticStopOnlyActivityLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(s => s.Equals("System.Net.Http.HttpRequestOut")); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient(useManagedHandlerString)) { client.GetAsync(Configuration.Http.RemoteEchoServer).Result.Dispose(); } @@ -580,14 +579,14 @@ public void SendAsync_ExpectedDiagnosticStopOnlyActivityLogging() } return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [OuterLoop] // TODO: Issue #11345 [Fact] public void SendAsync_ExpectedDiagnosticCancelledActivityLogging() { - RemoteInvoke(() => + RemoteInvoke(useManagedHandlerString => { bool cancelLogged = false; var diagnosticListenerObserver = new FakeDiagnosticListenerObserver(kvp => @@ -605,7 +604,7 @@ public void SendAsync_ExpectedDiagnosticCancelledActivityLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient(useManagedHandlerString)) { LoopbackServer.CreateServerAsync(async (server, url) => { @@ -627,7 +626,7 @@ public void SendAsync_ExpectedDiagnosticCancelledActivityLogging() diagnosticListenerObserver.Disable(); return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } private static T GetPropertyValueFromAnonymousTypeInstance(object obj, string propertyName) diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientEKUTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientEKUTest.cs index 831c89310e71..d5c693a6fde8 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientEKUTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientEKUTest.cs @@ -15,7 +15,7 @@ namespace System.Net.Http.Functional.Tests { using Configuration = System.Net.Test.Common.Configuration; - public class HttpClientEKUTest + public class HttpClientEKUTest : HttpClientTestBase { // Curl + OSX SecureTransport doesn't support the custom certificate callback. private static bool BackendSupportsCustomCertificateHandling => @@ -56,7 +56,7 @@ public async Task HttpClient_NoEKUServerAuth_Ok() options.ServerCertificate = serverCertificateNoEku; using (var server = new HttpsTestServer(options)) - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { server.Start(); @@ -78,7 +78,7 @@ public async Task HttpClient_ClientEKUServerAuth_Fails() options.ServerCertificate = serverCertificateWrongEku; using (var server = new HttpsTestServer(options)) - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { server.Start(); @@ -101,7 +101,7 @@ public async Task HttpClient_NoEKUClientAuth_Ok() options.RequireClientAuthentication = true; using (var server = new HttpsTestServer(options)) - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { server.Start(); @@ -125,7 +125,7 @@ public async Task HttpClient_ServerEKUClientAuth_Fails() options.RequireClientAuthentication = true; using (var server = new HttpsTestServer(options)) - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { server.Start(); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AcceptAllCerts.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AcceptAllCerts.cs index 157a84a3061a..b1544255b126 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AcceptAllCerts.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AcceptAllCerts.cs @@ -5,7 +5,6 @@ using System.Net.Security; using System.Net.Test.Common; using System.Security.Authentication; -using System.Security.Cryptography.X509Certificates; using System.Threading.Tasks; using Xunit; @@ -13,7 +12,7 @@ namespace System.Net.Http.Functional.Tests { using Configuration = System.Net.Test.Common.Configuration; - public class HttpClientHandler_DangerousAcceptAllCertificatesValidator_Test + public class HttpClientHandler_DangerousAcceptAllCertificatesValidator_Test : HttpClientTestBase { // TODO: https://github.com/dotnet/corefx/issues/7812 private static bool ClientSupportsDHECipherSuites => (!PlatformDetection.IsWindows || PlatformDetection.IsWindows10Version1607OrGreater); @@ -35,9 +34,11 @@ public void SingletonReturnsTrue() [InlineData(SslProtocols.None, true)] public async Task SetDelegate_ConnectionSucceeds(SslProtocols acceptedProtocol, bool requestOnlyThisProtocol) { - using (var handler = new HttpClientHandler() { ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator }) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { + handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator; + // Refer issue: #22089 // When the server uses SslProtocols.Tls, on MacOS, SecureTransport ends up picking a cipher suite // for TLS1.2, even though server said it was only using TLS1.0. LibreSsl throws error that @@ -69,8 +70,10 @@ await TestHelper.WhenAllCompletedOrAnyFailed( [MemberData(nameof(InvalidCertificateServers))] public async Task InvalidCertificateServers_CertificateValidationDisabled_Succeeds(string url) { - using (var client = new HttpClient(new HttpClientHandler() { ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator })) + using (HttpClientHandler handler = CreateHttpClientHandler()) + using (var client = new HttpClient(handler)) { + handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator; (await client.GetAsync(url)).Dispose(); } } diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs index 84262143d779..9530ce22fe0a 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics; using System.Net.Security; using System.Net.Sockets; using System.Net.Test.Common; @@ -15,13 +14,13 @@ namespace System.Net.Http.Functional.Tests { using Configuration = System.Net.Test.Common.Configuration; - public class HttpClientHandler_ClientCertificates_Test : RemoteExecutorTestBase + public class HttpClientHandler_ClientCertificates_Test : HttpClientTestBase { - public static bool CanTestCertificates => + public bool CanTestCertificates => Capability.IsTrustedRootCertificateInstalled() && (BackendSupportsCustomCertificateHandling || Capability.AreHostsFileNamesInstalled()); - public static bool CanTestClientCertificates => + public bool CanTestClientCertificates => CanTestCertificates && BackendSupportsCustomCertificateHandling; public HttpClientHandler_ClientCertificates_Test(ITestOutputHelper output) @@ -33,7 +32,7 @@ public HttpClientHandler_ClientCertificates_Test(ITestOutputHelper output) [Fact] public void ClientCertificateOptions_Default() { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { Assert.Equal(ClientCertificateOption.Manual, handler.ClientCertificateOptions); } @@ -44,7 +43,7 @@ public void ClientCertificateOptions_Default() [InlineData((ClientCertificateOption)(-1))] public void ClientCertificateOptions_InvalidArg_ThrowsException(ClientCertificateOption option) { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { AssertExtensions.Throws("value", () => handler.ClientCertificateOptions = option); } @@ -55,7 +54,7 @@ public void ClientCertificateOptions_InvalidArg_ThrowsException(ClientCertificat [InlineData(ClientCertificateOption.Manual)] public void ClientCertificateOptions_ValueArg_Roundtrips(ClientCertificateOption option) { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { handler.ClientCertificateOptions = option; Assert.Equal(option, handler.ClientCertificateOptions); @@ -65,7 +64,7 @@ public void ClientCertificateOptions_ValueArg_Roundtrips(ClientCertificateOption [Fact] public void ClientCertificates_ClientCertificateOptionsAutomatic_ThrowsException() { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { handler.ClientCertificateOptions = ClientCertificateOption.Automatic; Assert.Throws(() => handler.ClientCertificates); @@ -81,8 +80,10 @@ public async Task Automatic_SSLBackendNotSupported_ThrowsPlatformNotSupportedExc return; } - using (var client = new HttpClient(new HttpClientHandler() { ClientCertificateOptions = ClientCertificateOption.Automatic })) + using (HttpClientHandler handler = CreateHttpClientHandler()) + using (var client = new HttpClient(handler)) { + handler.ClientCertificateOptions = ClientCertificateOption.Automatic; await Assert.ThrowsAsync(() => client.GetAsync(Configuration.Http.SecureRemoteEchoServer)); } } @@ -96,7 +97,7 @@ public async Task Manual_SSLBackendNotSupported_ThrowsPlatformNotSupportedExcept return; } - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.ClientCertificates.Add(Configuration.Certificates.GetClientCertificate()); using (var client = new HttpClient(handler)) { @@ -117,10 +118,10 @@ public void Manual_SendClientCertificateWithClientAuthEKUToRemoteServer_OK() // UAP HTTP stack caches connections per-process. This causes interference when these tests run in // the same process as the other tests. Each test needs to be isolated to its own process. // See dicussion: https://github.com/dotnet/corefx/issues/21945 - RemoteInvoke(async () => + RemoteInvoke(async useManagedHandlerString => { var cert = Configuration.Certificates.GetClientCertificate(); - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(useManagedHandlerString); handler.ClientCertificates.Add(cert); using (var client = new HttpClient(handler)) { @@ -134,14 +135,14 @@ public void Manual_SendClientCertificateWithClientAuthEKUToRemoteServer_OK() return SuccessExitCode; } - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [OuterLoop] // TODO: Issue #11345 [Fact] public void Manual_SendClientCertificateWithServerAuthEKUToRemoteServer_Forbidden() { - if (ManagedHandlerTestHelpers.IsEnabled) + if (UseManagedHandler) { // TODO #23128: The managed handler is currently sending out client certificates when it shouldn't. return; @@ -156,10 +157,10 @@ public void Manual_SendClientCertificateWithServerAuthEKUToRemoteServer_Forbidde // UAP HTTP stack caches connections per-process. This causes interference when these tests run in // the same process as the other tests. Each test needs to be isolated to its own process. // See dicussion: https://github.com/dotnet/corefx/issues/21945 - RemoteInvoke(async () => + RemoteInvoke(async useManagedHandlerString => { var cert = Configuration.Certificates.GetServerCertificate(); - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(useManagedHandlerString); handler.ClientCertificates.Add(cert); using (var client = new HttpClient(handler)) { @@ -168,7 +169,7 @@ public void Manual_SendClientCertificateWithServerAuthEKUToRemoteServer_Forbidde return SuccessExitCode; } - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [OuterLoop] // TODO: Issue #11345 @@ -184,10 +185,10 @@ public void Manual_SendClientCertificateWithNoEKUToRemoteServer_OK() // UAP HTTP stack caches connections per-process. This causes interference when these tests run in // the same process as the other tests. Each test needs to be isolated to its own process. // See dicussion: https://github.com/dotnet/corefx/issues/21945 - RemoteInvoke(async () => + RemoteInvoke(async useManagedHandlerString => { var cert = Configuration.Certificates.GetNoEKUCertificate(); - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(useManagedHandlerString); handler.ClientCertificates.Add(cert); using (var client = new HttpClient(handler)) { @@ -201,7 +202,7 @@ public void Manual_SendClientCertificateWithNoEKUToRemoteServer_OK() return SuccessExitCode; } - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "dotnet/corefx #20010")] @@ -214,7 +215,7 @@ public async Task Manual_CertificateSentMatchesCertificateReceived_Success( int numberOfRequests, bool reuseClient) // validate behavior with and without connection pooling, which impacts client cert usage { - if (BackendDoesNotSupportCustomCertificateHandling) // can't use [Conditional*] right now as it's evaluated at the wrong time for the managed handler + if (!BackendSupportsCustomCertificateHandling) // can't use [Conditional*] right now as it's evaluated at the wrong time for the managed handler { _output.WriteLine($"Skipping {nameof(Manual_CertificateSentMatchesCertificateReceived_Success)}()"); return; @@ -224,7 +225,8 @@ public async Task Manual_CertificateSentMatchesCertificateReceived_Success( Func createClient = (cert) => { - var handler = new HttpClientHandler() { ServerCertificateCustomValidationCallback = delegate { return true; } }; + HttpClientHandler handler = CreateHttpClientHandler(); + handler.ServerCertificateCustomValidationCallback = delegate { return true; }; handler.ClientCertificates.Add(cert); return new HttpClient(handler); }; @@ -279,9 +281,8 @@ await LoopbackServer.CreateServerAsync(async (server, url) => }, options); } - private static bool BackendSupportsCustomCertificateHandling => - HttpClientHandler_ServerCertificates_Test.BackendSupportsCustomCertificateHandling; - - private static bool BackendDoesNotSupportCustomCertificateHandling => !BackendSupportsCustomCertificateHandling; + private bool BackendSupportsCustomCertificateHandling => + UseManagedHandler || + new HttpClientHandler_ServerCertificates_Test().BackendSupportsCustomCertificateHandling; } } diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs index e8f97b7bec24..547ea250aa71 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs @@ -13,12 +13,12 @@ namespace System.Net.Http.Functional.Tests { using Configuration = System.Net.Test.Common.Configuration; - public class HttpClientHandler_DefaultProxyCredentials_Test : RemoteExecutorTestBase + public class HttpClientHandler_DefaultProxyCredentials_Test : HttpClientTestBase { [Fact] public void Default_Get_Null() { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { Assert.Null(handler.DefaultProxyCredentials); } @@ -27,7 +27,7 @@ public void Default_Get_Null() [Fact] public void SetGet_Roundtrips() { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { var creds = new NetworkCredential("username", "password", "domain"); @@ -55,7 +55,7 @@ public void ProxyExplicitlyProvided_DefaultCredentials_Ignored() var rightCreds = new NetworkCredential("rightusername", "rightpassword"); var wrongCreds = new NetworkCredential("wrongusername", "wrongpassword"); - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { handler.Proxy = new UseSpecifiedUriWebProxy(proxyUrl, rightCreds); @@ -82,7 +82,7 @@ public void ProxyExplicitlyProvided_DefaultCredentials_Ignored() [InlineData(true)] public void ProxySetViaEnvironmentVariable_DefaultProxyCredentialsUsed(bool useProxy) { - bool envVarsSupported = ManagedHandlerTestHelpers.IsEnabled || !RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + bool envVarsSupported = UseManagedHandler || !RuntimeInformation.IsOSPlatform(OSPlatform.Windows); if (!envVarsSupported) { return; @@ -103,9 +103,9 @@ public void ProxySetViaEnvironmentVariable_DefaultProxyCredentialsUsed(bool useP // test in another process. var psi = new ProcessStartInfo(); psi.Environment.Add("http_proxy", $"http://localhost:{port}"); - RemoteInvoke(useProxyString => + RemoteInvoke((useProxyString, useManagedHandlerString) => { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler(useManagedHandlerString)) using (var client = new HttpClient(handler)) { var creds = new NetworkCredential(ExpectedUsername, ExpectedPassword); @@ -122,7 +122,7 @@ public void ProxySetViaEnvironmentVariable_DefaultProxyCredentialsUsed(bool useP TestHelper.VerifyResponseBody(responseStringTask.Result, responseTask.Result.Content.Headers.ContentMD5, false, null); } return SuccessExitCode; - }, useProxy.ToString(), new RemoteInvokeOptions { StartInfo = psi }).Dispose(); + }, useProxy.ToString(), UseManagedHandler.ToString(), new RemoteInvokeOptions { StartInfo = psi }).Dispose(); if (useProxy) { @@ -139,7 +139,7 @@ public async Task ProxyNotExplicitlyProvided_DefaultCredentialsSet_DefaultWebPro { WebRequest.DefaultWebProxy = null; - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { handler.DefaultProxyCredentials = new NetworkCredential("UsernameNotUsed", "PasswordNotUsed"); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs index 87aa8dcee57d..f53be768eb5e 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Linq; -using System.Net.Test.Common; using System.Runtime.InteropServices; using System.Threading.Tasks; @@ -14,13 +13,13 @@ namespace System.Net.Http.Functional.Tests using Configuration = System.Net.Test.Common.Configuration; [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "dotnet/corefx #20010")] - public class HttpClientHandler_MaxConnectionsPerServer_Test + public class HttpClientHandler_MaxConnectionsPerServer_Test : HttpClientTestBase { [Fact] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "MaxConnectionsPerServer either returns two or int.MaxValue depending if ctor of HttpClientHandlerTest executed first. Disabling cause of random xunit execution order.")] public void Default_ExpectedValue() { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { Assert.Equal(int.MaxValue, handler.MaxConnectionsPerServer); } @@ -31,7 +30,7 @@ public void Default_ExpectedValue() [InlineData(-1)] public void Set_InvalidValues_Throws(int invalidValue) { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { Assert.Throws(() => handler.MaxConnectionsPerServer = invalidValue); } @@ -44,7 +43,7 @@ public void Set_InvalidValues_Throws(int invalidValue) [InlineData(int.MaxValue - 1)] public void Set_ValidValues_Success(int validValue) { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { try { @@ -68,8 +67,10 @@ public void Set_ValidValues_Success(int validValue) [InlineData(3, 5, false)] public async Task GetAsync_MaxLimited_ConcurrentCallsStillSucceed(int maxConnections, int numRequests, bool secure) { - using (var client = new HttpClient(new HttpClientHandler { MaxConnectionsPerServer = maxConnections })) + using (HttpClientHandler handler = CreateHttpClientHandler()) + using (var client = new HttpClient(handler)) { + handler.MaxConnectionsPerServer = maxConnections; await Task.WhenAll( from i in Enumerable.Range(0, numRequests) select client.GetAsync(secure ? Configuration.Http.RemoteEchoServer : Configuration.Http.SecureRemoteEchoServer)); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxResponseHeadersLength.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxResponseHeadersLength.cs index c04259a14e44..1a666845c982 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxResponseHeadersLength.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxResponseHeadersLength.cs @@ -3,9 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Net.Sockets; using System.Net.Test.Common; using System.Text; using System.Threading.Tasks; @@ -15,7 +12,7 @@ namespace System.Net.Http.Functional.Tests { using Configuration = System.Net.Test.Common.Configuration; - public class HttpClientHandler_MaxResponseHeadersLength_Test : RemoteExecutorTestBase + public class HttpClientHandler_MaxResponseHeadersLength_Test : HttpClientTestBase { [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not currently supported on UAP")] [Theory] @@ -23,7 +20,7 @@ public class HttpClientHandler_MaxResponseHeadersLength_Test : RemoteExecutorTes [InlineData(-1)] public void InvalidValue_ThrowsException(int invalidValue) { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { AssertExtensions.Throws("value", () => handler.MaxResponseHeadersLength = invalidValue); } @@ -36,7 +33,7 @@ public void InvalidValue_ThrowsException(int invalidValue) [InlineData(int.MaxValue)] public void ValidValue_SetGet_Roundtrips(int validValue) { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { handler.MaxResponseHeadersLength = validValue; Assert.Equal(validValue, handler.MaxResponseHeadersLength); @@ -46,7 +43,7 @@ public void ValidValue_SetGet_Roundtrips(int validValue) [Fact] public async Task SetAfterUse_Throws() { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { handler.MaxResponseHeadersLength = int.MaxValue; @@ -62,9 +59,10 @@ public async Task ThresholdExceeded_ThrowsException(string responseHeaders, int { await LoopbackServer.CreateServerAsync(async (server, url) => { - using (var handler = new HttpClientHandler() { MaxResponseHeadersLength = maxResponseHeadersLength }) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { + handler.MaxResponseHeadersLength = maxResponseHeadersLength; Task getAsync = client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead); await LoopbackServer.AcceptSocketAsync(server, async (s, serverStream, reader, writer) => diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Unix.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Unix.cs index bb9d8e4901f8..132c930e66fb 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Unix.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Unix.cs @@ -14,17 +14,12 @@ namespace System.Net.Http.Functional.Tests { - public partial class HttpClientHandler_ServerCertificates_Test : RemoteExecutorTestBase + public partial class HttpClientHandler_ServerCertificates_Test { private static bool ShouldSuppressRevocationException { get { - if (ManagedHandlerTestHelpers.IsEnabled) - { - return false; - } - if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { return false; @@ -53,11 +48,11 @@ private static bool ShouldSuppressRevocationException } } - internal static bool BackendSupportsCustomCertificateHandling + internal bool BackendSupportsCustomCertificateHandling { get { - if (ManagedHandlerTestHelpers.IsEnabled) + if (UseManagedHandler) { return true; } @@ -73,8 +68,6 @@ internal static bool BackendSupportsCustomCertificateHandling } } - private static bool BackendDoesNotSupportCustomCertificateHandling => !BackendSupportsCustomCertificateHandling; - [DllImport("System.Net.Http.Native", EntryPoint = "HttpNative_GetSslVersionDescription")] private static extern string CurlSslVersionDescription(); } diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Windows.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Windows.cs index b44163a41e2c..c213aab296d3 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Windows.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Windows.cs @@ -2,24 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using System.Diagnostics; -using System.Net.Security; -using System.Net.Test.Common; -using System.Runtime.InteropServices; -using System.Security.Authentication.ExtendedProtection; -using System.Security.Cryptography.X509Certificates; -using System.Threading.Tasks; -using Xunit; - namespace System.Net.Http.Functional.Tests { - public partial class HttpClientHandler_ServerCertificates_Test : RemoteExecutorTestBase + public partial class HttpClientHandler_ServerCertificates_Test { private static bool ShouldSuppressRevocationException => false; - internal static bool BackendSupportsCustomCertificateHandling => true; + internal bool BackendSupportsCustomCertificateHandling => true; - private static bool BackendDoesNotSupportCustomCertificateHandling => !BackendSupportsCustomCertificateHandling; + private bool BackendDoesNotSupportCustomCertificateHandling => !BackendSupportsCustomCertificateHandling; } } diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs index e4b5bb5909da..43fef62f82a2 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; -using System.Diagnostics; using System.Linq; using System.Net.Security; using System.Net.Test.Common; @@ -18,18 +17,18 @@ namespace System.Net.Http.Functional.Tests using Configuration = System.Net.Test.Common.Configuration; [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework throws PNSE for ServerCertificateCustomValidationCallback")] - public partial class HttpClientHandler_ServerCertificates_Test : RemoteExecutorTestBase + public partial class HttpClientHandler_ServerCertificates_Test : HttpClientTestBase { // TODO: https://github.com/dotnet/corefx/issues/7812 private static bool ClientSupportsDHECipherSuites => (!PlatformDetection.IsWindows || PlatformDetection.IsWindows10Version1607OrGreater); - private static bool BackendSupportsCustomCertificateHandlingAndClientSupportsDHECipherSuites => + private bool BackendSupportsCustomCertificateHandlingAndClientSupportsDHECipherSuites => (BackendSupportsCustomCertificateHandling && ClientSupportsDHECipherSuites); [Fact] [SkipOnTargetFramework(~TargetFrameworkMonikers.Uap)] public void Ctor_ExpectedDefaultPropertyValues_UapPlatform() { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { Assert.Null(handler.ServerCertificateCustomValidationCallback); Assert.True(handler.CheckCertificateRevocationList); @@ -40,7 +39,7 @@ public void Ctor_ExpectedDefaultPropertyValues_UapPlatform() [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] public void Ctor_ExpectedDefaultValues_NotUapPlatform() { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { Assert.Null(handler.ServerCertificateCustomValidationCallback); Assert.False(handler.CheckCertificateRevocationList); @@ -51,7 +50,7 @@ public void Ctor_ExpectedDefaultValues_NotUapPlatform() [Fact] public async Task NoCallback_ValidCertificate_SuccessAndExpectedPropertyBehavior() { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); using (var client = new HttpClient(handler)) { using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.SecureRemoteEchoServer)) @@ -66,10 +65,14 @@ public async Task NoCallback_ValidCertificate_SuccessAndExpectedPropertyBehavior [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP won't send requests through a custom proxy")] [OuterLoop] // TODO: Issue #11345 - [ConditionalFact(nameof(BackendSupportsCustomCertificateHandling))] + [Fact] public async Task UseCallback_HaveNoCredsAndUseAuthenticatedCustomProxyAndPostToSecureServer_ProxyAuthenticationRequiredStatusCode() { - if (ManagedHandlerTestHelpers.IsEnabled) + if (!BackendSupportsCustomCertificateHandling) + { + return; + } + if (UseManagedHandler) { return; // TODO #23136: SSL proxy tunneling not yet implemented in ManagedHandler } @@ -81,7 +84,7 @@ public async Task UseCallback_HaveNoCredsAndUseAuthenticatedCustomProxyAndPostTo expectCreds: false); Uri proxyUrl = new Uri($"http://localhost:{port}"); - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.Proxy = new UseSpecifiedUriWebProxy(proxyUrl, null); handler.ServerCertificateCustomValidationCallback = delegate { return true; }; using (var client = new HttpClient(handler)) @@ -101,13 +104,13 @@ public async Task UseCallback_HaveNoCredsAndUseAuthenticatedCustomProxyAndPostTo [Fact] public async Task UseCallback_NotSecureConnection_CallbackNotCalled() { - if (BackendDoesNotSupportCustomCertificateHandling) // can't use [Conditional*] right now as it's evaluated at the wrong time for the managed handler + if (!BackendSupportsCustomCertificateHandling) { Console.WriteLine($"Skipping {nameof(UseCallback_NotSecureConnection_CallbackNotCalled)}()"); return; } - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); using (var client = new HttpClient(handler)) { bool callbackCalled = false; @@ -142,13 +145,13 @@ public static IEnumerable UseCallback_ValidCertificate_ExpectedValuesD [MemberData(nameof(UseCallback_ValidCertificate_ExpectedValuesDuringCallback_Urls))] public async Task UseCallback_ValidCertificate_ExpectedValuesDuringCallback(Uri url, bool checkRevocation) { - if (BackendDoesNotSupportCustomCertificateHandling) // can't use [Conditional*] right now as it's evaluated at the wrong time for the managed handler + if (!BackendSupportsCustomCertificateHandling) { Console.WriteLine($"Skipping {nameof(UseCallback_ValidCertificate_ExpectedValuesDuringCallback)}({url}, {checkRevocation})"); return; } - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); using (var client = new HttpClient(handler)) { bool callbackCalled = false; @@ -190,13 +193,13 @@ public async Task UseCallback_ValidCertificate_ExpectedValuesDuringCallback(Uri [Fact] public async Task UseCallback_CallbackReturnsFailure_ThrowsException() { - if (BackendDoesNotSupportCustomCertificateHandling) // can't use [Conditional*] right now as it's evaluated at the wrong time for the managed handler + if (!BackendSupportsCustomCertificateHandling) { Console.WriteLine($"Skipping {nameof(UseCallback_CallbackReturnsFailure_ThrowsException)}()"); return; } - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); using (var client = new HttpClient(handler)) { handler.ServerCertificateCustomValidationCallback = delegate { return false; }; @@ -204,25 +207,24 @@ public async Task UseCallback_CallbackReturnsFailure_ThrowsException() } } - [ActiveIssue(21904, ~TargetFrameworkMonikers.Uap)] [OuterLoop] // TODO: Issue #11345 - [ConditionalFact(nameof(BackendSupportsCustomCertificateHandling))] - public async Task UseCallback_CallbackThrowsException_ExceptionPropagatesAsInnerException() + [Fact] + public async Task UseCallback_CallbackThrowsException_ExceptionPropagatesAsBaseException() { - if (BackendDoesNotSupportCustomCertificateHandling) // can't use [Conditional*] right now as it's evaluated at the wrong time for the managed handler + if (!BackendSupportsCustomCertificateHandling) { - Console.WriteLine($"Skipping {nameof(UseCallback_CallbackThrowsException_ExceptionPropagatesAsInnerException)}()"); + Console.WriteLine($"Skipping {nameof(UseCallback_CallbackThrowsException_ExceptionPropagatesAsBaseException)}()"); return; } - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); using (var client = new HttpClient(handler)) { var e = new DivideByZeroException(); handler.ServerCertificateCustomValidationCallback = delegate { throw e; }; HttpRequestException ex = await Assert.ThrowsAsync(() => client.GetAsync(Configuration.Http.SecureRemoteEchoServer)); - Assert.Same(e, ex.InnerException); + Assert.Same(e, ex.GetBaseException()); } } @@ -238,7 +240,7 @@ public async Task UseCallback_CallbackThrowsException_ExceptionPropagatesAsInner [MemberData(nameof(CertificateValidationServers))] public async Task NoCallback_BadCertificate_ThrowsException(string url) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { await Assert.ThrowsAsync(() => client.GetAsync(url)); } @@ -254,7 +256,7 @@ public async Task NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds() // CheckCertificateRevocationList throws in the general case. try { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.RevokedCertRemoteServer)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -262,7 +264,7 @@ public async Task NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds() } catch (HttpRequestException) { - if (!ShouldSuppressRevocationException) + if (UseManagedHandler || !ShouldSuppressRevocationException) throw; } } @@ -271,13 +273,14 @@ public async Task NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds() [Fact] public async Task NoCallback_RevokedCertificate_RevocationChecking_Fails() { - if (BackendDoesNotSupportCustomCertificateHandling) // can't use [Conditional*] right now as it's evaluated at the wrong time for the managed handler + if (!BackendSupportsCustomCertificateHandling) { Console.WriteLine($"Skipping {nameof(NoCallback_RevokedCertificate_RevocationChecking_Fails)}()"); return; } - var handler = new HttpClientHandler() { CheckCertificateRevocationList = true }; + HttpClientHandler handler = CreateHttpClientHandler(); + handler.CheckCertificateRevocationList = true; using (var client = new HttpClient(handler)) { await Assert.ThrowsAsync(() => client.GetAsync(Configuration.Http.RevokedCertRemoteServer)); @@ -291,15 +294,15 @@ public async Task NoCallback_RevokedCertificate_RevocationChecking_Fails() new object[] { Configuration.Http.WrongHostNameCertRemoteServer , SslPolicyErrors.RemoteCertificateNameMismatch}, }; - public async Task UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(string url, SslPolicyErrors expectedErrors) + private async Task UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(string url, bool useManagedHandler, SslPolicyErrors expectedErrors) { - if (BackendDoesNotSupportCustomCertificateHandling) // can't use [Conditional*] right now as it's evaluated at the wrong time for the managed handler + if (!BackendSupportsCustomCertificateHandling) { Console.WriteLine($"Skipping {nameof(UseCallback_BadCertificate_ExpectedPolicyErrors)}({url}, {expectedErrors})"); return; } - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(useManagedHandler); using (var client = new HttpClient(handler)) { bool callbackCalled = false; @@ -310,7 +313,7 @@ public async Task UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(string Assert.NotNull(request); Assert.NotNull(cert); Assert.NotNull(chain); - if (!ManagedHandlerTestHelpers.IsEnabled) + if (!useManagedHandler) { // TODO #23137: This test is failing with the managed handler on the exact value of the managed errors, // e.g. reporting "RemoteCertificateNameMismatch, RemoteCertificateChainErrors" when we only expect @@ -330,27 +333,33 @@ public async Task UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(string } [OuterLoop] // TODO: Issue #11345 - [ConditionalTheory(nameof(BackendSupportsCustomCertificateHandlingAndClientSupportsDHECipherSuites))] + [Theory] [MemberData(nameof(CertificateValidationServersAndExpectedPolicies))] public async Task UseCallback_BadCertificate_ExpectedPolicyErrors(string url, SslPolicyErrors expectedErrors) { + if (!BackendSupportsCustomCertificateHandlingAndClientSupportsDHECipherSuites) + { + return; + } + if (PlatformDetection.IsUap) { // UAP HTTP stack caches connections per-process. This causes interference when these tests run in // the same process as the other tests. Each test needs to be isolated to its own process. // See dicussion: https://github.com/dotnet/corefx/issues/21945 - RemoteInvoke((remoteUrl, remoteExpectedErrors) => + RemoteInvoke((remoteUrl, remoteExpectedErrors, useManagedHandlerString) => { UseCallback_BadCertificate_ExpectedPolicyErrors_Helper( remoteUrl, + bool.Parse(useManagedHandlerString), (SslPolicyErrors)Enum.Parse(typeof(SslPolicyErrors), remoteExpectedErrors)).Wait(); return SuccessExitCode; - }, url, expectedErrors.ToString()).Dispose(); + }, url, expectedErrors.ToString(), UseManagedHandler.ToString()).Dispose(); } else { - await UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(url, expectedErrors); + await UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(url, UseManagedHandler, expectedErrors); } } @@ -358,12 +367,14 @@ public async Task UseCallback_BadCertificate_ExpectedPolicyErrors(string url, Ss [Fact] public async Task SSLBackendNotSupported_Callback_ThrowsPlatformNotSupportedException() { - if (BackendSupportsCustomCertificateHandling) // can't use [Conditional*] right now as it's evaluated at the wrong time for the managed handler + if (BackendSupportsCustomCertificateHandling) { return; } - using (var client = new HttpClient(new HttpClientHandler() { ServerCertificateCustomValidationCallback = delegate { return true; } })) + HttpClientHandler handler = CreateHttpClientHandler(); + handler.ServerCertificateCustomValidationCallback = delegate { return true; }; + using (var client = new HttpClient(handler)) { await Assert.ThrowsAsync(() => client.GetAsync(Configuration.Http.SecureRemoteEchoServer)); } @@ -375,12 +386,14 @@ public async Task SSLBackendNotSupported_Callback_ThrowsPlatformNotSupportedExce [PlatformSpecific(~TestPlatforms.OSX)] public async Task SSLBackendNotSupported_Revocation_ThrowsPlatformNotSupportedException() { - if (BackendSupportsCustomCertificateHandling) // can't use [Conditional*] right now as it's evaluated at the wrong time for the managed handler + if (BackendSupportsCustomCertificateHandling) { return; } - using (var client = new HttpClient(new HttpClientHandler() { CheckCertificateRevocationList = true })) + HttpClientHandler handler = CreateHttpClientHandler(); + handler.CheckCertificateRevocationList = true; + using (var client = new HttpClient(handler)) { await Assert.ThrowsAsync(() => client.GetAsync(Configuration.Http.SecureRemoteEchoServer)); } @@ -392,7 +405,7 @@ public async Task SSLBackendNotSupported_Revocation_ThrowsPlatformNotSupportedEx public async Task PostAsync_Post_ChannelBinding_ConfiguredCorrectly() { var content = new ChannelBindingAwareContent("Test contest"); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (HttpResponseMessage response = await client.PostAsync(Configuration.Http.SecureRemoteEchoServer, content)) { // Validate status. diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.Unix.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.Unix.cs index 83b32ec77f3b..56377d5e6902 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.Unix.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.Unix.cs @@ -16,11 +16,11 @@ namespace System.Net.Http.Functional.Tests { public partial class HttpClientHandler_SslProtocols_Test { - private static bool BackendSupportsSslConfiguration => - ManagedHandlerTestHelpers.IsEnabled || + private bool BackendSupportsSslConfiguration => + UseManagedHandler || (CurlSslVersionDescription()?.StartsWith("OpenSSL") ?? false); - private static bool SSLv3DisabledByDefault => + private bool SSLv3DisabledByDefault => BackendSupportsSslConfiguration || Version.Parse(CurlVersionDescription()) >= new Version(7, 39); // libcurl disables SSLv3 by default starting in v7.39 diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.Windows.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.Windows.cs index 8f390f12888f..28b5e9c8ce89 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.Windows.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.Windows.cs @@ -2,20 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.IO; -using System.Net.Security; -using System.Net.Sockets; -using System.Net.Test.Common; -using System.Runtime.InteropServices; -using System.Security.Authentication; -using System.Threading; -using System.Threading.Tasks; -using Xunit; namespace System.Net.Http.Functional.Tests { - using Configuration = System.Net.Test.Common.Configuration; - public partial class HttpClientHandler_SslProtocols_Test { private static bool BackendSupportsSslConfiguration => true; diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs index d6a166c4cea1..d7cb6c3a0f6c 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs @@ -4,11 +4,8 @@ using System.IO; using System.Net.Security; -using System.Net.Sockets; using System.Net.Test.Common; -using System.Runtime.InteropServices; using System.Security.Authentication; -using System.Threading; using System.Threading.Tasks; using Xunit; @@ -18,12 +15,12 @@ namespace System.Net.Http.Functional.Tests [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "SslProtocols not supported on UAP")] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #16805")] - public partial class HttpClientHandler_SslProtocols_Test + public partial class HttpClientHandler_SslProtocols_Test : HttpClientTestBase { [Fact] public void DefaultProtocols_MatchesExpected() { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { Assert.Equal(SslProtocols.None, handler.SslProtocols); } @@ -40,7 +37,7 @@ public void DefaultProtocols_MatchesExpected() [InlineData(SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12)] public void SetGetProtocols_Roundtrips(SslProtocols protocols) { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { handler.SslProtocols = protocols; Assert.Equal(protocols, handler.SslProtocols); @@ -48,12 +45,18 @@ public void SetGetProtocols_Roundtrips(SslProtocols protocols) } [OuterLoop] // TODO: Issue #11345 - [ConditionalFact(nameof(BackendSupportsSslConfiguration))] + [Fact] public async Task SetProtocols_AfterRequest_ThrowsException() { - using (var handler = new HttpClientHandler() { ServerCertificateCustomValidationCallback = LoopbackServer.AllowAllCertificates }) + if (!BackendSupportsSslConfiguration) + { + return; + } + + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { + handler.ServerCertificateCustomValidationCallback = LoopbackServer.AllowAllCertificates; await LoopbackServer.CreateServerAsync(async (server, url) => { await TestHelper.WhenAllCompletedOrAnyFailed( @@ -75,14 +78,14 @@ await TestHelper.WhenAllCompletedOrAnyFailed( #pragma warning restore 0618 public void DisabledProtocols_SetSslProtocols_ThrowsException(SslProtocols disabledProtocols) { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { Assert.Throws(() => handler.SslProtocols = disabledProtocols); } } [OuterLoop] // TODO: Issue #11345 - [ConditionalTheory(nameof(BackendSupportsSslConfiguration))] + [Theory] [InlineData(SslProtocols.Tls, false)] [InlineData(SslProtocols.Tls, true)] [InlineData(SslProtocols.Tls11, false)] @@ -91,15 +94,21 @@ public void DisabledProtocols_SetSslProtocols_ThrowsException(SslProtocols disab [InlineData(SslProtocols.Tls12, true)] public async Task GetAsync_AllowedSSLVersion_Succeeds(SslProtocols acceptedProtocol, bool requestOnlyThisProtocol) { - if (ManagedHandlerTestHelpers.IsEnabled) + if (!BackendSupportsSslConfiguration) + { + return; + } + if (UseManagedHandler) { // TODO #23138: The managed handler is failing. return; } - using (var handler = new HttpClientHandler() { ServerCertificateCustomValidationCallback = LoopbackServer.AllowAllCertificates }) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { + handler.ServerCertificateCustomValidationCallback = LoopbackServer.AllowAllCertificates; + if (requestOnlyThisProtocol) { handler.SslProtocols = acceptedProtocol; @@ -130,13 +139,13 @@ await TestHelper.WhenAllCompletedOrAnyFailed( [MemberData(nameof(SupportedSSLVersionServers))] public async Task GetAsync_SupportedSSLVersion_Succeeds(SslProtocols sslProtocols, string url) { - if (ManagedHandlerTestHelpers.IsEnabled) + if (UseManagedHandler) { // TODO #23138: The managed handler is failing. return; } - using (HttpClientHandler handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { if (PlatformDetection.IsCentos7) { @@ -162,30 +171,38 @@ public async Task GetAsync_SupportedSSLVersion_Succeeds(SslProtocols sslProtocol // when trying to use such an SslStream, we can't stand up a localhost server that // only speaks those protocols. [OuterLoop("Avoid www.ssllabs.com dependency in innerloop.")] - [ConditionalTheory(nameof(SSLv3DisabledByDefault))] + [Theory] [MemberData(nameof(NotSupportedSSLVersionServers))] public async Task GetAsync_UnsupportedSSLVersion_Throws(string name, string url) { - if (ManagedHandlerTestHelpers.IsEnabled && !PlatformDetection.IsWindows10Version1607OrGreater) + if (!SSLv3DisabledByDefault) + { + return; + } + + if (UseManagedHandler && !PlatformDetection.IsWindows10Version1607OrGreater) { // On Windows, https://github.com/dotnet/corefx/issues/21925#issuecomment-313408314 // On Linux, an older version of OpenSSL may permit negotiating SSLv3. return; } - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { await Assert.ThrowsAsync(() => client.GetAsync(url)); } } [OuterLoop] // TODO: Issue #11345 - [ConditionalFact(nameof(BackendSupportsSslConfiguration), nameof(SslDefaultsToTls12))] + [ConditionalFact(nameof(SslDefaultsToTls12))] public async Task GetAsync_NoSpecifiedProtocol_DefaultsToTls12() { - using (var handler = new HttpClientHandler() { ServerCertificateCustomValidationCallback = LoopbackServer.AllowAllCertificates }) + if (!BackendSupportsSslConfiguration) return; + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { + handler.ServerCertificateCustomValidationCallback = LoopbackServer.AllowAllCertificates; + var options = new LoopbackServer.Options { UseSsl = true }; await LoopbackServer.CreateServerAsync(async (server, url) => { @@ -202,16 +219,20 @@ await TestHelper.WhenAllCompletedOrAnyFailed( } [OuterLoop] // TODO: Issue #11345 - [ConditionalTheory(nameof(BackendSupportsSslConfiguration))] + [Theory] [InlineData(SslProtocols.Tls11, SslProtocols.Tls, typeof(IOException))] [InlineData(SslProtocols.Tls12, SslProtocols.Tls11, typeof(IOException))] [InlineData(SslProtocols.Tls, SslProtocols.Tls12, typeof(AuthenticationException))] public async Task GetAsync_AllowedSSLVersionDiffersFromServer_ThrowsException( SslProtocols allowedProtocol, SslProtocols acceptedProtocol, Type exceptedServerException) { - using (var handler = new HttpClientHandler() { SslProtocols = allowedProtocol, ServerCertificateCustomValidationCallback = LoopbackServer.AllowAllCertificates }) + if (!BackendSupportsSslConfiguration) return; + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { + handler.SslProtocols = allowedProtocol; + handler.ServerCertificateCustomValidationCallback = LoopbackServer.AllowAllCertificates; + var options = new LoopbackServer.Options { UseSsl = true, SslProtocols = acceptedProtocol }; await LoopbackServer.CreateServerAsync(async (server, url) => { @@ -227,9 +248,12 @@ await TestHelper.WhenAllCompletedOrAnyFailed( [Fact] public async Task GetAsync_DisallowTls10_AllowTls11_AllowTls12() { - using (var handler = new HttpClientHandler() { SslProtocols = SslProtocols.Tls11 | SslProtocols.Tls12, ServerCertificateCustomValidationCallback = LoopbackServer.AllowAllCertificates }) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { + handler.SslProtocols = SslProtocols.Tls11 | SslProtocols.Tls12; + handler.ServerCertificateCustomValidationCallback = LoopbackServer.AllowAllCertificates; + if (BackendSupportsSslConfiguration) { LoopbackServer.Options options = new LoopbackServer.Options { UseSsl = true }; diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs index 629188277ee0..1d9b2e4dc0c9 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs @@ -7,11 +7,9 @@ using System.IO; using System.Linq; using System.Net.Sockets; -using System.Net.Security; using System.Net.Test.Common; using System.Runtime.InteropServices; using System.Security.Authentication; -using System.Security.Authentication.ExtendedProtection; using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading; @@ -26,7 +24,7 @@ namespace System.Net.Http.Functional.Tests // Note: Disposing the HttpClient object automatically disposes the handler within. So, it is not necessary // to separately Dispose (or have a 'using' statement) for the handler. - public class HttpClientHandlerTest : RemoteExecutorTestBase + public class HttpClientHandlerTest : HttpClientTestBase { readonly ITestOutputHelper _output; private const string ExpectedContent = "Test contest"; @@ -126,7 +124,7 @@ public HttpClientHandlerTest(ITestOutputHelper output) [Fact] public void Ctor_ExpectedDefaultPropertyValues_CommonPlatform() { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { // Same as .NET Framework (Desktop). Assert.Equal(DecompressionMethods.None, handler.AutomaticDecompression); @@ -150,7 +148,7 @@ public void Ctor_ExpectedDefaultPropertyValues_CommonPlatform() [Fact] public void Ctor_ExpectedDefaultPropertyValues_NotUapPlatform() { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { // Same as .NET Framework (Desktop). Assert.Equal(64, handler.MaxResponseHeadersLength); @@ -171,7 +169,7 @@ public void Ctor_ExpectedDefaultPropertyValues_NotUapPlatform() [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsUap))] public void Ctor_ExpectedDefaultPropertyValues_UapPlatform() { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { Assert.True(handler.CheckCertificateRevocationList); Assert.Equal(0, handler.MaxRequestContentBufferSize); @@ -186,7 +184,7 @@ public void Ctor_ExpectedDefaultPropertyValues_UapPlatform() [Fact] public void Credentials_SetGet_Roundtrips() { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { var creds = new NetworkCredential("username", "password", "domain"); @@ -206,7 +204,7 @@ public void Credentials_SetGet_Roundtrips() [InlineData(0)] public void MaxAutomaticRedirections_InvalidValue_Throws(int redirects) { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { Assert.Throws(() => handler.MaxAutomaticRedirections = redirects); } @@ -217,7 +215,7 @@ public void MaxAutomaticRedirections_InvalidValue_Throws(int redirects) [InlineData((long)int.MaxValue + (long)1)] public void MaxRequestContentBufferSize_SetInvalidValue_ThrowsArgumentOutOfRangeException(long value) { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { Assert.Throws(() => handler.MaxRequestContentBufferSize = value); } @@ -229,7 +227,7 @@ public void MaxRequestContentBufferSize_SetInvalidValue_ThrowsArgumentOutOfRange [InlineData(true)] public async Task UseDefaultCredentials_SetToFalseAndServerNeedsAuth_StatusCodeUnauthorized(bool useProxy) { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.UseProxy = useProxy; handler.UseDefaultCredentials = false; using (var client = new HttpClient(handler)) @@ -246,7 +244,7 @@ public async Task UseDefaultCredentials_SetToFalseAndServerNeedsAuth_StatusCodeU [Fact] public void Properties_Get_CountIsZero() { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { IDictionary dict = handler.Properties; Assert.Same(dict, handler.Properties); @@ -257,7 +255,7 @@ public void Properties_Get_CountIsZero() [Fact] public void Properties_AddItemToDictionary_ItemPresent() { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) { IDictionary dict = handler.Properties; @@ -274,7 +272,7 @@ public void Properties_AddItemToDictionary_ItemPresent() [Theory, MemberData(nameof(EchoServers))] public async Task SendAsync_SimpleGet_Success(Uri remoteServer) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (HttpResponseMessage response = await client.GetAsync(remoteServer)) { string responseContent = await response.Content.ReadAsStringAsync(); @@ -292,7 +290,7 @@ public async Task SendAsync_SimpleGet_Success(Uri remoteServer) [Fact] public async Task GetAsync_IPv6LinkLocalAddressUri_Success() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { var options = new LoopbackServer.Options { Address = LoopbackServer.GetIPv6LinkLocalAddress() }; await LoopbackServer.CreateServerAsync(async (server, url) => @@ -310,7 +308,7 @@ await TestHelper.WhenAllCompletedOrAnyFailed( [MemberData(nameof(GetAsync_IPBasedUri_Success_MemberData))] public async Task GetAsync_IPBasedUri_Success(IPAddress address) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { var options = new LoopbackServer.Options { Address = address }; await LoopbackServer.CreateServerAsync(async (server, url) => @@ -338,7 +336,7 @@ public static IEnumerable GetAsync_IPBasedUri_Success_MemberData() [Fact] public async Task SendAsync_MultipleRequestsReusingSameClient_Success() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { for (int i = 0; i < 3; i++) { @@ -354,7 +352,7 @@ public async Task SendAsync_MultipleRequestsReusingSameClient_Success() [Fact] public async Task GetAsync_ResponseContentAfterClientAndHandlerDispose_Success() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.SecureRemoteEchoServer)) { client.Dispose(); @@ -371,7 +369,7 @@ public async Task SendAsync_Cancel_CancellationTokenPropagates() { var cts = new CancellationTokenSource(); cts.Cancel(); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { var request = new HttpRequestMessage(HttpMethod.Post, Configuration.Http.RemoteEchoServer); OperationCanceledException ex = await Assert.ThrowsAnyAsync(() => @@ -389,7 +387,7 @@ public async Task SendAsync_Cancel_CancellationTokenPropagates() [Theory, MemberData(nameof(CompressedServers))] public async Task GetAsync_SetAutomaticDecompression_ContentDecompressed(Uri server) { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate; using (var client = new HttpClient(handler)) { @@ -411,7 +409,7 @@ public async Task GetAsync_SetAutomaticDecompression_ContentDecompressed(Uri ser [Theory, MemberData(nameof(CompressedServers))] public async Task GetAsync_SetAutomaticDecompression_HeadersRemoved(Uri server) { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate; using (var client = new HttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(server, HttpCompletionOption.ResponseHeadersRead)) @@ -427,7 +425,7 @@ public async Task GetAsync_SetAutomaticDecompression_HeadersRemoved(Uri server) [Fact] public async Task GetAsync_ServerNeedsBasicAuthAndSetDefaultCredentials_StatusCodeUnauthorized() { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.Credentials = CredentialCache.DefaultCredentials; using (var client = new HttpClient(handler)) { @@ -443,7 +441,7 @@ public async Task GetAsync_ServerNeedsBasicAuthAndSetDefaultCredentials_StatusCo [Fact] public async Task GetAsync_ServerNeedsAuthAndSetCredential_StatusCodeOK() { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.Credentials = _credential; using (var client = new HttpClient(handler)) { @@ -462,9 +460,9 @@ public void GetAsync_ServerNeedsAuthAndNoCredential_StatusCodeUnauthorized() // UAP HTTP stack caches connections per-process. This causes interference when these tests run in // the same process as the other tests. Each test needs to be isolated to its own process. // See dicussion: https://github.com/dotnet/corefx/issues/21945 - RemoteInvoke(async () => + RemoteInvoke(async useManagedHandlerString => { - using (var client = new HttpClient()) + using (var client = CreateHttpClient(useManagedHandlerString)) { Uri uri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: Username, password: Password); using (HttpResponseMessage response = await client.GetAsync(uri)) @@ -474,7 +472,7 @@ public void GetAsync_ServerNeedsAuthAndNoCredential_StatusCodeUnauthorized() return SuccessExitCode; } - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [OuterLoop] // TODO: Issue #11345 @@ -488,7 +486,7 @@ public async Task GetAsync_ServerNeedsNonStandardAuthAndSetCredential_StatusCode _output.WriteLine(responseHeaders); await LoopbackServer.CreateServerAsync(async (server, url) => { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.Credentials = new NetworkCredential("unused", "unused"); using (var client = new HttpClient(handler)) { @@ -508,7 +506,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => [Theory, MemberData(nameof(RedirectStatusCodes))] public async Task GetAsync_AllowAutoRedirectFalse_RedirectFromHttpToHttp_StatusCodeRedirect(int statusCode) { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.AllowAutoRedirect = false; using (var client = new HttpClient(handler)) { @@ -533,7 +531,7 @@ public async Task GetAsync_AllowAutoRedirectFalse_RedirectFromHttpToHttp_StatusC public async Task AllowAutoRedirect_True_ValidateNewMethodUsedOnRedirection( int statusCode, string oldMethod, string newMethod) { - var handler = new HttpClientHandler() { AllowAutoRedirect = true }; + HttpClientHandler handler = CreateHttpClientHandler(); using (var client = new HttpClient(handler)) { await LoopbackServer.CreateServerAsync(async (origServer, origUrl) => @@ -573,7 +571,7 @@ await LoopbackServer.CreateServerAsync(async (origServer, origUrl) => [Theory, MemberData(nameof(RedirectStatusCodes))] public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttp_StatusCodeOK(int statusCode) { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.AllowAutoRedirect = true; using (var client = new HttpClient(handler)) { @@ -595,7 +593,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttp_StatusCo [Fact] public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttps_StatusCodeOK() { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.AllowAutoRedirect = true; using (var client = new HttpClient(handler)) { @@ -618,7 +616,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttps_StatusC [Fact] public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpsToHttp_StatusCodeRedirect() { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.AllowAutoRedirect = true; using (var client = new HttpClient(handler)) { @@ -641,7 +639,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpsToHttp_StatusC [Fact] public async Task GetAsync_AllowAutoRedirectTrue_RedirectToUriWithParams_RequestMsgUriSet() { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.AllowAutoRedirect = true; Uri targetUri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: Username, password: Password); using (var client = new HttpClient(handler)) @@ -682,7 +680,9 @@ public async Task GetAsync_MaxAutomaticRedirectionsNServerHops_ThrowsIfTooMany(i return; } - using (var client = new HttpClient(new HttpClientHandler() { MaxAutomaticRedirections = maxHops })) + HttpClientHandler handler = CreateHttpClientHandler(); + handler.MaxAutomaticRedirections = maxHops; + using (var client = new HttpClient(handler)) { Task t = client.GetAsync(Configuration.Http.RedirectUriForDestinationUri( secure: false, @@ -709,7 +709,9 @@ public async Task GetAsync_MaxAutomaticRedirectionsNServerHops_ThrowsIfTooMany(i [Fact] public async Task GetAsync_AllowAutoRedirectTrue_RedirectWithRelativeLocation() { - using (var client = new HttpClient(new HttpClientHandler() { AllowAutoRedirect = true })) + HttpClientHandler handler = CreateHttpClientHandler(); + handler.AllowAutoRedirect = true; + using (var client = new HttpClient(handler)) { Uri uri = Configuration.Http.RedirectUriForDestinationUri( secure: false, @@ -734,7 +736,8 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectWithRelativeLocation() [InlineData(400)] public async Task GetAsync_AllowAutoRedirectTrue_NonRedirectStatusCode_LocationHeader_NoRedirect(int statusCode) { - using (var handler = new HttpClientHandler() { AllowAutoRedirect = true }) + HttpClientHandler handler = CreateHttpClientHandler(); + handler.AllowAutoRedirect = true; using (var client = new HttpClient(handler)) { await LoopbackServer.CreateServerAsync(async (origServer, origUrl) => @@ -775,7 +778,8 @@ await TestHelper.WhenAllCompletedOrAnyFailed( public async Task GetAsync_AllowAutoRedirectTrue_RetainsOriginalFragmentIfAppropriate( string origFragment, string redirFragment, string expectedFragment, bool useRelativeRedirect) { - using (var handler = new HttpClientHandler() { AllowAutoRedirect = true }) + HttpClientHandler handler = CreateHttpClientHandler(); + handler.AllowAutoRedirect = true; using (var client = new HttpClient(handler)) { await LoopbackServer.CreateServerAsync(async (origServer, origUrl) => @@ -812,7 +816,7 @@ await LoopbackServer.CreateServerAsync(async (origServer, origUrl) => [Fact] public async Task GetAsync_CredentialIsNetworkCredentialUriRedirect_StatusCodeUnauthorized() { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.Credentials = _credential; using (var client = new HttpClient(handler)) { @@ -843,7 +847,7 @@ public async Task GetAsync_CredentialIsCredentialCacheUriRedirect_StatusCodeOK(i var credentialCache = new CredentialCache(); credentialCache.Add(uri, "Basic", _credential); - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); if (PlatformDetection.IsUap) { // UAP does not support CredentialCache for Credentials. @@ -867,7 +871,7 @@ public async Task GetAsync_CredentialIsCredentialCacheUriRedirect_StatusCodeOK(i [Fact] public async Task GetAsync_DefaultCoookieContainer_NoCookieSent() { - using (HttpClient client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { using (HttpResponseMessage httpResponse = await client.GetAsync(Configuration.Http.RemoteEchoServer)) { @@ -883,7 +887,7 @@ public async Task GetAsync_DefaultCoookieContainer_NoCookieSent() [InlineData("cookieName1", "cookieValue1")] public async Task GetAsync_SetCookieContainer_CookieSent(string cookieName, string cookieValue) { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); var cookieContainer = new CookieContainer(); cookieContainer.Add(Configuration.Http.RemoteEchoServer, new Cookie(cookieName, cookieValue)); handler.CookieContainer = cookieContainer; @@ -909,7 +913,7 @@ public async Task GetAsync_RedirectResponseHasCookie_CookieSentToFinalUri(string statusCode: 302, destinationUri: Configuration.Http.RemoteEchoServer, hops: 1); - using (HttpClient client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { client.DefaultRequestHeaders.Add( "X-SetCookie", @@ -928,7 +932,7 @@ public async Task GetAsync_RedirectResponseHasCookie_CookieSentToFinalUri(string [Theory, MemberData(nameof(HeaderWithEmptyValueAndUris))] public async Task GetAsync_RequestHeadersAddCustomHeaders_HeaderAndEmptyValueSent(string name, string value, Uri uri) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { _output.WriteLine($"name={name}, value={value}"); client.DefaultRequestHeaders.Add(name, value); @@ -946,7 +950,7 @@ public async Task GetAsync_RequestHeadersAddCustomHeaders_HeaderAndEmptyValueSen [Theory, MemberData(nameof(HeaderValueAndUris))] public async Task GetAsync_RequestHeadersAddCustomHeaders_HeaderAndValueSent(string name, string value, Uri uri) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { _output.WriteLine($"name={name}, value={value}"); client.DefaultRequestHeaders.Add(name, value); @@ -1016,7 +1020,7 @@ public async Task GetAsync_ResponseWithSetCookieHeaders_AllCookiesRead(KeyValueP await LoopbackServer.CreateServerAsync(async (server, url) => { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { Task getResponseTask = client.GetAsync(url); @@ -1051,7 +1055,7 @@ await TestHelper.WhenAllCompletedOrAnyFailed( [InlineData(true)] public async Task GetAsync_TrailingHeaders_Ignored(bool includeTrailerHeader) { - if (ManagedHandlerTestHelpers.IsEnabled) + if (UseManagedHandler) { // TODO #23130: The managed handler isn't correctly handling trailing headers. return; @@ -1059,7 +1063,7 @@ public async Task GetAsync_TrailingHeaders_Ignored(bool includeTrailerHeader) await LoopbackServer.CreateServerAsync(async (server, url) => { - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { Task getResponseTask = client.GetAsync(url); @@ -1097,7 +1101,7 @@ public async Task GetAsync_InvalidChunkSize_ThrowsHttpRequestException(string ch { await LoopbackServer.CreateServerAsync(async (server, url) => { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { string partialResponse = "HTTP/1.1 200 OK\r\n" + "Transfer-Encoding: chunked\r\n" + @@ -1124,7 +1128,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => [Fact] public async Task GetAsync_ResponseHeadersRead_ReadFromEachIterativelyDoesntDeadlock() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { const int NumGets = 5; Task[] responseTasks = (from _ in Enumerable.Range(0, NumGets) @@ -1150,7 +1154,7 @@ public async Task GetAsync_ResponseHeadersRead_ReadFromEachIterativelyDoesntDead public async Task SendAsync_HttpRequestMsgResponseHeadersRead_StatusCodeOK() { HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, Configuration.Http.SecureRemoteEchoServer); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { using (HttpResponseMessage response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)) { @@ -1172,7 +1176,7 @@ public async Task SendAsync_ReadFromSlowStreamingServer_PartialDataReturned() { await LoopbackServer.CreateServerAsync(async (server, url) => { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { Task getResponse = client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead); @@ -1207,7 +1211,7 @@ await writer.WriteAsync( [Fact] public async Task Dispose_DisposingHandlerCancelsActiveOperationsWithoutResponses() { - if (ManagedHandlerTestHelpers.IsEnabled) + if (UseManagedHandler) { // TODO #23131: The ManagedHandler isn't correctly handling disposal of the handler. // It should cause the outstanding requests to be canceled with OperationCanceledExceptions, @@ -1254,7 +1258,7 @@ await LoopbackServer.CreateServerAsync(async (socket3, url3) => // Make three requests Task get1, get2; HttpResponseMessage response3; - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { get1 = client.GetAsync(url1, HttpCompletionOption.ResponseHeadersRead); get2 = client.GetAsync(url2, HttpCompletionOption.ResponseHeadersRead); @@ -1287,7 +1291,7 @@ public async Task GetAsync_ExpectedStatusCode(int statusCode) { await LoopbackServer.CreateServerAsync(async (server, url) => { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { Task getResponseTask = client.GetAsync(url); await TestHelper.WhenAllCompletedOrAnyFailed( @@ -1318,7 +1322,7 @@ public async Task GetAsync_StatusCodeOutOfRange_ExpectedException(int statusCode await LoopbackServer.CreateServerAsync(async (server, url) => { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { Task getResponseTask = client.GetAsync(url); await LoopbackServer.ReadRequestAndSendResponseAsync(server, @@ -1337,7 +1341,7 @@ await LoopbackServer.ReadRequestAndSendResponseAsync(server, [Theory, MemberData(nameof(VerifyUploadServers))] public async Task PostAsync_CallMethodTwice_StringContent(Uri remoteServer) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { string data = "Test String"; var content = new StringContent(data, Encoding.UTF8); @@ -1362,7 +1366,7 @@ public async Task PostAsync_CallMethodTwice_StringContent(Uri remoteServer) [Theory, MemberData(nameof(VerifyUploadServers))] public async Task PostAsync_CallMethod_UnicodeStringContent(Uri remoteServer) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { string data = "\ub4f1\uffc7\u4e82\u67ab4\uc6d4\ud1a0\uc694\uc77c\uffda3\u3155\uc218\uffdb"; var content = new StringContent(data, Encoding.UTF8); @@ -1379,7 +1383,7 @@ public async Task PostAsync_CallMethod_UnicodeStringContent(Uri remoteServer) [Theory, MemberData(nameof(VerifyUploadServersStreamsAndExpectedData))] public async Task PostAsync_CallMethod_StreamContent(Uri remoteServer, HttpContent content, byte[] expectedData) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { content.Headers.ContentMD5 = TestHelper.ComputeMD5Hash(expectedData); @@ -1520,7 +1524,7 @@ public static IEnumerable VerifyUploadServersStreamsAndExpectedData [Theory, MemberData(nameof(EchoServers))] public async Task PostAsync_CallMethod_NullContent(Uri remoteServer) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { using (HttpResponseMessage response = await client.PostAsync(remoteServer, null)) { @@ -1541,7 +1545,7 @@ public async Task PostAsync_CallMethod_NullContent(Uri remoteServer) [Theory, MemberData(nameof(EchoServers))] public async Task PostAsync_CallMethod_EmptyContent(Uri remoteServer) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { var content = new StringContent(string.Empty); using (HttpResponseMessage response = await client.PostAsync(remoteServer, content)) @@ -1566,7 +1570,7 @@ public async Task PostAsync_CallMethod_EmptyContent(Uri remoteServer) [InlineData(null)] public async Task PostAsync_ExpectContinue_Success(bool? expectContinue) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { var req = new HttpRequestMessage(HttpMethod.Post, Configuration.Http.RemoteEchoServer) { @@ -1577,7 +1581,7 @@ public async Task PostAsync_ExpectContinue_Success(bool? expectContinue) using (HttpResponseMessage response = await client.SendAsync(req)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); - if (ManagedHandlerTestHelpers.IsEnabled) + if (UseManagedHandler) { const string ExpectedReqHeader = "\"Expect\": \"100-continue\""; if (expectContinue == true) @@ -1607,7 +1611,7 @@ public async Task PostAsync_Redirect_ResultingGetFormattedCorrectly(bool secure) secure ? Configuration.Http.SecureRemoteEchoServer : Configuration.Http.RemoteEchoServer, 1); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (HttpResponseMessage response = await client.PostAsync(redirectUri, content)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -1645,7 +1649,7 @@ public async Task PostAsync_Redirect_LargePayload_Helper(int statusCode, bool ex Uri redirectUri = Configuration.Http.RedirectUriForDestinationUri(false, statusCode, Configuration.Http.SecureRemoteEchoServer, 1); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (HttpResponseMessage response = await client.PostAsync(redirectUri, new StreamContent(fs))) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -1662,7 +1666,7 @@ public async Task PostAsync_Redirect_LargePayload_Helper(int statusCode, bool ex public async Task PostAsync_ReuseRequestContent_Success(Uri remoteServer) { const string ContentString = "This is the content string."; - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { var content = new StringContent(ContentString); for (int i = 0; i < 2; i++) @@ -1682,7 +1686,7 @@ public async Task PostAsync_ReuseRequestContent_Success(Uri remoteServer) [InlineData(HttpStatusCode.MethodNotAllowed, "")] public async Task GetAsync_CallMethod_ExpectedStatusLine(HttpStatusCode statusCode, string reasonPhrase) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.StatusCodeUri( false, @@ -1705,7 +1709,7 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithNoContent_Meth string method, bool secureServer) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { var request = new HttpRequestMessage( new HttpMethod(method), @@ -1740,7 +1744,7 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithContent_Succes return; } - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { var request = new HttpRequestMessage( new HttpMethod(method), @@ -1770,7 +1774,7 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithContent_Succes [InlineData("12345678910", 5)] public async Task SendAsync_SendSameRequestMultipleTimesDirectlyOnHandler_Success(string stringContent, int startingPosition) { - using (var handler = new HttpMessageInvoker(new HttpClientHandler())) + using (var handler = new HttpMessageInvoker(CreateHttpClientHandler())) { byte[] byteContent = Encoding.ASCII.GetBytes(stringContent); var content = new MemoryStream(); @@ -1819,7 +1823,7 @@ public async Task SendAsync_SendRequestUsingNoBodyMethodToEchoServerWithContent_ return; } - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { var request = new HttpRequestMessage( new HttpMethod(method), @@ -1830,7 +1834,7 @@ public async Task SendAsync_SendRequestUsingNoBodyMethodToEchoServerWithContent_ using (HttpResponseMessage response = await client.SendAsync(request)) { - if (method == "TRACE" && (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || ManagedHandlerTestHelpers.IsEnabled)) + if (method == "TRACE" && (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || UseManagedHandler)) { // .NET Framework also allows the HttpWebRequest and HttpClient APIs to send a request using 'TRACE' // verb and a request body. The usual response from a server is "400 Bad Request". @@ -1855,7 +1859,7 @@ public async Task SendAsync_SendRequestUsingNoBodyMethodToEchoServerWithContent_ [Fact] public async Task SendAsync_RequestVersion10_ServerReceivesVersion10Request() { - if (ManagedHandlerTestHelpers.IsEnabled) + if (UseManagedHandler) { // TODO #23132: ManagedHandler doesn't support 1.0 currently. return; @@ -1878,7 +1882,7 @@ public async Task SendAsync_RequestVersion11_ServerReceivesVersion11Request() [Fact] public async Task SendAsync_RequestVersionNotSpecified_ServerReceivesVersion11Request() { - if (ManagedHandlerTestHelpers.IsEnabled) + if (UseManagedHandler) { // TODO #23132: ManagedHandler requires 1.1 currently. return; @@ -1903,7 +1907,7 @@ public async Task SendAsync_RequestVersion20_ResponseVersion20IfHttp2Supported(U _output.WriteLine("Skipping test due to Windows 10 version prior to Version 1703."); return; } - if (ManagedHandlerTestHelpers.IsEnabled) + if (UseManagedHandler) { // TODO #23134: The managed handler doesn't yet support HTTP/2. return; @@ -1914,7 +1918,7 @@ public async Task SendAsync_RequestVersion20_ResponseVersion20IfHttp2Supported(U var request = new HttpRequestMessage(HttpMethod.Get, server); request.Version = new Version(2, 0); - using (var handler = new HttpClientHandler()) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler, false)) { // It is generally expected that the test hosts will be trusted, so we don't register a validation @@ -1955,7 +1959,7 @@ public async Task SendAsync_RequestVersion20_ResponseVersion20IfHttp2Supported(U [ConditionalTheory(nameof(IsWindows10Version1607OrGreater)), MemberData(nameof(Http2NoPushServers))] public async Task SendAsync_RequestVersion20_ResponseVersion20(Uri server) { - if (ManagedHandlerTestHelpers.IsEnabled) + if (UseManagedHandler) { // TODO #23134: The managed handler doesn't yet support HTTP/2. return; @@ -1965,7 +1969,7 @@ public async Task SendAsync_RequestVersion20_ResponseVersion20(Uri server) var request = new HttpRequestMessage(HttpMethod.Get, server); request.Version = new Version(2, 0); - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); using (var client = new HttpClient(handler)) { using (HttpResponseMessage response = await client.SendAsync(request)) @@ -1985,7 +1989,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => var request = new HttpRequestMessage(HttpMethod.Get, url); request.Version = requestVersion; - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { Task getResponse = client.SendAsync(request); Task> serverTask = LoopbackServer.ReadRequestAndSendResponseAsync(server); @@ -2025,7 +2029,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => [MemberData(nameof(CredentialsForProxy))] public async Task Proxy_BypassFalse_GetRequestGoesThroughCustomProxy(ICredentials creds, bool wrapCredsInCache) { - if (ManagedHandlerTestHelpers.IsEnabled) + if (UseManagedHandler) { // TODO #23135: ManagedHandler currently gets error "System.NotImplementedException : Basic auth: can't handle ':' in domain "dom:\ain"" return; @@ -2047,9 +2051,11 @@ public async Task Proxy_BypassFalse_GetRequestGoesThroughCustomProxy(ICredential creds = cache; } - using (var handler = new HttpClientHandler() { Proxy = new UseSpecifiedUriWebProxy(proxyUrl, creds) }) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { + handler.Proxy = new UseSpecifiedUriWebProxy(proxyUrl, creds); + Task responseTask = client.GetAsync(Configuration.Http.RemoteEchoServer); Task responseStringTask = responseTask.ContinueWith(t => t.Result.Content.ReadAsStringAsync(), TaskScheduler.Default).Unwrap(); await TestHelper.WhenAllCompletedOrAnyFailed(proxyTask, responseTask, responseStringTask); @@ -2075,7 +2081,9 @@ public async Task Proxy_BypassFalse_GetRequestGoesThroughCustomProxy(ICredential [MemberData(nameof(BypassedProxies))] public async Task Proxy_BypassTrue_GetRequestDoesntGoesThroughCustomProxy(IWebProxy proxy) { - using (var client = new HttpClient(new HttpClientHandler() { Proxy = proxy })) + HttpClientHandler handler = CreateHttpClientHandler(); + handler.Proxy = proxy; + using (var client = new HttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.RemoteEchoServer)) { TestHelper.VerifyResponseBody( @@ -2098,7 +2106,8 @@ public void Proxy_HaveNoCredsAndUseAuthenticatedCustomProxy_ProxyAuthenticationR expectCreds: false); Uri proxyUrl = new Uri($"http://localhost:{port}"); - using (var handler = new HttpClientHandler() { Proxy = new UseSpecifiedUriWebProxy(proxyUrl, null) }) + HttpClientHandler handler = CreateHttpClientHandler(); + handler.Proxy = new UseSpecifiedUriWebProxy(proxyUrl, null); using (var client = new HttpClient(handler)) { Task responseTask = client.GetAsync(Configuration.Http.RemoteEchoServer); @@ -2139,7 +2148,7 @@ await LoopbackServer.CreateServerAsync(async (server, rootUrl) => var request = new HttpRequestMessage(HttpMethod.Get, uri); string statusLine = string.Empty; - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { Task getResponseTask = client.SendAsync(request); Task> serverTask = LoopbackServer.ReadRequestAndSendResponseAsync(server); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientMiniStressTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientMiniStressTest.cs index 2d4d07b15b64..7866a00087fd 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientMiniStressTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientMiniStressTest.cs @@ -14,7 +14,7 @@ namespace System.Net.Http.Functional.Tests { using Configuration = System.Net.Test.Common.Configuration; - public class HttpClientMiniStress + public class HttpClientMiniStress : HttpClientTestBase { private static bool HttpStressEnabled => Configuration.Http.StressEnabled; @@ -23,7 +23,7 @@ public class HttpClientMiniStress public void SingleClient_ManyGets_Sync(int numRequests, int dop, HttpCompletionOption completionOption) { string responseText = CreateResponse("abcdefghijklmnopqrstuvwxyz"); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { Parallel.For(0, numRequests, new ParallelOptions { MaxDegreeOfParallelism = dop, TaskScheduler = new ThreadPerTaskScheduler() }, _ => { @@ -36,7 +36,7 @@ public void SingleClient_ManyGets_Sync(int numRequests, int dop, HttpCompletionO public async Task SingleClient_ManyGets_Async(int numRequests, int dop, HttpCompletionOption completionOption) { string responseText = CreateResponse("abcdefghijklmnopqrstuvwxyz"); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { await ForCountAsync(numRequests, dop, i => CreateServerAndGetAsync(client, completionOption, responseText)); } @@ -49,7 +49,7 @@ public void ManyClients_ManyGets(int numRequests, int dop, HttpCompletionOption string responseText = CreateResponse("abcdefghijklmnopqrstuvwxyz"); Parallel.For(0, numRequests, new ParallelOptions { MaxDegreeOfParallelism = dop, TaskScheduler = new ThreadPerTaskScheduler() }, _ => { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { CreateServerAndGet(client, completionOption, responseText); } @@ -63,7 +63,7 @@ public async Task ManyClients_ManyPosts_Async(int numRequests, int dop, int numB string responseText = CreateResponse(""); await ForCountAsync(numRequests, dop, async i => { - using (HttpClient client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { await CreateServerAndPostAsync(client, numBytes, responseText); } @@ -76,7 +76,7 @@ public void CreateAndDestroyManyClients(int numClients) { for (int i = 0; i < numClients; i++) { - new HttpClient().Dispose(); + CreateHttpClient().Dispose(); } } @@ -86,7 +86,7 @@ public async Task MakeAndFaultManyRequests(int numRequests) { await LoopbackServer.CreateServerAsync(async (server, url) => { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { client.Timeout = Timeout.InfiniteTimeSpan; @@ -193,7 +193,7 @@ public async Task UnreadResponseMessage_Collectible() { await LoopbackServer.CreateServerAsync(async (server, url) => { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { Func> getAsync = async () => new WeakReference(await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead)); Task wrt = getAsync(); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs index 42228af72aaf..5be76eb65913 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs @@ -2,13 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Concurrent; -using System.Diagnostics; -using System.Diagnostics.Tracing; using System.IO; using System.Linq; using System.Net.Test.Common; -using System.Reflection; using System.Threading; using System.Threading.Tasks; @@ -16,14 +12,12 @@ namespace System.Net.Http.Functional.Tests { - using Configuration = System.Net.Test.Common.Configuration; - - public class HttpClientTest + public class HttpClientTest : HttpClientTestBase { [Fact] public void Dispose_MultipleTimes_Success() { - var client = new HttpClient(); + HttpClient client = CreateHttpClient(); client.Dispose(); client.Dispose(); } @@ -31,7 +25,7 @@ public void Dispose_MultipleTimes_Success() [Fact] public void DefaultRequestHeaders_Idempotent() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { Assert.NotNull(client.DefaultRequestHeaders); Assert.Same(client.DefaultRequestHeaders, client.DefaultRequestHeaders); @@ -41,7 +35,7 @@ public void DefaultRequestHeaders_Idempotent() [Fact] public void BaseAddress_Roundtrip_Equal() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { Assert.Null(client.BaseAddress); @@ -57,7 +51,7 @@ public void BaseAddress_Roundtrip_Equal() [Fact] public void BaseAddress_InvalidUri_Throws() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { AssertExtensions.Throws("value", () => client.BaseAddress = new Uri("ftp://onlyhttpsupported")); AssertExtensions.Throws("value", () => client.BaseAddress = new Uri("/onlyabsolutesupported", UriKind.Relative)); @@ -67,7 +61,7 @@ public void BaseAddress_InvalidUri_Throws() [Fact] public void Timeout_Roundtrip_Equal() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { client.Timeout = Timeout.InfiniteTimeSpan; Assert.Equal(Timeout.InfiniteTimeSpan, client.Timeout); @@ -80,7 +74,7 @@ public void Timeout_Roundtrip_Equal() [Fact] public void Timeout_OutOfRange_Throws() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { AssertExtensions.Throws("value", () => client.Timeout = TimeSpan.FromSeconds(-2)); AssertExtensions.Throws("value", () => client.Timeout = TimeSpan.FromSeconds(0)); @@ -91,7 +85,7 @@ public void Timeout_OutOfRange_Throws() [Fact] public void MaxResponseContentBufferSize_Roundtrip_Equal() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { client.MaxResponseContentBufferSize = 1; Assert.Equal(1, client.MaxResponseContentBufferSize); @@ -104,7 +98,7 @@ public void MaxResponseContentBufferSize_Roundtrip_Equal() [Fact] public void MaxResponseContentBufferSize_OutOfRange_Throws() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { AssertExtensions.Throws("value", () => client.MaxResponseContentBufferSize = -1); AssertExtensions.Throws("value", () => client.MaxResponseContentBufferSize = 0); @@ -124,8 +118,10 @@ public void MaxResponseContentBufferSize_OutOfRange_Throws() [InlineData(1000, 1000, false)] public async Task MaxResponseContentBufferSize_ThrowsIfTooSmallForContent(int maxSize, int contentLength, bool exceptionExpected) { - using (var client = new HttpClient() { MaxResponseContentBufferSize = maxSize }) + using (HttpClient client = CreateHttpClient()) { + client.MaxResponseContentBufferSize = maxSize; + await LoopbackServer.CreateServerAsync(async (server, url) => { Task getTask = client.GetStringAsync(url); @@ -166,7 +162,7 @@ public async Task Properties_CantChangeAfterOperation_Throws() [InlineData("/something.html")] public void GetAsync_NoBaseAddress_InvalidUri_ThrowsException(string uri) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { Assert.Throws(() => { client.GetAsync(uri == null ? null : new Uri(uri, UriKind.RelativeOrAbsolute)); }); } @@ -253,7 +249,7 @@ public async Task GetContentAsync_SerializingContentThrows_Asynchronous_Throws() [Fact] public async Task GetAsync_InvalidUrl_ExpectedExceptionThrown() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { await Assert.ThrowsAsync(() => client.GetAsync(CreateFakeUri())); await Assert.ThrowsAsync(() => client.GetStringAsync(CreateFakeUri())); @@ -363,7 +359,7 @@ public async Task SendAsync_RequestContentNotDisposed() [Fact] public void Dispose_UseAfterDispose_Throws() { - var client = new HttpClient(); + HttpClient client = CreateHttpClient(); client.Dispose(); Assert.Throws(() => client.BaseAddress = null); @@ -411,8 +407,10 @@ public void Timeout_TooShort_AllPendingOperationsCanceled() [OuterLoop("One second delay in getting server's response")] public async Task Timeout_SetTo30AndGetResponseFromLoopbackQuickly_Success() { - using (var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(30) }) + using (HttpClient client = CreateHttpClient()) { + client.Timeout = TimeSpan.FromSeconds(30); + await LoopbackServer.CreateServerAsync(async (server, url) => { Task getTask = client.GetStringAsync(url); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientTestBase.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientTestBase.cs new file mode 100644 index 000000000000..c8220d916b51 --- /dev/null +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientTestBase.cs @@ -0,0 +1,60 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Diagnostics; +using System.Threading; + +namespace System.Net.Http.Functional.Tests +{ + public abstract class HttpClientTestBase : RemoteExecutorTestBase + { + private const string ManagedHandlerEnvVar = "COMPlus_UseManagedHttpClientHandler"; + private static readonly LocalDataStoreSlot s_managedHandlerSlot; + + static HttpClientTestBase() + { + s_managedHandlerSlot = Thread.GetNamedDataSlot(ManagedHandlerEnvVar); + if (s_managedHandlerSlot == null) + { + try + { + s_managedHandlerSlot = Thread.AllocateNamedDataSlot(ManagedHandlerEnvVar); + } + catch (ArgumentException) + { + s_managedHandlerSlot = Thread.GetNamedDataSlot(ManagedHandlerEnvVar); + } + } + Debug.Assert(s_managedHandlerSlot != null); + } + + protected virtual bool UseManagedHandler => false; + + protected HttpClient CreateHttpClient() => new HttpClient(CreateHttpClientHandler()); + + protected HttpClientHandler CreateHttpClientHandler() => CreateHttpClientHandler(UseManagedHandler); + + protected static HttpClient CreateHttpClient(string useManagedHandlerBoolString) => + new HttpClient(CreateHttpClientHandler(useManagedHandlerBoolString)); + + protected static HttpClientHandler CreateHttpClientHandler(string useManagedHandlerBoolString) => + CreateHttpClientHandler(bool.Parse(useManagedHandlerBoolString)); + + protected static HttpClientHandler CreateHttpClientHandler(bool useManagedHandler) => + useManagedHandler ? CreateManagedHttpClientHandler() : new HttpClientHandler(); + + private static HttpClientHandler CreateManagedHttpClientHandler() + { + try + { + Thread.SetData(s_managedHandlerSlot, true); + return new HttpClientHandler(); + } + finally + { + Thread.SetData(s_managedHandlerSlot, null); + } + } + } +} diff --git a/src/System.Net.Http/tests/FunctionalTests/ManagedHandlerTest.cs b/src/System.Net.Http/tests/FunctionalTests/ManagedHandlerTest.cs index c2f77ee88fed..dfbade9de15c 100644 --- a/src/System.Net.Http/tests/FunctionalTests/ManagedHandlerTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/ManagedHandlerTest.cs @@ -21,121 +21,87 @@ // - By setting the env var prior to running tests, every test will implicitly use the managed handler, // at which point the tests in this file are duplicative and can be commented out. -// For now parallelism is disabled because we use an env var to turn on the managed handler, and the env var -// impacts any tests running concurrently in the process. We can remove this restriction in the future once -// plans around the ManagedHandler are better understood. -[assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly, DisableTestParallelization = true, MaxParallelThreads = 1)] - namespace System.Net.Http.Functional.Tests { public sealed class ManagedHandler_HttpClientTest : HttpClientTest, IDisposable { - public ManagedHandler_HttpClientTest() => ManagedHandlerTestHelpers.SetEnvVar(); - public void Dispose() => ManagedHandlerTestHelpers.RemoveEnvVar(); + protected override bool UseManagedHandler => true; } public sealed class ManagedHandler_DiagnosticsTest : DiagnosticsTest, IDisposable { - public ManagedHandler_DiagnosticsTest() => ManagedHandlerTestHelpers.SetEnvVar(); - public new void Dispose() - { - ManagedHandlerTestHelpers.RemoveEnvVar(); - base.Dispose(); - } + protected override bool UseManagedHandler => true; } public sealed class ManagedHandler_HttpClientEKUTest : HttpClientEKUTest, IDisposable { - public ManagedHandler_HttpClientEKUTest() => ManagedHandlerTestHelpers.SetEnvVar(); - public void Dispose() => ManagedHandlerTestHelpers.RemoveEnvVar(); + protected override bool UseManagedHandler => true; } public sealed class ManagedHandler_HttpClientHandler_DangerousAcceptAllCertificatesValidator_Test : HttpClientHandler_DangerousAcceptAllCertificatesValidator_Test, IDisposable { - public ManagedHandler_HttpClientHandler_DangerousAcceptAllCertificatesValidator_Test() => ManagedHandlerTestHelpers.SetEnvVar(); - public void Dispose() => ManagedHandlerTestHelpers.RemoveEnvVar(); + protected override bool UseManagedHandler => true; } public sealed class ManagedHandler_HttpClientHandler_ClientCertificates_Test : HttpClientHandler_ClientCertificates_Test, IDisposable { - public ManagedHandler_HttpClientHandler_ClientCertificates_Test(ITestOutputHelper output) : base(output) => ManagedHandlerTestHelpers.SetEnvVar(); - public new void Dispose() - { - ManagedHandlerTestHelpers.RemoveEnvVar(); - base.Dispose(); - } + public ManagedHandler_HttpClientHandler_ClientCertificates_Test(ITestOutputHelper output) : base(output) { } + protected override bool UseManagedHandler => true; } public sealed class ManagedHandler_HttpClientHandler_DefaultProxyCredentials_Test : HttpClientHandler_DefaultProxyCredentials_Test, IDisposable { - public ManagedHandler_HttpClientHandler_DefaultProxyCredentials_Test() => ManagedHandlerTestHelpers.SetEnvVar(); - public new void Dispose() - { - ManagedHandlerTestHelpers.RemoveEnvVar(); - base.Dispose(); - } + protected override bool UseManagedHandler => true; } public sealed class ManagedHandler_HttpClientHandler_MaxConnectionsPerServer_Test : HttpClientHandler_MaxConnectionsPerServer_Test, IDisposable { - public ManagedHandler_HttpClientHandler_MaxConnectionsPerServer_Test() => ManagedHandlerTestHelpers.SetEnvVar(); - public void Dispose() => ManagedHandlerTestHelpers.RemoveEnvVar(); + protected override bool UseManagedHandler => true; } public sealed class ManagedHandler_HttpClientHandler_ServerCertificates_Test : HttpClientHandler_ServerCertificates_Test, IDisposable { - public ManagedHandler_HttpClientHandler_ServerCertificates_Test() => ManagedHandlerTestHelpers.SetEnvVar(); - public new void Dispose() - { - ManagedHandlerTestHelpers.RemoveEnvVar(); - base.Dispose(); - } + protected override bool UseManagedHandler => true; } public sealed class ManagedHandler_PostScenarioTest : PostScenarioTest, IDisposable { - public ManagedHandler_PostScenarioTest(ITestOutputHelper output) : base(output) => ManagedHandlerTestHelpers.SetEnvVar(); - public void Dispose() => ManagedHandlerTestHelpers.RemoveEnvVar(); + public ManagedHandler_PostScenarioTest(ITestOutputHelper output) : base(output) { } + protected override bool UseManagedHandler => true; } public sealed class ManagedHandler_ResponseStreamTest : ResponseStreamTest, IDisposable { - public ManagedHandler_ResponseStreamTest(ITestOutputHelper output) : base(output) => ManagedHandlerTestHelpers.SetEnvVar(); - public void Dispose() => ManagedHandlerTestHelpers.RemoveEnvVar(); + public ManagedHandler_ResponseStreamTest(ITestOutputHelper output) : base(output) { } + protected override bool UseManagedHandler => true; } - + public sealed class ManagedHandler_HttpClientHandler_SslProtocols_Test : HttpClientHandler_SslProtocols_Test, IDisposable { - public ManagedHandler_HttpClientHandler_SslProtocols_Test() => ManagedHandlerTestHelpers.SetEnvVar(); - public void Dispose() => ManagedHandlerTestHelpers.RemoveEnvVar(); + protected override bool UseManagedHandler => true; } public sealed class ManagedHandler_SchSendAuxRecordHttpTest : SchSendAuxRecordHttpTest, IDisposable { - public ManagedHandler_SchSendAuxRecordHttpTest(ITestOutputHelper output) : base(output) => ManagedHandlerTestHelpers.SetEnvVar(); - public void Dispose() => ManagedHandlerTestHelpers.RemoveEnvVar(); + public ManagedHandler_SchSendAuxRecordHttpTest(ITestOutputHelper output) : base(output) { } + protected override bool UseManagedHandler => true; } public sealed class ManagedHandler_HttpClientMiniStress : HttpClientMiniStress, IDisposable { - public ManagedHandler_HttpClientMiniStress() => ManagedHandlerTestHelpers.SetEnvVar(); - public void Dispose() => ManagedHandlerTestHelpers.RemoveEnvVar(); + protected override bool UseManagedHandler => true; } public sealed class ManagedHandler_HttpClientHandlerTest : HttpClientHandlerTest, IDisposable { - public ManagedHandler_HttpClientHandlerTest(ITestOutputHelper output) : base(output) => ManagedHandlerTestHelpers.SetEnvVar(); - public new void Dispose() - { - ManagedHandlerTestHelpers.RemoveEnvVar(); - base.Dispose(); - } + public ManagedHandler_HttpClientHandlerTest(ITestOutputHelper output) : base(output) { } + protected override bool UseManagedHandler => true; } public sealed class ManagedHandler_DefaultCredentialsTest : DefaultCredentialsTest, IDisposable { - public ManagedHandler_DefaultCredentialsTest(ITestOutputHelper output) : base(output) => ManagedHandlerTestHelpers.SetEnvVar(); - public void Dispose() => ManagedHandlerTestHelpers.RemoveEnvVar(); + public ManagedHandler_DefaultCredentialsTest(ITestOutputHelper output) : base(output) { } + protected override bool UseManagedHandler => true; } // TODO #23141: Socket's don't support canceling individual operations, so ReadStream on NetworkStream @@ -145,30 +111,24 @@ public sealed class ManagedHandler_DefaultCredentialsTest : DefaultCredentialsTe // same thing if it's really important. //public sealed class ManagedHandler_CancellationTest : CancellationTest, IDisposable //{ - // public ManagedHandler_CancellationTest(ITestOutputHelper output) : base(output) => ManagedHandlerTestHelpers.SetEnvVar(); - // public void Dispose() => ManagedHandlerTestHelpers.RemoveEnvVar(); + // public ManagedHandler_CancellationTest(ITestOutputHelper output) : base(output) { } + // protected override bool UseManagedHandler => true; //} // TODO #23142: The managed handler doesn't currently track how much data was written for the response headers. //public sealed class ManagedHandler_HttpClientHandler_MaxResponseHeadersLength_Test : HttpClientHandler_MaxResponseHeadersLength_Test, IDisposable //{ - // public ManagedHandler_HttpClientHandler_MaxResponseHeadersLength_Test() => ManagedHandlerTestHelpers.SetEnvVar(); - // public new void Dispose() - // { - // ManagedHandlerTestHelpers.RemoveEnvVar(); - // base.Dispose(); - // } + // protected override bool UseManagedHandler => true; //} - public sealed class ManagedHandler_HttpClientHandler_DuplexCommunication_Test : IDisposable + public sealed class ManagedHandler_HttpClientHandler_DuplexCommunication_Test : HttpClientTestBase, IDisposable { - public ManagedHandler_HttpClientHandler_DuplexCommunication_Test() => ManagedHandlerTestHelpers.SetEnvVar(); - public void Dispose() => ManagedHandlerTestHelpers.RemoveEnvVar(); + protected override bool UseManagedHandler => true; [Fact] public async Task SendBytesBackAndForthBetweenClientAndServer_Success() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (var listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) { listener.Bind(new IPEndPoint(IPAddress.Loopback, 0)); @@ -293,10 +253,9 @@ public override void Flush() { } } - public sealed class ManagedHandler_HttpClientHandler_ConnectionPooling_Test : IDisposable + public sealed class ManagedHandler_HttpClientHandler_ConnectionPooling_Test : HttpClientTestBase, IDisposable { - public ManagedHandler_HttpClientHandler_ConnectionPooling_Test() => ManagedHandlerTestHelpers.SetEnvVar(); - public void Dispose() => ManagedHandlerTestHelpers.RemoveEnvVar(); + protected override bool UseManagedHandler => true; // TODO: Currently the subsequent tests sometimes fail/hang with WinHttpHandler / CurlHandler. // In theory they should pass with any handler that does appropriate connection pooling. @@ -306,7 +265,7 @@ public sealed class ManagedHandler_HttpClientHandler_ConnectionPooling_Test : ID [Fact] public async Task MultipleIterativeRequests_SameConnectionReused() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (var listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) { listener.Bind(new IPEndPoint(IPAddress.Loopback, 0)); @@ -345,7 +304,7 @@ public async Task MultipleIterativeRequests_SameConnectionReused() [Fact] public async Task ServerDisconnectsAfterInitialRequest_SubsequentRequestUsesDifferentConnection() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (var listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) { listener.Bind(new IPEndPoint(IPAddress.Loopback, 0)); @@ -384,7 +343,7 @@ public async Task ServerDisconnectsAfterInitialRequest_SubsequentRequestUsesDiff [Fact] public async Task ServerSendsConnectionClose_SubsequentRequestUsesDifferentConnection() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (var listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) { listener.Bind(new IPEndPoint(IPAddress.Loopback, 0)); diff --git a/src/System.Net.Http/tests/FunctionalTests/ManagedHandlerTestHelpers.cs b/src/System.Net.Http/tests/FunctionalTests/ManagedHandlerTestHelpers.cs deleted file mode 100644 index 758dbdceb002..000000000000 --- a/src/System.Net.Http/tests/FunctionalTests/ManagedHandlerTestHelpers.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Xunit; -using Xunit.Abstractions; - -namespace System.Net.Http.Functional.Tests -{ - internal static class ManagedHandlerTestHelpers - { - private const string ManagedHandlerEnvVar = "COMPlus_UseManagedHttpClientHandler"; - public static void SetEnvVar() => Environment.SetEnvironmentVariable(ManagedHandlerEnvVar, "true"); - public static void RemoveEnvVar() => Environment.SetEnvironmentVariable(ManagedHandlerEnvVar, null); - public static bool IsEnabled => Environment.GetEnvironmentVariable(ManagedHandlerEnvVar) == "true"; - } -} diff --git a/src/System.Net.Http/tests/FunctionalTests/PostScenarioTest.cs b/src/System.Net.Http/tests/FunctionalTests/PostScenarioTest.cs index d1a7823b7bb2..5c5ee93fe879 100644 --- a/src/System.Net.Http/tests/FunctionalTests/PostScenarioTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/PostScenarioTest.cs @@ -2,14 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.IO; -using System.Net.Http.Headers; -using System.Net.Test.Common; -using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; - using Xunit; using Xunit.Abstractions; @@ -20,7 +14,7 @@ namespace System.Net.Http.Functional.Tests // Note: Disposing the HttpClient object automatically disposes the handler within. So, it is not necessary // to separately Dispose (or have a 'using' statement) for the handler. [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "dotnet/corefx #20010")] - public class PostScenarioTest + public class PostScenarioTest : HttpClientTestBase { private const string ExpectedContent = "Test contest"; private const string UserName = "user1"; @@ -178,7 +172,7 @@ public async Task PostNonRewindableContentUsingAuth_PreAuthenticate_Success(Uri [Theory, MemberData(nameof(EchoServers))] public async Task PostAsync_EmptyContent_ContentTypeHeaderNotSent(Uri serverUri) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (HttpResponseMessage response = await client.PostAsync(serverUri, null)) { string responseContent = await response.Content.ReadAsStringAsync(); @@ -195,7 +189,7 @@ private async Task PostHelper( bool useContentLengthUpload, bool useChunkedEncodingUpload) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { if (!useContentLengthUpload && requestContent != null) { @@ -234,7 +228,7 @@ private async Task PostUsingAuthHelper( NetworkCredential credential, bool preAuthenticate) { - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(); handler.PreAuthenticate = preAuthenticate; handler.Credentials = credential; using (var client = new HttpClient(handler)) diff --git a/src/System.Net.Http/tests/FunctionalTests/PostScenarioUWPTest.cs b/src/System.Net.Http/tests/FunctionalTests/PostScenarioUWPTest.cs index 1cce398e2b3d..1c58ff83ebe0 100644 --- a/src/System.Net.Http/tests/FunctionalTests/PostScenarioUWPTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/PostScenarioUWPTest.cs @@ -15,7 +15,7 @@ namespace System.Net.Http.Functional.Tests { using Configuration = System.Net.Test.Common.Configuration; - public class PostScenarioUWPTest : RemoteExecutorTestBase + public class PostScenarioUWPTest : HttpClientTestBase { private readonly ITestOutputHelper _output; @@ -27,15 +27,15 @@ public PostScenarioUWPTest(ITestOutputHelper output) [Fact] public void Authentication_UseStreamContent_Throws() { - RemoteInvoke(async () => + RemoteInvoke(async useManagedHandlerString => { // This test validates the current limitation of CoreFx's NetFxToWinRtStreamAdapter // which throws exceptions when trying to rewind a .NET Stream when it needs to be // re-POST'd to the server. string username = "testuser"; string password = "password"; - Uri uri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: username, password: password); - var handler = new HttpClientHandler(); + Uri uri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: username, password: password); + HttpClientHandler handler = CreateHttpClientHandler(useManagedHandlerString); handler.Credentials = new NetworkCredential(username, password); using (var client = new HttpClient(handler)) @@ -48,18 +48,18 @@ public void Authentication_UseStreamContent_Throws() } return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [Fact] public void Authentication_UseMultiInterfaceNonRewindableStreamContent_Throws() { - RemoteInvoke(async () => + RemoteInvoke(async useManagedHandlerString => { string username = "testuser"; string password = "password"; Uri uri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: username, password: password); - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(useManagedHandlerString); handler.Credentials = new NetworkCredential(username, password); using (var client = new HttpClient(handler)) @@ -72,18 +72,18 @@ public void Authentication_UseMultiInterfaceNonRewindableStreamContent_Throws() } return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [Fact] public void Authentication_UseMultiInterfaceStreamContent_Success() { - RemoteInvoke(async () => + RemoteInvoke(async useManagedHandlerString => { string username = "testuser"; string password = "password"; Uri uri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: username, password: password); - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(useManagedHandlerString); handler.Credentials = new NetworkCredential(username, password); using (var client = new HttpClient(handler)) @@ -100,18 +100,18 @@ public void Authentication_UseMultiInterfaceStreamContent_Success() } return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [Fact] public void Authentication_UseMemoryStreamVisibleBufferContent_Success() { - RemoteInvoke(async () => + RemoteInvoke(async useManagedHandlerString => { string username = "testuser"; string password = "password"; Uri uri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: username, password: password); - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(useManagedHandlerString); handler.Credentials = new NetworkCredential(username, password); using (var client = new HttpClient(handler)) @@ -128,18 +128,18 @@ public void Authentication_UseMemoryStreamVisibleBufferContent_Success() } return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } [Fact] public void Authentication_UseMemoryStreamNotVisibleBufferContent_Success() { - RemoteInvoke(async () => + RemoteInvoke(async useManagedHandlerString => { string username = "testuser"; string password = "password"; Uri uri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: username, password: password); - var handler = new HttpClientHandler(); + HttpClientHandler handler = CreateHttpClientHandler(useManagedHandlerString); handler.Credentials = new NetworkCredential(username, password); using (var client = new HttpClient(handler)) @@ -156,7 +156,7 @@ public void Authentication_UseMemoryStreamNotVisibleBufferContent_Success() } return SuccessExitCode; - }).Dispose(); + }, UseManagedHandler.ToString()).Dispose(); } } } diff --git a/src/System.Net.Http/tests/FunctionalTests/ReadOnlyMemoryContentTest.cs b/src/System.Net.Http/tests/FunctionalTests/ReadOnlyMemoryContentTest.cs index 94fa7eebebc8..01334a8c3fbe 100644 --- a/src/System.Net.Http/tests/FunctionalTests/ReadOnlyMemoryContentTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/ReadOnlyMemoryContentTest.cs @@ -393,7 +393,7 @@ private static ReadOnlyMemoryContent CreateContent(int contentLength, bool useAr else { ownedMemory = new NativeOwnedMemory(contentLength); - memory = ownedMemory.AsMemory; + memory = ownedMemory.Memory; } new Random(contentLength).NextBytes(memory.Span); diff --git a/src/System.Net.Http/tests/FunctionalTests/ResponseStreamTest.cs b/src/System.Net.Http/tests/FunctionalTests/ResponseStreamTest.cs index 16b930d5cac6..d067473b0570 100644 --- a/src/System.Net.Http/tests/FunctionalTests/ResponseStreamTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/ResponseStreamTest.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.IO; -using System.Net.Sockets; using System.Net.Test.Common; using System.Text; using System.Threading; @@ -17,7 +16,7 @@ namespace System.Net.Http.Functional.Tests using Configuration = System.Net.Test.Common.Configuration; [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "dotnet/corefx #20010")] - public class ResponseStreamTest + public class ResponseStreamTest : HttpClientTestBase { private readonly ITestOutputHelper _output; @@ -36,7 +35,7 @@ public ResponseStreamTest(ITestOutputHelper output) [InlineData(5)] public async Task GetStreamAsync_ReadToEnd_Success(int readMode) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { string customHeaderValue = Guid.NewGuid().ToString("N"); client.DefaultRequestHeaders.Add("X-ResponseStreamTest", customHeaderValue); @@ -111,7 +110,7 @@ public async Task GetStreamAsync_ReadToEnd_Success(int readMode) [Fact] public async Task GetAsync_UseResponseHeadersReadAndCallLoadIntoBuffer_Success() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.RemoteEchoServer, HttpCompletionOption.ResponseHeadersRead)) { await response.Content.LoadIntoBufferAsync(); @@ -130,7 +129,7 @@ public async Task GetAsync_UseResponseHeadersReadAndCallLoadIntoBuffer_Success() [Fact] public async Task GetAsync_UseResponseHeadersReadAndCopyToMemoryStream_Success() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.RemoteEchoServer, HttpCompletionOption.ResponseHeadersRead)) { var memoryStream = new MemoryStream(); @@ -154,7 +153,7 @@ public async Task GetAsync_UseResponseHeadersReadAndCopyToMemoryStream_Success() [Fact] public async Task GetStreamAsync_ReadZeroBytes_Success() { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (Stream stream = await client.GetStreamAsync(Configuration.Http.RemoteEchoServer)) { Assert.Equal(0, stream.Read(new byte[1], 0, 0)); @@ -169,7 +168,7 @@ public async Task ReadAsStreamAsync_Cancel_TaskIsCanceled() { var cts = new CancellationTokenSource(); - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.RemoteEchoServer, HttpCompletionOption.ResponseHeadersRead)) using (Stream stream = await response.Content.ReadAsStreamAsync()) @@ -243,7 +242,7 @@ public async Task ReadAsStreamAsync_ValidServerResponse_Success( private async Task ReadAsStreamHelper(IPEndPoint serverEndPoint) { - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { using (var response = await client.GetAsync( new Uri($"http://{serverEndPoint.Address}:{(serverEndPoint).Port}/"), diff --git a/src/System.Net.Http/tests/FunctionalTests/SchSendAuxRecordHttpTest.cs b/src/System.Net.Http/tests/FunctionalTests/SchSendAuxRecordHttpTest.cs index 50de6a06ea49..c02e2f1eb623 100644 --- a/src/System.Net.Http/tests/FunctionalTests/SchSendAuxRecordHttpTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/SchSendAuxRecordHttpTest.cs @@ -11,10 +11,8 @@ namespace System.Net.Http.Functional.Tests { - using Configuration = System.Net.Test.Common.Configuration; - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "dotnet/corefx #20010")] - public class SchSendAuxRecordHttpTest + public class SchSendAuxRecordHttpTest : HttpClientTestBase { readonly ITestOutputHelper _output; @@ -32,9 +30,10 @@ public async Task HttpClient_ClientUsesAuxRecord_Ok() options.AllowedProtocols = SslProtocols.Tls; using (var server = new HttpsTestServer(options)) - using (var handler = new HttpClientHandler() { ServerCertificateCustomValidationCallback = LoopbackServer.AllowAllCertificates }) + using (HttpClientHandler handler = CreateHttpClientHandler()) using (var client = new HttpClient(handler)) { + handler.ServerCertificateCustomValidationCallback = LoopbackServer.AllowAllCertificates; server.Start(); var tasks = new Task[2]; diff --git a/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj b/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj index ff4b8ed798b4..ae66726b3927 100644 --- a/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj +++ b/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj @@ -82,6 +82,7 @@ + @@ -102,7 +103,6 @@ - @@ -131,5 +131,8 @@ + + + \ No newline at end of file diff --git a/src/System.Net.NameResolution/tests/FunctionalTests/GetHostEntryTest.cs b/src/System.Net.NameResolution/tests/FunctionalTests/GetHostEntryTest.cs index 259a6803e32e..e5b5174e4343 100644 --- a/src/System.Net.NameResolution/tests/FunctionalTests/GetHostEntryTest.cs +++ b/src/System.Net.NameResolution/tests/FunctionalTests/GetHostEntryTest.cs @@ -91,34 +91,6 @@ public async Task Dns_GetHostEntryAsync_AnyIPAddress_Fail(IPAddress address) await Assert.ThrowsAsync(() => Dns.GetHostEntryAsync(addressString)); } - public static IEnumerable GetNoneAddresses() - { - yield return new object[] { IPAddress.None }; - } - - [PlatformSpecific(~TestPlatforms.OSX)] // macOS will resolve IPAddress.None to broadcasthost and produce a valid listing - [Theory] - [MemberData(nameof(GetNoneAddresses))] - public async Task Dns_GetHostEntryAsync_NoneIPAddress_Fail(IPAddress address) - { - string addressString = address.ToString(); - - await Assert.ThrowsAnyAsync(() => Dns.GetHostEntryAsync(address)); - await Assert.ThrowsAnyAsync(() => Dns.GetHostEntryAsync(addressString)); - } - - [PlatformSpecific(TestPlatforms.OSX)] // macOS will resolve IPAddress.None to broadcasthost and produce a valid listing - [Theory] - [MemberData(nameof(GetNoneAddresses))] - public async Task Dns_GetHostEntryAsync_NoneIPAddress_Success(IPAddress address) - { - IPHostEntry result = await Dns.GetHostEntryAsync(address); - Assert.NotNull(result); - Assert.NotNull(result.AddressList); - Assert.Equal(1, result.AddressList.Length); - Assert.Equal(address, result.AddressList[0]); - } - [Fact] public void DnsBeginGetHostEntry_BadName_Throws() { diff --git a/src/System.Net.Security/src/System.Net.Security.csproj b/src/System.Net.Security/src/System.Net.Security.csproj index c8756c39f695..251d4bb13cb8 100644 --- a/src/System.Net.Security/src/System.Net.Security.csproj +++ b/src/System.Net.Security/src/System.Net.Security.csproj @@ -21,6 +21,7 @@ + diff --git a/src/System.Net.Security/src/System/Net/Security/SslState.cs b/src/System.Net.Security/src/System/Net/Security/SslState.cs index f44975c58177..eb3e1e65b9dd 100644 --- a/src/System.Net.Security/src/System/Net/Security/SslState.cs +++ b/src/System.Net.Security/src/System/Net/Security/SslState.cs @@ -1279,10 +1279,31 @@ internal void FinishRead(byte[] renegotiateBuffer) } } - // Returns: - // true - operation queued - // false - operation can proceed - internal bool CheckEnqueueWrite(AsyncProtocolRequest asyncRequest) + internal Task CheckEnqueueWriteAsync() + { + // Clear previous request. + int lockState = Interlocked.CompareExchange(ref _lockWriteState, LockWrite, LockNone); + if (lockState != LockHandshake) + { + return Task.CompletedTask; + } + + lock (this) + { + if (_lockWriteState != LockHandshake) + { + CheckThrow(authSuccessCheck: true); + return Task.CompletedTask; + } + + _lockWriteState = LockPendingWrite; + TaskCompletionSource completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + _queuedWriteStateRequest = completionSource; + return completionSource.Task; + } + } + + internal void CheckEnqueueWrite() { // Clear previous request. _queuedWriteStateRequest = null; @@ -1290,7 +1311,7 @@ internal bool CheckEnqueueWrite(AsyncProtocolRequest asyncRequest) if (lockState != LockHandshake) { // Proceed with write. - return false; + return; } LazyAsyncResult lazyResult = null; @@ -1299,27 +1320,20 @@ internal bool CheckEnqueueWrite(AsyncProtocolRequest asyncRequest) if (_lockWriteState != LockHandshake) { // Handshake has completed before we grabbed the lock. - CheckThrow(true); - return false; + CheckThrow(authSuccessCheck: true); + return; } _lockWriteState = LockPendingWrite; - // Still pending, wait or enqueue. - if (asyncRequest != null) - { - _queuedWriteStateRequest = asyncRequest; - return true; - } - lazyResult = new LazyAsyncResult(null, null, /*must be */null); _queuedWriteStateRequest = lazyResult; } // Need to exit from lock before waiting. lazyResult.InternalWaitForCompletion(); - CheckThrow(true); - return false; + CheckThrow(authSuccessCheck: true); + return; } internal void FinishWrite() diff --git a/src/System.Net.Security/src/System/Net/Security/SslStreamInternal.Adapters.cs b/src/System.Net.Security/src/System/Net/Security/SslStreamInternal.Adapters.cs new file mode 100644 index 000000000000..48f0c13c5749 --- /dev/null +++ b/src/System.Net.Security/src/System/Net/Security/SslStreamInternal.Adapters.cs @@ -0,0 +1,53 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +using System.Threading; +using System.Threading.Tasks; + +namespace System.Net.Security +{ + // This contains adapters to allow a single code path for sync/async logic + internal partial class SslStreamInternal + { + private interface ISslWriteAdapter + { + Task LockAsync(); + Task WriteAsync(byte[] buffer, int offset, int count); + } + + private struct SslWriteAsync : ISslWriteAdapter + { + private readonly SslState _sslState; + private readonly CancellationToken _cancellationToken; + + public SslWriteAsync(SslState sslState, CancellationToken cancellationToken) + { + _sslState = sslState; + _cancellationToken = cancellationToken; + } + + public Task LockAsync() => _sslState.CheckEnqueueWriteAsync(); + + public Task WriteAsync(byte[] buffer, int offset, int count) => _sslState.InnerStream.WriteAsync(buffer, offset, count, _cancellationToken); + } + + private struct SslWriteSync : ISslWriteAdapter + { + private readonly SslState _sslState; + + public SslWriteSync(SslState sslState) => _sslState = sslState; + + public Task LockAsync() + { + _sslState.CheckEnqueueWrite(); + return Task.CompletedTask; + } + + public Task WriteAsync(byte[] buffer, int offset, int count) + { + _sslState.InnerStream.Write(buffer, offset, count); + return Task.CompletedTask; + } + } + } +} diff --git a/src/System.Net.Security/src/System/Net/Security/SslStreamInternal.cs b/src/System.Net.Security/src/System/Net/Security/SslStreamInternal.cs index 3794854dab15..ba789ab33d21 100644 --- a/src/System.Net.Security/src/System/Net/Security/SslStreamInternal.cs +++ b/src/System.Net.Security/src/System/Net/Security/SslStreamInternal.cs @@ -14,14 +14,11 @@ namespace System.Net.Security // // This is a wrapping stream that does data encryption/decryption based on a successfully authenticated SSPI context. // - internal class SslStreamInternal + internal partial class SslStreamInternal { - private static readonly AsyncCallback s_writeCallback = new AsyncCallback(WriteCallback); - private static readonly AsyncProtocolCallback s_resumeAsyncWriteCallback = new AsyncProtocolCallback(ResumeAsyncWriteCallback); private static readonly AsyncProtocolCallback s_resumeAsyncReadCallback = new AsyncProtocolCallback(ResumeAsyncReadCallback); private static readonly AsyncProtocolCallback s_readHeaderCallback = new AsyncProtocolCallback(ReadHeaderCallback); private static readonly AsyncProtocolCallback s_readFrameCallback = new AsyncProtocolCallback(ReadFrameCallback); - private static readonly Action s_freeWriteBufferCallback = FreeWriteBuffer; private const int FrameOverhead = 32; private const int ReadBufferSize = 4096 * 4 + FrameOverhead; // We read in 16K chunks + headers. @@ -30,7 +27,6 @@ internal class SslStreamInternal private int _nestedWrite; private int _nestedRead; private AsyncProtocolRequest _readProtocolRequest; // cached, reusable AsyncProtocolRequest used for read operations - private AsyncProtocolRequest _writeProtocolRequest; // cached, reusable AsyncProtocolRequest used for write operations // Never updated directly, special properties are used. This is the read buffer. private byte[] _internalBuffer; @@ -49,12 +45,6 @@ internal SslStreamInternal(SslState sslState) _decryptedBytesCount = 0; } - private static void FreeWriteBuffer(Task t, object buffer) - { - ArrayPool.Shared.Return((byte[])buffer); - t.GetAwaiter().GetResult(); - } - //We will only free the read buffer if it //actually contains no decrypted or encrypted bytes private void ReturnReadBufferIfEmpty() @@ -114,14 +104,14 @@ internal int ReadByte() return bytesRead == 1 ? oneByte[0] : -1; } - internal int Read(byte[] buffer, int offset, int count) - { - return ProcessRead(buffer, offset, count, null); - } + internal int Read(byte[] buffer, int offset, int count) => ProcessRead(buffer, offset, count, null); internal void Write(byte[] buffer, int offset, int count) { - ProcessWrite(buffer, offset, count, null); + ValidateParameters(buffer, offset, count); + + SslWriteSync writeAdapter = new SslWriteSync(_sslState); + WriteAsyncInternal(writeAdapter, buffer, offset, count).GetAwaiter().GetResult(); } internal IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState) @@ -167,41 +157,17 @@ internal int EndRead(IAsyncResult asyncResult) internal IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState) { - var lazyResult = new LazyAsyncResult(this, asyncState, asyncCallback); - ProcessWrite(buffer, offset, count, lazyResult); - return lazyResult; + return TaskToApm.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), asyncCallback, asyncState); } - internal void EndWrite(IAsyncResult asyncResult) - { - if (asyncResult == null) - { - throw new ArgumentNullException(nameof(asyncResult)); - } - - LazyAsyncResult lazyResult = asyncResult as LazyAsyncResult; - if (lazyResult == null) - { - throw new ArgumentException(SR.Format(SR.net_io_async_result, asyncResult.GetType().FullName), nameof(asyncResult)); - } + internal void EndWrite(IAsyncResult asyncResult) => TaskToApm.End(asyncResult); - if (Interlocked.Exchange(ref _nestedWrite, 0) == 0) - { - throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, "EndWrite")); - } - - // No "artificial" timeouts implemented so far, InnerStream controls timeout. - lazyResult.InternalWaitForCompletion(); - - if (lazyResult.Result is Exception e) - { - if (e is IOException) - { - ExceptionDispatchInfo.Throw(e); - } + internal Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) + { + ValidateParameters(buffer, offset, count); - throw new IOException(SR.net_io_write, e); - } + SslWriteAsync writeAdapter = new SslWriteAsync(_sslState, cancellationToken); + return WriteAsyncInternal(writeAdapter, buffer, offset, count); } private void ResetReadBuffer() @@ -270,137 +236,124 @@ private AsyncProtocolRequest GetOrCreateProtocolRequest(ref AsyncProtocolRequest return request; } - // - // Sync write method. - // - private void ProcessWrite(byte[] buffer, int offset, int count, LazyAsyncResult asyncResult) + private Task WriteAsyncInternal(TWriteAdapter writeAdapter, byte[] buffer, int offset, int count) + where TWriteAdapter : struct, ISslWriteAdapter { _sslState.CheckThrow(authSuccessCheck: true, shutdownCheck: true); - ValidateParameters(buffer, offset, count); - if (Interlocked.Exchange(ref _nestedWrite, 1) == 1) + if (count == 0 && !SslStreamPal.CanEncryptEmptyMessage) { - throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, "Write", "write")); + // If it's an empty message and the PAL doesn't support that, we're done. + return Task.CompletedTask; } - // If this is an async operation, get the AsyncProtocolRequest to use. - // We do this only after we verify we're the sole write operation in flight. - AsyncProtocolRequest asyncRequest = GetOrCreateProtocolRequest(ref _writeProtocolRequest, asyncResult); + if (Interlocked.Exchange(ref _nestedWrite, 1) == 1) + { + throw new NotSupportedException(SR.Format(SR.net_io_invalidnestedcall, nameof(WriteAsync), "write")); + } - bool failed = false; + Task t = count < _sslState.MaxDataSize ? + WriteSingleChunk(writeAdapter, buffer, offset, count) : + WriteAsyncChunked(writeAdapter, buffer, offset, count); - try + if (t.IsCompletedSuccessfully) { - StartWriting(buffer, offset, count, asyncRequest); + _nestedWrite = 0; + return t; } - catch (Exception e) - { - _sslState.FinishWrite(); + return ExitWriteAsync(t); - failed = true; - if (e is IOException) + async Task ExitWriteAsync(Task task) + { + try { - throw; + await task.ConfigureAwait(false); } + catch (Exception e) + { + _sslState.FinishWrite(); - throw new IOException(SR.net_io_write, e); - } - finally - { - if (asyncRequest == null || failed) + if (e is IOException) + { + throw; + } + + throw new IOException(SR.net_io_write, e); + } + finally { _nestedWrite = 0; } } } - private void StartWriting(byte[] buffer, int offset, int count, AsyncProtocolRequest asyncRequest) + private Task WriteSingleChunk(TWriteAdapter writeAdapter, byte[] buffer, int offset, int count) + where TWriteAdapter : struct, ISslWriteAdapter { - if (asyncRequest != null) + // Request a write IO slot. + Task ioSlot = writeAdapter.LockAsync(); + if (!ioSlot.IsCompletedSuccessfully) { - asyncRequest.SetNextRequest(buffer, offset, count, s_resumeAsyncWriteCallback); + // Operation is async and has been queued, return. + return WaitForWriteIOSlot(writeAdapter, ioSlot, buffer, offset, count); } - // We loop to this method from the callback. - // If the last chunk was just completed from async callback (count < 0), we complete user request. - if (count >= 0) - { - do - { - if (count == 0 && !SslStreamPal.CanEncryptEmptyMessage) - { - // If it's an empty message and the PAL doesn't support that, - // we're done. - break; - } + byte[] rentedBuffer = ArrayPool.Shared.Rent(count + FrameOverhead); + byte[] outBuffer = rentedBuffer; - // Request a write IO slot. - if (_sslState.CheckEnqueueWrite(asyncRequest)) - { - // Operation is async and has been queued, return. - return; - } - - int chunkBytes = Math.Min(count, _sslState.MaxDataSize); - byte[] rentedBuffer = ArrayPool.Shared.Rent(chunkBytes + FrameOverhead); - byte[] outBuffer = rentedBuffer; - int encryptedBytes = 0; + SecurityStatusPal status = _sslState.EncryptData(buffer, offset, count, ref outBuffer, out int encryptedBytes); - SecurityStatusPal status = _sslState.EncryptData(buffer, offset, chunkBytes, ref outBuffer, out encryptedBytes); - if (status.ErrorCode != SecurityStatusPalErrorCode.OK) - { - // Re-handshake status is not supported. - ProtocolToken message = new ProtocolToken(null, status); - ArrayPool.Shared.Return(rentedBuffer); - throw new IOException(SR.net_io_encrypt, message.GetException()); - } + if (status.ErrorCode != SecurityStatusPalErrorCode.OK) + { + // Re-handshake status is not supported. + ArrayPool.Shared.Return(rentedBuffer); + ProtocolToken message = new ProtocolToken(null, status); + return Task.FromException(new IOException(SR.net_io_encrypt, message.GetException())); + } - if (asyncRequest != null) - { - // Prepare for the next request. - asyncRequest.SetNextRequest(buffer, offset + chunkBytes, count - chunkBytes, s_resumeAsyncWriteCallback); - Task t = _sslState.InnerStream.WriteAsync(outBuffer, 0, encryptedBytes); - if (t.IsCompleted) - { - ArrayPool.Shared.Return(rentedBuffer); - t.GetAwaiter().GetResult(); - } - else - { - t = t.ContinueWith(s_freeWriteBufferCallback, rentedBuffer, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); - IAsyncResult ar = TaskToApm.Begin(t, s_writeCallback, asyncRequest); - if (!ar.CompletedSynchronously) - { - return; - } - TaskToApm.End(ar); - } - } - else - { - try - { - _sslState.InnerStream.Write(outBuffer, 0, encryptedBytes); - } - finally - { - ArrayPool.Shared.Return(rentedBuffer); - } - } + Task t = writeAdapter.WriteAsync(outBuffer, 0, encryptedBytes); + if (t.IsCompletedSuccessfully) + { + ArrayPool.Shared.Return(rentedBuffer); + _sslState.FinishWrite(); + return t; + } + else + { + return CompleteAsync(t, rentedBuffer); + } - offset += chunkBytes; - count -= chunkBytes; + async Task WaitForWriteIOSlot(TWriteAdapter wAdapter, Task lockTask, byte[] buff, int off, int c) + { + await lockTask.ConfigureAwait(false); + await WriteSingleChunk(wAdapter, buff, off, c).ConfigureAwait(false); + } - // Release write IO slot. + async Task CompleteAsync(Task writeTask, byte[] bufferToReturn) + { + try + { + await writeTask.ConfigureAwait(false); + } + finally + { + ArrayPool.Shared.Return(bufferToReturn); _sslState.FinishWrite(); - - } while (count != 0); + } } + } - if (asyncRequest != null) + private async Task WriteAsyncChunked(TWriteAdapter writeAdapter, byte[] buffer, int offset, int count) + where TWriteAdapter : struct, ISslWriteAdapter + { + do { - asyncRequest.CompleteUser(); - } + int chunkBytes = Math.Min(count, _sslState.MaxDataSize); + await WriteSingleChunk(writeAdapter, buffer, offset, chunkBytes).ConfigureAwait(false); + offset += chunkBytes; + count -= chunkBytes; + + } while (count != 0); } // Fill the buffer up to the minimum specified size (or more, if possible). @@ -513,7 +466,7 @@ private int EnsureBufferedBytes(int minSize, AsyncProtocolRequest asyncRequest, { return minSize; } - + int bytesRead; if (asyncRequest != null) { @@ -771,48 +724,6 @@ private int ProcessReadErrorCode(SecurityStatusPal status, AsyncProtocolRequest throw new IOException(SR.net_io_decrypt, message.GetException()); } - private static void WriteCallback(IAsyncResult transportResult) - { - if (transportResult.CompletedSynchronously) - { - return; - } - - if (!(transportResult.AsyncState is AsyncProtocolRequest)) - { - NetEventSource.Fail(transportResult, "State type is wrong, expected AsyncProtocolRequest."); - } - - AsyncProtocolRequest asyncRequest = (AsyncProtocolRequest)transportResult.AsyncState; - - var sslStream = (SslStreamInternal)asyncRequest.AsyncObject; - - try - { - TaskToApm.End(transportResult); - sslStream._sslState.FinishWrite(); - - if (asyncRequest.Count == 0) - { - // This was the last chunk. - asyncRequest.Count = -1; - } - - sslStream.StartWriting(asyncRequest.Buffer, asyncRequest.Offset, asyncRequest.Count, asyncRequest); - } - catch (Exception e) - { - if (asyncRequest.IsUserCompleted) - { - // This will throw on a worker thread. - throw; - } - - sslStream._sslState.FinishWrite(); - asyncRequest.CompleteUserWithError(e); - } - } - // // This is used in a rare situation when async Read is resumed from completed handshake. // @@ -835,28 +746,6 @@ private static void ResumeAsyncReadCallback(AsyncProtocolRequest request) } } - // - // This is used in a rare situation when async Write is resumed from completed handshake. - // - private static void ResumeAsyncWriteCallback(AsyncProtocolRequest asyncRequest) - { - try - { - ((SslStreamInternal)asyncRequest.AsyncObject).StartWriting(asyncRequest.Buffer, asyncRequest.Offset, asyncRequest.Count, asyncRequest); - } - catch (Exception e) - { - if (asyncRequest.IsUserCompleted) - { - // This will throw on a worker thread. - throw; - } - - ((SslStreamInternal)asyncRequest.AsyncObject)._sslState.FinishWrite(); - asyncRequest.CompleteUserWithError(e); - } - } - private static void ReadHeaderCallback(AsyncProtocolRequest asyncRequest) { try diff --git a/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamTestForUnix.cs b/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamTestForUnix.cs index 531e79123309..8522a20c56aa 100644 --- a/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamTestForUnix.cs +++ b/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamTestForUnix.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Linq; @@ -72,15 +73,31 @@ public bool CheckAndClearCredentials(ITestOutputHelper output) } // Clear the credentials - var startInfo = new ProcessStartInfo(KDestroyCmd); - startInfo.UseShellExecute = true; - startInfo.CreateNoWindow = true; - startInfo.Arguments = "-A"; - using (Process clearCreds = Process.Start(startInfo)) - { - clearCreds.WaitForExit(); - output.WriteLine("kdestroy returned {0}", clearCreds.ExitCode); - return (clearCreds.ExitCode == 0); + try + { + var startInfo = new ProcessStartInfo(KDestroyCmd); + startInfo.UseShellExecute = true; + startInfo.CreateNoWindow = true; + startInfo.Arguments = "-A"; + using (Process clearCreds = Process.Start(startInfo)) + { + clearCreds.WaitForExit(); + output.WriteLine("kdestroy returned {0}", clearCreds.ExitCode); + return (clearCreds.ExitCode == 0); + } + } + catch (Win32Exception) + { + // https://github.com/dotnet/corefx/issues/24000 + // on these distros right now + Assert.True(PlatformDetection.IsUbuntu1704 || + PlatformDetection.IsUbuntu1710 || + PlatformDetection.IsOpenSUSE || + PlatformDetection.IsFedora || + PlatformDetection.IsDebian || + PlatformDetection.IsCentos7); + + return false; } } diff --git a/src/System.Reflection.Metadata/tests/Metadata/Decoding/SignatureDecoderTests.cs b/src/System.Reflection.Metadata/tests/Metadata/Decoding/SignatureDecoderTests.cs index cecd35b13fad..92d544256376 100644 --- a/src/System.Reflection.Metadata/tests/Metadata/Decoding/SignatureDecoderTests.cs +++ b/src/System.Reflection.Metadata/tests/Metadata/Decoding/SignatureDecoderTests.cs @@ -264,7 +264,7 @@ public void PinnedAndUnpinnedLocals() // Compiler can generate temporaries or re-order so just check the ones we expect are there. // (They could get optimized away too. If that happens in practice, change this test to use hard-coded signatures.) - Assert.Contains("uint8& pinned", localTypes); + Assert.Contains("uint8[] pinned", localTypes); Assert.Contains("uint8[]", localTypes); } } diff --git a/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs b/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs index a45eca4daede..bfb9374a89a5 100644 --- a/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs +++ b/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs @@ -1474,8 +1474,10 @@ protected virtual void Dispose(bool disposing) { } public virtual int Peek() { throw null; } public virtual int Read() { throw null; } public virtual int Read(char[] buffer, int index, int count) { throw null; } + public virtual int Read(Span destination) { throw null; } public virtual System.Threading.Tasks.Task ReadAsync(char[] buffer, int index, int count) { throw null; } public virtual int ReadBlock(char[] buffer, int index, int count) { throw null; } + public virtual int ReadBlock(Span destination) { throw null; } public virtual System.Threading.Tasks.Task ReadBlockAsync(char[] buffer, int index, int count) { throw null; } public virtual string ReadLine() { throw null; } public virtual System.Threading.Tasks.Task ReadLineAsync() { throw null; } @@ -1517,6 +1519,7 @@ public virtual void Write(string format, params object[] arg) { } public virtual void Write(uint value) { } [System.CLSCompliantAttribute(false)] public virtual void Write(ulong value) { } + public virtual void Write(ReadOnlySpan source) { } public virtual System.Threading.Tasks.Task WriteAsync(char value) { throw null; } public System.Threading.Tasks.Task WriteAsync(char[] buffer) { throw null; } public virtual System.Threading.Tasks.Task WriteAsync(char[] buffer, int index, int count) { throw null; } @@ -1541,6 +1544,7 @@ public virtual void WriteLine(string format, params object[] arg) { } public virtual void WriteLine(uint value) { } [System.CLSCompliantAttribute(false)] public virtual void WriteLine(ulong value) { } + public virtual void WriteLine(ReadOnlySpan source) { } public virtual System.Threading.Tasks.Task WriteLineAsync() { throw null; } public virtual System.Threading.Tasks.Task WriteLineAsync(char value) { throw null; } public System.Threading.Tasks.Task WriteLineAsync(char[] buffer) { throw null; } diff --git a/src/System.Runtime.Extensions/src/Resources/Strings.resx b/src/System.Runtime.Extensions/src/Resources/Strings.resx index f399311e3815..1b7afc375751 100644 --- a/src/System.Runtime.Extensions/src/Resources/Strings.resx +++ b/src/System.Runtime.Extensions/src/Resources/Strings.resx @@ -1,5 +1,64 @@  + @@ -352,4 +411,7 @@ AppDomain resource monitoring is not supported on this platform. - + + The read operation returned an invalid length. + + \ No newline at end of file diff --git a/src/System.Runtime.Extensions/src/System/Collections/Hashtable.cs b/src/System.Runtime.Extensions/src/System/Collections/Hashtable.cs index 9bbee0341569..f822f99e54f8 100644 --- a/src/System.Runtime.Extensions/src/System/Collections/Hashtable.cs +++ b/src/System.Runtime.Extensions/src/System/Collections/Hashtable.cs @@ -732,13 +732,13 @@ public virtual Object this[Object key] private void expand() { int rawsize = HashHelpers.ExpandPrime(_buckets.Length); - rehash(rawsize, false); + rehash(rawsize); } // We occasionally need to rehash the table to clean up the collision bits. private void rehash() { - rehash(_buckets.Length, false); + rehash(_buckets.Length); } private void UpdateVersion() @@ -748,7 +748,7 @@ private void UpdateVersion() _version++; } - private void rehash(int newsize, bool forceNewHashCode) + private void rehash(int newsize) { // reset occupancy _occupancy = 0; @@ -768,7 +768,7 @@ private void rehash(int newsize, bool forceNewHashCode) bucket oldb = _buckets[nb]; if ((oldb.key != null) && (oldb.key != _buckets)) { - int hashcode = ((forceNewHashCode ? GetHash(oldb.key) : oldb.hash_coll) & 0x7FFFFFFF); + int hashcode = oldb.hash_coll & 0x7FFFFFFF; putEntry(newBuckets, oldb.key, oldb.val, hashcode); } } @@ -781,7 +781,6 @@ private void rehash(int newsize, bool forceNewHashCode) _isWriterInProgress = false; // minimum size of hashtable is 3 now and maximum loadFactor is 0.72 now. Debug.Assert(_loadsize < newsize, "Our current implementation means this is not possible."); - return; } // Returns an enumerator for this hashtable. @@ -945,18 +944,7 @@ private void Insert(Object key, Object nvalue, bool add) _count++; UpdateVersion(); _isWriterInProgress = false; -#if FEATURE_RANDOMIZED_STRING_HASHING - if (ntry > HashHelpers.HashCollisionThreshold && HashHelpers.IsWellKnownEqualityComparer(_keycomparer)) - { - // PERF: We don't want to rehash if _keycomparer is already a RandomizedObjectEqualityComparer since in some - // cases there may not be any strings in the hashtable and we wouldn't get any mixing. - if (_keycomparer == null || !(_keycomparer is System.Collections.Generic.RandomizedObjectEqualityComparer)) - { - _keycomparer = HashHelpers.GetRandomizedEqualityComparer(_keycomparer); - rehash(buckets.Length, true); - } - } -#endif + return; } @@ -975,18 +963,6 @@ private void Insert(Object key, Object nvalue, bool add) UpdateVersion(); _isWriterInProgress = false; -#if FEATURE_RANDOMIZED_STRING_HASHING - if (ntry > HashHelpers.HashCollisionThreshold && HashHelpers.IsWellKnownEqualityComparer(_keycomparer)) - { - // PERF: We don't want to rehash if _keycomparer is already a RandomizedObjectEqualityComparer since in some - // cases there may not be any strings in the hashtable and we wouldn't get any mixing. - if (_keycomparer == null || !(_keycomparer is System.Collections.Generic.RandomizedObjectEqualityComparer)) - { - _keycomparer = HashHelpers.GetRandomizedEqualityComparer(_keycomparer); - rehash(buckets.Length, true); - } - } -#endif return; } @@ -1017,18 +993,6 @@ private void Insert(Object key, Object nvalue, bool add) UpdateVersion(); _isWriterInProgress = false; -#if FEATURE_RANDOMIZED_STRING_HASHING - if (buckets.Length > HashHelpers.HashCollisionThreshold && HashHelpers.IsWellKnownEqualityComparer(_keycomparer)) - { - // PERF: We don't want to rehash if _keycomparer is already a RandomizedObjectEqualityComparer since in some - // cases there may not be any strings in the hashtable and we wouldn't get any mixing. - if (_keycomparer == null || !(_keycomparer is System.Collections.Generic.RandomizedObjectEqualityComparer)) - { - _keycomparer = HashHelpers.GetRandomizedEqualityComparer(_keycomparer); - rehash(buckets.Length, true); - } - } -#endif return; } @@ -1690,10 +1654,6 @@ public KeyValuePairs[] Items internal static class HashHelpers { -#if FEATURE_RANDOMIZED_STRING_HASHING - public const int HashCollisionThreshold = 100; - public static bool s_UseRandomizedStringHashing = String.UseRandomizedHashing(); -#endif // Table of prime numbers to use as hash table sizes. // A typical resize algorithm would pick the smallest prime number in this array // that is larger than twice the previous capacity. @@ -1771,87 +1731,5 @@ public static int ExpandPrime(int oldSize) private static ConditionalWeakTable s_serializationInfoTable; public static ConditionalWeakTable SerializationInfoTable => LazyInitializer.EnsureInitialized(ref s_serializationInfoTable); - -#if FEATURE_RANDOMIZED_STRING_HASHING - public static bool IsWellKnownEqualityComparer(object comparer) - { - return (comparer == null || comparer == System.Collections.Generic.EqualityComparer.Default || comparer is IWellKnownStringEqualityComparer); - } - - public static IEqualityComparer GetRandomizedEqualityComparer(object comparer) - { - Debug.Assert(comparer == null || comparer == System.Collections.Generic.EqualityComparer.Default || comparer is IWellKnownStringEqualityComparer); - - if (comparer == null) - { - return new System.Collections.Generic.RandomizedObjectEqualityComparer(); - } - - if (comparer == System.Collections.Generic.EqualityComparer.Default) - { - return new System.Collections.Generic.RandomizedStringEqualityComparer(); - } - - IWellKnownStringEqualityComparer cmp = comparer as IWellKnownStringEqualityComparer; - - if (cmp != null) - { - return cmp.GetRandomizedEqualityComparer(); - } - - Debug.Fail("Missing case in GetRandomizedEqualityComparer!"); - - return null; - } - - public static object GetEqualityComparerForSerialization(object comparer) - { - if (comparer == null) - { - return null; - } - - IWellKnownStringEqualityComparer cmp = comparer as IWellKnownStringEqualityComparer; - - if (cmp != null) - { - return cmp.GetEqualityComparerForSerialization(); - } - - return comparer; - } - - private const int bufferSize = 1024; - private static RandomNumberGenerator rng; - private static byte[] data; - private static int currentIndex = bufferSize; - private static readonly object lockObj = new Object(); - - internal static long GetEntropy() - { - lock (lockObj) - { - long ret; - - if (currentIndex == bufferSize) - { - if (null == rng) - { - rng = RandomNumberGenerator.Create(); - data = new byte[bufferSize]; - Debug.Assert(bufferSize % 8 == 0, "We increment our current index by 8, so our buffer size must be a multiple of 8"); - } - - rng.GetBytes(data); - currentIndex = 0; - } - - ret = BitConverter.ToInt64(data, currentIndex); - currentIndex += 8; - - return ret; - } - } -#endif // FEATURE_RANDOMIZED_STRING_HASHING } } diff --git a/src/System.Runtime.Extensions/src/System/IO/TextReader.cs b/src/System.Runtime.Extensions/src/System/IO/TextReader.cs index a24346120337..ff7596ebba34 100644 --- a/src/System.Runtime.Extensions/src/System/IO/TextReader.cs +++ b/src/System.Runtime.Extensions/src/System/IO/TextReader.cs @@ -8,6 +8,7 @@ using System.Diagnostics; using System.Diagnostics.Contracts; using System.Runtime.CompilerServices; +using System.Buffers; namespace System.IO { @@ -100,6 +101,30 @@ public virtual int Read(char[] buffer, int index, int count) return n; } + // Reads a span of characters. This method will read up to + // count characters from this TextReader into the + // span of characters Returns the actual number of characters read. + // + public virtual int Read(Span destination) + { + char[] buffer = ArrayPool.Shared.Rent(destination.Length); + + try + { + int numRead = Read(buffer, 0, destination.Length); + if ((uint)numRead > destination.Length) + { + throw new IOException(SR.IO_InvalidReadLength); + } + new Span(buffer, 0, numRead).CopyTo(destination); + return numRead; + } + finally + { + ArrayPool.Shared.Return(buffer); + } + } + // Reads all characters from the current position to the end of the // TextReader, and returns them as one string. public virtual string ReadToEnd() @@ -127,6 +152,29 @@ public virtual int ReadBlock(char[] buffer, int index, int count) return n; } + // Blocking version of read for span of characters. Returns only when count + // characters have been read or the end of the file was reached. + // + public virtual int ReadBlock(Span destination) + { + char[] buffer = ArrayPool.Shared.Rent(destination.Length); + + try + { + int numRead = ReadBlock(buffer, 0, destination.Length); + if ((uint)numRead > destination.Length) + { + throw new IOException(SR.IO_InvalidReadLength); + } + new Span(buffer, 0, numRead).CopyTo(destination); + return numRead; + } + finally + { + ArrayPool.Shared.Return(buffer); + } + } + // Reads a line. A line is defined as a sequence of characters followed by // a carriage return ('\r'), a line feed ('\n'), or a carriage return // immediately followed by a line feed. The resulting string does not diff --git a/src/System.Runtime.Extensions/src/System/IO/TextWriter.cs b/src/System.Runtime.Extensions/src/System/IO/TextWriter.cs index ee0142115e98..5faee4f3220c 100644 --- a/src/System.Runtime.Extensions/src/System/IO/TextWriter.cs +++ b/src/System.Runtime.Extensions/src/System/IO/TextWriter.cs @@ -7,6 +7,7 @@ using System.Globalization; using System.Threading.Tasks; using System.Runtime.CompilerServices; +using System.Buffers; namespace System.IO { @@ -161,6 +162,23 @@ public virtual void Write(char[] buffer, int index, int count) for (int i = 0; i < count; i++) Write(buffer[index + i]); } + // Writes a span of characters to the text stream. + // + public virtual void Write(ReadOnlySpan source) + { + char[] buffer = ArrayPool.Shared.Rent(source.Length); + + try + { + source.CopyTo(new Span(buffer)); + Write(buffer, 0, source.Length); + } + finally + { + ArrayPool.Shared.Return(buffer); + } + } + // Writes the text representation of a boolean to the text stream. This // method outputs either Boolean.TrueString or Boolean.FalseString. // @@ -328,6 +346,21 @@ public virtual void WriteLine(char[] buffer, int index, int count) WriteLine(); } + public virtual void WriteLine(ReadOnlySpan source) + { + char[] buffer = ArrayPool.Shared.Rent(source.Length); + + try + { + source.CopyTo(new Span(buffer)); + WriteLine(buffer, 0, source.Length); + } + finally + { + ArrayPool.Shared.Return(buffer); + } + } + // Writes the text representation of a boolean followed by a line // terminator to the text stream. // diff --git a/src/System.Runtime.Extensions/tests/System/MathTests.netcoreapp.cs b/src/System.Runtime.Extensions/tests/System/MathTests.netcoreapp.cs index 2439880d91aa..f1792140768d 100644 --- a/src/System.Runtime.Extensions/tests/System/MathTests.netcoreapp.cs +++ b/src/System.Runtime.Extensions/tests/System/MathTests.netcoreapp.cs @@ -7,6 +7,7 @@ namespace System.Tests { + [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Math.Clamp is not in CoreRT yet.")] public static partial class MathTests { public static IEnumerable Clamp_UnsignedInt_TestData() diff --git a/src/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs b/src/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs index 3d2c32e90545..ba2089d6fc9a 100644 --- a/src/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs +++ b/src/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs @@ -349,23 +349,32 @@ public BigInteger(ReadOnlySpan value) while (len >= 0 && val[len] == 0) len--; len++; - if (len == 1 && unchecked((int)(val[0])) > 0) + if (len == 1) { - if (val[0] == 1 /* abs(-1) */) + switch (val[0]) { - this = s_bnMinusOneInt; - } - else if (val[0] == kuMaskHighBit) // abs(Int32.MinValue) - { - this = s_bnMinInt; - } - else - { - _sign = (-1) * ((int)val[0]); - _bits = null; + case 1: // abs(-1) + this = s_bnMinusOneInt; + return; + + case kuMaskHighBit: // abs(Int32.MinValue) + this = s_bnMinInt; + return; + + default: + if (unchecked((int)val[0]) > 0) + { + _sign = (-1) * ((int)val[0]); + _bits = null; + AssertValid(); + return; + } + + break; } } - else if (len != val.Length) + + if (len != val.Length) { _sign = -1; _bits = new uint[len]; diff --git a/src/System.Runtime.Numerics/tests/BigInteger/ctor.cs b/src/System.Runtime.Numerics/tests/BigInteger/ctor.cs index d642efe456c2..e0d7ebbcff1a 100644 --- a/src/System.Runtime.Numerics/tests/BigInteger/ctor.cs +++ b/src/System.Runtime.Numerics/tests/BigInteger/ctor.cs @@ -891,6 +891,10 @@ public static void RunCtorByteArrayTests() // ctor(byte[]): array is UInt32.MaxValue + 1 VerifyCtorByteArray(new byte[] { 0, 0, 0, 0, 1 }, (UInt64)UInt32.MaxValue + 1); + // ctor(byte[]): array is Int32.MinValue with overlong representation. + VerifyCtorByteArray(new byte[] {0, 0, 0, 0x80, 0xFF}); + Assert.Equal(new BigInteger(new byte[] { 0, 0, 0, 0x80, 0xFF, 0xFF, 0xFF }), int.MinValue); + // ctor(byte[]): array is UInt64.MaxValue VerifyCtorByteArray(new byte[] { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0 }, UInt64.MaxValue); diff --git a/src/System.Runtime.Serialization.Formatters/tests/FormatterServicesTests.cs b/src/System.Runtime.Serialization.Formatters/tests/FormatterServicesTests.cs index 7dd48e984db0..7d29a45d2b95 100644 --- a/src/System.Runtime.Serialization.Formatters/tests/FormatterServicesTests.cs +++ b/src/System.Runtime.Serialization.Formatters/tests/FormatterServicesTests.cs @@ -127,8 +127,7 @@ public static IEnumerable GetUninitializedObject_ByRefLikeType_NetCore } #pragma warning disable 0169 // The private field 'class member' is never used - [System.Runtime.CompilerServices.IsByRefLike] - private struct StructWithSpanField + private ref struct StructWithSpanField { Span _bytes; int _position; diff --git a/src/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj b/src/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj index 6caf05cafd25..0b9984d73119 100644 --- a/src/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj +++ b/src/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj @@ -4,6 +4,7 @@ {13CE5E71-D373-4EA6-B3CB-166FF089A42A} true + 7.2 diff --git a/src/System.Runtime/ref/System.Runtime.cs b/src/System.Runtime/ref/System.Runtime.cs index 6ec8c8d61059..d24e92302937 100644 --- a/src/System.Runtime/ref/System.Runtime.cs +++ b/src/System.Runtime/ref/System.Runtime.cs @@ -1298,6 +1298,7 @@ public partial struct Guid : System.IComparable, System.IComparable { public static readonly System.Guid Empty; public Guid(byte[] b) { throw null; } + public Guid(ReadOnlySpan b) { throw null; } public Guid(int a, short b, short c, byte d, byte e, byte f, byte g, byte h, byte i, byte j, byte k) { throw null; } public Guid(int a, short b, short c, byte[] d) { throw null; } public Guid(string g) { throw null; } @@ -1314,9 +1315,11 @@ public partial struct Guid : System.IComparable, System.IComparable public static System.Guid Parse(string input) { throw null; } public static System.Guid ParseExact(string input, string format) { throw null; } public byte[] ToByteArray() { throw null; } + public bool TryWriteBytes(Span destination) { throw null; } public override string ToString() { throw null; } public string ToString(string format) { throw null; } public string ToString(string format, System.IFormatProvider provider) { throw null; } + public bool TryFormat(Span destination, out int charsWritten, string format) { throw null; } public static bool TryParse(string input, out System.Guid result) { throw null; } public static bool TryParseExact(string input, string format, out System.Guid result) { throw null; } } @@ -1878,7 +1881,7 @@ public struct ReadOnlyMemory public bool DangerousTryGetArray(out ArraySegment arraySegment) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public partial struct ReadOnlySpan + public readonly ref struct ReadOnlySpan { public static ReadOnlySpan Empty { get { throw null; } } public ReadOnlySpan(T[] array) { throw null; } @@ -2065,7 +2068,7 @@ public partial struct Single : System.IComparable, System.IComparable, Sy public static bool TryParse(ReadOnlySpan s, out float result, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider provider = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public partial struct Span + public readonly ref struct Span { public static Span Empty { get { throw null; } } public Span(T[] array) { throw null; } @@ -2156,6 +2159,7 @@ public String(System.ReadOnlySpan value) { } public bool Contains(string value, StringComparison comparisonType) { throw null; } public static System.String Copy(System.String str) { throw null; } public void CopyTo(int sourceIndex, char[] destination, int destinationIndex, int count) { } + public static string Create(int length, TState state, System.Buffers.SpanAction action) { throw null; } public bool EndsWith(char value) { throw null; } public bool EndsWith(string value) { throw null; } public bool EndsWith(System.String value, bool ignoreCase, System.Globalization.CultureInfo culture) { throw null; } @@ -3844,11 +3848,11 @@ public interface IRetainable public abstract class OwnedMemory : IDisposable, IRetainable { - public Memory AsMemory { get { throw null; } } + public Memory Memory { get { throw null; } } public abstract bool IsDisposed { get; } protected abstract bool IsRetained { get; } public abstract int Length { get; } - public abstract Span AsSpan(); + public abstract Span Span { get; } public void Dispose() { throw null; } protected abstract void Dispose(bool disposing); public abstract MemoryHandle Pin(); @@ -3857,6 +3861,11 @@ public abstract class OwnedMemory : IDisposable, IRetainable protected internal abstract bool TryGetArray(out ArraySegment arraySegment); } } +namespace System.Buffers +{ + public delegate void SpanAction(Span span, TArg arg); + public delegate void ReadOnlySpanAction(ReadOnlySpan span, TArg arg); +} namespace System.Collections { [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] diff --git a/src/System.Runtime/ref/System.Runtime.csproj b/src/System.Runtime/ref/System.Runtime.csproj index 349f7efa2045..7b13bb87fedf 100644 --- a/src/System.Runtime/ref/System.Runtime.csproj +++ b/src/System.Runtime/ref/System.Runtime.csproj @@ -5,6 +5,7 @@ true true {ADBCF120-3454-4A3C-9D1D-AC4293E795D6} + 7.2 diff --git a/src/System.Runtime/tests/System.Runtime.Tests.csproj b/src/System.Runtime/tests/System.Runtime.Tests.csproj index c2d7a738bd1c..acf928989fce 100644 --- a/src/System.Runtime/tests/System.Runtime.Tests.csproj +++ b/src/System.Runtime/tests/System.Runtime.Tests.csproj @@ -7,6 +7,7 @@ 1718 $(DefineConstants);netcoreapp $(DefineConstants);uapaot + 7.2 @@ -184,6 +185,7 @@ + diff --git a/src/System.Runtime/tests/System/GuidTests.cs b/src/System.Runtime/tests/System/GuidTests.cs index 122bb7bad949..1c8b7afc27b0 100644 --- a/src/System.Runtime/tests/System/GuidTests.cs +++ b/src/System.Runtime/tests/System/GuidTests.cs @@ -348,14 +348,14 @@ public static void ToByteArray() public static IEnumerable ToString_TestData() { - yield return new object[] { s_testGuid, "N", "a8a110d5fc4943c5bf46802db8f843ff" }; - yield return new object[] { s_testGuid, "D", "a8a110d5-fc49-43c5-bf46-802db8f843ff" }; - yield return new object[] { s_testGuid, "B", "{a8a110d5-fc49-43c5-bf46-802db8f843ff}" }; - yield return new object[] { s_testGuid, "P", "(a8a110d5-fc49-43c5-bf46-802db8f843ff)" }; - yield return new object[] { s_testGuid, "X", "{0xa8a110d5,0xfc49,0x43c5,{0xbf,0x46,0x80,0x2d,0xb8,0xf8,0x43,0xff}}" }; + yield return new object[] { s_testGuid, "N", "a8a110d5fc4943c5bf46802db8f843ff"}; + yield return new object[] { s_testGuid, "D", "a8a110d5-fc49-43c5-bf46-802db8f843ff"}; + yield return new object[] { s_testGuid, "B", "{a8a110d5-fc49-43c5-bf46-802db8f843ff}"}; + yield return new object[] { s_testGuid, "P", "(a8a110d5-fc49-43c5-bf46-802db8f843ff)"}; + yield return new object[] { s_testGuid, "X", "{0xa8a110d5,0xfc49,0x43c5,{0xbf,0x46,0x80,0x2d,0xb8,0xf8,0x43,0xff}}"}; - yield return new object[] { s_testGuid, null, "a8a110d5-fc49-43c5-bf46-802db8f843ff" }; - yield return new object[] { s_testGuid, "", "a8a110d5-fc49-43c5-bf46-802db8f843ff" }; + yield return new object[] { s_testGuid, null, "a8a110d5-fc49-43c5-bf46-802db8f843ff"}; + yield return new object[] { s_testGuid, "", "a8a110d5-fc49-43c5-bf46-802db8f843ff"}; } [Theory] @@ -372,11 +372,12 @@ public static void ToString(Guid guid, string format, string expected) Assert.Equal(expected, formattable.ToString(format, null)); } - [Fact] - public static void ToString_InvalidFormat_ThrowsFormatException() + [Theory] + [InlineData("Y")] + [InlineData("XX")] + public static void ToString_InvalidFormat_ThrowsFormatException(string format) { - Assert.Throws(() => s_testGuid.ToString("Y")); // Invalid format - Assert.Throws(() => s_testGuid.ToString("XX")); // Invalid format + Assert.Throws(() => s_testGuid.ToString(format)); } public static IEnumerable GuidStrings_Valid_TestData() diff --git a/src/System.Runtime/tests/System/GuidTests.netcoreapp.cs b/src/System.Runtime/tests/System/GuidTests.netcoreapp.cs new file mode 100644 index 000000000000..555aa3f91249 --- /dev/null +++ b/src/System.Runtime/tests/System/GuidTests.netcoreapp.cs @@ -0,0 +1,76 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Xunit; + +namespace System.Tests +{ + public static partial class GuidTests + { + [Theory] + [MemberData(nameof(Ctor_ByteArray_TestData))] + public static void Ctor_ReadOnlySpan(byte[] b, Guid expected) + { + Assert.Equal(expected, new Guid(new ReadOnlySpan(b))); + } + + [Theory] + [InlineData(15)] + [InlineData(17)] + public static void CtorSpan_InvalidLengthByteArray_ThrowsArgumentException(int length) + { + AssertExtensions.Throws("b", null, () => new Guid(new ReadOnlySpan(new byte[length]))); + } + + [Theory] + [MemberData(nameof(Ctor_ByteArray_TestData))] + public static void TryWriteBytes_ValidLength_ReturnsTrue(byte[] b, Guid guid) + { + var bytes = new byte[16]; + Assert.True(guid.TryWriteBytes(new Span(bytes))); + Assert.Equal(b, bytes); + } + + [Theory] + [InlineData(0)] + [InlineData(15)] + public static void TryWriteBytes_LengthTooShort_ReturnsFalse(int length) + { + Assert.False(s_testGuid.TryWriteBytes(new Span(new byte[length]))); + } + + [Theory] + [InlineData("Y")] + [InlineData("XX")] + public static void TryFormat_InvalidFormat_ThrowsFormatException(string format) + { + Assert.Throws(() => s_testGuid.TryFormat(new Span(), out int charsWritten, format)); + } + + [Theory] + [MemberData(nameof(ToString_TestData))] + public static void TryFormat_LengthTooSmall_ReturnsFalse(Guid guid, string format, string expected) + { + Assert.False(guid.TryFormat(new Span(new char[guid.ToString(format).Length - 1]), out int charsWritten, format)); + Assert.Equal(0, charsWritten); + } + + [Theory] + [MemberData(nameof(ToString_TestData))] + public static void TryFormat_CharsWritten_EqualsZero_WhenSpanTooSmall(Guid guid, string format, string expected) + { + Assert.False(guid.TryFormat(new Span(new char[guid.ToString(format).Length - 1]), out int charsWritten, format)); + Assert.Equal(0, charsWritten); + } + + [Theory] + [MemberData(nameof(ToString_TestData))] + public static void TryFormat_ValidLength_ReturnsTrue(Guid guid, string format, string expected) + { + char[] chars = new char[guid.ToString(format).Length]; + Assert.True(guid.TryFormat(new Span(chars), out int charsWritten, format)); + Assert.Equal(chars, expected.ToCharArray()); + } + } +} diff --git a/src/System.Runtime/tests/System/StringTests.netcoreapp.cs b/src/System.Runtime/tests/System/StringTests.netcoreapp.cs index 9cb554590ea7..f2a5039afa2e 100644 --- a/src/System.Runtime/tests/System/StringTests.netcoreapp.cs +++ b/src/System.Runtime/tests/System/StringTests.netcoreapp.cs @@ -32,6 +32,64 @@ public static void Ctor_CharSpan(char[] valueArray, int startIndex, int length, Assert.Equal(expected, new string(span)); } + [Fact] + public static void Create_InvalidArguments_Throw() + { + AssertExtensions.Throws("action", () => string.Create(-1, 0, null)); + AssertExtensions.Throws("length", () => string.Create(-1, 0, (span, state) => { })); + } + + [Fact] + public static void Create_Length0_ReturnsEmptyString() + { + bool actionInvoked = false; + Assert.Same(string.Empty, string.Create(0, 0, (span, state) => actionInvoked = true)); + Assert.False(actionInvoked); + } + + [Fact] + public static void Create_NullState_Allowed() + { + string result = string.Create(1, (object)null, (span, state) => + { + span[0] = 'a'; + Assert.Null(state); + }); + Assert.Equal("a", result); + } + + [Fact] + public static void Create_ClearsMemory() + { + const int Length = 10; + string result = string.Create(Length, (object)null, (span, state) => + { + for (int i = 0; i < span.Length; i++) + { + Assert.Equal('\0', span[i]); + } + }); + Assert.Equal(new string('\0', Length), result); + } + + [Theory] + [InlineData("a")] + [InlineData("this is a test")] + [InlineData("\0\u8001\u8002\ufffd\u1234\ud800\udfff")] + public static void Create_ReturnsExpectedString(string expected) + { + char[] input = expected.ToCharArray(); + string result = string.Create(input.Length, input, (span, state) => + { + Assert.Same(input, state); + for (int i = 0; i < state.Length; i++) + { + span[i] = state[i]; + } + }); + Assert.Equal(expected, result); + } + [Theory] // CurrentCulture [InlineData("Hello", "ello", StringComparison.CurrentCulture, true)] diff --git a/src/System.Runtime/tests/System/TypeTests.netcoreapp.cs b/src/System.Runtime/tests/System/TypeTests.netcoreapp.cs index 5d8bb592774e..521ead10e966 100644 --- a/src/System.Runtime/tests/System/TypeTests.netcoreapp.cs +++ b/src/System.Runtime/tests/System/TypeTests.netcoreapp.cs @@ -233,8 +233,7 @@ public static IEnumerable IsByRefLikeTestData } } - [IsByRefLike] - private struct ByRefLikeStruct + private ref struct ByRefLikeStruct { public ByRefLikeStruct(int dummy) { diff --git a/src/System.ServiceModel.Syndication/Microsoft.ServiceModel.Syndication.sln b/src/System.ServiceModel.Syndication/Microsoft.ServiceModel.Syndication.sln new file mode 100644 index 000000000000..c69d10290f1e --- /dev/null +++ b/src/System.ServiceModel.Syndication/Microsoft.ServiceModel.Syndication.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26430.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ServiceModel.Syndication", "src\Microsoft.ServiceModel.Syndication.csproj", "{B615835F-C286-4FB5-A2BF-C3B967AB9EC6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ServiceModel.Syndication.Tests", "tests\Microsoft.ServiceModel.Syndication.Tests.csproj", "{A622B2C0-DD74-4218-9CF0-F9B2E52F4E91}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B615835F-C286-4FB5-A2BF-C3B967AB9EC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B615835F-C286-4FB5-A2BF-C3B967AB9EC6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B615835F-C286-4FB5-A2BF-C3B967AB9EC6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B615835F-C286-4FB5-A2BF-C3B967AB9EC6}.Release|Any CPU.Build.0 = Release|Any CPU + {A622B2C0-DD74-4218-9CF0-F9B2E52F4E91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A622B2C0-DD74-4218-9CF0-F9B2E52F4E91}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A622B2C0-DD74-4218-9CF0-F9B2E52F4E91}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A622B2C0-DD74-4218-9CF0-F9B2E52F4E91}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/System.ServiceModel.Syndication/dir.props b/src/System.ServiceModel.Syndication/dir.props new file mode 100644 index 000000000000..cca318c45816 --- /dev/null +++ b/src/System.ServiceModel.Syndication/dir.props @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/System.ServiceModel.Syndication/dir.targets b/src/System.ServiceModel.Syndication/dir.targets new file mode 100644 index 000000000000..cca318c45816 --- /dev/null +++ b/src/System.ServiceModel.Syndication/dir.targets @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/System.ServiceModel.Syndication/src/App10Constants.cs b/src/System.ServiceModel.Syndication/src/App10Constants.cs new file mode 100644 index 000000000000..8398830125d3 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/App10Constants.cs @@ -0,0 +1,20 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + + +namespace Microsoft.ServiceModel.Syndication +{ + internal static class App10Constants + { + public const string Accept = "accept"; + public const string Categories = "categories"; + public const string Collection = "collection"; + public const string Fixed = "fixed"; + public const string Href = "href"; + public const string Namespace = "http://www.w3.org/2007/app"; + public const string Prefix = "app"; + public const string Service = "service"; + public const string Workspace = "workspace"; + } +} diff --git a/src/System.ServiceModel.Syndication/src/Atom10Constants.cs b/src/System.ServiceModel.Syndication/src/Atom10Constants.cs new file mode 100644 index 000000000000..c093eb856363 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/Atom10Constants.cs @@ -0,0 +1,53 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + + + +namespace Microsoft.ServiceModel.Syndication +{ + public static class Atom10Constants + { + public const string AlternateTag = "alternate"; + public const string Atom10Namespace = "http://www.w3.org/2005/Atom"; + public const string Atom10Prefix = "a10"; + public const string AtomMediaType = "application/atom+xml"; + public const string AuthorTag = "author"; + public const string CategoryTag = "category"; + public const string ContentTag = "content"; + public const string ContributorTag = "contributor"; + public const string EmailTag = "email"; + public const string EntryTag = "entry"; + public const string FeedTag = "feed"; + public const string GeneratorTag = "generator"; + public const string HrefTag = "href"; + public const string HtmlMediaType = "text/html"; + public const string HtmlType = "html"; + public const string IdTag = "id"; + public const string LabelTag = "label"; + public const string LengthTag = "length"; + public const string LinkTag = "link"; + public const string LogoTag = "logo"; + public const string NameTag = "name"; + public const string PlaintextType = "text"; + public const string PublishedTag = "published"; + public const string RelativeTag = "rel"; + public const string RightsTag = "rights"; + public const string SchemeTag = "scheme"; + public const string SelfTag = "self"; + public const string SourceFeedTag = "source"; + public const string SourceTag = "src"; + public const string SpecificationLink = "http://atompub.org/2005/08/17/draft-ietf-atompub-format-11.html"; + public const string SubtitleTag = "subtitle"; + public const string SummaryTag = "summary"; + public const string TermTag = "term"; + public const string TitleTag = "title"; + public const string TypeTag = "type"; + public const string UpdatedTag = "updated"; + public const string UriTag = "uri"; + public const string XHtmlMediaType = "application/xhtml+xml"; + public const string XHtmlType = "xhtml"; + public const string XmlMediaType = "text/xml"; + public const string IconTag = "icon"; + } +} diff --git a/src/System.ServiceModel.Syndication/src/Atom10FeedFormatter.cs b/src/System.ServiceModel.Syndication/src/Atom10FeedFormatter.cs new file mode 100644 index 000000000000..15878a1a1d2c --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/Atom10FeedFormatter.cs @@ -0,0 +1,1404 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using Microsoft.ServiceModel.Syndication.Resources; + using System; + using System.Collections.Generic; + using System.Collections.ObjectModel; + using System.Globalization; + using System.Runtime.CompilerServices; + using System.ServiceModel.Channels; + using System.Threading; + using System.Threading.Tasks; + using System.Xml; + using System.Xml.Serialization; + + [XmlRoot(ElementName = Atom10Constants.FeedTag, Namespace = Atom10Constants.Atom10Namespace)] + public class Atom10FeedFormatter : SyndicationFeedFormatter + { + internal static readonly TimeSpan zeroOffset = new TimeSpan(0, 0, 0); + internal const string XmlNs = "http://www.w3.org/XML/1998/namespace"; + internal const string XmlNsNs = "http://www.w3.org/2000/xmlns/"; + private static readonly XmlQualifiedName s_atom10Href = new XmlQualifiedName(Atom10Constants.HrefTag, string.Empty); + private static readonly XmlQualifiedName s_atom10Label = new XmlQualifiedName(Atom10Constants.LabelTag, string.Empty); + private static readonly XmlQualifiedName s_atom10Length = new XmlQualifiedName(Atom10Constants.LengthTag, string.Empty); + private static readonly XmlQualifiedName s_atom10Relative = new XmlQualifiedName(Atom10Constants.RelativeTag, string.Empty); + private static readonly XmlQualifiedName s_atom10Scheme = new XmlQualifiedName(Atom10Constants.SchemeTag, string.Empty); + private static readonly XmlQualifiedName s_atom10Term = new XmlQualifiedName(Atom10Constants.TermTag, string.Empty); + private static readonly XmlQualifiedName s_atom10Title = new XmlQualifiedName(Atom10Constants.TitleTag, string.Empty); + private static readonly XmlQualifiedName s_atom10Type = new XmlQualifiedName(Atom10Constants.TypeTag, string.Empty); + private static readonly UriGenerator s_idGenerator = new UriGenerator(); + private const string Rfc3339LocalDateTimeFormat = "yyyy-MM-ddTHH:mm:sszzz"; + private const string Rfc3339UTCDateTimeFormat = "yyyy-MM-ddTHH:mm:ssZ"; + private Type _feedType; + private int _maxExtensionSize; + private bool _preserveAttributeExtensions; + private bool _preserveElementExtensions; + + //Custom parsing + // value, localname , ns , result + public Func stringParser = DefaultStringParser; + public Func dateParser = DefaultDateFromString; + public Func uriParser = DefaultUriParser; + + private static string DefaultStringParser(string value, string localName, string ns) + { + return value; + } + + private static Uri DefaultUriParser(string value, UriKind kind, string localName, string ns) + { + return new Uri(value,kind); + } + + public Atom10FeedFormatter() + : this(typeof(SyndicationFeed)) + { + } + + public Atom10FeedFormatter(Type feedTypeToCreate) + : base() + { + if (feedTypeToCreate == null) + { + throw new ArgumentException(nameof(feedTypeToCreate)); + } + if (!typeof(SyndicationFeed).IsAssignableFrom(feedTypeToCreate)) + { + throw new ArgumentException(string.Format(SR.InvalidObjectTypePassed, nameof(feedTypeToCreate), nameof(SyndicationFeed))); + } + _maxExtensionSize = int.MaxValue; + _preserveAttributeExtensions = _preserveElementExtensions = true; + _feedType = feedTypeToCreate; + } + + public Atom10FeedFormatter(SyndicationFeed feedToWrite) + : base(feedToWrite) + { + // No need to check that the parameter passed is valid - it is checked by the c'tor of the base class + _maxExtensionSize = int.MaxValue; + _preserveAttributeExtensions = _preserveElementExtensions = true; + _feedType = feedToWrite.GetType(); + } + + public bool PreserveAttributeExtensions + { + get { return _preserveAttributeExtensions; } + set { _preserveAttributeExtensions = value; } + } + + public bool PreserveElementExtensions + { + get { return _preserveElementExtensions; } + set { _preserveElementExtensions = value; } + } + + public override string Version + { + get { return SyndicationVersions.Atom10; } + } + + protected Type FeedType + { + get + { + return _feedType; + } + } + + public override bool CanRead(XmlReader reader) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + + return reader.IsStartElement(Atom10Constants.FeedTag, Atom10Constants.Atom10Namespace); + } + + public override async Task ReadFromAsync(XmlReader reader, CancellationToken ct) + { + if (!CanRead(reader)) + { + throw new XmlException(string.Format(SR.UnknownFeedXml, reader.LocalName, reader.NamespaceURI)); + } + + SetFeed(CreateFeedInstance()); + await ReadFeedFromAsync(XmlReaderWrapper.CreateFromReader(reader), this.Feed, false); + } + + public override async Task WriteToAsync(XmlWriter writer, CancellationToken ct) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + + writer = XmlWriterWrapper.CreateFromWriter(writer); + + await writer.WriteStartElementAsync(Atom10Constants.FeedTag, Atom10Constants.Atom10Namespace); + await WriteFeedAsync(writer); + await writer.WriteEndElementAsync(); + } + + internal static async Task ReadCategoryAsync(XmlReaderWrapper reader, SyndicationCategory category, string version, bool preserveAttributeExtensions, bool preserveElementExtensions, int _maxExtensionSize) + { + await MoveToStartElementAsync(reader); + bool isEmpty = reader.IsEmptyElement; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + string value = await reader.GetValueAsync(); + bool notHandled = false; + + if(reader.NamespaceURI == string.Empty) + { + switch (reader.LocalName) + { + case Atom10Constants.TermTag: + category.Name = value; + break; + + case Atom10Constants.SchemeTag: + category.Scheme = value; + break; + + case Atom10Constants.LabelTag: + category.Label = value; + break; + + default: + notHandled = true; + break; + } + } + else + { + notHandled = true; + } + + if (notHandled) + { + string ns = reader.NamespaceURI; + string name = reader.LocalName; + if (FeedUtils.IsXmlns(name, ns)) + { + continue; + } + + if (!TryParseAttribute(name, ns, value, category, version)) + { + if (preserveAttributeExtensions) + { + category.AttributeExtensions.Add(new XmlQualifiedName(name, ns), value); + } + } + } + } + } + + if (!isEmpty) + { + await reader.ReadStartElementAsync(); + XmlBuffer buffer = null; + XmlDictionaryWriter extWriter = null; + try + { + while (await reader.IsStartElementAsync()) + { + if (TryParseElement(reader, category, version)) + { + continue; + } + else if (!preserveElementExtensions) + { + await reader.SkipAsync(); + } + else + { + var tuple = await CreateBufferIfRequiredAndWriteNodeAsync(buffer, extWriter, reader, _maxExtensionSize); + buffer = tuple.Item1; + extWriter = tuple.Item2; + } + } + + LoadElementExtensions(buffer, extWriter, category); + } + finally + { + if (extWriter != null) + { + ((IDisposable)extWriter).Dispose(); + } + } + + await reader.ReadEndElementAsync(); + } + else + { + await reader.ReadStartElementAsync(); + } + + return category; + } + + internal Task ReadTextContentFromAsync(XmlReaderWrapper reader, string context, bool preserveAttributeExtensions) + { + string type = reader.GetAttribute(Atom10Constants.TypeTag); + return ReadTextContentFromHelperAsync(reader, type, context, preserveAttributeExtensions); + } + + internal static async Task WriteCategoryAsync(XmlWriter writer, SyndicationCategory category, string version) + { + await writer.WriteStartElementAsync(Atom10Constants.CategoryTag, Atom10Constants.Atom10Namespace); + await WriteAttributeExtensionsAsync(writer, category, version); + string categoryName = category.Name ?? string.Empty; + if (!category.AttributeExtensions.ContainsKey(s_atom10Term)) + { + await writer.WriteAttributeStringAsync(Atom10Constants.TermTag, categoryName); + } + + if (!string.IsNullOrEmpty(category.Label) && !category.AttributeExtensions.ContainsKey(s_atom10Label)) + { + await writer.WriteAttributeStringAsync(Atom10Constants.LabelTag, category.Label); + } + + if (!string.IsNullOrEmpty(category.Scheme) && !category.AttributeExtensions.ContainsKey(s_atom10Scheme)) + { + await writer.WriteAttributeStringAsync(Atom10Constants.SchemeTag, category.Scheme); + } + + await WriteElementExtensionsAsync(writer, category, version); + await writer.WriteEndElementAsync(); + } + + internal async Task ReadItemFromAsync(XmlReaderWrapper reader, SyndicationItem result) + { + await ReadItemFromAsync(reader, result, null); + } + + internal async Task TryParseFeedElementFromAsync(XmlReaderWrapper reader, SyndicationFeed result) + { + if (await reader.MoveToContentAsync() != XmlNodeType.Element) + { + return false; + } + + string name = reader.LocalName; + string ns = reader.NamespaceURI; + + if(ns == Atom10Constants.Atom10Namespace) + { + switch (name) + { + case Atom10Constants.AuthorTag: + result.Authors.Add(await ReadPersonFromAsync(reader, result)); + break; + case Atom10Constants.CategoryTag: + result.Categories.Add(await ReadCategoryFromAsync(reader, result)); + break; + case Atom10Constants.ContributorTag: + result.Contributors.Add(await ReadPersonFromAsync(reader, result)); + break; + case Atom10Constants.GeneratorTag: + result.Generator = stringParser(await reader.ReadElementStringAsync(),Atom10Constants.GeneratorTag,ns); + break; + case Atom10Constants.IdTag: + result.Id = stringParser(await reader.ReadElementStringAsync(),Atom10Constants.IdTag,ns); + break; + case Atom10Constants.LinkTag: + result.Links.Add(await ReadLinkFromAsync(reader, result)); + break; + case Atom10Constants.LogoTag: + result.ImageUrl = uriParser(await reader.ReadElementStringAsync(), UriKind.RelativeOrAbsolute, Atom10Constants.LogoTag, ns); //new Uri(await reader.ReadElementStringAsync(), UriKind.RelativeOrAbsolute); + break; + case Atom10Constants.RightsTag: + result.Copyright = await ReadTextContentFromAsync(reader, "//atom:feed/atom:rights[@type]"); + break; + case Atom10Constants.SubtitleTag: + result.Description = await ReadTextContentFromAsync(reader, "//atom:feed/atom:subtitle[@type]"); + break; + case Atom10Constants.TitleTag: + result.Title = await ReadTextContentFromAsync(reader, "//atom:feed/atom:title[@type]"); + break; + case Atom10Constants.UpdatedTag: + await reader.ReadStartElementAsync(); + result.LastUpdatedTime = dateParser(await reader.ReadStringAsync(), Atom10Constants.UpdatedTag, ns); + await reader.ReadEndElementAsync(); + break; + case Atom10Constants.IconTag: + result.IconImage = uriParser(await reader.ReadElementStringAsync(), UriKind.RelativeOrAbsolute, Atom10Constants.IconTag, ns); + break; + default: + return false; + } + + return true; + } + + return false; + } + + internal async Task TryParseItemElementFromAsync(XmlReaderWrapper reader, SyndicationItem result) + { + if (await reader.MoveToContentAsync() != XmlNodeType.Element) + { + return false; + } + + string name = reader.LocalName; + string ns = reader.NamespaceURI; + + if(ns == Atom10Constants.Atom10Namespace) + { + switch (name) + { + case Atom10Constants.AuthorTag: + result.Authors.Add(await ReadPersonFromAsync(reader, result)); + break; + case Atom10Constants.CategoryTag: + result.Categories.Add(await ReadCategoryFromAsync(reader, result)); + break; + case Atom10Constants.ContentTag: + result.Content = await ReadContentFromAsync(reader, result); + break; + case Atom10Constants.ContributorTag: + result.Contributors.Add(await ReadPersonFromAsync(reader, result)); + break; + case Atom10Constants.IdTag: + result.Id = stringParser(await reader.ReadElementStringAsync(),Atom10Constants.IdTag,ns); + break; + case Atom10Constants.LinkTag: + result.Links.Add(await ReadLinkFromAsync(reader, result)); + break; + case Atom10Constants.PublishedTag: + await reader.ReadStartElementAsync(); + result.PublishDate = dateParser(await reader.ReadStringAsync(), Atom10Constants.UpdatedTag, ns); + await reader.ReadEndElementAsync(); + break; + case Atom10Constants.RightsTag: + result.Copyright = await ReadTextContentFromAsync(reader, "//atom:feed/atom:entry/atom:rights[@type]"); + break; + case Atom10Constants.SourceFeedTag: + await reader.ReadStartElementAsync(); + result.SourceFeed = await ReadFeedFromAsync(reader, new SyndicationFeed(), true); // isSourceFeed + await reader.ReadEndElementAsync(); + break; + case Atom10Constants.SummaryTag: + result.Summary = await ReadTextContentFromAsync(reader, "//atom:feed/atom:entry/atom:summary[@type]"); + break; + case Atom10Constants.TitleTag: + result.Title = await ReadTextContentFromAsync(reader, "//atom:feed/atom:entry/atom:title[@type]"); + break; + case Atom10Constants.UpdatedTag: + await reader.ReadStartElementAsync(); + result.LastUpdatedTime = dateParser(await reader.ReadStringAsync(), Atom10Constants.UpdatedTag, ns); + await reader.ReadEndElementAsync(); + break; + default: + return false; + } + + return true; + } + + return false; + } + + internal Task WriteContentToAsync(XmlWriter writer, string elementName, SyndicationContent content) + { + if (content != null) + { + return content.WriteToAsync(writer, elementName, Atom10Constants.Atom10Namespace); + } + return Task.CompletedTask; + } + + internal async Task WriteElementAsync(XmlWriter writer, string elementName, string value) + { + if (value != null) + { + await writer.WriteElementStringAsync(elementName, Atom10Constants.Atom10Namespace, value); + } + } + + internal async Task WriteFeedAuthorsToAsync(XmlWriter writer, Collection authors) + { + writer = XmlWriterWrapper.CreateFromWriter(writer); + for (int i = 0; i < authors.Count; ++i) + { + SyndicationPerson p = authors[i]; + await WritePersonToAsync(writer, p, Atom10Constants.AuthorTag); + } + } + + internal async Task WriteFeedContributorsToAsync(XmlWriter writer, Collection contributors) + { + writer = XmlWriterWrapper.CreateFromWriter(writer); + for (int i = 0; i < contributors.Count; ++i) + { + SyndicationPerson p = contributors[i]; + await WritePersonToAsync(writer, p, Atom10Constants.ContributorTag); + } + } + + internal Task WriteFeedLastUpdatedTimeToAsync(XmlWriter writer, DateTimeOffset lastUpdatedTime, bool isRequired) + { + if (lastUpdatedTime == DateTimeOffset.MinValue && isRequired) + { + lastUpdatedTime = DateTimeOffset.UtcNow; + } + + if (lastUpdatedTime != DateTimeOffset.MinValue) + { + return WriteElementAsync(writer, Atom10Constants.UpdatedTag, AsString(lastUpdatedTime)); + } + + return Task.CompletedTask; + } + + internal async Task WriteItemAuthorsToAsync(XmlWriter writer, Collection authors) + { + writer = XmlWriterWrapper.CreateFromWriter(writer); + for (int i = 0; i < authors.Count; ++i) + { + SyndicationPerson p = authors[i]; + await WritePersonToAsync(writer, p, Atom10Constants.AuthorTag); + } + } + + internal Task WriteItemContentsAsync(XmlWriter dictWriter, SyndicationItem item) + { + return WriteItemContentsAsync(dictWriter, item, null); + } + + internal async Task WriteItemContributorsToAsync(XmlWriter writer, Collection contributors) + { + writer = XmlWriterWrapper.CreateFromWriter(writer); + + for (int i = 0; i < contributors.Count; ++i) + { + SyndicationPerson p = contributors[i]; + await WritePersonToAsync(writer, p, Atom10Constants.ContributorTag); + } + } + + internal Task WriteItemLastUpdatedTimeToAsync(XmlWriter writer, DateTimeOffset lastUpdatedTime) + { + if (lastUpdatedTime == DateTimeOffset.MinValue) + { + lastUpdatedTime = DateTimeOffset.UtcNow; + } + + return writer.WriteElementStringAsync(Atom10Constants.UpdatedTag, + Atom10Constants.Atom10Namespace, + AsString(lastUpdatedTime)); + } + + internal async Task WriteLinkAsync(XmlWriter writer, SyndicationLink link, Uri baseUri) + { + await writer.WriteStartElementAsync(Atom10Constants.LinkTag, Atom10Constants.Atom10Namespace); + Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(baseUri, link.BaseUri); + if (baseUriToWrite != null) + { + await writer.WriteAttributeStringAsync("xml", "base", XmlNs, FeedUtils.GetUriString(baseUriToWrite)); + } + + await link.WriteAttributeExtensionsAsync(writer, SyndicationVersions.Atom10); + if (!string.IsNullOrEmpty(link.RelationshipType) && !link.AttributeExtensions.ContainsKey(s_atom10Relative)) + { + await writer.WriteAttributeStringAsync(Atom10Constants.RelativeTag, link.RelationshipType); + } + + if (!string.IsNullOrEmpty(link.MediaType) && !link.AttributeExtensions.ContainsKey(s_atom10Type)) + { + await writer.WriteAttributeStringAsync(Atom10Constants.TypeTag, link.MediaType); + } + + if (!string.IsNullOrEmpty(link.Title) && !link.AttributeExtensions.ContainsKey(s_atom10Title)) + { + await writer.WriteAttributeStringAsync(Atom10Constants.TitleTag, link.Title); + } + + if (link.Length != 0 && !link.AttributeExtensions.ContainsKey(s_atom10Length)) + { + await writer.WriteAttributeStringAsync(Atom10Constants.LengthTag, Convert.ToString(link.Length, CultureInfo.InvariantCulture)); + } + + if (!link.AttributeExtensions.ContainsKey(s_atom10Href)) + { + await writer.WriteAttributeStringAsync(Atom10Constants.HrefTag, FeedUtils.GetUriString(link.Uri)); + } + + await link.WriteElementExtensionsAsync(writer, SyndicationVersions.Atom10); + await writer.WriteEndElementAsync(); + } + + protected override SyndicationFeed CreateFeedInstance() + { + return SyndicationFeedFormatter.CreateFeedInstance(_feedType); + } + + protected virtual async Task ReadItemAsync(XmlReader reader, SyndicationFeed feed) + { + if (feed == null) + { + throw new ArgumentNullException(nameof(feed)); + } + + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + + SyndicationItem item = CreateItem(feed); + XmlReaderWrapper readerWrapper = XmlReaderWrapper.CreateFromReader(reader); + await ReadItemFromAsync(readerWrapper, item, feed.BaseUri); + return item; + } + + //not referenced anymore + protected virtual async Task> ReadItemsAsync(XmlReader reader, SyndicationFeed feed) + { + if (feed == null) + { + throw new ArgumentNullException(nameof(feed)); + } + + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + + NullNotAllowedCollection items = new NullNotAllowedCollection(); + XmlReaderWrapper readerWrapper = XmlReaderWrapper.CreateFromReader(reader); + + while (await readerWrapper.IsStartElementAsync(Atom10Constants.EntryTag, Atom10Constants.Atom10Namespace)) + { + items.Add(await ReadItemAsync(reader, feed)); + } + + return items; + } + + protected virtual async Task WriteItemAsync(XmlWriter writer, SyndicationItem item, Uri feedBaseUri) + { + writer = XmlWriterWrapper.CreateFromWriter(writer); + await writer.WriteStartElementAsync(Atom10Constants.EntryTag, Atom10Constants.Atom10Namespace); + await WriteItemContentsAsync(writer, item, feedBaseUri); + await writer.WriteEndElementAsync(); + } + + protected virtual async Task WriteItemsAsync(XmlWriter writer, IEnumerable items, Uri feedBaseUri) + { + if (items == null) + { + return; + } + + foreach (SyndicationItem item in items) + { + await this.WriteItemAsync(writer, item, feedBaseUri); + } + } + + private async Task ReadTextContentFromHelperAsync(XmlReaderWrapper reader, string type, string context, bool preserveAttributeExtensions) + { + if (string.IsNullOrEmpty(type)) + { + type = Atom10Constants.PlaintextType; + } + + TextSyndicationContentKind kind = new TextSyndicationContentKind(); + switch (type) + { + case Atom10Constants.PlaintextType: + kind = TextSyndicationContentKind.Plaintext; + break; + case Atom10Constants.HtmlType: + kind = TextSyndicationContentKind.Html; + break; + case Atom10Constants.XHtmlType: + kind = TextSyndicationContentKind.XHtml; + break; + + throw new XmlException(string.Format(SR.Atom10SpecRequiresTextConstruct, context, type)); + } + + Dictionary attrs = null; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + if (reader.LocalName == Atom10Constants.TypeTag && reader.NamespaceURI == string.Empty) + { + continue; + } + string ns = reader.NamespaceURI; + string name = reader.LocalName; + if (FeedUtils.IsXmlns(name, ns)) + { + continue; + } + if (preserveAttributeExtensions) + { + string value = await reader.GetValueAsync(); + if (attrs == null) + { + attrs = new Dictionary(); + } + attrs.Add(new XmlQualifiedName(name, ns), value); + } + } + } + reader.MoveToElement(); + string localName = reader.LocalName; + string nameSpace = reader.NamespaceURI; + string val = (kind == TextSyndicationContentKind.XHtml) ? await reader.ReadInnerXmlAsync() : stringParser(await reader.ReadElementStringAsync(),localName,nameSpace); // cant custom parse because its static + TextSyndicationContent result = new TextSyndicationContent(val, kind); + if (attrs != null) + { + foreach (XmlQualifiedName attr in attrs.Keys) + { + if (!FeedUtils.IsXmlns(attr.Name, attr.Namespace)) + { + result.AttributeExtensions.Add(attr, attrs[attr]); + } + } + } + return result; + } + + private string AsString(DateTimeOffset dateTime) + { + if (dateTime.Offset == zeroOffset) + { + return dateTime.ToUniversalTime().ToString(Rfc3339UTCDateTimeFormat, CultureInfo.InvariantCulture); + } + else + { + return dateTime.ToString(Rfc3339LocalDateTimeFormat, CultureInfo.InvariantCulture); + } + } + + private static DateTimeOffset DefaultDateFromString(string dateTimeString, string localName, string ns) + { + dateTimeString = dateTimeString.Trim(); + if (dateTimeString.Length < 20) + { + throw new XmlException(SR.ErrorParsingDateTime); + } + if (dateTimeString[19] == '.') + { + // remove any fractional seconds, we choose to ignore them + int i = 20; + while (dateTimeString.Length > i && char.IsDigit(dateTimeString[i])) + { + ++i; + } + dateTimeString = dateTimeString.Substring(0, 19) + dateTimeString.Substring(i); + } + DateTimeOffset localTime; + if (DateTimeOffset.TryParseExact(dateTimeString, Rfc3339LocalDateTimeFormat, + CultureInfo.InvariantCulture.DateTimeFormat, + DateTimeStyles.None, out localTime)) + { + return localTime; + } + DateTimeOffset utcTime; + if (DateTimeOffset.TryParseExact(dateTimeString, Rfc3339UTCDateTimeFormat, + CultureInfo.InvariantCulture.DateTimeFormat, + DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal, out utcTime)) + { + return utcTime; + } + + //throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingDateTime)); + + //if imposible to parse, return default date + return new DateTimeOffset(); + } + + private Task ReadCategoryAsync(XmlReaderWrapper reader, SyndicationCategory category) + { + return ReadCategoryAsync(reader, category, this.Version, this.PreserveAttributeExtensions, this.PreserveElementExtensions, _maxExtensionSize); + } + + private Task ReadCategoryFromAsync(XmlReaderWrapper reader, SyndicationFeed feed) + + { + SyndicationCategory result = CreateCategory(feed); + return ReadCategoryAsync(reader, result); + } + + private async Task ReadCategoryFromAsync(XmlReaderWrapper reader, SyndicationItem item) + { + SyndicationCategory result = CreateCategory(item); + await ReadCategoryAsync(reader, result); + return result; + } + + private async Task ReadContentFromAsync(XmlReaderWrapper reader, SyndicationItem item) + { + await MoveToStartElementAsync(reader); + string type = reader.GetAttribute(Atom10Constants.TypeTag, string.Empty); + + SyndicationContent result; + if (TryParseContent(reader, item, type, this.Version, out result)) + { + return result; + } + + if (string.IsNullOrEmpty(type)) + { + type = Atom10Constants.PlaintextType; + } + string src = reader.GetAttribute(Atom10Constants.SourceTag, string.Empty); + + if (string.IsNullOrEmpty(src) && type != Atom10Constants.PlaintextType && type != Atom10Constants.HtmlType && type != Atom10Constants.XHtmlType) + { + return new XmlSyndicationContent(reader); + } + + if (!string.IsNullOrEmpty(src)) + { + result = new UrlSyndicationContent(new Uri(src, UriKind.RelativeOrAbsolute), type); + bool isEmpty = reader.IsEmptyElement; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + if (reader.LocalName == Atom10Constants.TypeTag && reader.NamespaceURI == string.Empty) + { + continue; + } + else if (reader.LocalName == Atom10Constants.SourceTag && reader.NamespaceURI == string.Empty) + { + continue; + } + else if (!FeedUtils.IsXmlns(reader.LocalName, reader.NamespaceURI)) + { + if (_preserveAttributeExtensions) + { + result.AttributeExtensions.Add(new XmlQualifiedName(reader.LocalName, reader.NamespaceURI), await reader.GetValueAsync()); + } + else + { + //result.AttributeExtensions.Add(new XmlQualifiedName(reader.LocalName, reader.NamespaceURI), await reader.GetValueAsync()); + } + } + } + } + + await reader.ReadStartElementAsync(); + if (!isEmpty) + { + await reader.ReadEndElementAsync(); + } + + return result; + } + else + { + return await ReadTextContentFromHelperAsync(reader, type, "//atom:feed/atom:entry/atom:content[@type]", _preserveAttributeExtensions); + } + } + + private async Task ReadFeedFromAsync(XmlReaderWrapper reader, SyndicationFeed result, bool isSourceFeed) + { + await reader.MoveToContentAsync(); + //fix to accept non contiguous items + NullNotAllowedCollection feedItems = new NullNotAllowedCollection(); + + bool elementIsEmpty = false; + if (!isSourceFeed) + { + await MoveToStartElementAsync(reader); + elementIsEmpty = reader.IsEmptyElement; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + if (reader.LocalName == "lang" && reader.NamespaceURI == XmlNs) + { + result.Language = await reader.GetValueAsync(); + } + else if (reader.LocalName == "base" && reader.NamespaceURI == XmlNs) + { + result.BaseUri = FeedUtils.CombineXmlBase(result.BaseUri, await reader.GetValueAsync()); + } + else + { + string ns = reader.NamespaceURI; + string name = reader.LocalName; + if (FeedUtils.IsXmlns(name, ns) || FeedUtils.IsXmlSchemaType(name, ns)) + { + continue; + } + + string val = await reader.GetValueAsync(); + + if (!TryParseAttribute(name, ns, val, result, this.Version)) + { + if (_preserveAttributeExtensions) + { + result.AttributeExtensions.Add(new XmlQualifiedName(reader.LocalName, reader.NamespaceURI), val); + } + } + } + } + } + await reader.ReadStartElementAsync(); + } + + XmlBuffer buffer = null; + XmlDictionaryWriter extWriter = null; + + if (!elementIsEmpty) + { + try + { + while (await reader.IsStartElementAsync()) + { + if (await TryParseFeedElementFromAsync(reader, result)) + { + // nothing, we parsed something, great + } + else if (await reader.IsStartElementAsync(Atom10Constants.EntryTag, Atom10Constants.Atom10Namespace) && !isSourceFeed) + { + while (await reader.IsStartElementAsync(Atom10Constants.EntryTag, Atom10Constants.Atom10Namespace)) + { + feedItems.Add(await ReadItemAsync(reader, result)); + } + } + else + { + if (!TryParseElement(reader, result, this.Version)) + { + if (_preserveElementExtensions) + { + if (buffer == null) + { + buffer = new XmlBuffer(_maxExtensionSize); + extWriter = buffer.OpenSection(XmlDictionaryReaderQuotas.Max); + extWriter.WriteStartElement(Rss20Constants.ExtensionWrapperTag); + } + + await XmlReaderWrapper.WriteNodeAsync(extWriter, reader, false); + } + else + { + await reader.SkipAsync(); + } + } + } + } + //Add all read items to the feed + result.Items = feedItems; + LoadElementExtensions(buffer, extWriter, result); + } + catch (FormatException e) + { + throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingFeed), e); + } + catch (ArgumentException e) + { + throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingFeed), e); + } + finally + { + if (extWriter != null) + { + ((IDisposable)extWriter).Dispose(); + } + } + } + if (!isSourceFeed) + { + await reader.ReadEndElementAsync(); // feed + } + + return result; + } + + + private async Task ReadItemFromAsync(XmlReaderWrapper reader, SyndicationItem result, Uri feedBaseUri) + { + try + { + result.BaseUri = feedBaseUri; + await MoveToStartElementAsync(reader); + bool isEmpty = reader.IsEmptyElement; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + string ns = reader.NamespaceURI; + string name = reader.LocalName; + if (name == "base" && ns == XmlNs) + { + result.BaseUri = FeedUtils.CombineXmlBase(result.BaseUri, await reader.GetValueAsync()); + continue; + } + + if (FeedUtils.IsXmlns(name, ns) || FeedUtils.IsXmlSchemaType(name, ns)) + { + continue; + } + + string val = await reader.GetValueAsync(); + if (!TryParseAttribute(name, ns, val, result, this.Version)) + { + if (_preserveAttributeExtensions) + { + result.AttributeExtensions.Add(new XmlQualifiedName(reader.LocalName, reader.NamespaceURI), reader.Value); + } + } + } + } + await reader.ReadStartElementAsync(); + + if (!isEmpty) + { + XmlBuffer buffer = null; + XmlDictionaryWriter extWriter = null; + try + { + while (await reader.IsStartElementAsync()) + { + if (await TryParseItemElementFromAsync(reader, result)) + { + // nothing, we parsed something, great + } + else + { + if (!TryParseElement(reader, result, this.Version)) + { + if (_preserveElementExtensions) + { + var tuple = await CreateBufferIfRequiredAndWriteNodeAsync(buffer, extWriter, reader, _maxExtensionSize); + buffer = tuple.Item1; + extWriter = tuple.Item2; + } + else + { + await reader.SkipAsync(); + } + } + } + } + LoadElementExtensions(buffer, extWriter, result); + } + finally + { + if (extWriter != null) + { + ((IDisposable)extWriter).Dispose(); + } + } + await reader.ReadEndElementAsync(); // item + } + } + catch (FormatException e) + { + throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingItem), e); + + } + catch (ArgumentException e) + { + throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingItem), e); + } + } + + private async Task ReadLinkAsync(XmlReaderWrapper reader, SyndicationLink link, Uri baseUri) + { + bool isEmpty = reader.IsEmptyElement; + string mediaType = null; + string relationship = null; + string title = null; + string lengthStr = null; + string val = null; + string ns = null; + link.BaseUri = baseUri; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + bool notHandled = false; + if (reader.LocalName == "base" && reader.NamespaceURI == XmlNs) + { + link.BaseUri = FeedUtils.CombineXmlBase(link.BaseUri, await reader.GetValueAsync()); + } + else if(reader.NamespaceURI == string.Empty) + { + switch (reader.LocalName) + { + case Atom10Constants.TypeTag: + mediaType = await reader.GetValueAsync(); + break; + case Atom10Constants.RelativeTag: + relationship = await reader.GetValueAsync(); + break; + case Atom10Constants.TitleTag: + title = await reader.GetValueAsync(); + break; + case Atom10Constants.LengthTag: + lengthStr = await reader.GetValueAsync(); + break; + case Atom10Constants.HrefTag: + val = await reader.GetValueAsync(); + ns = reader.NamespaceURI; + break; + default: + notHandled = true; + break; + } + } + else + { + notHandled = true; + } + + if (notHandled && !FeedUtils.IsXmlns(reader.LocalName, reader.NamespaceURI)) + { + if (_preserveAttributeExtensions) + { + link.AttributeExtensions.Add(new XmlQualifiedName(reader.LocalName, reader.NamespaceURI), await reader.GetValueAsync()); + } + } + } + } + + long length = 0; + if (!string.IsNullOrEmpty(lengthStr)) + { + length = Convert.ToInt64(lengthStr, CultureInfo.InvariantCulture.NumberFormat); + } + + await reader.ReadStartElementAsync(); + if (!isEmpty) + { + XmlBuffer buffer = null; + XmlDictionaryWriter extWriter = null; + try + { + while (await reader.IsStartElementAsync()) + { + if (TryParseElement(reader, link, this.Version)) + { + continue; + } + else if (!_preserveElementExtensions) + { + await reader.SkipAsync(); + } + else + { + if (buffer == null) + { + buffer = new XmlBuffer(_maxExtensionSize); + extWriter = buffer.OpenSection(XmlDictionaryReaderQuotas.Max); + extWriter.WriteStartElement(Rss20Constants.ExtensionWrapperTag); + } + + await XmlReaderWrapper.WriteNodeAsync(extWriter, reader, false); + } + } + + LoadElementExtensions(buffer, extWriter, link); + } + finally + { + if (extWriter != null) + { + ((IDisposable)extWriter).Dispose(); + } + } + + await reader.ReadEndElementAsync(); + } + + link.Length = length; + link.MediaType = mediaType; + link.RelationshipType = relationship; + link.Title = title; + link.Uri = (val != null) ? uriParser(val,UriKind.RelativeOrAbsolute,Atom10Constants.LinkTag,ns) /*new Uri(val, UriKind.RelativeOrAbsolute)*/ : null; + } + + private async Task ReadLinkFromAsync(XmlReaderWrapper reader, SyndicationFeed feed) + { + SyndicationLink result = CreateLink(feed); + await ReadLinkAsync(reader, result, feed.BaseUri); + return result; + } + + private async Task ReadLinkFromAsync(XmlReaderWrapper reader, SyndicationItem item) + { + SyndicationLink result = CreateLink(item); + await ReadLinkAsync(reader, result, item.BaseUri); + return result; + } + + private async Task ReadPersonFromAsync(XmlReaderWrapper reader, SyndicationFeed feed) + { + SyndicationPerson result = CreatePerson(feed); + await ReadPersonFromAsync(reader, result); + return result; + } + + private async Task ReadPersonFromAsync(XmlReaderWrapper reader, SyndicationItem item) + { + SyndicationPerson result = CreatePerson(item); + await ReadPersonFromAsync(reader, result); + return result; + } + + private async Task ReadPersonFromAsync(XmlReaderWrapper reader, SyndicationPerson result) + { + bool isEmpty = reader.IsEmptyElement; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + string ns = reader.NamespaceURI; + string name = reader.LocalName; + if (FeedUtils.IsXmlns(name, ns)) + { + continue; + } + string val = await reader.GetValueAsync(); + if (!TryParseAttribute(name, ns, val, result, this.Version)) + { + if (_preserveAttributeExtensions) + { + result.AttributeExtensions.Add(new XmlQualifiedName(reader.LocalName, reader.NamespaceURI), await reader.GetValueAsync()); + } + } + } + } + + await reader.ReadStartElementAsync(); + if (!isEmpty) + { + XmlBuffer buffer = null; + XmlDictionaryWriter extWriter = null; + try + { + while (await reader.IsStartElementAsync()) + { + string name = reader.LocalName; + string ns = reader.NamespaceURI; + bool notHandled = false; + + switch (name) + { + case Atom10Constants.NameTag: + result.Name = stringParser(await reader.ReadElementStringAsync(),Atom10Constants.NameTag,ns); + break; + case Atom10Constants.UriTag: + result.Uri = stringParser(await reader.ReadElementStringAsync(),Atom10Constants.UriTag,ns); + break; + case Atom10Constants.EmailTag: + result.Email = stringParser(await reader.ReadElementStringAsync(),Atom10Constants.EmailTag,ns); + break; + default: + notHandled = true; + break; + } + + if(notHandled && !TryParseElement(reader, result, this.Version)) + { + if (_preserveElementExtensions) + { + if (buffer == null) + { + buffer = new XmlBuffer(_maxExtensionSize); + extWriter = buffer.OpenSection(XmlDictionaryReaderQuotas.Max); + extWriter.WriteStartElement(Rss20Constants.ExtensionWrapperTag); + } + + await XmlReaderWrapper.WriteNodeAsync(extWriter, reader, false); + } + else + { + await reader.SkipAsync(); + } + } + } + + LoadElementExtensions(buffer, extWriter, result); + } + finally + { + if (extWriter != null) + { + ((IDisposable)extWriter).Dispose(); + } + } + + await reader.ReadEndElementAsync(); + } + } + + private Task ReadTextContentFromAsync(XmlReaderWrapper reader, string context) + { + return ReadTextContentFromAsync(reader, context, this.PreserveAttributeExtensions); + } + + private async Task WriteCategoriesToAsync(XmlWriter writer, Collection categories) + { + writer = XmlWriterWrapper.CreateFromWriter(writer); + for (int i = 0; i < categories.Count; ++i) + { + await WriteCategoryAsync(writer, categories[i], this.Version); + } + } + + private Task WriteFeedAsync(XmlWriter writer) + { + if (this.Feed == null) + { + throw new InvalidOperationException(SR.FeedFormatterDoesNotHaveFeed); + } + return WriteFeedToAsync(writer, this.Feed, false); // isSourceFeed + } + + private async Task WriteFeedToAsync(XmlWriter writer, SyndicationFeed feed, bool isSourceFeed) + { + if (!isSourceFeed) + { + if (!string.IsNullOrEmpty(feed.Language)) + { + await writer.WriteAttributeStringAsync("xml", "lang", XmlNs, feed.Language); + } + if (feed.BaseUri != null) + { + await writer.InternalWriteAttributeStringAsync("xml", "base", XmlNs, FeedUtils.GetUriString(feed.BaseUri)); + } + await WriteAttributeExtensionsAsync(writer, feed, this.Version); + } + bool isElementRequired = !isSourceFeed; + TextSyndicationContent title = feed.Title; + if (isElementRequired) + { + title = title ?? new TextSyndicationContent(string.Empty); + } + await WriteContentToAsync(writer, Atom10Constants.TitleTag, title); + await WriteContentToAsync(writer, Atom10Constants.SubtitleTag, feed.Description); + string id = feed.Id; + if (isElementRequired) + { + id = id ?? s_idGenerator.Next(); + } + await WriteElementAsync(writer, Atom10Constants.IdTag, id); + await WriteContentToAsync(writer, Atom10Constants.RightsTag, feed.Copyright); + await WriteFeedLastUpdatedTimeToAsync(writer, feed.LastUpdatedTime, isElementRequired); + await WriteCategoriesToAsync(writer, feed.Categories); + if (feed.ImageUrl != null) + { + await WriteElementAsync(writer, Atom10Constants.LogoTag, feed.ImageUrl.ToString()); + } + await WriteFeedAuthorsToAsync(writer, feed.Authors); + await WriteFeedContributorsToAsync(writer, feed.Contributors); + await WriteElementAsync(writer, Atom10Constants.GeneratorTag, feed.Generator); + + if(feed.IconImage != null) + { + await WriteElementAsync(writer, Atom10Constants.IconTag, feed.IconImage.AbsoluteUri); + } + + for (int i = 0; i < feed.Links.Count; ++i) + { + await WriteLinkAsync(writer, feed.Links[i], feed.BaseUri); + } + + await WriteElementExtensionsAsync(writer, feed, this.Version); + + if (!isSourceFeed) + { + await WriteItemsAsync(writer, feed.Items, feed.BaseUri); + } + } + + private async Task WriteItemContentsAsync(XmlWriter dictWriter, SyndicationItem item, Uri feedBaseUri) + { + Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(feedBaseUri, item.BaseUri); + if (baseUriToWrite != null) + { + await dictWriter.InternalWriteAttributeStringAsync("xml", "base", XmlNs, FeedUtils.GetUriString(baseUriToWrite)); + } + await WriteAttributeExtensionsAsync(dictWriter, item, this.Version); + + string id = item.Id ?? s_idGenerator.Next(); + await WriteElementAsync(dictWriter, Atom10Constants.IdTag, id); + + TextSyndicationContent title = item.Title ?? new TextSyndicationContent(string.Empty); + await WriteContentToAsync(dictWriter, Atom10Constants.TitleTag, title); + await WriteContentToAsync(dictWriter, Atom10Constants.SummaryTag, item.Summary); + if (item.PublishDate != DateTimeOffset.MinValue) + { + await dictWriter.WriteElementStringAsync(Atom10Constants.PublishedTag, + Atom10Constants.Atom10Namespace, + AsString(item.PublishDate)); + } + await WriteItemLastUpdatedTimeToAsync(dictWriter, item.LastUpdatedTime); + await WriteItemAuthorsToAsync(dictWriter, item.Authors); + await WriteItemContributorsToAsync(dictWriter, item.Contributors); + for (int i = 0; i < item.Links.Count; ++i) + { + await WriteLinkAsync(dictWriter, item.Links[i], item.BaseUri); + } + await WriteCategoriesToAsync(dictWriter, item.Categories); + await WriteContentToAsync(dictWriter, Atom10Constants.ContentTag, item.Content); + await WriteContentToAsync(dictWriter, Atom10Constants.RightsTag, item.Copyright); + if (item.SourceFeed != null) + { + await dictWriter.WriteStartElementAsync(Atom10Constants.SourceFeedTag, Atom10Constants.Atom10Namespace); + await WriteFeedToAsync(dictWriter, item.SourceFeed, true); // isSourceFeed + await dictWriter.WriteEndElementAsync(); + } + await WriteElementExtensionsAsync(dictWriter, item, this.Version); + } + + private async Task WritePersonToAsync(XmlWriter writer, SyndicationPerson p, string elementName) + { + await writer.WriteStartElementAsync(elementName, Atom10Constants.Atom10Namespace); + await WriteAttributeExtensionsAsync(writer, p, this.Version); + await WriteElementAsync(writer, Atom10Constants.NameTag, p.Name); + if (!string.IsNullOrEmpty(p.Uri)) + { + await writer.WriteElementStringAsync(Atom10Constants.UriTag, Atom10Constants.Atom10Namespace, p.Uri); + } + if (!string.IsNullOrEmpty(p.Email)) + { + await writer.WriteElementStringAsync(Atom10Constants.EmailTag, Atom10Constants.Atom10Namespace, p.Email); + } + await WriteElementExtensionsAsync(writer, p, this.Version); + await writer.WriteEndElementAsync(); + } + } + + [XmlRoot(ElementName = Atom10Constants.FeedTag, Namespace = Atom10Constants.Atom10Namespace)] + public class Atom10FeedFormatter : Atom10FeedFormatter + where TSyndicationFeed : SyndicationFeed, new() + { + // constructors + public Atom10FeedFormatter() + : base(typeof(TSyndicationFeed)) + { + } + public Atom10FeedFormatter(TSyndicationFeed feedToWrite) + : base(feedToWrite) + { + } + + protected override SyndicationFeed CreateFeedInstance() + { + return new TSyndicationFeed(); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/Atom10ItemFormatter.cs b/src/System.ServiceModel.Syndication/src/Atom10ItemFormatter.cs new file mode 100644 index 000000000000..3edf4860be26 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/Atom10ItemFormatter.cs @@ -0,0 +1,169 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + + +/* + * Some diagnostic lines have been commented + * + * */ + +namespace Microsoft.ServiceModel.Syndication +{ + using Microsoft.ServiceModel.Syndication.Resources; + using System; + using System.Diagnostics.CodeAnalysis; + using System.Runtime.CompilerServices; + using System.Threading.Tasks; + using System.Xml; + using System.Xml.Schema; + using System.Xml.Serialization; + + [XmlRoot(ElementName = Atom10Constants.EntryTag, Namespace = Atom10Constants.Atom10Namespace)] + public class Atom10ItemFormatter : SyndicationItemFormatter + { + private Atom10FeedFormatter _feedSerializer; + private Type _itemType; + private bool _preserveAttributeExtensions; + private bool _preserveElementExtensions; + + public Atom10ItemFormatter() + : this(typeof(SyndicationItem)) + { + } + + public Atom10ItemFormatter(Type itemTypeToCreate) + : base() + { + if (itemTypeToCreate == null) + { + throw new ArgumentNullException(nameof(itemTypeToCreate)); + } + if (!typeof(SyndicationItem).IsAssignableFrom(itemTypeToCreate)) + { + throw new ArgumentException(string.Format(SR.InvalidObjectTypePassed, nameof(itemTypeToCreate), nameof(SyndicationItem))); + } + _feedSerializer = new Atom10FeedFormatter(); + _feedSerializer.PreserveAttributeExtensions = _preserveAttributeExtensions = true; + _feedSerializer.PreserveElementExtensions = _preserveElementExtensions = true; + _itemType = itemTypeToCreate; + } + + public Atom10ItemFormatter(SyndicationItem itemToWrite) + : base(itemToWrite) + { + // No need to check that the parameter passed is valid - it is checked by the c'tor of the base class + _feedSerializer = new Atom10FeedFormatter(); + _feedSerializer.PreserveAttributeExtensions = _preserveAttributeExtensions = true; + _feedSerializer.PreserveElementExtensions = _preserveElementExtensions = true; + _itemType = itemToWrite.GetType(); + } + + public bool PreserveAttributeExtensions + { + get { return _preserveAttributeExtensions; } + set + { + _preserveAttributeExtensions = value; + _feedSerializer.PreserveAttributeExtensions = value; + } + } + + public bool PreserveElementExtensions + { + get { return _preserveElementExtensions; } + set + { + _preserveElementExtensions = value; + _feedSerializer.PreserveElementExtensions = value; + } + } + + public override string Version + { + get { return SyndicationVersions.Atom10; } + } + + protected Type ItemType + { + get + { + return _itemType; + } + } + + public override bool CanRead(XmlReader reader) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + return reader.IsStartElement(Atom10Constants.EntryTag, Atom10Constants.Atom10Namespace); + } + + public override Task ReadFromAsync(XmlReader reader) + { + if (!CanRead(reader)) + { + throw new XmlException(string.Format(SR.UnknownItemXml, reader.LocalName, reader.NamespaceURI)); + } + + return ReadItemAsync(reader); + } + + public override async Task WriteToAsync(XmlWriter writer) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + + writer = XmlWriterWrapper.CreateFromWriter(writer); + + await writer.WriteStartElementAsync(Atom10Constants.EntryTag, Atom10Constants.Atom10Namespace); + await WriteItemAsync(writer); + await writer.WriteEndElementAsync(); + } + + protected override SyndicationItem CreateItemInstance() + { + return SyndicationItemFormatter.CreateItemInstance(_itemType); + } + + private Task ReadItemAsync(XmlReader reader) + { + SetItem(CreateItemInstance()); + return _feedSerializer.ReadItemFromAsync(XmlReaderWrapper.CreateFromReader(XmlDictionaryReader.CreateDictionaryReader(reader)), this.Item); + } + + private Task WriteItemAsync(XmlWriter writer) + { + if (this.Item == null) + { + throw new InvalidOperationException(SR.ItemFormatterDoesNotHaveItem); + } + XmlDictionaryWriter w = XmlDictionaryWriter.CreateDictionaryWriter(writer); + return _feedSerializer.WriteItemContentsAsync(w, this.Item); + } + } + + [XmlRoot(ElementName = Atom10Constants.EntryTag, Namespace = Atom10Constants.Atom10Namespace)] + public class Atom10ItemFormatter : Atom10ItemFormatter + where TSyndicationItem : SyndicationItem, new() + { + // constructors + public Atom10ItemFormatter() + : base(typeof(TSyndicationItem)) + { + } + public Atom10ItemFormatter(TSyndicationItem itemToWrite) + : base(itemToWrite) + { + } + + protected override SyndicationItem CreateItemInstance() + { + return new TSyndicationItem(); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/AtomPub10CategoriesDocumentFormatter.cs b/src/System.ServiceModel.Syndication/src/AtomPub10CategoriesDocumentFormatter.cs new file mode 100644 index 000000000000..260843683c68 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/AtomPub10CategoriesDocumentFormatter.cs @@ -0,0 +1,215 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + + +namespace Microsoft.ServiceModel.Syndication +{ + + using Microsoft.ServiceModel.Syndication.Resources; + using System; + using System.Runtime.CompilerServices; + using System.Threading.Tasks; + using System.Xml; + using System.Xml.Serialization; + + [XmlRoot(ElementName = App10Constants.Categories, Namespace = App10Constants.Namespace)] + public class AtomPub10CategoriesDocumentFormatter : CategoriesDocumentFormatter + { + private Type _inlineDocumentType; + private int _maxExtensionSize; + private bool _preserveAttributeExtensions; + private bool _preserveElementExtensions; + private Type _referencedDocumentType; + + public AtomPub10CategoriesDocumentFormatter() + : this(typeof(InlineCategoriesDocument), typeof(ReferencedCategoriesDocument)) + { + } + + public AtomPub10CategoriesDocumentFormatter(Type inlineDocumentType, Type referencedDocumentType) + : base() + { + if (inlineDocumentType == null) + { + throw new ArgumentNullException(nameof(inlineDocumentType)); + } + + if (!typeof(InlineCategoriesDocument).IsAssignableFrom(inlineDocumentType)) + { + throw new ArgumentException(string.Format(SR.InvalidObjectTypePassed, nameof(inlineDocumentType), nameof(InlineCategoriesDocument))); + } + + if (referencedDocumentType == null) + { + throw new ArgumentNullException(nameof(referencedDocumentType)); + } + + if (!typeof(ReferencedCategoriesDocument).IsAssignableFrom(referencedDocumentType)) + { + throw new ArgumentException(string.Format(SR.InvalidObjectTypePassed, nameof(referencedDocumentType), nameof(ReferencedCategoriesDocument))); + } + + _maxExtensionSize = int.MaxValue; + _preserveAttributeExtensions = true; + _preserveElementExtensions = true; + _inlineDocumentType = inlineDocumentType; + _referencedDocumentType = referencedDocumentType; + } + + public AtomPub10CategoriesDocumentFormatter(CategoriesDocument documentToWrite) + : base(documentToWrite) + { + // No need to check that the parameter passed is valid - it is checked by the c'tor of the base class + _maxExtensionSize = int.MaxValue; + _preserveAttributeExtensions = true; + _preserveElementExtensions = true; + if (documentToWrite.IsInline) + { + _inlineDocumentType = documentToWrite.GetType(); + _referencedDocumentType = typeof(ReferencedCategoriesDocument); + } + else + { + _referencedDocumentType = documentToWrite.GetType(); + _inlineDocumentType = typeof(InlineCategoriesDocument); + } + } + + public override string Version + { + get { return App10Constants.Namespace; } + } + + public override Task CanReadAsync(XmlReader reader) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + + XmlReaderWrapper wrappedReader = XmlReaderWrapper.CreateFromReader(reader); + return wrappedReader.IsStartElementAsync(App10Constants.Categories, App10Constants.Namespace); + } + + + + Task ReadXmlAsync(XmlReaderWrapper reader) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + + return ReadDocumentAsync(reader); + } + + Task WriteXmlAsync(XmlWriter writer) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + + if (this.Document == null) + { + throw new InvalidOperationException(SR.DocumentFormatterDoesNotHaveDocument); + } + + return WriteDocumentAsync(writer); + } + + public override async Task ReadFromAsync(XmlReader reader) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + + if (!await CanReadAsync(reader)) + { + throw new XmlException(string.Format(SR.UnknownDocumentXml, reader.LocalName, reader.NamespaceURI)); + } + + await ReadDocumentAsync(XmlReaderWrapper.CreateFromReader(reader)); + } + + public override async Task WriteTo(XmlWriter writer) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + + if (this.Document == null) + { + throw new InvalidOperationException(SR.DocumentFormatterDoesNotHaveDocument); + } + + writer.WriteStartElement(App10Constants.Prefix, App10Constants.Categories, App10Constants.Namespace); + await WriteDocumentAsync(writer); + writer.WriteEndElement(); + } + + protected override InlineCategoriesDocument CreateInlineCategoriesDocument() + { + if (_inlineDocumentType == typeof(InlineCategoriesDocument)) + { + return new InlineCategoriesDocument(); + } + else + { + return (InlineCategoriesDocument)Activator.CreateInstance(_inlineDocumentType); + } + } + + protected override ReferencedCategoriesDocument CreateReferencedCategoriesDocument() + { + if (_referencedDocumentType == typeof(ReferencedCategoriesDocument)) + { + return new ReferencedCategoriesDocument(); + } + else + { + return (ReferencedCategoriesDocument)Activator.CreateInstance(_referencedDocumentType); + } + } + + private async Task ReadDocumentAsync(XmlReaderWrapper reader) + { + try + { + await SyndicationFeedFormatter.MoveToStartElementAsync(reader); + SetDocument(await AtomPub10ServiceDocumentFormatter.ReadCategories(reader, null, + delegate () + { + return this.CreateInlineCategoriesDocument(); + }, + + delegate () + { + return this.CreateReferencedCategoriesDocument(); + }, + this.Version, + _preserveElementExtensions, + _preserveAttributeExtensions, + _maxExtensionSize)); + } + catch (FormatException e) + { + throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingDocument), e); + } + catch (ArgumentException e) + { + throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingDocument), e); + } + } + + private Task WriteDocumentAsync(XmlWriter writer) + { + // declare the atom10 namespace upfront for compactness + writer.WriteAttributeString(Atom10Constants.Atom10Prefix, Atom10FeedFormatter.XmlNsNs, Atom10Constants.Atom10Namespace); + return AtomPub10ServiceDocumentFormatter.WriteCategoriesInnerXml(writer, this.Document, null, this.Version); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/AtomPub10ServiceDocumentFormatter.cs b/src/System.ServiceModel.Syndication/src/AtomPub10ServiceDocumentFormatter.cs new file mode 100644 index 000000000000..eb9f66028f3f --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/AtomPub10ServiceDocumentFormatter.cs @@ -0,0 +1,793 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + + using Microsoft.ServiceModel.Syndication.Resources; + using System; + using System.Diagnostics.CodeAnalysis; + using System.Runtime.CompilerServices; + using System.Threading.Tasks; + using System.Xml; + using System.Xml.Schema; + using System.Xml.Serialization; + + internal delegate InlineCategoriesDocument CreateInlineCategoriesDelegate(); + internal delegate ReferencedCategoriesDocument CreateReferencedCategoriesDelegate(); + + [XmlRoot(ElementName = App10Constants.Service, Namespace = App10Constants.Namespace)] + public class AtomPub10ServiceDocumentFormatter : ServiceDocumentFormatter + { + private Type _documentType; + private int _maxExtensionSize; + private bool _preserveAttributeExtensions; + private bool _preserveElementExtensions; + + public AtomPub10ServiceDocumentFormatter() + : this(typeof(ServiceDocument)) + { + } + + public AtomPub10ServiceDocumentFormatter(Type documentTypeToCreate) + : base() + { + if (documentTypeToCreate == null) + { + throw new ArgumentNullException(nameof(documentTypeToCreate)); + } + if (!typeof(ServiceDocument).IsAssignableFrom(documentTypeToCreate)) + { + throw new ArgumentException(string.Format(SR.InvalidObjectTypePassed, nameof(documentTypeToCreate), nameof(ServiceDocument))); + } + _maxExtensionSize = int.MaxValue; + _preserveAttributeExtensions = true; + _preserveElementExtensions = true; + _documentType = documentTypeToCreate; + } + + public AtomPub10ServiceDocumentFormatter(ServiceDocument documentToWrite) + : base(documentToWrite) + { + // No need to check that the parameter passed is valid - it is checked by the c'tor of the base class + _maxExtensionSize = int.MaxValue; + _preserveAttributeExtensions = true; + _preserveElementExtensions = true; + _documentType = documentToWrite.GetType(); + } + + public override string Version + { + get { return App10Constants.Namespace; } + } + + public override Task CanReadAsync(XmlReader reader) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + + XmlReaderWrapper readerWrapper = XmlReaderWrapper.CreateFromReader(reader); + return readerWrapper.IsStartElementAsync(App10Constants.Service, App10Constants.Namespace); + } + + Task ReadXml(XmlReaderWrapper reader) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + + return ReadDocumentAsync(reader); + } + + Task WriteXml(XmlWriter writer) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + + if (this.Document == null) + { + throw new InvalidOperationException(SR.DocumentFormatterDoesNotHaveDocument); + } + + return WriteDocumentAsync(XmlWriterWrapper.CreateFromWriter(writer)); + } + + public override async Task ReadFromAsync(XmlReader reader) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + + XmlReaderWrapper wrappedReader = XmlReaderWrapper.CreateFromReader(reader); + await wrappedReader.MoveToContentAsync(); + + if (!await CanReadAsync(reader)) + { + throw new XmlException(string.Format(SR.UnknownDocumentXml, reader.LocalName, reader.NamespaceURI)); + } + + await ReadDocumentAsync(wrappedReader); + } + + public override async Task WriteToAsync(XmlWriter writer) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + + if (this.Document == null) + { + throw new InvalidOperationException(SR.DocumentFormatterDoesNotHaveDocument); + } + + writer = XmlWriterWrapper.CreateFromWriter(writer); + + await writer.WriteStartElementAsync(App10Constants.Prefix, App10Constants.Service, App10Constants.Namespace); + await WriteDocumentAsync(writer); + await writer.WriteEndElementAsync(); + } + + internal static async Task ReadCategories(XmlReaderWrapper reader, Uri baseUri, CreateInlineCategoriesDelegate inlineCategoriesFactory, CreateReferencedCategoriesDelegate referencedCategoriesFactory, string version, bool preserveElementExtensions, bool preserveAttributeExtensions, int maxExtensionSize) + { + string link = reader.GetAttribute(App10Constants.Href, string.Empty); + if (string.IsNullOrEmpty(link)) + { + InlineCategoriesDocument inlineCategories = inlineCategoriesFactory(); + await ReadInlineCategoriesAsync(reader, inlineCategories, baseUri, version, preserveElementExtensions, preserveAttributeExtensions, maxExtensionSize); + return inlineCategories; + } + else + { + ReferencedCategoriesDocument referencedCategories = referencedCategoriesFactory(); + await ReadReferencedCategoriesAsync(reader, referencedCategories, baseUri, new Uri(link, UriKind.RelativeOrAbsolute), version, preserveElementExtensions, preserveAttributeExtensions, maxExtensionSize); + return referencedCategories; + } + } + + + + internal static async Task WriteCategoriesInnerXml(XmlWriter writer, CategoriesDocument categories, Uri baseUri, string version) + { + Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(baseUri, categories.BaseUri); + if (baseUriToWrite != null) + { + WriteXmlBase(writer, baseUriToWrite); + } + + if (!string.IsNullOrEmpty(categories.Language)) + { + WriteXmlLang(writer, categories.Language); + } + + if (categories.IsInline) + { + await WriteInlineCategoriesContentAsync(XmlWriterWrapper.CreateFromWriter(writer), (InlineCategoriesDocument)categories, version); + } + else + { + WriteReferencedCategoriesContent(writer, (ReferencedCategoriesDocument)categories, version); + } + } + + protected override ServiceDocument CreateDocumentInstance() + { + if (_documentType == typeof(ServiceDocument)) + { + return new ServiceDocument(); + } + else + { + return (ServiceDocument)Activator.CreateInstance(_documentType); + } + } + + private static async Task ReadInlineCategoriesAsync(XmlReaderWrapper reader, InlineCategoriesDocument inlineCategories, Uri baseUri, string version, bool preserveElementExtensions, bool preserveAttributeExtensions, int _maxExtensionSize) + { + inlineCategories.BaseUri = baseUri; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + if (reader.LocalName == "base" && reader.NamespaceURI == Atom10FeedFormatter.XmlNs) + { + inlineCategories.BaseUri = FeedUtils.CombineXmlBase(inlineCategories.BaseUri, await reader.GetValueAsync()); + } + else if (reader.LocalName == "lang" && reader.NamespaceURI == Atom10FeedFormatter.XmlNs) + { + inlineCategories.Language = await reader.GetValueAsync(); + } + else if (reader.LocalName == App10Constants.Fixed && reader.NamespaceURI == string.Empty) + { + inlineCategories.IsFixed = (reader.Value == "yes"); + } + else if (reader.LocalName == Atom10Constants.SchemeTag && reader.NamespaceURI == string.Empty) + { + inlineCategories.Scheme = await reader.GetValueAsync(); + } + else + { + string ns = reader.NamespaceURI; + string name = reader.LocalName; + if (FeedUtils.IsXmlns(name, ns) || FeedUtils.IsXmlSchemaType(name, ns)) + { + continue; + } + string val = await reader.GetValueAsync(); + if (!TryParseAttribute(name, ns, val, inlineCategories, version)) + { + if (preserveAttributeExtensions) + { + inlineCategories.AttributeExtensions.Add(new XmlQualifiedName(reader.LocalName, reader.NamespaceURI), await reader.GetValueAsync()); + } + } + } + } + } + + await SyndicationFeedFormatter.MoveToStartElementAsync(reader); + bool isEmptyElement = reader.IsEmptyElement; + await reader.ReadStartElementAsync(); + if (!isEmptyElement) + { + XmlBuffer buffer = null; + XmlDictionaryWriter extWriter = null; + try + { + while (await reader.IsStartElementAsync()) + { + if (await reader.IsStartElementAsync(Atom10Constants.CategoryTag, Atom10Constants.Atom10Namespace)) + { + SyndicationCategory category = CreateCategory(inlineCategories); + await Atom10FeedFormatter.ReadCategoryAsync(reader, category, version, preserveAttributeExtensions, preserveElementExtensions, _maxExtensionSize); + if (category.Scheme == null) + { + category.Scheme = inlineCategories.Scheme; + } + + inlineCategories.Categories.Add(category); + } + else if (!TryParseElement(reader, inlineCategories, version)) + { + if (preserveElementExtensions) + { + var tuple = await SyndicationFeedFormatter.CreateBufferIfRequiredAndWriteNodeAsync(buffer, extWriter, reader, _maxExtensionSize); + buffer = tuple.Item1; + extWriter = tuple.Item2; + } + else + { + await reader.SkipAsync(); + } + } + } + LoadElementExtensions(buffer, extWriter, inlineCategories); + } + finally + { + if (extWriter != null) + { + extWriter.Close(); + } + } + + await reader.ReadEndElementAsync(); + } + } + + private static async Task ReadReferencedCategoriesAsync(XmlReaderWrapper reader, ReferencedCategoriesDocument referencedCategories, Uri baseUri, Uri link, string version, bool preserveElementExtensions, bool preserveAttributeExtensions, int maxExtensionSize) + { + referencedCategories.BaseUri = baseUri; + referencedCategories.Link = link; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + if (reader.LocalName == "base" && reader.NamespaceURI == Atom10FeedFormatter.XmlNs) + { + referencedCategories.BaseUri = FeedUtils.CombineXmlBase(referencedCategories.BaseUri, await reader.GetValueAsync()); + } + else if (reader.LocalName == "lang" && reader.NamespaceURI == Atom10FeedFormatter.XmlNs) + { + referencedCategories.Language = await reader.GetValueAsync(); + } + else if (reader.LocalName == App10Constants.Href && reader.NamespaceURI == string.Empty) + { + continue; + } + else + { + string ns = reader.NamespaceURI; + string name = reader.LocalName; + if (FeedUtils.IsXmlns(name, ns) || FeedUtils.IsXmlSchemaType(name, ns)) + { + continue; + } + + string val = await reader.GetValueAsync(); + if (!TryParseAttribute(name, ns, val, referencedCategories, version)) + { + if (preserveAttributeExtensions) + { + referencedCategories.AttributeExtensions.Add(new XmlQualifiedName(reader.LocalName, reader.NamespaceURI), await reader.GetValueAsync()); + } + } + } + } + } + + reader.MoveToElement(); + bool isEmptyElement = reader.IsEmptyElement; + await reader.ReadStartElementAsync(); + if (!isEmptyElement) + { + XmlBuffer buffer = null; + XmlDictionaryWriter extWriter = null; + try + { + while (await reader.IsStartElementAsync()) + { + if (!TryParseElement(reader, referencedCategories, version)) + { + if (preserveElementExtensions) + { + var tuple = await SyndicationFeedFormatter.CreateBufferIfRequiredAndWriteNodeAsync(buffer, extWriter, reader, maxExtensionSize); + buffer = tuple.Item1; + extWriter = tuple.Item2; + } + } + } + + LoadElementExtensions(buffer, extWriter, referencedCategories); + } + finally + { + if (extWriter != null) + { + extWriter.Close(); + } + } + + await reader.ReadEndElementAsync(); + } + } + + private static async Task WriteCategoriesAsync(XmlWriter writer, CategoriesDocument categories, Uri baseUri, string version) + { + await writer.WriteStartElementAsync(App10Constants.Prefix, App10Constants.Categories, App10Constants.Namespace); + await WriteCategoriesInnerXml(writer, categories, baseUri, version); + await writer.WriteEndElementAsync(); + } + + private static async Task WriteInlineCategoriesContentAsync(XmlWriter writer, InlineCategoriesDocument categories, string version) + { + writer = XmlWriterWrapper.CreateFromWriter(writer); + if (!string.IsNullOrEmpty(categories.Scheme)) + { + await writer.WriteAttributeStringAsync(Atom10Constants.SchemeTag, categories.Scheme); + } + // by default, categories are not fixed + if (categories.IsFixed) + { + await writer.WriteAttributeStringAsync(App10Constants.Fixed, "yes"); + } + + await WriteAttributeExtensionsAsync(writer, categories, version); + + for (int i = 0; i < categories.Categories.Count; ++i) + { + await Atom10FeedFormatter.WriteCategoryAsync(writer, categories.Categories[i], version); + } + + await WriteElementExtensionsAsync(writer, categories, version); + } + + private static void WriteReferencedCategoriesContent(XmlWriter writer, ReferencedCategoriesDocument categories, string version) + { + if (categories.Link != null) + { + writer.WriteAttributeString(App10Constants.Href, FeedUtils.GetUriString(categories.Link)); + } + + WriteAttributeExtensionsAsync(writer, categories, version); + WriteElementExtensionsAsync(writer, categories, version); + } + + private static void WriteXmlBase(XmlWriter writer, Uri baseUri) + { + writer.WriteAttributeString("xml", "base", Atom10FeedFormatter.XmlNs, FeedUtils.GetUriString(baseUri)); + } + + private static void WriteXmlLang(XmlWriter writer, string lang) + { + writer.WriteAttributeString("xml", "lang", Atom10FeedFormatter.XmlNs, lang); + } + + private async Task ReadCollection(XmlReaderWrapper reader, Workspace workspace) + { + ResourceCollectionInfo result = CreateCollection(workspace); + result.BaseUri = workspace.BaseUri; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + if (reader.LocalName == "base" && reader.NamespaceURI == Atom10FeedFormatter.XmlNs) + { + result.BaseUri = FeedUtils.CombineXmlBase(result.BaseUri, await reader.GetValueAsync()); + } + else if (reader.LocalName == App10Constants.Href && reader.NamespaceURI == string.Empty) + { + result.Link = new Uri(await reader.GetValueAsync(), UriKind.RelativeOrAbsolute); + } + else + { + string ns = reader.NamespaceURI; + string name = reader.LocalName; + if (FeedUtils.IsXmlns(name, ns) || FeedUtils.IsXmlSchemaType(name, ns)) + { + continue; + } + + string val = await reader.GetValueAsync(); + if (!TryParseAttribute(name, ns, val, result, this.Version)) + { + if (_preserveAttributeExtensions) + { + result.AttributeExtensions.Add(new XmlQualifiedName(reader.LocalName, reader.NamespaceURI), val); + } + } + } + } + } + + XmlBuffer buffer = null; + XmlDictionaryWriter extWriter = null; + + reader.ReadStartElement(); + try + { + while (await reader.IsStartElementAsync()) + { + if (await reader.IsStartElementAsync(Atom10Constants.TitleTag, Atom10Constants.Atom10Namespace)) + { + result.Title = await new Atom10FeedFormatter().ReadTextContentFromAsync(reader, "//app:service/app:workspace/app:collection/atom:title[@type]", _preserveAttributeExtensions); + } + else if (await reader.IsStartElementAsync(App10Constants.Categories, App10Constants.Namespace)) + { + result.Categories.Add(await ReadCategories(reader, + result.BaseUri, + delegate () + { + return CreateInlineCategories(result); + }, + + delegate () + { + return CreateReferencedCategories(result); + }, + this.Version, + _preserveElementExtensions, + _preserveAttributeExtensions, + _maxExtensionSize)); + } + else if (await reader.IsStartElementAsync(App10Constants.Accept, App10Constants.Namespace)) + { + result.Accepts.Add(reader.ReadElementString()); + } + else if (!TryParseElement(reader, result, this.Version)) + { + if (_preserveElementExtensions) + { + if (buffer == null) + { + buffer = new XmlBuffer(_maxExtensionSize); + extWriter = buffer.OpenSection(XmlDictionaryReaderQuotas.Max); + extWriter.WriteStartElement(Rss20Constants.ExtensionWrapperTag); + } + + await XmlReaderWrapper.WriteNodeAsync(extWriter, reader, false); + } + else + { + reader.Skip(); + } + } + } + + LoadElementExtensions(buffer, extWriter, result); + } + finally + { + if (extWriter != null) + { + extWriter.Close(); + } + } + + reader.ReadEndElement(); + return result; + } + + private async Task ReadDocumentAsync(XmlReaderWrapper reader) + { + ServiceDocument result = CreateDocumentInstance(); + try + { + await SyndicationFeedFormatter.MoveToStartElementAsync(reader); + bool elementIsEmpty = reader.IsEmptyElement; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + if (reader.LocalName == "lang" && reader.NamespaceURI == Atom10FeedFormatter.XmlNs) + { + result.Language = await reader.GetValueAsync(); + } + else if (reader.LocalName == "base" && reader.NamespaceURI == Atom10FeedFormatter.XmlNs) + { + result.BaseUri = new Uri(await reader.GetValueAsync(), UriKind.RelativeOrAbsolute); + } + else + { + string ns = reader.NamespaceURI; + string name = reader.LocalName; + if (FeedUtils.IsXmlns(name, ns) || FeedUtils.IsXmlSchemaType(name, ns)) + { + continue; + } + + string val = await reader.GetValueAsync(); + if (!TryParseAttribute(name, ns, val, result, this.Version)) + { + if (_preserveAttributeExtensions) + { + result.AttributeExtensions.Add(new XmlQualifiedName(reader.LocalName, reader.NamespaceURI), val); + } + } + } + } + } + XmlBuffer buffer = null; + XmlDictionaryWriter extWriter = null; + + await reader.ReadStartElementAsync(); + if (!elementIsEmpty) + { + try + { + while (await reader.IsStartElementAsync()) + { + if (await reader.IsStartElementAsync(App10Constants.Workspace, App10Constants.Namespace)) + { + result.Workspaces.Add(ReadWorkspace(reader, result).Result); + } + else if (!TryParseElement(reader, result, this.Version)) + { + if (_preserveElementExtensions) + { + var tuple = await SyndicationFeedFormatter.CreateBufferIfRequiredAndWriteNodeAsync(buffer, extWriter, reader, _maxExtensionSize); + buffer = tuple.Item1; + extWriter = tuple.Item2; + } + else + { + await reader.SkipAsync(); + } + } + } + + LoadElementExtensions(buffer, extWriter, result); + } + finally + { + if (extWriter != null) + { + extWriter.Close(); + } + } + } + + await reader.ReadEndElementAsync(); + } + catch (FormatException e) + { + throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingDocument), e); + } + catch (ArgumentException e) + { + new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingDocument), e); + } + + SetDocument(result); + } + + private async Task ReadWorkspace(XmlReaderWrapper reader, ServiceDocument document) + { + Workspace result = CreateWorkspace(document); + result.BaseUri = document.BaseUri; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + if (reader.LocalName == "base" && reader.NamespaceURI == Atom10FeedFormatter.XmlNs) + { + result.BaseUri = FeedUtils.CombineXmlBase(result.BaseUri,await reader.GetValueAsync()); + } + else + { + string ns = reader.NamespaceURI; + string name = reader.LocalName; + if (FeedUtils.IsXmlns(name, ns) || FeedUtils.IsXmlSchemaType(name, ns)) + { + continue; + } + + string val = await reader.GetValueAsync(); + if (!TryParseAttribute(name, ns, val, result, this.Version)) + { + if (_preserveAttributeExtensions) + { + result.AttributeExtensions.Add(new XmlQualifiedName(reader.LocalName, reader.NamespaceURI), val); + } + } + } + } + } + + XmlBuffer buffer = null; + XmlDictionaryWriter extWriter = null; + await reader.ReadStartElementAsync(); + try + { + while (await reader.IsStartElementAsync()) + { + if (await reader.IsStartElementAsync(Atom10Constants.TitleTag, Atom10Constants.Atom10Namespace)) + { + result.Title = await new Atom10FeedFormatter().ReadTextContentFromAsync(reader, "//app:service/app:workspace/atom:title[@type]", _preserveAttributeExtensions); + } + else if (await reader.IsStartElementAsync(App10Constants.Collection, App10Constants.Namespace)) + { + result.Collections.Add(ReadCollection(reader, result).Result); + } + else if (!TryParseElement(reader, result, this.Version)) + { + if (_preserveElementExtensions) + { + var tuple = await SyndicationFeedFormatter.CreateBufferIfRequiredAndWriteNodeAsync(buffer, extWriter, reader, _maxExtensionSize); + buffer = tuple.Item1; + extWriter = tuple.Item2; + } + else + { + await reader.SkipAsync(); + } + } + } + + LoadElementExtensions(buffer, extWriter, result); + } + finally + { + if (extWriter != null) + { + extWriter.Close(); + } + } + + await reader.ReadEndElementAsync(); + return result; + } + + private async Task WriteCollectionAsync(XmlWriter writer, ResourceCollectionInfo collection, Uri baseUri) + { + await writer.WriteStartElementAsync(App10Constants.Prefix, App10Constants.Collection, App10Constants.Namespace); + Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(baseUri, collection.BaseUri); + if (baseUriToWrite != null) + { + baseUri = collection.BaseUri; + WriteXmlBase(writer, baseUriToWrite); + } + + if (collection.Link != null) + { + await writer.WriteAttributeStringAsync(App10Constants.Href, FeedUtils.GetUriString(collection.Link)); + } + + await WriteAttributeExtensionsAsync(writer, collection, this.Version); + if (collection.Title != null) + { + await collection.Title.WriteToAsync(writer, Atom10Constants.TitleTag, Atom10Constants.Atom10Namespace); + } + + for (int i = 0; i < collection.Accepts.Count; ++i) + { + await writer.WriteElementStringAsync(App10Constants.Prefix, App10Constants.Accept, App10Constants.Namespace, collection.Accepts[i]); + } + + for (int i = 0; i < collection.Categories.Count; ++i) + { + await WriteCategoriesAsync(writer, collection.Categories[i], baseUri, this.Version); + } + + await WriteElementExtensionsAsync(writer, collection, this.Version); + await writer.WriteEndElementAsync(); + } + + private async Task WriteDocumentAsync(XmlWriter writer) + { + // declare the atom10 namespace upfront for compactness + await writer.WriteAttributeStringAsync(Atom10Constants.Atom10Prefix, Atom10FeedFormatter.XmlNsNs, Atom10Constants.Atom10Namespace); + if (!string.IsNullOrEmpty(this.Document.Language)) + { + WriteXmlLang(writer, this.Document.Language); + } + + Uri baseUri = this.Document.BaseUri; + if (baseUri != null) + { + WriteXmlBase(writer, baseUri); + } + + WriteAttributeExtensions(writer, this.Document, this.Version); + + for (int i = 0; i < this.Document.Workspaces.Count; ++i) + { + await WriteWorkspaceAsync(writer, this.Document.Workspaces[i], baseUri); + } + + await WriteElementExtensionsAsync(writer, this.Document, this.Version); + } + + private async Task WriteWorkspaceAsync(XmlWriter writer, Workspace workspace, Uri baseUri) + { + await writer.WriteStartElementAsync(App10Constants.Prefix, App10Constants.Workspace, App10Constants.Namespace); + Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(baseUri, workspace.BaseUri); + if (baseUriToWrite != null) + { + baseUri = workspace.BaseUri; + WriteXmlBase(writer, baseUriToWrite); + } + + WriteAttributeExtensions(writer, workspace, this.Version); + if (workspace.Title != null) + { + await workspace.Title.WriteToAsync(writer, Atom10Constants.TitleTag, Atom10Constants.Atom10Namespace); + } + + for (int i = 0; i < workspace.Collections.Count; ++i) + { + await WriteCollectionAsync(writer, workspace.Collections[i], baseUri); + } + + await WriteElementExtensionsAsync(writer, workspace, this.Version); + await writer.WriteEndElementAsync(); + } + } + + [XmlRoot(ElementName = App10Constants.Service, Namespace = App10Constants.Namespace)] + public class AtomPub10ServiceDocumentFormatter : AtomPub10ServiceDocumentFormatter + where TServiceDocument : ServiceDocument, new() + { + public AtomPub10ServiceDocumentFormatter() : + base(typeof(TServiceDocument)) + { + } + + public AtomPub10ServiceDocumentFormatter(TServiceDocument documentToWrite) + : base(documentToWrite) + { + } + + protected override ServiceDocument CreateDocumentInstance() + { + return new TServiceDocument(); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/CategoriesDocument.cs b/src/System.ServiceModel.Syndication/src/CategoriesDocument.cs new file mode 100644 index 000000000000..2f31cdd6517f --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/CategoriesDocument.cs @@ -0,0 +1,119 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Collections.Generic; + using System.Collections.ObjectModel; + using System.Runtime.CompilerServices; + using System.Threading.Tasks; + using System.Xml; + + public abstract class CategoriesDocument : IExtensibleSyndicationObject + { + private Uri _baseUri; + private ExtensibleSyndicationObject _extensions = new ExtensibleSyndicationObject(); + private string _language; + + internal CategoriesDocument() + { + } + + public Dictionary AttributeExtensions + { + get + { + return _extensions.AttributeExtensions; + } + } + + public Uri BaseUri + { + get { return _baseUri; } + set { _baseUri = value; } + } + + public SyndicationElementExtensionCollection ElementExtensions + { + get + { + return _extensions.ElementExtensions; + } + } + + public string Language + { + get { return _language; } + set { _language = value; } + } + + internal abstract bool IsInline + { + get; + } + + public static InlineCategoriesDocument Create(Collection categories) + { + return new InlineCategoriesDocument(categories); + } + + public static InlineCategoriesDocument Create(Collection categories, bool isFixed, string scheme) + { + return new InlineCategoriesDocument(categories, isFixed, scheme); + } + + public static ReferencedCategoriesDocument Create(Uri linkToCategoriesDocument) + { + return new ReferencedCategoriesDocument(linkToCategoriesDocument); + } + + public static async Task LoadAsync(XmlReader reader) + { + AtomPub10CategoriesDocumentFormatter formatter = new AtomPub10CategoriesDocumentFormatter(); + await formatter.ReadFromAsync(reader); + return formatter.Document; + } + + public CategoriesDocumentFormatter GetFormatter() + { + return new AtomPub10CategoriesDocumentFormatter(this); + } + + public void Save(XmlWriter writer) + { + this.GetFormatter().WriteTo(writer); + } + + protected internal virtual bool TryParseAttribute(string name, string ns, string value, string version) + { + return false; + } + + protected internal virtual bool TryParseElement(XmlReader reader, string version) + { + return false; + } + + protected internal virtual Task WriteAttributeExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteAttributeExtensionsAsync(writer); + } + + protected internal virtual Task WriteElementExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteElementExtensionsAsync(writer); + } + + internal void LoadElementExtensions(XmlReaderWrapper readerOverUnparsedExtensions, int maxExtensionSize) + { + _extensions.LoadElementExtensions(readerOverUnparsedExtensions, maxExtensionSize); + } + + internal void LoadElementExtensions(XmlBuffer buffer) + { + _extensions.LoadElementExtensions(buffer); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/CategoriesDocumentFormatter.cs b/src/System.ServiceModel.Syndication/src/CategoriesDocumentFormatter.cs new file mode 100644 index 000000000000..76a3e0261c37 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/CategoriesDocumentFormatter.cs @@ -0,0 +1,56 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.Serialization; + using System.Threading.Tasks; + using System.Xml; + + public abstract class CategoriesDocumentFormatter + { + private CategoriesDocument _document; + + protected CategoriesDocumentFormatter() + { + } + protected CategoriesDocumentFormatter(CategoriesDocument documentToWrite) + { + if (documentToWrite == null) + { + throw new ArgumentNullException(nameof(documentToWrite)); + } + _document = documentToWrite; + } + + public CategoriesDocument Document + { + get { return _document; } + } + + public abstract string Version + { get; } + + public abstract Task CanReadAsync(XmlReader reader); + public abstract Task ReadFromAsync(XmlReader reader); + public abstract Task WriteTo(XmlWriter writer); + + protected virtual InlineCategoriesDocument CreateInlineCategoriesDocument() + { + return new InlineCategoriesDocument(); + } + + protected virtual ReferencedCategoriesDocument CreateReferencedCategoriesDocument() + { + return new ReferencedCategoriesDocument(); + } + + protected virtual void SetDocument(CategoriesDocument document) + { + _document = document; + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/ExtensibleSyndicationObject.cs b/src/System.ServiceModel.Syndication/src/ExtensibleSyndicationObject.cs new file mode 100644 index 000000000000..6f1eb6c08f4e --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/ExtensibleSyndicationObject.cs @@ -0,0 +1,142 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Collections.ObjectModel; + using System.Collections.Generic; + using System.Xml; + using System.Threading.Tasks; + + // NOTE: This class implements Clone so if you add any members, please update the copy ctor + internal struct ExtensibleSyndicationObject : IExtensibleSyndicationObject + { + private Dictionary _attributeExtensions; + private SyndicationElementExtensionCollection _elementExtensions; + + private ExtensibleSyndicationObject(ExtensibleSyndicationObject source) + { + if (source._attributeExtensions != null) + { + _attributeExtensions = new Dictionary(); + foreach (XmlQualifiedName key in source._attributeExtensions.Keys) + { + _attributeExtensions.Add(key, source._attributeExtensions[key]); + } + } + else + { + _attributeExtensions = null; + } + if (source._elementExtensions != null) + { + _elementExtensions = new SyndicationElementExtensionCollection(source._elementExtensions); + } + else + { + _elementExtensions = null; + } + } + + public Dictionary AttributeExtensions + { + get + { + if (_attributeExtensions == null) + { + _attributeExtensions = new Dictionary(); + } + return _attributeExtensions; + } + } + + public SyndicationElementExtensionCollection ElementExtensions + { + get + { + if (_elementExtensions == null) + { + _elementExtensions = new SyndicationElementExtensionCollection(); + } + return _elementExtensions; + } + } + + private static XmlBuffer CreateXmlBuffer(XmlDictionaryReader unparsedExtensionsReader, int maxExtensionSize) + { + XmlBuffer buffer = new XmlBuffer(maxExtensionSize); + using (XmlDictionaryWriter writer = buffer.OpenSection(unparsedExtensionsReader.Quotas)) + { + writer.WriteStartElement(Rss20Constants.ExtensionWrapperTag); + while (unparsedExtensionsReader.IsStartElement()) + { + writer.WriteNode(unparsedExtensionsReader, false); + } + writer.WriteEndElement(); + } + buffer.CloseSection(); + buffer.Close(); + return buffer; + } + + internal void LoadElementExtensions(XmlReader readerOverUnparsedExtensions, int maxExtensionSize) + { + if (readerOverUnparsedExtensions == null) + { + throw new ArgumentNullException(nameof(readerOverUnparsedExtensions)); + } + + if (maxExtensionSize < 0) + { + throw new ArgumentOutOfRangeException(nameof(maxExtensionSize)); + } + XmlDictionaryReader r = XmlDictionaryReader.CreateDictionaryReader(readerOverUnparsedExtensions); + _elementExtensions = new SyndicationElementExtensionCollection(CreateXmlBuffer(r, maxExtensionSize)); + } + + + internal void LoadElementExtensions(XmlBuffer buffer) + { + _elementExtensions = new SyndicationElementExtensionCollection(buffer); + } + + internal async Task WriteAttributeExtensionsAsync(XmlWriter writer) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + + writer = XmlWriterWrapper.CreateFromWriter(writer); + + if (_attributeExtensions != null) + { + foreach (XmlQualifiedName qname in _attributeExtensions.Keys) + { + string value = _attributeExtensions[qname]; + await writer.WriteAttributeStringAsync(qname.Name, qname.Namespace, value); + } + } + } + + internal async Task WriteElementExtensionsAsync(XmlWriter writer) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + + if (_elementExtensions != null) + { + await _elementExtensions.WriteToAsync(writer); + } + } + + public ExtensibleSyndicationObject Clone() + { + return new ExtensibleSyndicationObject(this); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/FeedUtils.cs b/src/System.ServiceModel.Syndication/src/FeedUtils.cs new file mode 100644 index 000000000000..beb33eace4f5 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/FeedUtils.cs @@ -0,0 +1,145 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using Microsoft.ServiceModel.Syndication.Resources; + using System; + using System.Collections.ObjectModel; + using System.Globalization; + using System.Xml; + + internal static class FeedUtils + { + public static string AddLineInfo(XmlReader reader, string error) + { + IXmlLineInfo lineInfo = reader as IXmlLineInfo; + if (lineInfo != null && lineInfo.HasLineInfo()) + { + error = string.Format(CultureInfo.InvariantCulture, "{0} {1}", string.Format(SR.ErrorInLine, lineInfo.LineNumber, lineInfo.LinePosition), error); + } + return error; + } + + static internal Collection CloneCategories(Collection categories) + { + if (categories == null) + { + return null; + } + Collection result = new NullNotAllowedCollection(); + for (int i = 0; i < categories.Count; ++i) + { + result.Add(categories[i].Clone()); + } + return result; + } + + static internal Collection CloneLinks(Collection links) + { + if (links == null) + { + return null; + } + Collection result = new NullNotAllowedCollection(); + for (int i = 0; i < links.Count; ++i) + { + result.Add(links[i].Clone()); + } + return result; + } + + static internal Collection ClonePersons(Collection persons) + { + if (persons == null) + { + return null; + } + Collection result = new NullNotAllowedCollection(); + for (int i = 0; i < persons.Count; ++i) + { + result.Add(persons[i].Clone()); + } + return result; + } + + static internal TextSyndicationContent CloneTextContent(TextSyndicationContent content) + { + if (content == null) + { + return null; + } + return (TextSyndicationContent)(content.Clone()); + } + + internal static Uri CombineXmlBase(Uri rootBase, string newBase) + { + if (string.IsNullOrEmpty(newBase)) + { + return rootBase; + } + + Uri newBaseUri = new Uri(newBase, UriKind.RelativeOrAbsolute); + if (rootBase == null || newBaseUri.IsAbsoluteUri) + { + return newBaseUri; + } + + return new Uri(rootBase, newBase); + } + + internal static Uri GetBaseUriToWrite(Uri rootBase, Uri currentBase) + { + Uri uriToWrite; + if (rootBase == currentBase || currentBase == null) + { + uriToWrite = null; + } + else if (rootBase == null) + { + uriToWrite = currentBase; + } + else + { + // rootBase != currentBase and both are not null + // Write the relative base if possible + if (rootBase.IsAbsoluteUri && currentBase.IsAbsoluteUri && rootBase.IsBaseOf(currentBase)) + { + uriToWrite = rootBase.MakeRelativeUri(currentBase); + } + else + { + uriToWrite = currentBase; + } + } + return uriToWrite; + } + + static internal string GetUriString(Uri uri) + { + if (uri == null) + { + return null; + } + if (uri.IsAbsoluteUri) + { + return uri.AbsoluteUri; + } + else + { + return uri.ToString(); + } + } + + static internal bool IsXmlns(string name, string ns) + { + return name == "xmlns" || ns == "http://www.w3.org/2000/xmlns/"; + } + + internal static bool IsXmlSchemaType(string name, string ns) + { + return name == "type" && ns == "http://www.w3.org/2001/XMLSchema-instance"; + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/IExtensibleSyndicationObject.cs b/src/System.ServiceModel.Syndication/src/IExtensibleSyndicationObject.cs new file mode 100644 index 000000000000..38e070208585 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/IExtensibleSyndicationObject.cs @@ -0,0 +1,17 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System.Collections.Generic; + using System.Xml; + + internal interface IExtensibleSyndicationObject + { + Dictionary AttributeExtensions + { get; } + SyndicationElementExtensionCollection ElementExtensions + { get; } + } +} diff --git a/src/System.ServiceModel.Syndication/src/InlineCategoriesDocument.cs b/src/System.ServiceModel.Syndication/src/InlineCategoriesDocument.cs new file mode 100644 index 000000000000..7c21a2def293 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/InlineCategoriesDocument.cs @@ -0,0 +1,74 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System.Collections.Generic; + using System.Collections.ObjectModel; + using System.Runtime.CompilerServices; + + public class InlineCategoriesDocument : CategoriesDocument + { + private Collection _categories; + private bool _isFixed; + private string _scheme; + + public InlineCategoriesDocument() + { + } + + public InlineCategoriesDocument(IEnumerable categories) + : this(categories, false, null) + { + } + + public InlineCategoriesDocument(IEnumerable categories, bool isFixed, string scheme) + { + if (categories != null) + { + _categories = new NullNotAllowedCollection(); + foreach (SyndicationCategory category in categories) + { + _categories.Add(category); + } + } + _isFixed = isFixed; + _scheme = scheme; + } + + public Collection Categories + { + get + { + if (_categories == null) + { + _categories = new NullNotAllowedCollection(); + } + return _categories; + } + } + + public bool IsFixed + { + get { return _isFixed; } + set { _isFixed = value; } + } + + public string Scheme + { + get { return _scheme; } + set { _scheme = value; } + } + + internal override bool IsInline + { + get { return true; } + } + + internal protected virtual SyndicationCategory CreateCategory() + { + return new SyndicationCategory(); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/Microsoft.ServiceModel.Syndication.csproj.disabled b/src/System.ServiceModel.Syndication/src/Microsoft.ServiceModel.Syndication.csproj.disabled new file mode 100644 index 000000000000..7b1ac41ff36f --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/Microsoft.ServiceModel.Syndication.csproj.disabled @@ -0,0 +1,27 @@ + + + + netstandard2.0 + false + + + + + + + + True + True + SR.resx + + + + + + + + ResXFileCodeGenerator + SR.Designer.cs + + + \ No newline at end of file diff --git a/src/System.ServiceModel.Syndication/src/NullNotAllowedCollection.cs b/src/System.ServiceModel.Syndication/src/NullNotAllowedCollection.cs new file mode 100644 index 000000000000..e3d00150b452 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/NullNotAllowedCollection.cs @@ -0,0 +1,36 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Collections.ObjectModel; + + internal class NullNotAllowedCollection : Collection + where TCollectionItem : class + { + public NullNotAllowedCollection() + : base() + { + } + + protected override void InsertItem(int index, TCollectionItem item) + { + if (item == null) + { + throw new ArgumentNullException(nameof(item)); + } + base.InsertItem(index, item); + } + + protected override void SetItem(int index, TCollectionItem item) + { + if (item == null) + { + throw new ArgumentNullException(nameof(item)); + } + base.SetItem(index, item); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/RSSClasses/SyndicationTextInput.cs b/src/System.ServiceModel.Syndication/src/RSSClasses/SyndicationTextInput.cs new file mode 100644 index 000000000000..2a195215ac97 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/RSSClasses/SyndicationTextInput.cs @@ -0,0 +1,14 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + public class SyndicationTextInput + { + public string Description; + public string title; + public SyndicationLink link; + public string name; + } +} diff --git a/src/System.ServiceModel.Syndication/src/ReferencedCategoriesDocument.cs b/src/System.ServiceModel.Syndication/src/ReferencedCategoriesDocument.cs new file mode 100644 index 000000000000..a266d0da6140 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/ReferencedCategoriesDocument.cs @@ -0,0 +1,39 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Runtime.CompilerServices; + + public class ReferencedCategoriesDocument : CategoriesDocument + { + private Uri _link; + + public ReferencedCategoriesDocument() + { + } + + public ReferencedCategoriesDocument(Uri link) + : base() + { + if (link == null) + { + throw new ArgumentNullException(nameof(link)); + } + _link = link; + } + + public Uri Link + { + get { return _link; } + set { _link = value; } + } + + internal override bool IsInline + { + get { return false; } + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/ResourceCollectionInfo.cs b/src/System.ServiceModel.Syndication/src/ResourceCollectionInfo.cs new file mode 100644 index 000000000000..d8357877bbcf --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/ResourceCollectionInfo.cs @@ -0,0 +1,182 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Collections.Generic; + using System.Collections.ObjectModel; + using System.Runtime.CompilerServices; + using System.Threading.Tasks; + using System.Xml; + + public class ResourceCollectionInfo : IExtensibleSyndicationObject + { + private static IEnumerable s_singleEmptyAccept; + private Collection _accepts; + private Uri _baseUri; + private Collection _categories; + private ExtensibleSyndicationObject _extensions = new ExtensibleSyndicationObject(); + private Uri _link; + private TextSyndicationContent _title; + + public ResourceCollectionInfo() + { + } + + public ResourceCollectionInfo(string title, Uri link) + : this((title == null) ? null : new TextSyndicationContent(title), link) + { + } + + public ResourceCollectionInfo(TextSyndicationContent title, Uri link) + : this(title, link, null, null) + { + } + + public ResourceCollectionInfo(TextSyndicationContent title, Uri link, IEnumerable categories, bool allowsNewEntries) + : this(title, link, categories, (allowsNewEntries) ? null : CreateSingleEmptyAccept()) + { + } + + public ResourceCollectionInfo(TextSyndicationContent title, Uri link, IEnumerable categories, IEnumerable accepts) + { + if (title == null) + { + throw new ArgumentNullException(nameof(title)); + } + if (link == null) + { + throw new ArgumentNullException(nameof(link)); + } + _title = title; + _link = link; + if (categories != null) + { + _categories = new NullNotAllowedCollection(); + foreach (CategoriesDocument category in categories) + { + _categories.Add(category); + } + } + if (accepts != null) + { + _accepts = new NullNotAllowedCollection(); + foreach (string accept in accepts) + { + _accepts.Add(accept); + } + } + } + + public Collection Accepts + { + get + { + if (_accepts == null) + { + _accepts = new NullNotAllowedCollection(); + } + return _accepts; + } + } + + public Dictionary AttributeExtensions + { + get + { + return _extensions.AttributeExtensions; + } + } + + public Uri BaseUri + { + get { return _baseUri; } + set { _baseUri = value; } + } + + public Collection Categories + { + get + { + if (_categories == null) + { + _categories = new NullNotAllowedCollection(); + } + return _categories; + } + } + + public SyndicationElementExtensionCollection ElementExtensions + { + get + { + return _extensions.ElementExtensions; + } + } + + public Uri Link + { + get { return _link; } + set { _link = value; } + } + + public TextSyndicationContent Title + { + get { return _title; } + set { _title = value; } + } + + protected internal virtual InlineCategoriesDocument CreateInlineCategoriesDocument() + { + return new InlineCategoriesDocument(); + } + + protected internal virtual ReferencedCategoriesDocument CreateReferencedCategoriesDocument() + { + return new ReferencedCategoriesDocument(); + } + + protected internal virtual bool TryParseAttribute(string name, string ns, string value, string version) + { + return false; + } + + protected internal virtual bool TryParseElement(XmlReader reader, string version) + { + return false; + } + + protected internal virtual Task WriteAttributeExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteAttributeExtensionsAsync(writer); + } + + protected internal virtual Task WriteElementExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteElementExtensionsAsync(writer); + } + + internal void LoadElementExtensions(XmlReaderWrapper readerOverUnparsedExtensions, int maxExtensionSize) + { + _extensions.LoadElementExtensions(readerOverUnparsedExtensions, maxExtensionSize); + } + + internal void LoadElementExtensions(XmlBuffer buffer) + { + _extensions.LoadElementExtensions(buffer); + } + + private static IEnumerable CreateSingleEmptyAccept() + { + if (s_singleEmptyAccept == null) + { + List tmp = new List(1); + tmp.Add(string.Empty); + s_singleEmptyAccept = tmp.AsReadOnly(); + } + return s_singleEmptyAccept; + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/Resources/Resources.txt b/src/System.ServiceModel.Syndication/src/Resources/Resources.txt new file mode 100644 index 000000000000..07f2be0a42f2 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/Resources/Resources.txt @@ -0,0 +1,2694 @@ +XmlNodeIsNotAnElement=The XmlReader is not currently in a node of type Element. +InvalidSkipHours=The hour can't be lower than 0 or greater than 23. +NoIPEndpointsFoundForHost=No IPEndpoints were found for host {0}. +DnsResolveFailed=No DNS entries exist for host {0}. +RequiredAttributeMissing=Attribute '{0}' is required on element '{1}'. +UnsupportedCryptoAlgorithm=Crypto algorithm {0} not supported in this context. +CustomCryptoAlgorithmIsNotValidHashAlgorithm=The custom crypto algorithm '{0}' obtained using CryptoConfig is not a valid or supported hash algorithm. +InvalidClientCredentials=The client credential entered was invalid. +SspiErrorOrInvalidClientCredentials=Either the client credential was invalid or there was an error collecting the client credentials by the SSPI. +CustomCryptoAlgorithmIsNotValidAsymmetricSignature=The custom crypto algorithm '{0}' obtained using CryptoConfig is not a valid or supported asymmetric signature algorithm. +TokenSerializerNotSetonFederationProvider=The security token serializer must be specified on the security token provider. +IssuerBindingNotPresentInTokenRequirement=The key length '{0}' is not a multiple of 8 for symmetric keys. +IssuerChannelBehaviorsCannotContainSecurityCredentialsManager=The channel behaviors configured for the issuer address '{0}' cannot contain a behavior of type '{1}'. +ServiceBusyCountTrace=Operation Action={0} +SecurityTokenManagerCannotCreateProviderForRequirement=The security token manager cannot create a token provider for requirement '{0}'. +SecurityTokenManagerCannotCreateAuthenticatorForRequirement=The security token manager cannot create a token authenticator for requirement '{0}'. +FailedSignatureVerification=The signature verification failed. Please see inner exception for fault details. +SecurityTokenManagerCannotCreateSerializerForVersion=The security token manager cannot create a token serializer for security token version '{0}'. +SupportingSignatureIsNotDerivedFrom=The supporting signature is not signed with a derived key. The binding's supporting token parameter '{0}' requires key derivation. +PrimarySignatureWasNotSignedByDerivedKey=The primary signature is not signed with a derived key. The binding's primary token parameter '{0}' requires key derivation. +PrimarySignatureWasNotSignedByDerivedWrappedKey=The primary signature is not signed with a key derived from the encrypted key. The binding's token parameter '{0}' requires key derivation. +MessageWasNotEncryptedByDerivedWrappedKey=The message is not encrypted with a key derived from the encrypted key. The binding's token parameter '{0}' requires key derivation. +SecurityStateEncoderDecodingFailure=The DataProtectionSecurityStateEncoder is unable to decode the byte array. Ensure that a 'UserProfile' is loaded, if this is a 'web farm scenario' ensure all servers are running as the same user with the roaming profiles or provide a custom SecurityStateEncoder'. +SecurityStateEncoderEncodingFailure=The DataProtectionSecurityStateEncoder is unable to encode the byte array. Ensure that a 'UserProfile' is loaded, if this is a 'web farm scenario' ensure all servers are running as the same user with the roaming profiles or provide a custom SecurityStateEncoder'. +MessageWasNotEncryptedByDerivedEncryptionToken=The message is not encrypted with a key derived from the encryption token. The binding's token parameter '{0}' requires key derivation. +TokenAuthenticatorRequiresSecurityBindingElement=The security token manager requires the security binding element to be specified in order to create a token authenticator for requirement '{0}'. +TokenProviderRequiresSecurityBindingElement=The security token manager requires the security binding element to be specified in order to create a token provider for requirement '{0}'. +UnexpectedSecuritySessionCloseResponse=The security session received an unexpected close response from the other party. +UnexpectedSecuritySessionClose=The security session received an unexpected close from the other party. +CannotObtainSslConnectionInfo=The service was unable to verify the cipher strengths negotiated as part of the SSL handshake. +HeaderEncryptionNotSupportedInWsSecurityJan2004=SecurityVersion.WSSecurityJan2004 does not support header encryption. Header with name '{0}' and namespace '{1}' is configured for encryption. Consider using SecurityVersion.WsSecurity11 and above or use transport security to encrypt the full message. +EncryptedHeaderNotSigned=The Header ('{0}', '{1}') was encrypted but not signed. All encrypted headers outside the security header should be signed. +EncodingBindingElementDoesNotHandleReaderQuotas=Unable to obtain XmlDictionaryReaderQuotas from the Binding. If you have specified a custom EncodingBindingElement, verify that the EncodingBindingElement can handle XmlDictionaryReaderQuotas in its GetProperty() method. +HeaderDecryptionNotSupportedInWsSecurityJan2004=SecurityVersion.WSSecurityJan2004 does not support header decryption. Use SecurityVersion.WsSecurity11 and above or use transport security to encrypt the full message. +DecryptionFailed=Unable to decrypt an encrypted data block. Please verify that the encryption algorithm and keys used by the sender and receiver match. +AuthenticationManagerShouldNotReturnNull=The authenticate method in the ServiceAuthenticationManager returned null. If you do not want to return any authorization policies in the collection then return an empty ReadOnlyCollection instead. +ErrorSerializingSecurityToken=There was an error serializing the security token. Please see the inner exception for more details. +ErrorDeserializingKeyIdentifierClauseFromTokenXml=There was an error creating the security key identifier clause from the security token XML. Please see the inner exception for more details. +ErrorDeserializingTokenXml=There was an error deserializing the security token XML. Please see the inner exception for more details. +TokenRequirementDoesNotSpecifyTargetAddress=The token requirement '{0}' does not specify the target address. This is required by the token manager for creating the corresponding security token provider. +DerivedKeyNotInitialized=The derived key has not been computed for the security token. +IssuedKeySizeNotCompatibleWithAlgorithmSuite=The binding ('{0}', '{1}') has been configured with a security algorithm suite '{2}' that is incompatible with the issued token key size '{3}' specified on the binding. +IssuedTokenAuthenticationModeRequiresSymmetricIssuedKey=The IssuedToken security authentication mode requires the issued token to contain a symmetric key. +InvalidBearerKeyUsage=The binding ('{0}', '{1}') uses an Issued Token with Bearer Key Type in a invalid context. The Issued Token with a Bearer Key Type can only be used as a Signed Supporting token or a Signed Encrypted Supporting token. See the SecurityBindingElement.EndpointSupportingTokenParameters property. +MultipleIssuerEndpointsFound=Policy for multiple issuer endpoints was retrieved from '{0}' but the relying party's policy does not specify which issuer endpoint to use. One of the endpoints was selected as the issuer endpoint to use. If you are using svcutil, the other endpoints will be available in commented form in the configuration as . Check the configuration to ensure that the right issuer endpoint was selected. +MultipleAuthenticationManagersInServiceBindingParameters=The AuthenticationManager cannot be added to the binding parameters because the binding parameters already contains a AuthenticationManager '{0}'. If you are configuring a custom AuthenticationManager for the service, please first remove any existing AuthenticationManagers from the behaviors collection before adding the custom AuthenticationManager. +MultipleAuthenticationSchemesInServiceBindingParameters=The AuthenticationSchemes cannot be added to the binding parameters because the binding parameters already contains AuthenticationSchemes '{0}'. If you are configuring custom AuthenticationSchemes for the service, please first remove any existing AuthenticationSchemes from the behaviors collection before adding custom AuthenticationSchemes. +NoSecurityBindingElementFound=Unable to find a SecurityBindingElement. +MultipleSecurityCredentialsManagersInServiceBindingParameters=The ServiceCredentials cannot be added to the binding parameters because the binding parameters already contains a SecurityCredentialsManager '{0}'. If you are configuring custom credentials for the service, please first remove any existing ServiceCredentials from the behaviors collection before adding the custom credential. +MultipleSecurityCredentialsManagersInChannelBindingParameters=The ClientCredentials cannot be added to the binding parameters because the binding parameters already contains a SecurityCredentialsManager '{0}'. If you are configuring custom credentials for the channel, please first remove any existing ClientCredentials from the behaviors collection before adding the custom credential. +NoClientCertificate=The binding ('{0}', '{1}') has been configured with a MutualCertificateDuplexBindingElement that requires a client certificate. The client certificate is currently missing. +SecurityTokenParametersHasIncompatibleInclusionMode=The binding ('{0}', '{1}') is configured with a security token parameter '{2}' that has an incompatible security token inclusion mode '{3}'. Specify an alternate security token inclusion mode (for example, '{4}'). +CannotCreateTwoWayListenerForNegotiation=Unable to create a bi-directional (request-reply or duplex) channel for security negotiation. Please ensure that the binding is capable of creating a bi-directional channel. +NegotiationQuotasExceededFaultReason=There are too many active security negotiations or secure conversations at the service. Please retry later. +PendingSessionsExceededFaultReason=There are too many pending secure conversations on the server. Please retry later. +RequestSecurityTokenDoesNotMatchEndpointFilters=The RequestSecurityToken message does not match the endpoint filters the service '{0}' is expecting incoming messages to match. This may be because the RequestSecurityToken was intended to be sent to a different service. +SecuritySessionRequiresIssuanceAuthenticator=The security session requires a security token authenticator that implements '{0}'. '{1}' does not implement '{0}'. +SecuritySessionRequiresSecurityContextTokenCache=The security session requires a security token resolver that implements '{1}'. The security token resolver '{0}' does not implement '{1}'. +SessionTokenIsNotSecurityContextToken=The session security token authenticator returned a token of type '{0}'. The token type expected is '{1}'. +SessionTokenIsNotGenericXmlToken=The session security token provider returned a token of type '{0}'. The token type expected is '{1}'. +SecurityStandardsManagerNotSet=The security standards manager was not specified on '{0}'. +SecurityNegotiationMessageTooLarge=The security negotiation message with action '{0}' is larger than the maximum allowed buffer size '{1}'. If you are using a streamed transport consider increasing the maximum buffer size on the transport. +PreviousChannelDemuxerOpenFailed=The channel demuxer Open failed previously with exception '{0}'. +SecurityChannelListenerNotSet=The security channel listener was not specified on '{0}'. +SecurityChannelListenerChannelExtendedProtectionNotSupported=ExtendedProtectionPolicy specified a PolicyEnforcement of 'Always' which is not supported for the authentication mode requested. This prevents the ExtendedProtectionPolicy from being enforced. For StandardBindings use a SecurityMode of TransportWithMessageCredential and a ClientCredential type of Windows. For CustomBindings use SspiNegotiationOverTransport or KerberosOverTransport. Alternatively, specify a PolicyEnforcement of 'Never'. +SecurityChannelBindingMissing=ExtendedProtectionPolicy specified a PolicyEnforcement of 'Always' and a ChannelBinding was not found. This prevents the ExtendedProtectionPolicy from being enforced. Change the binding to make a ChannelBinding available, for StandardBindings use a SecurityMode of TransportWithMessageCredential and a ClientCredential type of Windows. For CustomBindings use SspiNegotiationOverTransport or KerberosOverTransport. Alternatively, specify a PolicyEnforcement of 'Never'. +SecuritySettingsLifetimeManagerNotSet=The security settings lifetime manager was not specified on '{0}'. +SecurityListenerClosing=The listener is not accepting new secure conversations because it is closing. +SecurityListenerClosingFaultReason=The server is not accepting new secure conversations currently because it is closing. Please retry later. +SslCipherKeyTooSmall=The cipher key negotiated by SSL is too small ('{0}' bits). Keys of such lengths are not allowed as they may result in information disclosure. Please configure the initiator machine to negotiate SSL cipher keys that are '{1}' bits or longer. +DerivedKeyTokenNonceTooLong=The length ('{0}' bytes) of the derived key's Nonce exceeds the maximum length ('{1}' bytes) allowed. +DerivedKeyTokenLabelTooLong=The length ('{0}' bytes) of the derived key's Label exceeds the maximum length ('{1}' bytes) allowed. +DerivedKeyTokenOffsetTooHigh=The derived key's Offset ('{0}' bytes) exceeds the maximum offset ('{1}' bytes) allowed. +DerivedKeyTokenGenerationAndLengthTooHigh=The derived key's generation ('{0}') and length ('{1}' bytes) result in a key derivation offset that is greater than the maximum offset ('{2}' bytes) allowed. +DerivedKeyLimitExceeded=The number of derived keys in the message has exceeded the maximum allowed number '{0}'. +WrappedKeyLimitExceeded=The number of encrypted keys in the message has exceeded the maximum allowed number '{0}'. +BufferQuotaExceededReadingBase64=Unable to finish reading Base64 data as the given buffer quota has been exceeded. Buffer quota: {0}. Consider increasing the MaxReceivedMessageSize quota on the TransportBindingElement. Please note that a very high value for MaxReceivedMessageSize will result in buffering a large message and might open the system to DOS attacks. +MessageSecurityDoesNotWorkWithManualAddressing=Manual addressing is not supported with message level security. Configure the binding ('{0}', '{1}') to use transport security or to not do manual addressing. +TargetAddressIsNotSet=The target service address was not specified on '{0}'. +IssuedTokenCacheNotSet=The issued token cache was not specified on '{0}'. +SecurityAlgorithmSuiteNotSet=The security algorithm suite was not specified on '{0}'. +SecurityTokenFoundOutsideSecurityHeader=A security token ('{0}', '{1}') was found outside the security header. The message may have been altered in transit. +SecurityTokenNotResolved=The SecurityTokenProvider '{0}' could not resolve the token. +SecureConversationCancelNotAllowedFaultReason=A secure conversation cancellation is not allowed by the binding. +BootstrapSecurityBindingElementNotSet=The security binding element for bootstrap security was not specified on '{0}'. +IssuerBuildContextNotSet=The context for building the issuer channel was not specified on '{0}'. +StsBindingNotSet=The binding to use to communicate to the federation service at '{0}' is not specified. +SslCertMayNotDoKeyExchange=It is likely that certificate '{0}' may not have a private key that is capable of key exchange or the process may not have access rights for the private key. Please see inner exception for detail. +SslCertMustHavePrivateKey=The certificate '{0}' must have a private key. The process must have access rights for the private key. +NoOutgoingEndpointAddressAvailableForDoingIdentityCheck=No outgoing EndpointAddress is available to check the identity on a message to be sent. +NoOutgoingEndpointAddressAvailableForDoingIdentityCheckOnReply=No outgoing EndpointAddress is available to check the identity on a received reply. +NoSigningTokenAvailableToDoIncomingIdentityCheck=No signing token is available to do an incoming identity check. +Psha1KeyLengthInvalid=The PSHA1 key length '{0}' is invalid. +CloneNotImplementedCorrectly=Clone() was not implemented properly by '{0}'. The cloned object was '{1}'. +BadIssuedTokenType=The issued token is of unexpected type '{0}'. Expected token type '{1}'. +OperationDoesNotAllowImpersonation=The service operation '{0}' that belongs to the contract with the '{1}' name and the '{2}' namespace does not allow impersonation. +RstrHasMultipleIssuedTokens=The RequestSecurityTokenResponse has multiple RequestedSecurityToken elements. +RstrHasMultipleProofTokens=The RequestSecurityTokenResponse has multiple RequestedProofToken elements. +ProofTokenXmlUnexpectedInRstr=The proof token XML element is not expected in the response. +InvalidKeyLengthRequested=The key length '{0}' requested is invalid. +IssuedSecurityTokenParametersNotSet=The security token parameters to use for the issued token are not set on '{0}'. +InvalidOrUnrecognizedAction=The message could not be processed because the action '{0}' is invalid or unrecognized. +UnsupportedTokenInclusionMode=Token inclusion mode '{0}' is not supported. +CannotImportProtectionLevelForContract=The policy to import a process cannot import a binding for contract ({0},{1}). The protection requirements for the binding are not compatible with a binding already imported for the contract. You must reconfigure the binding. +OnlyOneOfEncryptedKeyOrSymmetricBindingCanBeSelected=The symmetric security protocol can either be configured with a symmetric token provider and a symmetric token authenticator or an asymmetric token provider. It cannot be configured with both. +ClientCredentialTypeMustBeSpecifiedForMixedMode=ClientCredentialType.None is not valid for the TransportWithMessageCredential security mode. Specify a message credential type or use a different security mode. +SecuritySessionIdAlreadyPresentInFilterTable=The security session id '{0}' is already present in the filter table. +SupportingTokenNotProvided=A supporting token that satisfies parameters '{0}' and attachment mode '{1}' was not provided. +SupportingTokenIsNotEndorsing=The supporting token provided for parameters '{0}' did not endorse the primary signature. +SupportingTokenIsNotSigned=The supporting token provided for parameters '{0}' was not signed as part of the primary signature. +SupportingTokenIsNotEncrypted=The supporting token provided for parameters '{0}' was not encrypted. +BasicTokenNotExpected=A basic token is not expected in the security header in this context. +FailedAuthenticationTrustFaultCode=The request for security token could not be satisfied because authentication failed. +AuthenticationOfClientFailed=The caller was not authenticated by the service. +InvalidRequestTrustFaultCode=The request for security token has invalid or malformed elements. +SignedSupportingTokenNotExpected=A signed supporting token is not expected in the security header in this context. +SenderSideSupportingTokensMustSpecifySecurityTokenParameters=Security token parameters must be specified with supporting tokens for each message. +SignatureAndEncryptionTokenMismatch=The signature token '{0}' is not the same token as the encryption token '{1}'. +RevertingPrivilegeFailed=The reverting operation failed with the exception '{0}'. +UnknownSupportingToken=Unrecognized supporting token '{0}' was encountered. +MoreThanOneSupportingSignature=More than one supporting signature was encountered using the same supporting token '{0}'. +UnsecuredMessageFaultReceived=An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. +FailedAuthenticationFaultReason=At least one security token in the message could not be validated. +BadContextTokenOrActionFaultReason=The message could not be processed. This is most likely because the action '{0}' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding. +BadContextTokenFaultReason=The security context token is expired or is not valid. The message was not processed. +NegotiationFailedIO=Transport security negotiation failed due to an underlying IO error: {0}. +SecurityNegotiationCannotProtectConfidentialEndpointHeader=The security negotiation with '{0}' cannot be initiated because the confidential endpoint address header ('{1}', '{2}') cannot be encrypted during the course of the negotiation. +InvalidSecurityTokenFaultReason=An error occurred when processing the security tokens in the message. +InvalidSecurityFaultReason=An error occurred when verifying security for the message. +AnonymousLogonsAreNotAllowed=The service does not allow you to log on anonymously. +UnableToObtainIssuerMetadata=Obtaining metadata from issuer '{0}' failed with error '{1}'. +ErrorImportingIssuerMetadata=Importing metadata from issuer '{0}' failed with error '{1}'. +MultipleCorrelationTokensFound=Multiple correlation tokens were found in the security correlation state. +NoCorrelationTokenFound=No correlation token was found in the security correlation state. +MultipleSupportingAuthenticatorsOfSameType=Multiple supporting token authenticators with the token parameter type equal to '{0}' cannot be specified. If more than one Supporting Token of the same type is expected in the response, then configure the supporting token collection with just one entry for that SecurityTokenParameters. The SecurityTokenAuthenticator that gets created from the SecurityTokenParameters will be used to authenticate multiple tokens. It is not possible to add SecurityTokenParameters of the same type in the SupportingTokenParameters collection or repeat it across EndpointSupportingTokenParameters and OperationSupportingTokenParameters. +TooManyIssuedSecurityTokenParameters=A leg of the federated security chain contains multiple IssuedSecurityTokenParameters. The InfoCard system only supports one IssuedSecurityTokenParameters for each leg. +UnknownTokenAuthenticatorUsedInTokenProcessing=An unrecognized token authenticator '{0}' was used for token processing. +TokenMustBeNullWhenTokenParametersAre=The SecurityTokenParameters and SecurityToken tuple specified for use in the security header must both be null or must both be non-null. +SecurityTokenParametersCloneInvalidResult=The CloneCore method of {0} type returned an invalid result. +CertificateUnsupportedForHttpTransportCredentialOnly=Certificate-based client authentication is not supported in TransportCredentialOnly security mode. Select the Transport security mode. +BasicHttpMessageSecurityRequiresCertificate=BasicHttp binding requires that BasicHttpBinding.Security.Message.ClientCredentialType be equivalent to the BasicHttpMessageCredentialType.Certificate credential type for secure messages. Select Transport or TransportWithMessageCredential security for UserName credentials. +EntropyModeRequiresRequestorEntropy=The client must provide key entropy in key entropy mode '{0}'. +BearerKeyTypeCannotHaveProofKey=A Proof Token was found in the response that was returned by the Security Token Service for a Bearer Key Type token request. Note that Proof Tokens should not be generated when a Bearer Key Type request is made. +BearerKeyIncompatibleWithWSFederationHttpBinding=Bearer Key Type is not supported with WSFederationHttpBinding. Please use WS2007FederationHttpBinding. +UnableToCreateKeyTypeElementForUnknownKeyType=Unable to create Key Type element for the Key Type '{0}'. This might be due to a wrong version of MessageSecurityVersion set on the SecurityBindingElement. +EntropyModeCannotHaveProofTokenOrIssuerEntropy=The issuer cannot provide key entropy or a proof token in key entropy mode '{0}'. +EntropyModeCannotHaveRequestorEntropy=The client cannot provide key entropy in key entropy mode '{0}'. +EntropyModeRequiresProofToken=The issuer must provide a proof token in key entropy mode '{0}'. +EntropyModeRequiresComputedKey=The issuer must provide a computed key in key entropy mode '{0}'. +EntropyModeRequiresIssuerEntropy=The issuer must provide key entropy in key entropy mode '{0}'. +EntropyModeCannotHaveComputedKey=The issuer cannot provide a computed key in key entropy mode '{0}'. +UnknownComputedKeyAlgorithm=The computed key algorithm '{0}' is not supported. +NoncesCachedInfinitely=The ReplayWindow and ClockSkew cannot be the maximum possible value when replay detection is enabled. +ChannelMustBeOpenedToGetSessionId=The session channel must be opened before the session ID can be accessed. +SecurityVersionDoesNotSupportEncryptedKeyBinding=The binding ('{0}','{1}') for contract ('{2}','{3}') has been configured with an incompatible security version that does not support unattached references to EncryptedKeys. Use '{4}' or higher as the security version for the binding. +SecurityVersionDoesNotSupportThumbprintX509KeyIdentifierClause=The '{0}','{1}' binding for the '{2}','{3}' contract is configured with a security version that does not support external references to X.509 tokens using the certificate's thumbprint value. Use '{4}' or higher as the security version for the binding. +SecurityBindingSupportsOneWayOnly=The SecurityBinding for the ('{0}','{1}') binding for the ('{2}','{3}') contract only supports the OneWay operation. +DownlevelNameCannotMapToUpn=Cannot map Windows user '{0}' to a UserPrincipalName that can be used for S4U impersonation. +ResolvingExternalTokensRequireSecurityTokenParameters=Resolving an External reference token requires appropriate SecurityTokenParameters to be specified. +SecurityRenewFaultReason=The SecurityContextSecurityToken's key needs to be renewed. +ClientSecurityOutputSessionCloseTimeout=The client's security session was not able to close its output session within the configured timeout ({0}). +ClientSecurityNegotiationTimeout=Client is unable to finish the security negotiation within the configured timeout ({0}). The current negotiation leg is {1} ({2}). +ClientSecuritySessionRequestTimeout=Client is unable to request the security session within the configured timeout ({0}). +ServiceSecurityCloseOutputSessionTimeout=The service's security session was not able to close its output session within the configured timeout ({0}). +ServiceSecurityCloseTimeout=The service's security session did not receive a 'close' message from the client within the configured timeout ({0}). +ClientSecurityCloseTimeout=The client's security session did not receive a 'close response' message from the service within the configured timeout ({0}). +UnableToRenewSessionKey=Cannot renew the security session key. +SessionKeyRenewalNotSupported=Cannot renew the security session key. Session Key Renewal is not supported. +SctCookieXmlParseError=Error parsing SecurityContextSecurityToken Cookie XML. +SctCookieValueMissingOrIncorrect=The SecurityContextSecurityToken's Cookie element either does not contain '{0}' or has a wrong value for it. +SctCookieBlobDecodeFailure=Error decoding the Cookie element of SecurityContextSecurityToken. +SctCookieNotSupported=Issuing cookie SecurityContextSecurityToken is not supported. +CannotImportSupportingTokensForOperationWithoutRequestAction=Security policy import failed. The security policy contains supporting token requirements at the operation scope. The contract description does not specify the action for the request message associated with this operation. +SignatureConfirmationsNotExpected=Signature confirmation is not expected in the security header. +SignatureConfirmationsOccursAfterPrimarySignature=The signature confirmation elements cannot occur after the primary signature. +SignatureConfirmationWasExpected=Signature confirmation was expected to be present in the security header. +SecurityVersionDoesNotSupportSignatureConfirmation=The SecurityVersion '{0}' does not support signature confirmation. Use a later SecurityVersion. +SignatureConfirmationRequiresRequestReply=The protocol factory must support Request/Reply security in order to offer signature confirmation. +NotAllSignaturesConfirmed=Not all the signatures in the request message were confirmed in the reply message. +FoundUnexpectedSignatureConfirmations=The request did not have any signatures but the reply has signature confirmations. +TooManyPendingSessionKeys=There are too many renewed session keys that have not been used. +SecuritySessionKeyIsStale=The session key must be renewed before it can secure application messages. +MultipleMatchingCryptosFound=The token's crypto collection has multiple objects of type '{0}'. +CannotFindMatchingCrypto=The token's crypto collection does not support algorithm '{0}'. +SymmetricSecurityBindingElementNeedsProtectionTokenParameters=SymmetricSecurityBindingElement cannot build a channel or listener factory. The ProtectionTokenParameters property is required but not set. Binding element configuration: {0} +AsymmetricSecurityBindingElementNeedsInitiatorTokenParameters=AsymmetricSecurityBindingElement cannot build a channel or listener factory. The InitiatorTokenParameters property is required but not set. Binding element configuration: {0} +AsymmetricSecurityBindingElementNeedsRecipientTokenParameters=AsymmetricSecurityBindingElement cannot build a channel or listener factory. The RecipientTokenParameters property is required but not set. Binding element configuration: {0} +CachedNegotiationStateQuotaReached=The service cannot cache the negotiation state as the capacity '{0}' has been reached. Retry the request. +LsaAuthorityNotContacted=Internal SSL error (refer to Win32 status code for details). Check the server certificate to determine if it is capable of key exchange. +KeyRolloverGreaterThanKeyRenewal=The key rollover interval cannot be greater than the key renewal interval. +AtLeastOneContractOperationRequestRequiresProtectionLevelNotSupportedByBinding=The request message must be protected. This is required by an operation of the contract ('{0}','{1}'). The protection must be provided by the binding ('{2}','{3}'). +AtLeastOneContractOperationResponseRequiresProtectionLevelNotSupportedByBinding=The response message must be protected. This is required by an operation of the contract ('{0}', '{1}'). The protection must be provided by the binding ('{2}', '{3}'). +UnknownHeaderCannotProtected=The contract ('{0}','{1}') contains some unknown header ('{2}','{3}') which cannot be secured. Please choose ProtectionLevel.None for this header. +NoStreamingWithSecurity=The binding ('{0}','{1}') supports streaming which cannot be configured together with message level security. Consider choosing a different transfer mode or choosing the transport level security. +CurrentSessionTokenNotRenewed=The supporting token in the renew message has a different generation '{0}' than the current session token's generation '{1}'. +IncorrectSpnOrUpnSpecified=Security Support Provider Interface (SSPI) authentication failed. The server may not be running in an account with identity '{0}'. If the server is running in a service account (Network Service for example), specify the account's ServicePrincipalName as the identity in the EndpointAddress for the server. If the server is running in a user account, specify the account's UserPrincipalName as the identity in the EndpointAddress for the server. +IncomingSigningTokenMustBeAnEncryptedKey=For this security protocol, the incoming signing token must be an EncryptedKey. +SecuritySessionAbortedFaultReason=The security session was terminated This may be because no messages were received on the session for too long. +NoAppliesToPresent=No AppliesTo element is present in the deserialized RequestSecurityToken/RequestSecurityTokenResponse. +UnsupportedKeyLength=Symmetric Key length {0} is not supported by the algorithm suite '{1}'. +ForReplayDetectionToBeDoneRequireIntegrityMustBeSet=For replay detection to be done ProtectionLevel must be Sign or EncryptAndSign. +CantInferReferenceForToken=Can't infer an external reference for '{0}' token type. +TrustDriverIsUnableToCreatedNecessaryAttachedOrUnattachedReferences=Unable to create Attached or Unattached reference for '{0}'. +TrustDriverVersionDoesNotSupportSession=The configured Trust version does not support sessions. Use WSTrustFeb2005 or above. +TrustDriverVersionDoesNotSupportIssuedTokens=The configured WS-Trust version does not support issued tokens. WS-Trust February 2005 or later is required. +CannotPerformS4UImpersonationOnPlatform=The binding ('{0}','{1}') for contract ('{2}','{3}') supports impersonation only on Windows 2003 Server and newer version of Windows. Use SspiNegotiated authentication and a binding with Secure Conversation with cancellation enabled. +CannotPerformImpersonationOnUsernameToken=Impersonation using the client token is not possible. The binding ('{0}', '{1}') for contract ('{2}', '{3}') uses the Username Security Token for client authentication with a Membership Provider registered. Use a different type of security token for the client. +SecureConversationRequiredByReliableSession=Cannot establish a reliable session without secure conversation. Enable secure conversation. +RevertImpersonationFailure=Failed to revert impersonation. {0} +TransactionFlowRequiredIssuedTokens=In order to flow a transaction, flowing issued tokens must also be supported. +SignatureConfirmationNotSupported=The configured SecurityVersion does not support signature confirmation. Use WsSecurity11 or above. +SecureConversationDriverVersionDoesNotSupportSession=The configured SecureConversation version does not support sessions. Use WSSecureConversationFeb2005 or above. +SoapSecurityNegotiationFailed=SOAP security negotiation failed. See inner exception for more details. +SoapSecurityNegotiationFailedForIssuerAndTarget=SOAP security negotiation with '{0}' for target '{1}' failed. See inner exception for more details. +OneWayOperationReturnedFault=The one-way operation returned a fault message. The reason for the fault was '{0}'. +OneWayOperationReturnedLargeFault=The one-way operation returned a fault message with Action='{0}'. +OneWayOperationReturnedMessage=The one-way operation returned a non-null message with Action='{0}'. +CannotFindSecuritySession=Cannot find the security session with the ID '{0}'. +SecurityContextKeyExpired=The SecurityContextSecurityToken with Context-id={0} (generation-id={1}) has expired. +SecurityContextKeyExpiredNoKeyGeneration=The SecurityContextSecurityToken with Context-id={0} (no key generation-id) has expired. +SecuritySessionRequiresMessageIntegrity=Security sessions require all messages to be signed. +RequiredTimestampMissingInSecurityHeader=Required timestamp missing in security header. +ReceivedMessageInRequestContextNull=The request message in the request context received from channel '{0}' is null. +KeyLifetimeNotWithinTokenLifetime=The key effective and expiration times must be bounded by the token effective and expiration times. +EffectiveGreaterThanExpiration=The valid from time is greater than the valid to time. +NoSessionTokenPresentInMessage=No session token was present in the message. +KeyLengthMustBeMultipleOfEight=Key length '{0}' is not a multiple of 8 for symmetric keys. +InvalidX509RawData=Invalid binary representation of an X.509 certificate. +ExportOfBindingWithTransportSecurityBindingElementAndNoTransportSecurityNotSupported=Security policy export failed. The binding contains a TransportSecurityBindingElement but no transport binding element that implements ITransportTokenAssertionProvider. Policy export for such a binding is not supported. Make sure the transport binding element in the binding implements the ITransportTokenAssertionProvider interface. +UnsupportedSecureConversationBootstrapProtectionRequirements=Cannot import the security policy. The protection requirements for the secure conversation bootstrap binding are not supported. Protection requirements for the secure conversation bootstrap must require both the request and the response to be signed and encrypted. +UnsupportedBooleanAttribute=Cannot import the policy. The value of the attribute '{0}' must be either 'true', 'false', '1' or '0'. The following error occurred: '{1}'. +NoTransportTokenAssertionProvided=The security policy expert failed. The provided transport token assertion of type '{0}' did not create a transport token assertion to include the sp:TransportBinding security policy assertion. +PolicyRequiresConfidentialityWithoutIntegrity=Message security policy for the '{0}' action requires confidentiality without integrity. Confidentiality without integrity is not supported. +PrimarySignatureIsRequiredToBeEncrypted=The primary signature must be encrypted. +TokenCannotCreateSymmetricCrypto=A symmetric crypto could not be created from token '{0}'. +TokenDoesNotMeetKeySizeRequirements=The key size requirements for the '{0}' algorithm suite are not met by the '{1}' token which has key size of '{2}'. +MessageProtectionOrderMismatch=The received message does not meet the required message protection order '{0}'. +PrimarySignatureMustBeComputedBeforeSupportingTokenSignatures=Primary signature must be computed before supporting token signatures. +ElementToSignMustHaveId=Element to sign must have id. +StandardsManagerCannotWriteObject=The token Serializer cannot serialize '{0}'. If this is a custom type you must supply a custom serializer. +SigningWithoutPrimarySignatureRequiresTimestamp=Signing without primary signature requires timestamp. +OperationCannotBeDoneAfterProcessingIsStarted=This operation cannot be done after processing is started. +MaximumPolicyRedirectionsExceeded=The recursive policy fetching limit has been reached. Check to determine if there is a loop in the federation service chain. +InvalidAttributeInSignedHeader=The ('{0}', '{1}') signed header contains the ('{2}', '{3}') attribute. The expected attribute is ('{4}', '{5}'). +StsAddressNotSet=The address of the security token issuer is not specified. An explicit issuer address must be specified in the binding for target '{0}' or the local issuer address must be configured in the credentials. +MoreThanOneSecurityBindingElementInTheBinding=More than one SecurityBindingElement found in the binding ('{0}', '{1}) for contract ('{2}', '{3}'). Only one SecurityBindingElement is allowed. +ClientCredentialsUnableToCreateLocalTokenProvider=ClientCredentials cannot create a local token provider for token requirement {0}. +SecurityBindingElementCannotBeExpressedInConfig=A security policy was imported for the endpoint. The security policy contains requirements that cannot be represented in a Windows Communication Foundation configuration. Look for a comment about the SecurityBindingElement parameters that are required in the configuration file that was generated. Create the correct binding element with code. The binding configuration that is in the configuration file is not secure. +ConfigurationSchemaInsuffientForSecurityBindingElementInstance=The configuration schema is insufficient to describe the non-standard configuration of the following security binding element: +ConfigurationSchemaContainsX509IssuerSerialReference=The wsdl schema that was used to create this configuration file contained a 'RequireIssuerSerialReference' assertion for a X509Token. This can not be represented in configuration, you will need to programatically adjust the appropriate X509SecurityTokenParameters.X509KeyIdentifierClauseType to X509KeyIdentifierClauseType.IssuerSerial. The default of X509KeyIdentifierClauseType.Thumbprint will be used, which may cause interop issues. +;OperationCannotBeDoneOnReceiverSideSecurityHeaders=This operation cannot be done on the receiver security headers. +SecurityProtocolCannotDoReplayDetection=The security protocol '{0}' cannot do replay detection. +UnableToFindSecurityHeaderInMessage=Security processor was unable to find a security header with actor '{0}' in the message. This might be because the message is an unsecured fault or because there is a binding mismatch between the communicating parties. This can occur if the service is configured for security and the client is not using security. +UnableToFindSecurityHeaderInMessageNoActor=Security processor was unable to find a security header in the message. This might be because the message is an unsecured fault or because there is a binding mismatch between the communicating parties. This can occur if the service is configured for security and the client is not using security. +NoPrimarySignatureAvailableForSupportingTokenSignatureVerification=No primary signature available for supporting token signature verification. +SupportingTokenSignaturesNotExpected=Supporting token signatures not expected. +CannotReadToken=Cannot read the token from the '{0}' element with the '{1}' namespace for BinarySecretSecurityToken, with a '{2}' ValueType. If this element is expected to be valid, ensure that security is configured to consume tokens with the name, namespace and value type specified. +ExpectedElementMissing=Element '{0}' with namespace '{1}' not found. +ExpectedOneOfTwoElementsFromNamespace=Expected element '{0}' or element '{1}' (from namespace '{2}'). +RstDirectDoesNotExpectRstr=AcceleratedTokenAuthenticator does not expect RequestSecurityTokenResponse from the client. +RequireNonCookieMode=The '{0}' binding with the '{1}' namespace is configured to issue cookie security context tokens. COM+ Integration services does not support cookie security context tokens. +RequiredSignatureMissing=The signature must be in the security header. +RequiredMessagePartNotSigned=The '{0}' required message part was not signed. +RequiredMessagePartNotSignedNs=The '{0}', '{1}' required message part was not signed. +RequiredMessagePartNotEncrypted=The '{0}' required message part was not encrypted. +RequiredMessagePartNotEncryptedNs=The '{0}', '{1}' required message part was not encrypted. +SignatureVerificationFailed=Signature verification failed. +CannotIssueRstTokenType=Cannot issue the token type '{0}'. +NoNegotiationMessageToSend=There is no negotiation message to send. +InvalidIssuedTokenKeySize=The issued token has an invalid key size '{0}'. +CannotObtainIssuedTokenKeySize=Cannot determine the key size of the issued token. +NegotiationIsNotCompleted=The negotiation has not yet completed. +NegotiationIsCompleted=The negotiation has already completed. +MissingMessageID=Request Message is missing a MessageID header. One is required to correlate a reply. +SecuritySessionLimitReached=Cannot create a security session. Retry later. +SecuritySessionAlreadyPending=The security session with id '{0}' is already pending. +SecuritySessionNotPending=No security session with id '{0}' is pending. +SecuritySessionListenerNotFound=No security session listener was found for message with action '{0}'. +SessionTokenWasNotClosed=The session token was not closed by the server. +ProtocolMustBeInitiator='{0}' protocol can only be used by the Initiator. +ProtocolMustBeRecipient='{0}' protocol can only be used at the Recipient. +SendingOutgoingmessageOnRecipient=Unexpected code path for server security application, sending outgoing message on Recipient. +OnlyBodyReturnValuesSupported=Only body return values are supported currently for protection, MessagePartDescription was specified. +UnknownTokenAttachmentMode=Unknown token attachment mode: {0}. +ProtocolMisMatch=Security protocol must be '{0}', type is: '{1}'.; +AttemptToCreateMultipleRequestContext=The initial request context was already specified. Can not create two for same message. +ServerReceivedCloseMessageStateIsCreated={0}.OnCloseMessageReceived when state == Created. +ShutdownRequestWasNotReceived=Shutdown request was not received. +UnknownFilterType=Unknown filter type: '{0}'. +StandardsManagerDoesNotMatch=Standards manager of filter does not match that of filter table. Can not have two different filters. +FilterStrictModeDifferent=Session filter's isStrictMode differs from filter table's isStrictMode. +SSSSCreateAcceptor=SecuritySessionServerSettings.CreateAcceptor, channelAcceptor must be null, can not create twice. +TransactionFlowBadOption=Invalid TransactionFlowOption value. +TokenManagerCouldNotReadToken=Security token manager could not parse token with name '{0}', namespace '{1}', valueType '{2}'. +InvalidActionForNegotiationMessage=Security negotiation message has incorrect action '{0}'. +InvalidKeySizeSpecifiedInNegotiation=The specified key size {0} is invalid. The key size must be between {1} and {2}. +GetTokenInfoFailed=Could not get token information (error=0x{0:X}). +UnexpectedEndOfFile=Unexpected end of file. +TimeStampHasCreationAheadOfExpiry=The security timestamp is invalid because its creation time ('{0}') is greater than or equal to its expiration time ('{1}'). +TimeStampHasExpiryTimeInPast=The security timestamp is stale because its expiration time ('{0}') is in the past. Current time is '{1}' and allowed clock skew is '{2}'. +TimeStampHasCreationTimeInFuture=The security timestamp is invalid because its creation time ('{0}') is in the future. Current time is '{1}' and allowed clock skew is '{2}'. +TimeStampWasCreatedTooLongAgo=The security timestamp is stale because its creation time ('{0}') is too far back in the past. Current time is '{1}', maximum timestamp lifetime is '{2}' and allowed clock skew is '{3}'. +InvalidOrReplayedNonce=The nonce is invalid or replayed. +MessagePartSpecificationMustBeImmutable=Message part specification must be made constant before being set. +UnsupportedIssuerEntropyType=Issuer entropy is not BinarySecretSecurityToken or WrappedKeySecurityToken. +NoRequestSecurityTokenResponseElements=No RequestSecurityTokenResponse elements were found. +NoCookieInSct=The SecurityContextSecurityToken does not have a cookie. +TokenProviderReturnedBadToken=TokenProvider returned token of incorrect type '{0}'. +ItemNotAvailableInDeserializedRST={0} is not available in deserialized RequestSecurityToken. +ItemAvailableInDeserializedRSTOnly={0} is only available in a deserialized RequestSecurityToken. +ItemNotAvailableInDeserializedRSTR={0} is not available in deserialized RequestSecurityTokenResponse. +ItemAvailableInDeserializedRSTROnly={0} is only available in a deserialized RequestSecurityTokenResponse. +MoreThanOneRSTRInRSTRC=The RequestSecurityTokenResponseCollection received has more than one RequestSecurityTokenResponse element. Only one RequestSecurityTokenResponse element was expected. +Hosting_VirtualPathExtenstionCanNotBeDetached=VirtualPathExtension is not allowed to be removed. +Hosting_NotSupportedProtocol=The protocol '{0}' is not supported. +Hosting_BaseUriDeserializedNotValid=The BaseUriWithWildcard object has invalid fields after deserialization. +Hosting_RelativeAddressFormatError=Registered relativeAddress '{0}' in configuration file is not a valid one. Possible causes could be : You specified an empty addreess or an absolute address (i.e., starting with '/' or '\\'), or the address contains invalid character[s]. The supported relativeAddress formats are "[folder/]filename" or "~/[folder/]filename". +Hosting_NoAbsoluteRelativeAddress= '{0}' is an absolute address. The supported relativeAddress formats are "[subfolder/]filename" or "~/[subfolder/]filename". +SecureConversationNeedsBootstrapSecurity=Cannot create security binding element based on the configuration data. When secure conversation authentication mode is selected, the secure conversation bootstrap binding element must also be specified. +Hosting_MemoryGatesCheckFailedUnderPartialTrust=Setting minFreeMemoryPercentageToActivateService requires full trust privilege. Please change the application's trust level or remove this setting from the configuration file. +Hosting_CompatibilityServiceNotHosted=This service requires ASP.NET compatibility and must be hosted in IIS. Either host the service in IIS with ASP.NET compatibility turned on in web.config or set the AspNetCompatibilityRequirementsAttribute.AspNetCompatibilityRequirementsMode property to a value other than Required. +Hosting_MisformattedPort=The '{0}' protocol binding '{1}' specifies an invalid port number '{2}'. +Hosting_MisformattedBinding=The protocol binding '{0}' does not conform to the syntax for '{1}'. The following is an example of valid '{1}' protocol bindings: '{2}'. +Hosting_MisformattedBindingData=The protocol binding '{0}' is not valid for '{1}'. This might be because the port number is out of range. +Hosting_NoHttpTransportManagerForUri=There is no compatible TransportManager found for URI '{0}'. This may be because you have used an absolute address that points outside of the virtual application. Please use a relative address instead. +Hosting_NoTcpPipeTransportManagerForUri=There is no compatible TransportManager found for URI '{0}'. This may be because you have used an absolute address that points outside of the virtual application, or the binding settings of the endpoint do not match those that have been set by other services or endpoints. Note that all bindings for the same protocol should have the same settings in the same application. +Hosting_ProcessNotExecutingUnderHostedContext='{0}' cannot be invoked within the current hosting environment. This API requires that the calling application be hosted in IIS or WAS. +Hosting_ServiceActivationFailed=The requested service, '{0}' could not be activated. See the server's diagnostic trace logs for more information. +Hosting_ServiceTypeNotProvided=The value for the Service attribute was not provided in the ServiceHost directive. +SharedEndpointReadDenied=The service endpoint failed to listen on the URI '{0}' because access was denied. Verify that the current user is granted access in the appropriate allowAccounts section of SMSvcHost.exe.config. +SharedEndpointReadNotFound=The service endpoint failed to listen on the URI '{0}' because the shared memory section was not found. Verify that the '{1}' service is running. +SharedManagerBase=The TransportManager failed to listen on the supplied URI using the {0} service: {1}. +SharedManagerServiceStartFailure=failed to start the service ({0}). Refer to the Event Log for more details +SharedManagerServiceStartFailureDisabled=failed to start the service because it is disabled. An administrator can enable it by running 'sc.exe config {0} start= demand'. +SharedManagerServiceStartFailureNoError=failed to start the service. Refer to the Event Log for more details +SharedManagerServiceLookupFailure=failed to look up the service process in the SCM ({0}) +SharedManagerServiceSidLookupFailure=failed to look up the service SID in the SCM ({0}) +SharedManagerServiceEndpointReadFailure=failed to read the service's endpoint with native error code {0}. See inner exception for details +SharedManagerServiceSecurityFailed=the service failed the security checks +SharedManagerUserSidLookupFailure=failed to retrieve the UserSid of the service process ({0}) +SharedManagerCurrentUserSidLookupFailure=failed to retrieve the UserSid of the current process +SharedManagerLogonSidLookupFailure=failed to retrieve the LogonSid of the service process ({0}) +SharedManagerDataConnectionFailure=failed to establish a data connection to the service +SharedManagerDataConnectionCreateFailure=failed to create a data connection to the service +;SharedManagerDataConnectionTimeout=failed to establish the data connection to the service because of a timeout +SharedManagerDataConnectionPipeFailed=failed to establish the data connection because of an I/O error +SharedManagerVersionUnsupported=the version is not supported by the service +SharedManagerAllowDupHandleFailed=failed to grant the PROCESS_DUP_HANDLE access right to the target service's account SID '{0}'. +SharedManagerPathTooLong=the URI is too long +SharedManagerRegistrationQuotaExceeded=the quota was exceeded +SharedManagerProtocolUnsupported=the protocol is not supported +SharedManagerConflictingRegistration=the URI is already registered with the service +SharedManagerFailedToListen=the service failed to listen +Sharing_ConnectionDispatchFailed=The message could not be dispatched to the service at address '{0}'. Refer to the server Event Log for more details +Sharing_EndpointUnavailable=The message could not be dispatched because the service at the endpoint address '{0}' is unavailable for the protocol of the address. +Sharing_EmptyListenerEndpoint=The endpoint address for the NT service '{0}' read from shared memory is empty. +Sharing_ListenerProxyStopped=The message could not be dispatched because the transport manager has been stopped. This can happen if the application is being recycled or disabled. +UnexpectedEmptyElementExpectingClaim=The '{0}' from the '{1}' namespace is empty and does not specify a valid identity claim. +UnexpectedElementExpectingElement='{0}' from namespace '{1}' is not expected. Expecting element '{2}' from namespace '{3}' +UnexpectedDuplicateElement='{0}' from namespace '{1}' is not expected to appear more than once +UnsupportedSecurityPolicyAssertion=An unsupported security policy assertion was detected during the security policy import: {0} +MultipleIdentities=The extensions cannot contain an Identity if one is supplied as a constructor argument. +InvalidUriValue=Value '{0}' provided for '{1}' from namespace '{2}' is an invalid absolute URI. +BindingDoesNotSupportProtectionForRst=The binding ('{0}','{1}') for contract ('{2}','{3}') is configured with SecureConversation, but the authentication mode is not able to provide the request/reply-based integrity and confidentiality required for the negotiation. +TransportDoesNotProtectMessage=The '{0}'.'{1}' binding for the '{2}'.'{3}' contract is configured with an authentication mode that requires transport level integrity and confidentiality. However the transport cannot provide integrity and confidentiality. +BindingDoesNotSupportWindowsIdenityForImpersonation=The contract operation '{0}' requires Windows identity for automatic impersonation. A Windows identity that represents the caller is not provided by binding ('{1}','{2}') for contract ('{3}','{4}'. +ListenUriNotSet=A listen URI must be specified in order to open this {0}. +UnsupportedChannelInterfaceType=Channel interface type '{0}' is not supported. +TransportManagerOpen=This property cannot be changed after the transport manager has been opened. +TransportManagerNotOpen=This operation is only valid after the transport manager has been opened. +UnrecognizedIdentityType=Unrecognized identity type Name='{0}', Namespace='{1}'. +InvalidIdentityElement=Cannot read the Identity element. The Identity type is not supported or the Identity element is empty. +UnableToLoadCertificateIdentity=Cannot load the X.509 certificate identity specified in the configuration. +UnrecognizedClaimTypeForIdentity=The ClaimType '{0}' is not recognized. Expected ClaimType '{1}'. +AsyncCallbackException=An AsyncCallback threw an exception. +SendCannotBeCalledAfterCloseOutputSession=You cannot Send messages on a channel after CloseOutputSession has been called. +CommunicationObjectCannotBeModifiedInState=The communication object, {0}, cannot be modified while it is in the {1} state. +CommunicationObjectCannotBeModified=The communication object, {0}, cannot be modified unless it is in the Created state. +CommunicationObjectCannotBeUsed=The communication object, {0}, is in the {1} state. Communication objects cannot be used for communication unless they are in the Opened state. +CommunicationObjectFaulted1=The communication object, {0}, cannot be used for communication because it is in the Faulted state. +CommunicationObjectFaultedStack2=The communication object, {0}, cannot be used for communication because it is in the Faulted state: {1} +CommunicationObjectAborted1=The communication object, {0}, cannot be used for communication because it has been Aborted. +CommunicationObjectAbortedStack2=The communication object, {0}, cannot be used for communication because it has been Aborted: {1} +CommunicationObjectBaseClassMethodNotCalled=The communication object, {0}, has overridden the virtual function {1} but it does not call version defined in the base class. +CommunicationObjectInInvalidState=The communication object, {0}, is not part of WCF and is in an unsupported state '{1}'. This indicates an internal error in the implementation of that communication object. +CommunicationObjectCloseInterrupted1=The communication object, {0}, cannot be used due to an error that occurred during close. +ChannelFactoryCannotBeUsedToCreateChannels=A call to IChannelFactory.CreateChannel made on an object of type {0} failed because Open has not been called on this object. +ChannelParametersCannotBeModified=Cannot modify channel parameters because the {0} is in the {1} state. This operation is only supported in the Created state. +ChannelParametersCannotBePropagated=Cannot propagate channel parameters because the {0} is in the {1} state. This operation is only supported in the Opening or Opened state when the collection is locked. +OneWayInternalTypeNotSupported=Binding '{0}' is not configured properly. OneWayBindingElement requires an inner binding element that supports IRequestChannel/IReplyChannel or IDuplexSessionChannel. +ChannelTypeNotSupported=The specified channel type {0} is not supported by this channel manager. +SecurityContextMissing=SecurityContext for the UltimateReceiver role is missing from the SecurityContextProperty of the request message with action '{0}'. +SecurityContextDoesNotAllowImpersonation=Cannot start impersonation because the SecurityContext for the UltimateReceiver role from the request message with the '{0}' action is not mapped to a Windows identity. +InvalidEnumValue=Unexpected internal enum value: {0}. +InvalidDecoderStateMachine=Invalid decoder state machine. +OperationPropertyIsRequiredForAttributeGeneration=Operation property of OperationAttributeGenerationContext is required to generate an attribute based on settings. +InvalidMembershipProviderSpecifiedInConfig=The username/password Membership provider {0} specified in the configuration is invalid. No such provider was found registered under system.web/membership/providers. +InvalidRoleProviderSpecifiedInConfig=The RoleProvider {0} specified in the configuration is invalid. No such provider was found registered under system.web/roleManager/providers. +ObjectDisposed=The {0} object has been disposed. +InvalidReaderPositionOnCreateMessage=The XmlReader used for the body of the message must be positioned on an element. +DuplicateMessageProperty=A property with the name '{0}' already exists. +MessagePropertyNotFound=A property with the name '{0}' is not present. +HeaderAlreadyUnderstood=The message header with name '{0}' and namespace '{1}' is already present in the set of understood headers. +HeaderAlreadyNotUnderstood=The message header with name '{0}' and namespace '{1}' is not present in the set of understood headers. +MultipleMessageHeaders=Multiple headers with name '{0}' and namespace '{1}' found. +MultipleMessageHeadersWithActor=Multiple headers with name '{0}' and namespace '{1}' and role '{2}' found. +MultipleRelatesToHeaders= Multiple RelatesTo headers with relationship '{0}' found. Only one is allowed per relationship. +ExtraContentIsPresentInFaultDetail=Additional XML content is present in the fault detail element. Only a single element is allowed. +MessageIsEmpty=The body of the message cannot be read because it is empty. +MessageClosed=Message is closed. +StreamClosed=The operation cannot be completed because the stream is closed. +BodyWriterReturnedIsNotBuffered=The body writer returned from OnCreateBufferedCopy was not buffered. +BodyWriterCanOnlyBeWrittenOnce=The body writer does not support writing more than once because it is not buffered. +RstrKeySizeNotProvided=KeySize element not present in RequestSecurityTokenResponse. +RequestMessageDoesNotHaveAMessageID=A reply message cannot be created because the request message does not have a MessageID. +HeaderNotFound=There is not a header with name {0} and namespace {1} in the message. +MessageBufferIsClosed=MessageBuffer is closed. +MessageTextEncodingNotSupported=The text encoding '{0}' used in the text message format is not supported. +AtLeastOneFaultReasonMustBeSpecified=At least one fault reason must be specified. +NoNullTranslations=The translation set cannot contain nulls. +FaultDoesNotHaveAnyDetail=The fault does not have detail information. +InvalidXmlQualifiedName=Expected XML qualified name, found '{0}'. +UnboundPrefixInQName=Unbound prefix used in qualified name '{0}'. +MessageBodyIsUnknown=... +MessageBodyIsStream=... stream ... +MessageBodyToStringError=... Error reading body: {0}: {1} ... +NoMatchingTranslationFoundForFaultText=The fault reason does not contain any text translations. +CannotDetermineSPNBasedOnAddress=Client cannot determine the Service Principal Name based on the identity in the target address '{0}' for the purpose of SspiNegotiation/Kerberos. The target address identity must be a UPN identity (like acmedomain\\alice) or SPN identity (like host/bobs-machine). +XmlLangAttributeMissing=Required xml:lang attribute value is missing. +EncoderUnrecognizedCharSet=Unrecognized charSet '{0}' in contentType. +EncoderUnrecognizedContentType=Unrecognized contentType ({0}). Expected: {1}. +EncoderBadContentType=Cannot process contentType. +EncoderEnvelopeVersionMismatch=The envelope version of the incoming message ({0}) does not match that of the encoder ({1}). Make sure the binding is configured with the same version as the expected messages. +EncoderMessageVersionMismatch=The message version of the outgoing message ({0}) does not match that of the encoder ({1}). Make sure the binding is configured with the same version as the message. +MtomEncoderBadMessageVersion=MessageVersion '{0}' not supported by MTOM encoder. +ReadNotSupported=Read is not supported on this stream. +SeekNotSupported=Seek is not supported on this stream. +WriterAsyncWritePending=An asynchronous write is pending on the stream. Ensure that there are no uncompleted asynchronous writes before attempting the next write. +ChannelInitializationTimeout=A newly accepted connection did not receive initialization data from the sender within the configured ChannelInitializationTimeout ({0}). As a result, the connection will be aborted. If you are on a highly congested network, or your sending machine is heavily loaded, consider increasing this value or load-balancing your server. +SocketCloseReadTimeout=The remote endpoint of the socket ({0}) did not respond to a close request within the allotted timeout ({1}). It is likely that the remote endpoint is not calling Close after receiving the EOF signal (null) from Receive. The time allotted to this operation may have been a portion of a longer timeout. +SocketCloseReadReceivedData=A graceful close was attempted on the socket, but the other side ({0}) is still sending data. +PipeCantCloseWithPendingWrite=The pipe cannot be closed while a write to the pipe is pending. +PipeShutdownWriteError=The shutdown indicator could not be written to the pipe. The application on the other end of the pipe may not be listening for it. The pipe will still be closed. +PipeShutdownReadError=The shutdown indicator was not received from the pipe. The application on the other end of the pipe may not have sent it. The pipe will still be closed. +PipeNameCanNotBeAccessed=The pipe name could not be obtained for the pipe URI: {0} +PipeNameCanNotBeAccessed2=The pipe name could not be obtained for {0}. +PipeModeChangeFailed=The pipe was not able to be set to message mode: {0} +PipeCloseFailed=The pipe could not close gracefully. This may be caused by the application on the other end of the pipe exiting. +PipeAlreadyShuttingDown=The pipe cannot be written to because it is already in the process of shutting down. +PipeSignalExpected=The read from the pipe expected just a signal, but received actual data. +PipeAlreadyClosing=The pipe cannot be written to or read from because it is already in the process of being closed. +PipeAcceptFailed=Server cannot accept pipe: {0} +PipeListenFailed=Cannot listen on pipe '{0}': {1} +PipeNameInUse=Cannot listen on pipe name '{0}' because another pipe endpoint is already listening on that name. +PipeNameCantBeReserved=Cannot listen on pipe '{0}' because the pipe name could not be reserved: {1} +PipeListenerDisposed=The pipe listener has been disposed. +PipeListenerNotListening=Connections cannot be created until the pipe has started listening. Call Listen() before attempting to accept a connection. +PipeConnectAddressFailed=A pipe endpoint exists for '{0}', but the connect failed: {1} +PipeConnectFailed=Cannot connect to endpoint '{0}'. +PipeConnectTimedOut=Cannot connect to endpoint '{0}' within the allotted timeout of {1}. The time allotted to this operation may have been a portion of a longer timeout. +PipeConnectTimedOutServerTooBusy=Cannot connect to endpoint '{0}' within the allotted timeout of {1}. The server has likely reached the MaxConnections quota and is too busy to accept new connections. The time allotted to this operation may have been a portion of a longer timeout. +PipeEndpointNotFound=The pipe endpoint '{0}' could not be found on your local machine. +PipeUriSchemeWrong=URIs used with pipes must use the scheme: 'net.pipe'. +PipeWriteIncomplete=The pipe write did not write all the bytes. +PipeClosed=The operation cannot be completed because the pipe was closed. This may have been caused by the application on the other end of the pipe exiting. +PipeReadTimedOut=The read from the pipe did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. +PipeWriteTimedOut=The write to the pipe did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. +PipeConnectionAbortedReadTimedOut=The pipe connection was aborted because an asynchronous read from the pipe did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. +PipeConnectionAbortedWriteTimedOut=The pipe connection was aborted because an asynchronous write to the pipe did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. +PipeWriteError=There was an error writing to the pipe: {0}. +PipeReadError=There was an error reading from the pipe: {0}. +PipeUnknownWin32Error=Unrecognized error {0} (0x{1}) +PipeKnownWin32Error={0} ({1}, 0x{2}) +PipeWritePending=There is already a write in progress for the pipe. Wait for the first operation to complete before attempting to write again. +PipeReadPending=There is already a read in progress for the pipe. Wait for the first operation to complete before attempting to read again. +PipeDuplicationFailed=There was an error duplicating the. +SessionValueInvalid=The Session value '{0}' is invalid. Please specify 'CurrentSession','ServiceSession' or a valid non-negative Windows Session Id. +PackageFullNameInvalid=The package full name '{0}' is invalid. +SocketAbortedReceiveTimedOut=The socket was aborted because an asynchronous receive from the socket did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. +SocketAbortedSendTimedOut=The socket connection was aborted because an asynchronous send to the socket did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. +OperationInvalidBeforeSecurityNegotiation=This operation is not valid until security negotiation is complete. +FramingError=Error while reading message framing format at position {0} of stream (state: {1}) +FramingPrematureEOF=More data was expected, but EOF was reached. +FramingRecordTypeMismatch=Expected record type '{0}', found '{1}'. +FramingVersionNotSupported=Framing major version {0} is not supported. +FramingModeNotSupported=Framing mode {0} is not supported. +FramingSizeTooLarge=Specified size is too large for this implementation. +FramingViaTooLong=The framing via size ({0}) exceeds the quota. +FramingViaNotUri=The framing via ({0}) is not a valid URI. +FramingFaultTooLong=The framing fault size ({0}) exceeds the quota. +FramingContentTypeTooLong=The framing content type size ({0}) exceeds the quota. +FramingValueNotAvailable=The value cannot be accessed because it has not yet been fully decoded. +FramingAtEnd=An attempt was made to decode a value after the framing stream was ended. +RemoteSecurityNotNegotiatedOnStreamUpgrade=Stream Security is required at {0}, but no security context was negotiated. This is likely caused by the remote endpoint missing a StreamSecurityBindingElement from its binding. +BinaryEncoderSessionTooLarge=The binary encoder session information exceeded the maximum size quota ({0}). To increase this quota, use the MaxSessionSize property on the BinaryMessageEncodingBindingElement. +BinaryEncoderSessionInvalid=The binary encoder session is not valid. There was an error decoding a previous message. +BinaryEncoderSessionMalformed=The binary encoder session information is not properly formed. +ReceiveShutdownReturnedFault=The channel received an unexpected fault input message while closing. The fault reason given is: '{0}' +ReceiveShutdownReturnedLargeFault=The channel received an unexpected fault input message with Action = '{0}' while closing. You should only close your channel when you are not expecting any more input messages. +ReceiveShutdownReturnedMessage=The channel received an unexpected input message with Action '{0}' while closing. You should only close your channel when you are not expecting any more input messages. +MaxReceivedMessageSizeExceeded=The maximum message size quota for incoming messages ({0}) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. +MaxSentMessageSizeExceeded=The maximum message size quota for outgoing messages ({0}) has been exceeded. +FramingMaxMessageSizeExceeded=The maximum message size quota for incoming messages has been exceeded for the remote channel. See the server logs for more details. +StreamDoesNotSupportTimeout=TimeoutStream requires an inner Stream that supports timeouts; its CanTimeout property must be true. +FilterExists=The filter already exists in the filter table. +FilterUnexpectedError=An internal error has occurred. Unexpected error modifying filter table. +FilterNodeQuotaExceeded=The number of XML infoset nodes inspected by the navigator has exceeded the quota ({0}). +FilterCapacityNegative=Value cannot be negative. +ActionFilterEmptyList=The set of actions cannot be empty. +FilterUndefinedPrefix=The prefix '{0}' is not defined. +FilterMultipleMatches=Multiple filters matched. +FilterTableTypeMismatch=The type of IMessageFilterTable created for a particular Filter type must always be the same. +FilterTableInvalidForLookup=The MessageFilterTable state is corrupt. The requested lookup cannot be performed. +FilterBadTableType=The IMessageFilterTable created for a Filter cannot be a MessageFilterTable or a subclass of MessageFilterTable. +FilterQuotaRange=NodeQuota must be greater than 0. +FilterEmptyString=Parameter value cannot be an empty string. +FilterInvalidInner=Required inner element '{0}' was not found. +FilterInvalidAttribute=Invalid attribute on the XPath. +FilterInvalidDialect=When present, the dialect attribute must have the value '{0}'. +FilterCouldNotCompile=Could not compile the XPath expression '{0}' with the given XsltContext. +FilterReaderNotStartElem=XmlReader not positioned at a start element. +SeekableMessageNavInvalidPosition=The position is not valid for this navigator. +SeekableMessageNavNonAtomized=Cannot call '{0}' on a non-atomized navigator. +SeekableMessageNavIDNotSupported=XML unique ID not supported. +SeekableMessageNavBodyForbidden=A filter has attempted to access the body of a Message. Use a MessageBuffer instead if body filtering is required. +SeekableMessageNavOverrideForbidden=Not allowed to override prefix '{0}'. +QueryNotImplemented=The function '{0}' is not implemented. +QueryNotSortable=XPathNavigator positions cannot be compared. +QueryMustBeSeekable=XPathNavigator must be a SeekableXPathNavigator. +QueryContextNotSupportedInSequences=Context node is not supported in node sequences. +QueryFunctionTypeNotSupported=IXsltContextFunction return type '{0}' not supported. +QueryVariableTypeNotSupported=IXsltContextVariable type '{0}' not supported. +QueryVariableNull=IXsltContextVariables cannot return null. +QueryFunctionStringArg=The argument to an IXsltContextFunction could not be converted to a string. +QueryItemAlreadyExists=An internal error has occurred. Item already exists. +QueryBeforeNodes=Positioned before first element. +QueryAfterNodes=Positioned after last element. +QueryIteratorOutOfScope=The XPathNodeIterator has been invalidated. XPathNodeIterators passed as arguments to IXsltContextFunctions are only valid within the function. They cannot be cached for later use or returned as the result of the function. +QueryCantGetStringForMovedIterator=The string value can't be determined because the XPathNodeIterator has been moved past the first node. +MessageVersionToStringFormat={0} {1} +Addressing10ToStringFormat=Addressing10 ({0}) +Addressing200408ToStringFormat=Addressing200408 ({0}) +AddressingNoneToStringFormat=AddressingNone ({0}) +AddressingVersionNotSupported=Addressing Version '{0}' is not supported. +SupportedAddressingModeNotSupported=The '{0}' addressing mode is not supported. +Soap11ToStringFormat=Soap11 ({0}) +Soap12ToStringFormat=Soap12 ({0}) +EnvelopeNoneToStringFormat=EnvelopeNone ({0}) +MessagePropertyReturnedNullCopy=The IMessageProperty could not be copied. CreateCopy returned null. +MessageVersionUnknown=Unrecognized message version. +EnvelopeVersionUnknown=Unrecognized envelope version: {0}. +EnvelopeVersionNotSupported=Envelope Version '{0}' is not supported. +CannotDetectAddressingVersion=Cannot detect WS-Addressing version. EndpointReference does not start with an Element. +HeadersCannotBeAddedToEnvelopeVersion=Envelope Version '{0}' does not support adding Message Headers. +AddressingHeadersCannotBeAddedToAddressingVersion=Addressing Version '{0}' does not support adding WS-Addressing headers. +AddressingExtensionInBadNS=The element '{0}' in namespace '{1}' is not valid. This either means that element '{0}' is a duplicate element, or that it is not a legal extension because extension elements cannot be in the addressing namespace. +MessageHeaderVersionNotSupported=The '{0}' header cannot be added because it does not support the specified message version '{1}'. +MessageHasBeenCopied=This message cannot support the operation because it has been copied. +MessageHasBeenWritten=This message cannot support the operation because it has been written. +MessageHasBeenRead=This message cannot support the operation because it has been read. +InvalidMessageState=An internal error has occurred. Invalid MessageState. +MessageBodyReaderInvalidReadState=The body reader is in ReadState '{0}' and cannot be consumed. +XmlBufferQuotaExceeded=The size necessary to buffer the XML content exceeded the buffer quota. +XmlBufferInInvalidState=An internal error has occurred. The XML buffer is not in the correct state to perform the operation. +MessageBodyMissing=A body element was not found inside the message envelope. +MessageHeaderVersionMismatch=The version of the header(s) ({0}) differs from the version of the message ({1}). +ManualAddressingRequiresAddressedMessages=Manual addressing is enabled on this factory, so all messages sent must be pre-addressed. +OneWayHeaderNotFound=A one-way header was expected on this message and none was found. It is possible that your bindings are mismatched. +ReceiveTimedOut=Receive on local address {0} timed out after {1}. The time allotted to this operation may have been a portion of a longer timeout. +ReceiveTimedOut2=Receive timed out after {0}. The time allotted to this operation may have been a portion of a longer timeout. +WaitForMessageTimedOut=WaitForMessage timed out after {0}. The time allotted to this operation may have been a portion of a longer timeout. +ReceiveTimedOutNoLocalAddress=Receive timed out after {0}. The time allotted to this operation may have been a portion of a longer timeout. +ReceiveRequestTimedOutNoLocalAddress=Receive request timed out after {0}. The time allotted to this operation may have been a portion of a longer timeout. +ReceiveRequestTimedOut=Receive request on local address {0} timed out after {1}. The time allotted to this operation may have been a portion of a longer timeout. +SendToViaTimedOut=Sending to via {0} timed out after {1}. The time allotted to this operation may have been a portion of a longer timeout. +CloseTimedOut=Close timed out after {0}. Increase the timeout value passed to the call to Close or increase the CloseTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. +OpenTimedOutEstablishingTransportSession=Open timed out after {0} while establishing a transport session to {1}. The time allotted to this operation may have been a portion of a longer timeout. +RequestTimedOutEstablishingTransportSession=Request timed out after {0} while establishing a transport connection to {1}. The time allotted to this operation may have been a portion of a longer timeout. +TcpConnectingToViaTimedOut=Connecting to via {0} timed out after {1}. Connection attempts were made to {2} of {3} available addresses ({4}). Check the RemoteAddress of your channel and verify that the DNS records for this endpoint correspond to valid IP Addresses. The time allotted to this operation may have been a portion of a longer timeout. +RequestChannelSendTimedOut=The request channel timed out attempting to send after {0}. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. +RequestChannelWaitForReplyTimedOut=The request channel timed out while waiting for a reply after {0}. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. +HttpTransportCannotHaveMultipleAuthenticationSchemes=The policy being imported for contract '{0}:{1}' contains multiple HTTP authentication scheme assertions. Since at most one such assertion is allowed, policy import has failed. This may be resolved by updating the policy to contain no more than one HTTP authentication scheme assertion. +MultipleCCbesInParameters=More than one '{0}' objects were found in the BindingParameters of the BindingContext. This is usually caused by having multiple '{0}' objects in a CustomBinding. Remove all but one of these elements. +CookieContainerBindingElementNeedsHttp=The '{0}' can only be used with HTTP (or HTTPS) transport. +HttpIfModifiedSinceParseError=The value specified, '{0}', for the If-Modified-Since header does not parse into a valid date. Check the property value and ensure that it is of the proper format. +HttpSoapActionMismatch=The SOAP action specified on the message, '{0}', does not match the action specified on the HttpRequestMessageProperty, '{1}'. +HttpSoapActionMismatchContentType=The SOAP action specified on the message, '{0}', does not match the action specified in the content-type of the HttpRequestMessageProperty, '{1}'. +HttpSoapActionMismatchFault=The SOAP action specified on the message, '{0}', does not match the HTTP SOAP Action, '{1}'. +HttpContentTypeFormatException=An error ({0}) occurred while parsing the content type of the HTTP request. The content type was: {1}. +HttpServerTooBusy=The HTTP service located at {0} is unavailable. This could be because the service is too busy or because no endpoint was found listening at the specified address. Please ensure that the address is correct and try accessing the service again later. +HttpRequestAborted=The HTTP request to '{0}' was aborted. This may be due to the local channel being closed while the request was still in progress. If this behavior is not desired, then update your code so that it does not close the channel while request operations are still in progress. +HttpRequestTimedOut=The HTTP request to '{0}' has exceeded the allotted timeout of {1}. The time allotted to this operation may have been a portion of a longer timeout. +HttpResponseTimedOut=The HTTP request to '{0}' has exceeded the allotted timeout of {1} while reading the response. The time allotted to this operation may have been a portion of a longer timeout. +HttpTransferError=An error ({0}) occurred while transmitting data over the HTTP channel. +HttpReceiveFailure=An error occurred while receiving the HTTP response to {0}. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details. +HttpSendFailure=An error occurred while making the HTTP request to {0}. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server. +HttpAuthDoesNotSupportRequestStreaming=HTTP request streaming cannot be used in conjunction with HTTP authentication. Either disable request streaming or specify anonymous HTTP authentication. +ReplyAlreadySent=A reply has already been sent from this RequestContext. +HttpInvalidListenURI=Unable to start the HTTP listener. The URI provided, '{0}', is invalid for listening. Check the base address of your service and verify that it is a valid URI. +RequestContextAborted=The requestContext has been aborted. +ReceiveContextCannotBeUsed=The receive context, {0}, is in the {1} state. Receive contexts cannot be used for sending delayed acks unless they are in the Received state. +ReceiveContextInInvalidState=The receive context, {0}, is in an unsupported state '{1}'. This indicates an internal error in the implementation of that receive context. +ReceiveContextFaulted=The receive context, {0}, cannot be used for sending delayed acks because it is in the Faulted state. +UnrecognizedHostNameComparisonMode=Invalid HostNameComparisonMode value: {0}. +BadData=Invalid data buffer. +InvalidRenewResponseAction=A security session renew response was received with an invalid action '{0}'. +InvalidCloseResponseAction=A security session close response was received with an invalid action '{0}', +IncompatibleBehaviors=TransactedBatchingBehavior cannot be used when ReceiveContext is being used. +NullSessionRequestMessage=Could not formulate request message for security session operation '{0}'. +IssueSessionTokenHandlerNotSet=There is no handler registered for session token issuance event. +RenewSessionTokenHandlerNotSet=There is no handler registered for session token renew event. +WrongIdentityRenewingToken=The identity of the security session renew message does not match the identity of the session token. +InvalidRstRequestType=The RequestSecurityToken has an invalid or unspecified RequestType '{0}'. +NoCloseTargetSpecified=The RequestSecurityToken must specify a CloseTarget. +FailedSspiNegotiation=Secure channel cannot be opened because security negotiation with the remote endpoint has failed. This may be due to absent or incorrectly specified EndpointIdentity in the EndpointAddress used to create the channel. Please verify the EndpointIdentity specified or implied by the EndpointAddress correctly identifies the remote endpoint. +BadCloseTarget=The CloseTarget specified '{0}' does not identify the security token that signed the message. +RenewSessionMissingSupportingToken=The renew security session message does not have the session token as a supporting token. +NoRenewTargetSpecified=The RequestSecurityToken must specify a RenewTarget. +BadRenewTarget=There is no endorsing session token that matches the specified RenewTarget '{0}'. +BadEncryptedBody=Invalid format for encrypted body. +BadEncryptionState=The EncryptedData or EncryptedKey is in an invalid state for this operation. +NoSignaturePartsSpecified=No signature message parts were specified for messages with the '{0}' action. +NoEncryptionPartsSpecified=No encryption message parts were specified for messages with the '{0}' action. +SecuritySessionFaultReplyWasSent=The receiver sent back a security session fault message. Retry the request. +InnerListenerFactoryNotSet=The Inner listener factory of {0} must be set before this operation. +SecureConversationBootstrapCannotUseSecureConversation=Cannot create security binding element based on configuration data. The secure conversation bootstrap requires another secure conversation which is not supported. +InnerChannelFactoryWasNotSet=Cannot open ChannelFactory as the inner channel factory was not set during the initialization process. +SecurityProtocolFactoryDoesNotSupportDuplex=Duplex security is not supported by the security protocol factory '{0}'. +SecurityProtocolFactoryDoesNotSupportRequestReply=Request-reply security is not supported by the security protocol factory '{0}'. +SecurityProtocolFactoryShouldBeSetBeforeThisOperation=The security protocol factory must be set before this operation is performed. +SecuritySessionProtocolFactoryShouldBeSetBeforeThisOperation=Security session protocol factory must be set before this operation is performed. +SecureConversationSecurityTokenParametersRequireBootstrapBinding=Security channel or listener factory creation failed. Secure conversation security token parameters do not specify the bootstrap security binding element. +PropertySettingErrorOnProtocolFactory=The required '{0}' property on the '{1}' security protocol factory is not set or has an invalid value. +ProtocolFactoryCouldNotCreateProtocol=The protocol factory cannot create a protocol. +IdentityCheckFailedForOutgoingMessage=The identity check failed for the outgoing message. The expected identity is '{0}' for the '{1}' target endpoint. +IdentityCheckFailedForIncomingMessage=The identity check failed for the incoming message. The expected identity is '{0}' for the '{1}' target endpoint. +DnsIdentityCheckFailedForIncomingMessageLackOfDnsClaim=The Identity check failed for the incoming message. The remote endpoint did not provide a domain name system (DNS) claim and therefore did not satisfied DNS identity '{0}'. This may be caused by lack of DNS or CN name in the remote endpoint X.509 certificate's distinguished name. +DnsIdentityCheckFailedForOutgoingMessageLackOfDnsClaim=The Identity check failed for the outgoing message. The remote endpoint did not provide a domain name system (DNS) claim and therefore did not satisfied DNS identity '{0}'. This may be caused by lack of DNS or CN name in the remote endpoint X.509 certificate's distinguished name. +DnsIdentityCheckFailedForIncomingMessage=Identity check failed for incoming message. The expected DNS identity of the remote endpoint was '{0}' but the remote endpoint provided DNS claim '{1}'. If this is a legitimate remote endpoint, you can fix the problem by explicitly specifying DNS identity '{1}' as the Identity property of EndpointAddress when creating channel proxy. +DnsIdentityCheckFailedForOutgoingMessage=Identity check failed for outgoing message. The expected DNS identity of the remote endpoint was '{0}' but the remote endpoint provided DNS claim '{1}'. If this is a legitimate remote endpoint, you can fix the problem by explicitly specifying DNS identity '{1}' as the Identity property of EndpointAddress when creating channel proxy. +SerializedTokenVersionUnsupported=The serialized token version {0} is unsupported. +AuthenticatorNotPresentInRSTRCollection=The RequestSecurityTokenResponseCollection does not contain an authenticator. +RSTRAuthenticatorHasBadContext=The negotiation RequestSecurityTokenResponse has a different context from the authenticator RequestSecurityTokenResponse. +ServerCertificateNotProvided=The recipient did not provide its certificate. This certificate is required by the TLS protocol. Both parties must have access to their certificates. +RSTRAuthenticatorNotPresent=The authenticator was not included in the final leg of negotiation. +RSTRAuthenticatorIncorrect=The RequestSecurityTokenResponse CombinedHash is incorrect. +ClientCertificateNotProvided=The certificate for the client has not been provided. The certificate can be set on the ClientCredentials or ServiceCredentials. +ClientCertificateNotProvidedOnServiceCredentials=The client certificate is not provided. Specify a client certificate in ServiceCredentials. +ClientCertificateNotProvidedOnClientCredentials=The client certificate is not provided. Specify a client certificate in ClientCredentials. +ServiceCertificateNotProvidedOnServiceCredentials=The service certificate is not provided. Specify a service certificate in ServiceCredentials. +ServiceCertificateNotProvidedOnClientCredentials=The service certificate is not provided for target '{0}'. Specify a service certificate in ClientCredentials. +UserNamePasswordNotProvidedOnClientCredentials=The username is not provided. Specify username in ClientCredentials. +ObjectIsReadOnly=Object is read-only. +EmptyXmlElementError=Element {0} cannot be empty. +UnexpectedXmlChildNode=XML child node {0} of type {1} is unexpected for element {2}. +ContextAlreadyRegistered=The context-id={0} (generation-id={1}) is already registered with SecurityContextSecurityTokenAuthenticator. +ContextAlreadyRegisteredNoKeyGeneration=The context-id={0} (no key generation-id) is already registered with SecurityContextSecurityTokenAuthenticator. +ContextNotPresent=There is no SecurityContextSecurityToken with context-id={0} (generation-id={1}) registered with SecurityContextSecurityTokenAuthenticator. +ContextNotPresentNoKeyGeneration=There is no SecurityContextSecurityToken with context-id={0} (no key generation-id) registered with SecurityContextSecurityTokenAuthenticator. +InvalidSecurityContextCookie=The SecurityContextSecurityToken has an invalid Cookie. The following error occurred when processing the Cookie: '{0}'. +SecurityContextNotRegistered=The SecurityContextSecurityToken with context-id={0} (key generation-id={1}) is not registered. +SecurityContextExpired=The SecurityContextSecurityToken with context-id={0} (key generation-id={1}) has expired. +SecurityContextExpiredNoKeyGeneration=The SecurityContextSecurityToken with context-id={0} (no key generation-id) has expired. +NoSecurityContextIdentifier=The SecurityContextSecurityToken does not have a context-id. +MessageMustHaveViaOrToSetForSendingOnServerSideCompositeDuplexChannels=For sending a message on server side composite duplex channels, the message must have either the 'Via' property or the 'To' header set. +MessageViaCannotBeAddressedToAnonymousOnServerSideCompositeDuplexChannels=The 'Via' property on the message is set to Anonymous Uri '{0}'. Please set the 'Via' property to a non-anonymous address as message cannot be addressed to anonymous Uri on server side composite duplex channels. +MessageToCannotBeAddressedToAnonymousOnServerSideCompositeDuplexChannels=The 'To' header on the message is set to Anonymous Uri '{0}'. Please set the 'To' header to a non-anonymous address as message cannot be addressed to anonymous Uri on server side composite duplex channels. +SecurityBindingNotSetUpToProcessOutgoingMessages=This SecurityProtocol instance was not set up to process outgoing messages. +SecurityBindingNotSetUpToProcessIncomingMessages=This SecurityProtocol instance was not set up to process incoming messages. +TokenProviderCannotGetTokensForTarget=The token provider cannot get tokens for target '{0}'. +UnsupportedKeyDerivationAlgorithm=Key derivation algorithm '{0}' is not supported. +CannotFindCorrelationStateForApplyingSecurity=Cannot find the correlation state for applying security to reply at the responder. +ReplyWasNotSignedWithRequiredSigningToken=The reply was not signed with the required signing token. +EncryptionNotExpected=Encryption not expected for this message. +SignatureNotExpected=A signature is not expected for this message. +InvalidQName=The QName is invalid. +UnknownICryptoType=The ICrypto implementation '{0}' is not supported. +SameProtocolFactoryCannotBeSetForBothDuplexDirections=On DuplexSecurityProtocolFactory, the same protocol factory cannot be set for the forward and reverse directions. +SuiteDoesNotAcceptAlgorithm=The algorithm '{0}' is not accepted for operation '{1}' by algorithm suite {2}. +TokenDoesNotSupportKeyIdentifierClauseCreation='{0}' does not support '{1}' creation. +UnableToCreateICryptoFromTokenForSignatureVerification=Cannot create an ICrypto interface from the '{0}' token for signature verification. +MessageSecurityVerificationFailed=Message security verification failed. +TransportSecurityRequireToHeader=Transport secured messages should have the 'To' header specified. +TransportSecuredMessageMissingToHeader=The message received over Transport security was missing the 'To' header. +UnsignedToHeaderInTransportSecuredMessage=The message received over Transport security has unsigned 'To' header. +TransportSecuredMessageHasMoreThanOneToHeader=More than one 'To' header specified in a message secured by Transport Security. +TokenNotExpectedInSecurityHeader=Received security header contains unexpected token '{0}'. +CannotFindCert=Cannot find the X.509 certificate using the following search criteria: StoreName '{0}', StoreLocation '{1}', FindType '{2}', FindValue '{3}'. +CannotFindCertForTarget=Cannot find The X.509 certificate using the following search criteria: StoreName '{0}', StoreLocation '{1}', FindType '{2}', FindValue '{3}' for target '{4}'. +FoundMultipleCerts=Found multiple X.509 certificates using the following search criteria: StoreName '{0}', StoreLocation '{1}', FindType '{2}', FindValue '{3}'. Provide a more specific find value. +FoundMultipleCertsForTarget=Found multiple X.509 certificates using the following search criteria: StoreName '{0}', StoreLocation '{1}', FindType '{2}', FindValue '{3}' for target '{4}'. Provide a more specific find value. +MissingKeyInfoInEncryptedKey=The KeyInfo clause is missing or empty in EncryptedKey. +EncryptedKeyWasNotEncryptedWithTheRequiredEncryptingToken=The EncryptedKey clause was not wrapped with the required encryption token '{0}'. +MessageWasNotEncryptedWithTheRequiredEncryptingToken=The message was not encrypted with the required encryption token. +TimestampMustOccurFirstInSecurityHeaderLayout=The timestamp must occur first in this security header layout. +TimestampMustOccurLastInSecurityHeaderLayout=The timestamp must occur last in this security header layout. +AtMostOnePrimarySignatureInReceiveSecurityHeader=Only one primary signature is allowed in a security header. +SigningTokenHasNoKeys=The signing token {0} has no keys. The security token is used in a context that requires it to perform cryptographic operations, but the token contains no cryptographic keys. Either the token type does not support cryptographic operations, or the particular token instance does not contain cryptographic keys. Check your configuration to ensure that cryptographically disabled token types (for example, UserNameSecurityToken) are not specified in a context that requires cryptographic operations (for example, an endorsing supporting token). +SigningTokenHasNoKeysSupportingTheAlgorithmSuite=The signing token {0} has no key that supports the algorithm suite {1}. +DelayedSecurityApplicationAlreadyCompleted=Delayed security application has already been completed. +UnableToResolveKeyInfoClauseInDerivedKeyToken=Cannot resolve KeyInfo in derived key token for resolving source token: KeyInfoClause '{0}'. +UnableToDeriveKeyFromKeyInfoClause=KeyInfo clause '{0}' resolved to token '{1}', which does not contain a Symmetric key that can be used for derivation. +UnableToResolveKeyInfoForVerifyingSignature=Cannot resolve KeyInfo for verifying signature: KeyInfo '{0}', available tokens '{1}'. +UnableToResolveKeyInfoForUnwrappingToken=Cannot resolve KeyInfo for unwrapping key: KeyInfo '{0}', available tokens '{1}'. +UnableToResolveKeyInfoForDecryption=Cannot resolve KeyInfo for decryption: KeyInfo '{0}', available tokens '{1}'. +EmptyBase64Attribute=An empty value was found for the required base-64 attribute name '{0}', namespace '{1}'. +RequiredSecurityHeaderElementNotSigned=The security header element '{0}' with the '{1}' id must be signed. +RequiredSecurityTokenNotSigned=The '{0}' security token with the '{1}' attachment mode must be signed. +RequiredSecurityTokenNotEncrypted=The '{0}' security token with the '{1}' attachment mode must be encrypted. +MessageBodyOperationNotValidInBodyState=Operation '{0}' is not valid in message body state '{1}'. +EncryptedKeyWithReferenceListNotAllowed=EncryptedKey with ReferenceList is not allowed according to the current settings. +UnableToFindTokenAuthenticator=Cannot find a token authenticator for the '{0}' token type. Tokens of that type cannot be accepted according to current security settings. +NoPartsOfMessageMatchedPartsToSign=No signature was created because not part of the message matched the supplied message part specification. +BasicTokenCannotBeWrittenWithoutEncryption=Supporting SecurityToken cannot be written without encryption. +DuplicateIdInMessageToBeVerified=The '{0}' id occurred twice in the message that is supplied for verification. +UnsupportedCanonicalizationAlgorithm=Canonicalization algorithm '{0}' is not supported. +NoKeyInfoInEncryptedItemToFindDecryptingToken=The KeyInfo value was not found in the encrypted item to find the decrypting token. +NoKeyInfoInSignatureToFindVerificationToken=No KeyInfo in signature to find verification token. +SecurityHeaderIsEmpty=Security header is empty. +EncryptionMethodMissingInEncryptedData=The encryption method is missing in encrypted data. +EncryptedHeaderAttributeMismatch=The Encrypted Header and the Security Header '{0}' attribute did not match. Encrypted Header: {1}. Security Header: {2}. +AtMostOneReferenceListIsSupportedWithDefaultPolicyCheck=At most one reference list is supported with default policy check. +AtMostOneSignatureIsSupportedWithDefaultPolicyCheck=At most one signature is supported with default policy check. +UnexpectedEncryptedElementInSecurityHeader=Unexpected encrypted element in security header. +MissingIdInEncryptedElement=Id is missing in encrypted item in security header. +TokenManagerCannotCreateTokenReference=The supplied token manager cannot create a token reference. +TimestampToSignHasNoId=The timestamp element added to security header to sign has no id. +EncryptedHeaderXmlMustHaveId=An encrypted header must have an id. +UnableToResolveDataReference=The data reference '{0}' could not be resolved in the received message. +TimestampAlreadySetForSecurityHeader=A timestamp element has already been set for this security header. +DuplicateTimestampInSecurityHeader=More than one Timestamp element was present in security header. +MismatchInSecurityOperationToken=The incoming message was signed with a token which was different from what used to encrypt the body. This was not expected. +UnableToCreateSymmetricAlgorithmFromToken=Cannot create the '{0}' symmetric algorithm from the token. +UnknownEncodingInBinarySecurityToken=Unrecognized encoding occurred while reading the binary security token. +UnableToResolveReferenceUriForSignature=Cannot resolve reference URI '{0}' in signature to compute digest. +NoTimestampAvailableInSecurityHeaderToDoReplayDetection=No timestamp is available in the security header to do replay detection. +NoSignatureAvailableInSecurityHeaderToDoReplayDetection=No signature is available in the security header to provide the nonce for replay detection. +CouldNotFindNamespaceForPrefix=There is no namespace binding for prefix '{0}' in scope. +DerivedKeyCannotDeriveFromSecret=Derived Key Token cannot derive key from the secret. +DerivedKeyPosAndGenBothSpecified=Both offset and generation cannot be specified for Derived Key Token. +DerivedKeyPosAndGenNotSpecified=Either offset or generation must be specified for Derived Key Token. +DerivedKeyTokenRequiresTokenReference=DerivedKeyToken requires a reference to a token. +DerivedKeyLengthTooLong=DerivedKey length ({0}) exceeds the allowed settings ({1}). +DerivedKeyLengthSpecifiedInImplicitDerivedKeyClauseTooLong=The Implicit derived key clause '{0}' specifies a derivation key length ({1}) which exceeds the allowed maximum length ({2}). +DerivedKeyInvalidOffsetSpecified=The received derived key token has a invalid offset value specified. Value: {0}. The value should be greater than or equal to zero. +DerivedKeyInvalidGenerationSpecified=The received derived key token has a invalid generation value specified. Value: {0}. The value should be greater than or equal to zero. +ChildNodeTypeMissing=The XML element {0} does not have a child of type {1}. +NoLicenseXml=RequestedSecurityToken not specified in RequestSecurityTokenResponse. +UnsupportedBinaryEncoding=Binary encoding {0} is not supported. +BadKeyEncryptionAlgorithm=Invalid key encryption algorithm {0}. +InvalidAsyncResult=The asynchronous result object used to end this operation was not the object that was returned when the operation was initiated. +UnableToCreateTokenReference=Unable to create token reference. +ConfigNull=null +NonceLengthTooShort=The specified nonce is too short. The minimum required nonce length is 4 bytes. +NoBinaryNegoToSend=There is no binary negotiation to send to the other party. +BadSecurityNegotiationContext=Security negotiation failure because an incorrect Context attribute specified in RequestSecurityToken/RequestSecurityTokenResponse from the other party. +NoBinaryNegoToReceive=No binary negotiation was received from the other party. +ProofTokenWasNotWrappedCorrectly=The proof token was not wrapped correctly in the RequestSecurityTokenResponse. +NoServiceTokenReceived=Final RSTR from other party does not contain a service token. +InvalidSspiNegotiation=The Security Support Provider Interface (SSPI) negotiation failed. +CannotAuthenticateServer=Cannot authenticate the other party. +IncorrectBinaryNegotiationValueType=Incoming binary negotiation has invalid ValueType {0}. +ChannelNotOpen=The channel is not open. +FailToRecieveReplyFromNegotiation=Security negotiation failed because the remote party did not send back a reply in a timely manner. This may be because the underlying transport connection was aborted. +MessageSecurityVersionOutOfRange=SecurityVersion must be WsSecurity10 or WsSecurity11. +CreationTimeUtcIsAfterExpiryTime=Creation time must be before expiration time. +NegotiationStateAlreadyPresent=Negotiation state already exists for context '{0}'. +CannotFindNegotiationState=Cannot find the negotiation state for the context '{0}'. +OutputNotExpected=Send cannot be called when the session does not expect output. +SessionClosedBeforeDone=The session was closed before message transfer was complete. +CacheQuotaReached=The item cannot be added. The maximum cache size is ({0} items). +NoServerX509TokenProvider=The server's X509SecurityTokenProvider cannot be null. +UnexpectedBinarySecretType=Expected binary secret of type {0} but got secret of type {1}. +UnsupportedPasswordType=The '{0}' username token has an unsupported password type. +;NoPassword=No password specified for username '{0}'. +UnrecognizedIdentityPropertyType=Unrecognized identity property type: '{0}'. +UnableToDemuxChannel=There was no channel that could accept the message with action '{0}'. +EndpointNotFound=There was no endpoint listening at {0} that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. +MaxReceivedMessageSizeMustBeInIntegerRange=This factory buffers messages, so the message sizes must be in the range of an integer value. +MaxBufferSizeMustMatchMaxReceivedMessageSize=For TransferMode.Buffered, MaxReceivedMessageSize and MaxBufferSize must be the same value. +MaxBufferSizeMustNotExceedMaxReceivedMessageSize=MaxBufferSize must not exceed MaxReceivedMessageSize. +MessageSizeMustBeInIntegerRange=This Factory buffers messages, so the message sizes must be in the range of a int value. +UriLengthExceedsMaxSupportedSize=URI {0} could not be set because its size ({1}) exceeds the max supported size ({2}). +InValidateIdPrefix=Expecting first char - c - to be in set [Char.IsLetter(c) && c == '_', found '{0}'. +InValidateId=Expecting all chars - c - of id to be in set [Char.IsLetter(c), Char.IsNumber(c), '.', '_', '-'], found '{0}'. +HttpRegistrationAlreadyExists=HTTP could not register URL {0}. Another application has already registered this URL with HTTP.SYS. +HttpRegistrationAccessDenied=HTTP could not register URL {0}. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). +HttpRegistrationPortInUse=HTTP could not register URL {0} because TCP port {1} is being used by another application. +HttpRegistrationLimitExceeded=HTTP could not register URL {0} because the MaxEndpoints quota has been exceeded. To correct this, either close other HTTP-based services, or increase your MaxEndpoints registry key setting (see http://go.microsoft.com/fwlink/?LinkId=70352 for details). +UnexpectedHttpResponseCode=The remote server returned an unexpected response: ({0}) {1}. +HttpContentLengthIncorrect=The number of bytes available is inconsistent with the HTTP Content-Length header. There may have been a network error or the client may be sending invalid requests. +OneWayUnexpectedResponse=A response was received from a one-way send over the underlying IRequestChannel. Make sure the remote endpoint has a compatible binding at its endpoint (one that contains OneWayBindingElement). +MissingContentType=The receiver returned an error indicating that the content type was missing on the request to {0}. See the inner exception for more information. +DuplexChannelAbortedDuringOpen=Duplex channel to {0} was aborted during the open process. +OperationAbortedDuringConnectionEstablishment=Operation was aborted while establishing a connection to {0}. +HttpAddressingNoneHeaderOnWire=The incoming message contains a SOAP header representing the WS-Addressing '{0}', yet the HTTP transport is configured with AddressingVersion.None. As a result, the message is being dropped. If this is not desired, then update your HTTP binding to support a different AddressingVersion. +MessageXmlProtocolError=There is a problem with the XML that was received from the network. See inner exception for more details. +TcpV4AddressInvalid=An IPv4 address was specified ({0}), but IPv4 is not enabled on this machine. +TcpV6AddressInvalid=An IPv6 address was specified ({0}), but IPv6 is not enabled on this machine. +UniquePortNotAvailable=Cannot find a unique port number that is available for both IPv4 and IPv6. +TcpAddressInUse=There is already a listener on IP endpoint {0}. This could happen if there is another application already listening on this endpoint or if you have multiple service endpoints in your service host with the same IP endpoint but with incompatible binding configurations. +TcpConnectNoBufs=Insufficient winsock resources available to complete socket connection initiation. +InsufficentMemory=Insufficient memory avaliable to complete the operation. +TcpConnectError=Could not connect to {0}. TCP error code {1}: {2}. +TcpConnectErrorWithTimeSpan=Could not connect to {0}. The connection attempt lasted for a time span of {3}. TCP error code {1}: {2}. +TcpListenError=A TCP error ({0}: {1}) occurred while listening on IP Endpoint={2}. +TcpTransferError=A TCP error ({0}: {1}) occurred while transmitting data. +TcpTransferErrorWithIP=A TCP error ({0}: {1}) occurred while transmitting data. The local IP address and port is {2}. The remote IP address and port is {3}. +TcpLocalConnectionAborted=The socket connection was aborted by your local machine. This could be caused by a channel Abort(), or a transmission error from another thread using this socket. +HttpResponseAborted=The HTTP request context was aborted while writing the response. As a result, the response may not have been completely written to the network. This can be remedied by gracefully closing the request context rather than aborting it. +TcpConnectionResetError=The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '{0}'. +TcpConnectionResetErrorWithIP=The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '{0}'. The local IP address and port is {1}. The remote IP address and port is {2}. +TcpConnectionTimedOut=The socket transfer timed out after {0}. You have exceeded the timeout set on your binding. The time allotted to this operation may have been a portion of a longer timeout. +TcpConnectionTimedOutWithIP=The socket transfer timed out after {0}. You have exceeded the timeout set on your binding. The time allotted to this operation may have been a portion of a longer timeout. The local IP address and port is {1}. The remote IP address and port is {2}. +SocketConnectionDisposed=The socket connection has been disposed. +SocketListenerDisposed=The socket listener has been disposed. +SocketListenerNotListening=The socket listener is not listening. +DuplexSessionListenerNotFound=No duplex session listener was listening at {0}. This could be due to an incorrect via set on the client or a binding mismatch. +HttpTargetNameDictionaryConflict=The entry found in AuthenticationManager's CustomTargetNameDictionary for {0} does not match the requested identity of {1}. +HttpContentTypeHeaderRequired=An HTTP Content-Type header is required for SOAP messaging and none was found. +ContentTypeMismatch=Content Type {0} was sent to a service expecting {1}. The client and service bindings may be mismatched. +ResponseContentTypeMismatch=The content type {0} of the response message does not match the content type of the binding ({1}). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first {2} bytes of the response were: '{3}'. +ResponseContentTypeNotSupported=The content type {0} of the message is not supported by the encoder. +HttpToMustEqualVia=The binding specified requires that the to and via URIs must match because the Addressing Version is set to None. The to URI specified was '{0}'. The via URI specified was '{1}'. +NullReferenceOnHttpResponse=The server challenged this request and streamed requests cannot be resubmitted. To enable HTTP server challenges, set your TransferMode to Buffered or StreamedResponse. +FramingContentTypeMismatch=Content Type {0} was not supported by service {1}. The client and service bindings may be mismatched. +FramingFaultUnrecognized=Server faulted with code '{0}'. +FramingContentTypeTooLongFault=Content type '{0}' is too long to be processed by the remote host. See the server logs for more details. +FramingViaTooLongFault=Via '{0}' is too long to be processed by the remote host. See the server logs for more details. +FramingModeNotSupportedFault=The .Net Framing mode being used is not supported by '{0}'. See the server logs for more details. +FramingVersionNotSupportedFault=The .Net Framing version being used is not supported by '{0}'. See the server logs for more details. +FramingUpgradeInvalid=The requested upgrade is not supported by '{0}'. This could be due to mismatched bindings (for example security enabled on the client and not on the server). +SecurityServerTooBusy=Server '{0}' sent back a fault indicating it is too busy to process the request. Please retry later. Please see the inner exception for fault details. +SecurityEndpointNotFound=Server '{0}' sent back a fault indicating it is in the process of shutting down. Please see the inner exception for fault details. +ServerTooBusy=Server '{0}' is too busy to process this request. Try again later. +UpgradeProtocolNotSupported=Protocol Type {0} was sent to a service that does not support that type of upgrade. +UpgradeRequestToNonupgradableService=.Net Framing upgrade request for {0} was sent to a service that is not setup to receive upgrades. +PreambleAckIncorrect=You have tried to create a channel to a service that does not support .Net Framing. +PreambleAckIncorrectMaybeHttp=You have tried to create a channel to a service that does not support .Net Framing. It is possible that you are encountering an HTTP endpoint. +StreamError=An error occurred while transmitting data. +ServerRejectedUpgradeRequest=The server rejected the upgrade request. +ServerRejectedSessionPreamble=The server at {0} rejected the session-establishment request. +UnableToResolveHost=Cannot resolve the host name of URI \"{0}\" using DNS. +HttpRequiresSingleAuthScheme=The '{0}' authentication scheme has been specified on the HTTP factory. However, the factory only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. +HttpAuthSchemeCannotBeNone=The value specified for the AuthenticationScheme property on the HttpTransportBindingElement ('{0}') is not allowed when building a ChannelFactory. If you used a standard binding, ensure the ClientCredentialType is not set to HttpClientCredentialType.InheritedFromHost, a value which is invalid on a client. If you set the value to '{0}' directly on the HttpTransportBindingElement, please set it to Digest, Negotiate, NTLM, Basic, or Anonymous. +HttpProxyRequiresSingleAuthScheme=The '{0}' authentication scheme has been specified for the proxy on the HTTP factory. However, the factory only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. +HttpMutualAuthNotSatisfied=The remote HTTP server did not satisfy the mutual authentication requirement. +HttpAuthorizationFailed=The HTTP request is unauthorized with client authentication scheme '{0}'. The authentication header received from the server was '{1}'. +HttpAuthenticationFailed=The HTTP request with client authentication scheme '{0}' failed with '{1}' status. +HttpAuthorizationForbidden=The HTTP request was forbidden with client authentication scheme '{0}'. +InvalidUriScheme=The provided URI scheme '{0}' is invalid; expected '{1}'. +HttpAuthSchemeAndClientCert=The HTTPS listener factory was configured to require a client certificate and the '{0}' authentication scheme. However, only one form of client authentication can be required at once. +NoTransportManagerForUri=Could not find an appropriate transport manager for listen URI '{0}'. +ListenerFactoryNotRegistered=The specified channel listener at '{0}' is not registered with this transport manager. +HttpsExplicitIdentity=The HTTPS channel factory does not support explicit specification of an identity in the EndpointAddress unless the authentication scheme is NTLM or Negotiate. +HttpsIdentityMultipleCerts=The endpoint identity specified when creating the HTTPS channel to '{0}' contains multiple server certificates. However, the HTTPS transport only supports the specification of a single server certificate. In order to create an HTTPS channel, please specify no more than one server certificate in the endpoint identity. +HttpsServerCertThumbprintMismatch=The server certificate with name '{0}' failed identity verification because its thumbprint ('{1}') does not match the one specified in the endpoint identity ('{2}'). As a result, the current HTTPS request has failed. Please update the endpoint identity used on the client or the certificate used by the server. +DuplicateRegistration=A registration already exists for URI '{0}'. +SecureChannelFailure=Could not establish secure channel for SSL/TLS with authority '{0}'. +TrustFailure=Could not establish trust relationship for the SSL/TLS secure channel with authority '{0}'. +NoCompatibleTransportManagerForUri=Could not find a compatible transport manager for URI '{0}'. +HttpSpnNotFound=The SPN for the responding server at URI '{0}' could not be determined. +StreamMutualAuthNotSatisfied=The remote server did not satisfy the mutual authentication requirement. +TransferModeNotSupported=Transfer mode {0} is not supported by {1}. +InvalidTokenProvided=The token provider of type '{0}' did not return a token of type '{1}'. Check the credential configuration. +NoUserNameTokenProvided=The required UserNameSecurityToken was not provided. +RemoteIdentityFailedVerification=The following remote identity failed verification: '{0}'. +UseDefaultWebProxyCantBeUsedWithExplicitProxyAddress=You cannot specify an explicit Proxy Address as well as UseDefaultWebProxy=true in your HTTP Transport Binding Element. +ProxyImpersonationLevelMismatch=The HTTP proxy authentication credential specified an impersonation level restriction ({0}) that is stricter than the restriction for target server authentication ({1}). +ProxyAuthenticationLevelMismatch=The HTTP proxy authentication credential specified an mutual authentication requirement ({0}) that is stricter than the requirement for target server authentication ({1}). +CredentialDisallowsNtlm=The NTLM authentication scheme was specified, but the target credential does not allow NTLM. +DigestExplicitCredsImpersonationLevel=The impersonation level '{0}' was specified, yet HTTP Digest authentication can only support 'Impersonation' level when used with an explicit credential. +UriGeneratorSchemeMustNotBeEmpty=The scheme parameter must not be empty. +UnsupportedSslProtectionLevel=The protection level '{0}' was specified, yet SSL transport security only supports EncryptAndSign. +HttpNoTrackingService={0}. This often indicates that a service that HTTP.SYS depends upon (such as httpfilter) is not started. +HttpNetnameDeleted={0}. This often indicates that the HTTP client has prematurely closed the underlying TCP connection. +TimeoutServiceChannelConcurrentOpen1=Opening the channel timed out after {0}. The time allotted to this operation may have been a portion of a longer timeout. +TimeoutServiceChannelConcurrentOpen2=Opening the {0} channel timed out after {1}. The time allotted to this operation may have been a portion of a longer timeout. +TimeSpanMustbeGreaterThanTimeSpanZero=TimeSpan must be greater than TimeSpan.Zero. +TimeSpanCannotBeLessThanTimeSpanZero=TimeSpan cannot be less than TimeSpan.Zero. +ValueMustBeNonNegative=The value of this argument must be non-negative. +ValueMustBePositive=The value of this argument must be positive. +ValueMustBeGreaterThanZero=The value of this argument must be greater than 0. +ValueMustBeInRange=The value of this argument must fall within the range {0} to {1}. +OffsetExceedsBufferBound=The specified offset exceeds the upper bound of the buffer ({0}). +OffsetExceedsBufferSize=The specified offset exceeds the buffer size ({0} bytes). +SizeExceedsRemainingBufferSpace=The specified size exceeds the remaining buffer space ({0} bytes). +SpaceNeededExceedsMessageFrameOffset=The space needed for encoding ({0} bytes) exceeds the message frame offset. +FaultConverterDidNotCreateFaultMessage={0} returned true from OnTryCreateFaultMessage, but did not return a fault message. +FaultConverterCreatedFaultMessage={0} returned false from OnTryCreateFaultMessage, but returned a non-null fault message. +FaultConverterDidNotCreateException={0} returned true from OnTryCreateException, but did not return an Exception. +FaultConverterCreatedException={0} returned false from OnTryCreateException, but returned a non-null Exception (See InnerException for details). +InfoCardInvalidChain=Policy chain contains self issued URI or a managed issuer in the wrong position. +FullTrustOnlyBindingElementSecurityCheck1=The Binding with name {0} failed validation because it contains a BindingElement with type {1} which is not supported in partial trust. Consider using BasicHttpBinding or WSHttpBinding, or hosting your application in a full-trust environment. +FullTrustOnlyBindingElementSecurityCheckWSHttpBinding1=The WSHttpBinding with name {0} failed validation because it contains a BindingElement with type {1} which is not supported in partial trust. Consider disabling the message security and reliable session options, using BasicHttpBinding, or hosting your application in a full-trust environment. +FullTrustOnlyBindingSecurityCheck1=The Binding with name {0} failed validation because the Binding type {1} is not supported in partial trust. Consider using BasicHttpBinding or WSHttpBinding, or hosting your application in a full-trust environment. +PartialTrustServiceCtorNotVisible=The Service with name '{0}' could not be constructed because the application does not have permission to construct the type: both the Type and its default parameter-less constructor must be public. +PartialTrustServiceMethodNotVisible=The Method with name '{1}' in Type '{0}' could not be invoked because the application does not have permission to invoke the method: both the Method and its containing Type must be public. +PartialTrustPerformanceCountersNotEnabled=Access to performance counters is denied. Application may be running in partial trust. Either disable performance counters or configure the application to run in full trust. +EnsureCategoriesExistFailedPermission=Performance counter instance names may not be unique. See "http://go.microsoft.com/fwlink/?LinkId=524462" for details. +PartialTrustWMINotEnabled=Access to windows management instrumentation (WMI) is denied. Application may be running in partial trust. Either disable WMI or configure the application to run in full trust. +PartialTrustMessageLoggingNotEnabled=Unable to log messages. Application may be running in partial trust. Either disable message logging or configure the application to run in full trust. +ScopeNameMustBeSpecified=The 'scopeName' argument to the InstanceKey constructor must be a non-empty string which indicates the scope of uniqueness for the key. Durable services use the service namespace and name as the scope of uniqueness. +ProviderCannotBeEmptyString=The 'provider' argument to the InstanceKey constructor must be a non-empty string which identifies the source of the key data. The 'provider' argument can be null, in which case the default correlation provider name is used. +CannotSetNameOnTheInvalidKey=The 'Name' property cannot be set on an invalid InstanceKey. +UnsupportedMessageQueryResultType=The type {0} is not a supported result type. +CannotRepresentResultAsNodeset=The result cannot be represented as a nodeset. Only results of type XPathResultType.NodeSet can be represented as nodesets. +MessageNotInLockedState=Message with id {0} was not in a locked state. +MessageValidityExpired=Validity of message with id {0} has expired. +UnsupportedUpgradeInitiator=The StreamUpgradeInitiator specified ({0}) is not supported by this IStreamUpgradeChannelBindingProvider implementation. The most likely cause of this is passing a StreamUpgradeInitiator that was not created by the StreamUpgradeProvider associated with the current IStreamUpgradeChannelBindingProvider implementation. +UnsupportedUpgradeAcceptor=The StreamUpgradeAcceptor specified ({0}) is not supported by this IStreamUpgradeChannelBindingProvider implementation. The most likely cause of this is passing a StreamUpgradeAcceptor that was not created by the StreamUpgradeProvider associated with this IStreamUpgradeChannelBindingProvider implementation. +StreamUpgradeUnsupportedChannelBindingKind=The StreamUpgradeProvider {0} does not support the specified ChannelBindingKind ({1}). +ExtendedProtectionNotSupported=Extended protection is not supported on this platform. Please install the appropriate patch or change the ExtendedProtectionPolicy on the Binding or BindingElement to a value with a PolicyEnforcement value of "Never" or "WhenSupported". +ExtendedProtectionPolicyBasicAuthNotSupported=The Authentication Scheme "Basic" does not support Extended Protection. Please use a different authentication scheme or disable the ExtendedProtectionPolicy on the Binding or BindingElement by creating a new ExtendedProtectionPolicy with a PolicyEnforcement value of "Never". +ExtendedProtectionPolicyCustomChannelBindingNotSupported=CustomChannelBindings are not supported. Please remove the CustomChannelBinding from the ExtendedProtectionPolicy". +HttpClientCredentialTypeInvalid=ClientCredentialType '{0}' can only be used on the server side, not the client side. Please use one of the following values instead 'None, Basic, Client, Digest, Ntlm, Windows'. +SecurityTokenProviderIncludeWindowsGroupsInconsistent=When authentication schemes 'Basic' and also '{0}' are enabled, the value of IncludeWindowsGroups for Windows ('{1}') and UserName authentication ('{2}') must match. Please consider using the same value in both places. +AuthenticationSchemesCannotBeInheritedFromHost=The authentication schemes cannot be inherited from the host for binding '{0}'. No AuthenticationScheme was specified on the ServiceHost or in the virtual application in IIS. This may be resolved by enabling at least one authentication scheme for this virtual application in IIS, through the ServiceHost.Authentication.AuthenticationSchemes property or in the configuration at the element. +AuthenticationSchemes_BindingAndHostConflict=The authentication schemes configured on the host ('{0}') do not allow those configured on the binding '{1}' ('{2}'). Please ensure that the SecurityMode is set to Transport or TransportCredentialOnly. Additionally, this may be resolved by changing the authentication schemes for this application through the IIS management tool, through the ServiceHost.Authentication.AuthenticationSchemes property, in the application configuration file at the element, by updating the ClientCredentialType property on the binding, or by adjusting the AuthenticationScheme property on the HttpTransportBindingElement. +FlagEnumTypeExpected=Object type must be an enum with the flag attribute. '{0}' is not an enum - or the flag attribute is not set. Please use an enum type with the flag attribute instead. +InvalidFlagEnumType=Object type must be an enum with the flag attribute and may only contain powers of two for the flags enum values or a combination of such values. Please use an enum type according to these rules. +NoAsyncWritePending=There is no pending asynchronous write on this stream. Ensure that there is pending write on the stream or verify that the implementation does not try to complete the same operation multiple times. +FlushBufferAlreadyInUse=Cannot write to a buffer which is currently being flushed. +WriteAsyncWithoutFreeBuffer=An asynchronous write was called on the stream without a free buffer. +TransportDoesNotSupportCompression=The transport configured on this binding does not appear to support the CompressionFormat specified ({0}) on the message encoder. To resolve this issue, set the CompressionFormat on the {1} to '{2}' or use a different transport. +UnsupportedSecuritySetting=The value '{1}' is not supported in this context for the binding security property '{0}'. +UnsupportedBindingProperty=The value '{1}' is not supported in this context for the binding property '{0}'. +HttpMaxPendingAcceptsTooLargeError=The value of MaxPendingAccepts should not be larger than {0}. +RequestInitializationTimeoutReached=The initialization process of the request message timed out after {0}. To increase this quota, use the '{1}' property on the '{2}'. +UnsupportedTokenImpersonationLevel=The value '{1}' for the '{0}' property is not supported in Windows Store apps. + +; --------------------------------------------------------------------------------------------------------------------- +; RM +; --------------------------------------------------------------------------------------------------------------------- +AcksToMustBeSameAsRemoteAddress=The remote endpoint requested an address for acknowledgements that is not the same as the address for application messages. The channel could not be opened because this is not supported. Ensure the endpoint address used to create the channel is identical to the one the remote endpoint was set up with. +AcksToMustBeSameAsRemoteAddressReason=The address for acknowledgements must be the same as the address for application messages. Verify that your endpoint is configured to use the same URI for these two addresses. +AssertionNotSupported=The {0}:{1} assertion is not supported. +CloseOutputSessionErrorReason=An unexpected error occurred while attempting to close the output half of the duplex reliable session. +ConflictingAddress=The remote endpoint sent conflicting requests to create a reliable session. The conflicting requests have inconsistent filter criteria such as address or action. The reliable session has been faulted. +ConflictingOffer=The remote endpoint sent conflicting requests to create a reliable session. The remote endpoint requested both a one way and a two way session. The reliable session has been faulted. +CouldNotParseWithAction=A message with action {0} could not be parsed. +CSRefused=The request to create a reliable session has been refused by the RM Destination. {0} The channel could not be opened. +CSRefusedAcksToMustEqualEndpoint=The endpoint processing requests to create a reliable session only supports sessions in which the AcksTo Uri and the Endpoint Uri are the same. +CSRefusedAcksToMustEqualReplyTo=The endpoint processing requests to create a reliable session only supports sessions in which the AcksTo Uri and the ReplyTo Uri are the same. +CSRefusedDuplexNoOffer=The endpoint at {0} processes duplex sessions. The create sequence request must contain an offer for a return sequence. This is likely caused by a binding mismatch. +CSRefusedInputOffer=The endpoint at {0} processes input sessions. The create sequence request must not contain an offer for a return sequence. This is likely caused by a binding mismatch. +CSRefusedInvalidIncompleteSequenceBehavior=The request to create a reliable session contains an invalid wsrm:IncompleteSequenceBehavior value. This is a WS-ReliableMessaging protocol violation. +CSRefusedNoSTRWSSecurity=The request to create a reliable session contains the wsse:SecurityTokenReference but does not carry a wsrm:UsesSequenceSTR header. This is a WS-ReliableMessaging protocol violation. The session could not be created. +CSRefusedReplyNoOffer=The endpoint at {0} processes reply sessions. The create sequence request must contain an offer for a return sequence. This is likely caused by a binding mismatch. +CSRefusedRequiredSecurityElementMissing=The RM Destination requires the WS-SecureConversation protocol in the binding. This is likely caused by a binding mismatch. +CSRefusedSSLNotSupported=The endpoint processing requests to create a reliable session does not support sessions that use SSL. This is likely caused by a binding mismatch. The session could not be created. +CSRefusedSTRNoWSSecurity=The request to create a reliable session carries a wsrm:UsesSequenceSTR header, but does not contain the wsse:SecurityTokenReference. This is a WS-ReliableMessaging protocol violation. The session could not be created. +CSRefusedUnexpectedElementAtEndOfCSMessage=The message is not a valid SOAP message. The body contains more than 1 root element. +CSResponseOfferRejected=The remote endpoint replied to a request for a two way session with an offer for a one way session. This is likely caused by a binding mismatch. The channel could not be opened. +CSResponseOfferRejectedReason=The client requested creation of a two way session. A one way session was created. The session cannot continue without as a one way session. This is likely caused by a binding mismatch. +CSResponseWithInvalidIncompleteSequenceBehavior=The response to the request to create a reliable session contains an invalid wsrm:IncompleteSequenceBehavior value. This is a WS-ReliableMessaging protocol violation. +CSResponseWithOffer=The remote endpoint replied to a request for a one way session with an offer for a two way session. This is a WS-ReliableMessaging protocol violation. The channel could not be opened. +CSResponseWithOfferReason=A return sequence was not offered by the create sequence request. The create sequence response cannot accept a return sequence. +CSResponseWithoutOffer=The remote endpoint replied to a request for a two way session with an offer for a one way session. This is a WS-ReliableMessaging protocol violation. The channel could not be opened. +CSResponseWithoutOfferReason=A return sequence was offered by the create sequence request but the create sequence response did not accept this sequence. +DeliveryAssuranceRequiredNothingFound=The WS-RM policy under the namespace {0} requires the wsrmp:ExactlyOnce, wsrmp:AtLeastOnce, or wsrmp:AtMostOnce assertion. Nothing was found. +DeliveryAssuranceRequired=The WS-RM policy under the namespace {0} requires the wsrmp:ExactlyOnce, wsrmp:AtLeastOnce, or wsrmp:AtMostOnce assertion. The {1} element under the {2} namespace was found. +EarlyRequestTerminateSequence=The remote endpoint sent a TerminateSequence protocol message before fully acknowledging all messages in the reply sequence. This is a violation of the reliable request reply protocol. The reliable session was faulted. +EarlySecurityClose=The remote endpoint has closed the underlying secure session before the reliable session fully completed. The reliable session was faulted. +EarlySecurityFaulted=The underlying secure session has faulted before the reliable session fully completed. The reliable session was faulted. +EarlyTerminateSequence=The remote endpoint has errantly sent a TerminateSequence protocol message before the sequence finished. +ElementFound=The {0}:{1} element requires a {2}:{3} child element but has the {4} child element under the {5} namespace. +ElementRequired=The {0}:{1} element requires a {2}:{3} child element but has no child elements. +InconsistentLastMsgNumberExceptionString=The remote endpoint specified two different last message numbers. The reliable session is in an inconsistent state since it cannot determine the actual last message. The reliable session was faulted. +InvalidAcknowledgementFaultReason=The SequenceAcknowledgement violates the cumulative acknowledgement invariant. +InvalidAcknowledgementReceived=A violation of acknowledgement protocol has been detected. An InvalidAcknowledgement fault was sent to the remote endpoint and the reliable session was faulted. +InvalidBufferRemaining=An acknowledgement was received indicating the remaining buffer space on the remote endpoint is {0}. This number cannot be less than zero. The reliable session was faulted. +InvalidSequenceNumber=A message was received with a sequence number of {0}. Sequence numbers cannot be less than 1. The reliable session was faulted. +InvalidSequenceRange=An acknowledgement range starting at {0} and ending at {1} was received. This is an invalid acknowledgement range. The reliable session was faulted. +InvalidWsrmResponseChannelNotOpened=The remote endpoint responded to the {0} request with a response with action {1}. The response must be a {0}Response with action {2}. The channel could not be opened. +InvalidWsrmResponseSessionFaultedExceptionString=The remote endpoint responded to the {0} request with a response with action {1}. The response must be a {0}Response with action {2}. The channel was faulted. +InvalidWsrmResponseSessionFaultedFaultString=The {0} request's response was a message with action {1}. The response must be a {0}Response with action {2}. The reliable session cannot continue. +LastMessageNumberExceeded=A message was received with a sequence number higher than the sequence number of the last message in this sequence. This is a violation of the sequence number protocol. The reliable session was faulted. +LastMessageNumberExceededFaultReason=The value for wsrm:MessageNumber exceeds the value of the MessageNumber accompanying a LastMessage element in this Sequence. +ManualAddressingNotSupported=Binding validation failed because the TransportBindingElement's ManualAddressing property was set to true on a binding that is configured to create reliable sessions. This combination is not supported and the channel factory or service host was not opened. +MaximumRetryCountExceeded=The maximum retry count has been exceeded with no response from the remote endpoint. The reliable session was faulted. This is often an indication that the remote endpoint is no longer available. +MessageExceptionOccurred=A problem occurred while reading a message. See inner exception for details. +MessageNumberRollover=The maximum message number for this sequence has been exceeded. The reliable session was faulted. +MessageNumberRolloverFaultReason=The maximum value for wsrm:MessageNumber has been exceeded. +MillisecondsNotConvertibleToBindingRange=The {0} assertion's Milliseconds attribute does not fall within the range this binding uses. The ReliableSessionBindingElement could not be created. +MissingFinalAckExceptionString=The remote endpoint did not include a final acknowledgement in the reply to the close sequence request message. This is a violation of the WS-ReliableMessaging protocol. The reliable session was faulted. +MissingMessageIdOnWsrmRequest=The wsa:MessageId header must be present on a wsrm:{0} message. +MissingRelatesToOnWsrmResponseReason=The returned wsrm:{0}Response message was missing the required wsa:RelatesTo header. This is a violation of the WS-Addressing request reply protocol. The reliable session was faulted. +MissingReplyToOnWsrmRequest=The wsa:ReplyTo header must be present on a wsrm:{0} message. +MultipleVersionsFoundInPolicy=More than one version of the {0} assertion was found. The ReliableSessionBindingElement could not be created. +NoActionNoSequenceHeaderReason=The endpoint only processes messages using the WS-ReliableMessaging protocol. The message sent to the endpoint does not have an action or any headers used by the protocol and cannot be processed. +NonEmptyWsrmMessageIsEmpty=A message with action {0} is an empty message. This message cannot be processed because the body of this WS-ReliableMessaging protocol message must carry information pertaining to a reliable session. +NonWsrmFeb2005ActionNotSupported=The action {0} is not supported by this endpoint. Only WS-ReliableMessaging February 2005 messages are processed by this endpoint. +NotAllRepliesAcknowledgedExceptionString=The remote endpoint closed the session before acknowledging all responses. All replies could not be delivered. The reliable session was faulted. +ReceivedResponseBeforeRequestExceptionString=The remote endpoint returned a {0}Response when the {0} request had not been sent. This is a WS-ReliableMessaging protocol violation. The reliable session was faulted. +ReceivedResponseBeforeRequestFaultString=The {0}Response was received when the {0} request had not been sent. This is a WS-ReliableMessaging protocol violation. The reliable session cannot continue. +ReplyMissingAcknowledgement=The remote endpoint failed to include a required SequenceAcknowledgement header on a reliable reply message. The reliable session was faulted. +ReliableRequestContextAborted=Due to a request context abort call, the reliable reply session channel potentially has a gap in its reply sequence. The ExactlyOnce assurance can no longer be satisfied. The reliable session was faulted. +RequiredAttributeIsMissing=The required {0} attribute is missing from the {1} element in the {2} assertion. The ReliableSessionBindingElement could not be created. +RequiredMillisecondsAttributeIncorrect=The {0} assertion's required Milliseconds attribute is not schema compliant. Milliseconds must be convertible to an unsigned long. The ReliableSessionBindingElement could not be created. +RMEndpointNotFoundReason=The endpoint at {0} has stopped accepting wsrm sessions. +SequenceClosedFaultString=The Sequence is closed and cannot accept new messages. +SequenceTerminatedAddLastToWindowTimedOut=The RM Source could not transfer the last message within the timeout the user specified. +SequenceTerminatedBeforeReplySequenceAcked=The server received a TerminateSequence message before all reply sequence messages were acknowledged. This is a violation of the reply sequence acknowledgement protocol. +SequenceTerminatedEarlyTerminateSequence=The wsrm:TerminateSequence protocol message was transmitted before the sequence was successfully completed. +SequenceTerminatedInactivityTimeoutExceeded=The inactivity timeout of ({0}) has been exceeded. +SequenceTerminatedInconsistentLastMsgNumber=Two different wsrm:LastMsgNumber values were specified. Because of this the reliable session cannot complete. +SequenceTerminatedMaximumRetryCountExceeded=The user specified maximum retry count for a particular message has been exceeded. Because of this the reliable session cannot continue. +SequenceTerminatedMissingFinalAck=The CloseSequence request's reply message must carry a final acknowledgement. This is a violation of the WS-ReliableMessaging protocol. The reliable session cannot continue. +SequenceTerminatedOnAbort=Due to a user abort the reliable session cannot continue. +SequenceTerminatedQuotaExceededException=The necessary size to buffer a sequence message has exceeded the configured buffer quota. Because of this the reliable session cannot continue. +SequenceTerminatedReliableRequestThrew=The session has stopped waiting for a particular reply. Because of this the reliable session cannot continue. +SequenceTerminatedReplyMissingAcknowledgement=A reply message was received with no acknowledgement. +SequenceTerminatedNotAllRepliesAcknowledged=All of the reply sequence's messages must be acknowledged prior to closing the request sequence. This is a violation of the reply sequence's delivery guarantee. The session cannot continue. +SequenceTerminatedSessionClosedBeforeDone=The user of the remote endpoint's reliable session expects no more messages and a new message arrived. Due to this the reliable session cannot continue. +SequenceTerminatedSmallLastMsgNumber=The wsrm:LastMsgNumber value is too small. A message with a larger sequence number has already been received. +SequenceTerminatedUnexpectedAcknowledgement=The RM destination received an acknowledgement message. The RM destination does not process acknowledgement messages. +SequenceTerminatedUnexpectedAckRequested=The RM source received an AckRequested message. The RM source does not process AckRequested messages. +SequenceTerminatedUnexpectedCloseSequence=The RM source received an CloseSequence message. The RM source does not process CloseSequence messages. +SequenceTerminatedUnexpectedCloseSequenceResponse=The RM destination received an CloseSequenceResponse message. The RM destination does not process CloseSequenceResponse messages. +SequenceTerminatedUnexpectedCS=The RM source received a CreateSequence request. The RM source does not process CreateSequence requests. +SequenceTerminatedUnexpectedCSOfferId=The RM destination received multiple CreateSequence requests with different OfferId values over the same session. +SequenceTerminatedUnexpectedCSR=The RM destination received a CreateSequenceResponse message. The RM destination does not process CreateSequenceResponse messages. +SequenceTerminatedUnexpectedCSROfferId=The RM source received multiple CreateSequenceResponse messages with different sequence identifiers over the same session. +SequenceTerminatedUnexpectedTerminateSequence=The RM source received a TerminateSequence message. The RM source does not process TerminateSequence messages. +SequenceTerminatedUnexpectedTerminateSequenceResponse=The RM destination received a TerminateSequenceResponse message. The RM destination does not process TerminateSequenceResponse messages. +SequenceTerminatedUnsupportedClose=The RM source does not support an RM destination initiated close since messages can be lost. The reliable session cannot continue. +SequenceTerminatedUnsupportedTerminateSequence=The RM source does not support an RM destination initiated termination since messages can be lost. The reliable session cannot continue. +SequenceTerminatedUnknownAddToWindowError=An unknown error occurred while trying to add a sequence message to the window. +SmallLastMsgNumberExceptionString=The remote endpoint specified a last message number that is smaller than a sequence number that has already been seen. The reliable session is in an inconsistent state since it cannot determine the actual last message. The reliable session was faulted. +TimeoutOnAddToWindow=The message could not be transferred within the allotted timeout of {0}. There was no space available in the reliable channel's transfer window. The time allotted to this operation may have been a portion of a longer timeout. +TimeoutOnClose=The close operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. +TimeoutOnOpen=The open operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. +TimeoutOnOperation=The operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. +TimeoutOnRequest=The request operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. +TimeoutOnSend=The send operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. +UnexpectedAcknowledgement=The remote endpoint sent an unexpected ack. Simplex servers do not process acks. +UnexpectedAckRequested=The remote endpoint sent an unexpected request for an ack. Simplex clients do not send acks and do not process requests for acks. +UnexpectedCloseSequence=The remote endpoint sent an unexpected close sequence message. Simplex clients do not process this message. +UnexpectedCloseSequenceResponse=The remote endpoint sent an unexpected close sequence response message. Simplex servers do not process this message. +UnexpectedCS=The remote endpoint sent an unexpected request to create a sequence. Clients do not process requests for a sequence. +UnexpectedCSR=The remote endpoint sent an unexpected create sequence response. Servers do not process this message. +UnexpectedCSOfferId=The remote endpoint sent inconsistent requests to create the same sequence. The OfferId values are not identical. +UnexpectedCSROfferId=The remote endpoint sent inconsistent responses to the same create sequence request. The sequence identifiers are not identical. +UnexpectedTerminateSequence=The remote endpoint sent an unexpected terminate sequence message. Simplex clients do not process this message. +UnexpectedTerminateSequenceResponse=The remote endpoint sent an unexpected terminate sequence response message. Simplex servers do not process this message. +UnparsableCSResponse=The remote endpoint replied to the request for a sequence with a response that could not be parsed. See inner exception for details. The channel could not be opened. +UnknownSequenceFaultReason=The value of wsrm:Identifier is not a known Sequence identifier. +UnknownSequenceFaultReceived=The remote endpoint no longer recognizes this sequence. This is most likely due to an abort on the remote endpoint. {0} The reliable session was faulted. +UnknownSequenceMessageReceived=The remote endpoint has sent a message containing an unrecognized sequence identifier. The reliable session was faulted. +UnrecognizedFaultReceived=The remote endpoint has sent an unrecognized fault with namespace, {0}, name {1}, and reason {2}. The reliable session was faulted. +UnrecognizedFaultReceivedOnOpen=The remote endpoint has sent an unrecognized fault with namespace, {0}, name {1}, and reason {2}. The channel could not be opened. +UnsupportedCloseExceptionString=The remote endpoint closed the sequence before message transfer was complete. This is not supported since all messages could not be transferred. The reliable session was faulted. +UnsupportedTerminateSequenceExceptionString=The remote endpoint terminated the sequence before message transfer was complete. This is not supported since all messages could not be transferred. The reliable session was faulted. +WrongIdentifierFault=The remote endpoint has sent an fault message with an unexpected sequence identifier over a session. The fault may be intended for a different session. The fault reason is: {0} The reliable session was faulted. +WSHttpDoesNotSupportRMWithHttps=Binding validation failed because the WSHttpBinding does not support reliable sessions over transport security (HTTPS). The channel factory or service host could not be opened. Use message security for secure reliable messaging over HTTP. +WsrmFaultReceived=The sequence has been terminated by the remote endpoint. {0} The reliable session was faulted. +WsrmMessageProcessingError=An error occurred while processing a message. {0} +WsrmMessageWithWrongRelatesToExceptionString=The returned {0}Response was carrying the a wsa:RelatesTo header that does not correlate with the wsa:MessageId header on the {0} request. This is a violation of the WS-Addressing request reply protocol. The reliable session cannot continue. +WsrmMessageWithWrongRelatesToFaultString=The remote endpoint has responded to a {0} request message with an invalid reply. The reply has a wsa:RelatesTo header with an unexpected identifier. The reliable session cannot continue. +WsrmRequestIncorrectReplyToExceptionString=The remote endpoint sent a wsrm:{0} request message with a wsa:ReplyTo address containing a URI which is not equivalent to the remote address. This is not supported. The reliable session was faulted. +WsrmRequestIncorrectReplyToFaultString=The wsrm:{0} request message's wsa:ReplyTo address containing a URI which is not equivalent to the remote address. This is not supported. The reliable session was faulted. +WsrmRequiredExceptionString=The incoming message is not a WS-ReliableMessaging 1.1 message and could not be processed. +WsrmRequiredFaultString=The RM server requires the use of WS-ReliableMessaging 1.1 protocol. This is likely caused by a binding mismatch. +; ------------------------------------------------------------------------------------------------------------------------------ +; Rule Manager and Routing +; ------------------------------------------------------------------------------------------------------------------------------ +; +; Place Service Framework strings below prefixed by SFx +; ------------------------------------------------------------------------------------------------------------------------------ +SFxActionDemuxerDuplicate=The operations {0} and {1} have the same action ({2}). Every operation must have a unique action value. +SFxActionMismatch=Cannot create a typed message due to action mismatch, expecting {0} encountered {1} +SFxAnonymousTypeNotSupported=Part {1} in message {0} cannot be exported with RPC or encoded since its type is anonymous. +SFxAsyncResultsDontMatch0=The IAsyncResult returned from Begin and the IAsyncResult supplied to the Callback are on different objects. These are required to be the same object. +SFXBindingNameCannotBeNullOrEmpty=Binding name cannot be null or empty. +SFXUnvalidNamespaceValue=Value '{0}' provided for {1} property is an invalid URI. +SFXUnvalidNamespaceParam=Parameter value '{0}' is an invalid URI. +SFXHeaderNameCannotBeNullOrEmpty=Header name cannot be null or empty. +SFxEndpointNoMatchingScheme=Could not find a base address that matches scheme {0} for the endpoint with binding {1}. Registered base address schemes are [{2}]. +SFxBindingSchemeDoesNotMatch=The scheme '{0}' used by binding {1} does not match the required scheme '{2}'. +SFxGetChannelDispatcherDoesNotSupportScheme=Only a '{0}' using '{1}' or '{2}' is supported in this scenario. +SFxIncorrectMessageVersion=MessageVersion '{0}' is not supported in this scenario. Only MessageVersion '{1}' is supported. +SFxBindingNotSupportedForMetadataHttpGet=The binding associated with ServiceMetadataBehavior or ServiceDebugBehavior is not supported. The inner binding elements used by this binding must support IReplyChannel. Verify that HttpGetBinding/HttpsGetBinding (on ServiceMetadataBehavior) and HttpHelpPageBinding/HttpsHelpPageBinding (on ServiceDebugBehavior) are supported. +SFxBadByReferenceParameterMetadata=Method '{0}' in class '{1}' has bad parameter metadata: a pass-by-reference parameter is marked with the 'in' but not the 'out' parameter mode. +SFxBadByValueParameterMetadata=Method '{0}' in class '{1}' has bad parameter metadata: a pass-by-value parameter is marked with the 'out' parameter mode. +SFxBadMetadataMustBePolicy=When calling the CreateFromPolicy method, the policy argument must be an XmlElement instance with LocalName '{1}' and NamespaceUri '{0}'. This XmlElement has LocalName '{3}' and NamespaceUri '{2}'. +SFxBadMetadataLocationUri=The URI supplied to ServiceMetadataBehavior via the ExternalMetadataLocation property or the externalMetadataLocation attribute in the serviceMetadata section in config must be a relative URI or an absolute URI with an http or https scheme. '{0}' was specified, which is a absolute URI with {1} scheme. +SFxBadMetadataLocationNoAppropriateBaseAddress=The URL supplied to ServiceMetadataBehavior via the ExternalMetadataLocation property or the externalMetadataLocation attribute in the serviceMetadata section in config was a relative URL and there is no base address with which to resolve it. '{0}' was specified. +SFxBadMetadataDialect=There was a problem reading the MetadataSet argument: a MetadataSection instance with identifier '{0}' and dialect '{1}' has a Metadata property whose type does not match the dialect. The expected Metadata type for this dialect is '{2}' but was found to be '{3}'. +SFxBadMetadataReference=Metadata contains a reference that cannot be resolved: '{0}'. +SFxMaximumResolvedReferencesOutOfRange=The MaximumResolvedReferences property of MetadataExchangeClient must be greater than or equal to one. '{0}' was specified. +SFxMetadataExchangeClientNoMetadataAddress=The MetadataExchangeClient was not supplied with a MetadataReference or MetadataLocation from which to get metadata. You must supply one to the constructor, to the GetMetadata method, or to the BeginGetMetadata method. +SFxMetadataExchangeClientCouldNotCreateChannelFactory=The MetadataExchangeClient could not create an IChannelFactory for: address='{0}', dialect='{1}', and identifier='{2}'. +SFxMetadataExchangeClientCouldNotCreateWebRequest=The MetadataExchangeClient could not create an HttpWebRequest for: address='{0}', dialect='{1}', and identifier='{2}'. +SFxMetadataExchangeClientCouldNotCreateChannelFactoryBadScheme=The MetadataExchangeClient instance could not be initialized because no Binding is available for scheme '{0}'. You can supply a Binding in the constructor, or specify a configurationName. +SFxBadTransactionProtocols=The TransactionProtocol setting was not understood. A supported protocol must be specified. +SFxMetadataResolverKnownContractsArgumentCannotBeEmpty=The MetadataResolver cannot recieve an empty contracts argument to the Resolve or BeginResolve methods. You must supply at least one ContractDescription. +SFxMetadataResolverKnownContractsUniqueQNames=The ContractDescriptions in contracts must all have unique Name and Namespace pairs. More than one ContractDescription had the pair Name='{0}' and Namespace='{1}'. +SFxMetadataResolverKnownContractsCannotContainNull=The contracts argument to the Resolve or BeginResolve methods cannot contain a null ContractDescription. +SFxBindingDoesNotHaveATransportBindingElement=The binding specified to do metadata exchange does not contain a TransportBindingElement. +SFxBindingMustContainTransport2=The binding (Name={0}, Namespace={1}) does not contain a TransportBindingElement. +SFxBodyCannotBeNull=Body object cannot be null in message {0} +SFxBodyObjectTypeCannotBeInherited=Type {0} cannot inherit from any class other than object to be used as body object in RPC style. +SFxBodyObjectTypeCannotBeInterface=Type {0} implements interface {1} which is not supported for body object in RPC style. +SFxCallbackBehaviorAttributeOnlyOnDuplex=CallbackBehaviorAttribute can only be run as a behavior on an endpoint with a duplex contract. Contract '{0}' is not duplex, as it contains no callback operations. +SFxCallbackRequestReplyInOrder1=This operation would deadlock because the reply cannot be received until the current Message completes processing. If you want to allow out-of-order message processing, specify ConcurrencyMode of Reentrant or Multiple on {0}. +SfxCallbackTypeCannotBeNull=In order to use the contract '{0}' with DuplexChannelFactory, the contract must specify a valid callback contract. If your contract does not have a callback contract, consider using ChannelFactory instead of DuplexChannelFactory. +SFxCannotActivateCallbackInstace=The dispatch instance for duplex callbacks cannot be activated - you must provide an instance. +SFxCannotCallAddBaseAddress=ServiceHostBase's AddBaseAddress method cannot be called after the InitializeDescription method has completed. +SFxCannotCallAutoOpenWhenExplicitOpenCalled=Cannot make a call on this channel because a call to Open() is in progress. +SFxCannotGetMetadataFromRelativeAddress=The MetadataExchangeClient can only get metadata from absolute addresses. It cannot get metadata from '{0}'. +SFxCannotHttpGetMetadataFromAddress=The MetadataExchangeClient can only get metadata from http or https addresses when using MetadataExchangeClientMode HttpGet. It cannot get metadata from '{0}'. +SFxCannotGetMetadataFromLocation=The MetadataExchangeClient can only get metadata from http and https MetadataLocations. It cannot get metadata from '{0}'. +SFxCannotHaveDifferentTransactionProtocolsInOneBinding=The configured policy specifies more than one TransactionProtocol across the operations. A single TransactionProtocol for each endpoint must be specified. +SFxCannotImportAsParameters_Bare=Generating message contract since the operation {0} is neither RPC nor document wrapped. +SFxCannotImportAsParameters_DifferentWrapperNs=Generating message contract since the wrapper namespace ({1}) of message {0} does not match the default value ({2}) +SFxCannotImportAsParameters_DifferentWrapperName=Generating message contract since the wrapper name ({1}) of message {0} does not match the default value ({2}) +SFxCannotImportAsParameters_ElementIsNotNillable=Generating message contract since element name {0} from namespace {1} is not marked nillable +SFxCannotImportAsParameters_MessageHasProtectionLevel=Generating message contract since message {0} requires protection. +SFxCannotImportAsParameters_HeadersAreIgnoredInEncoded=Headers are not supported in RPC encoded format. Headers are ignored in message {0}. +SFxCannotImportAsParameters_HeadersAreUnsupported=Generating message contract since message {0} has headers +SFxCannotImportAsParameters_Message=Generating message contract since the operation {0} has untyped Message as argument or return type +SFxCannotImportAsParameters_NamespaceMismatch=Generating message contract since message part namespace ({0}) does not match the default value ({1}) +SFxCannotRequireBothSessionAndDatagram3=There are two contracts listening on the same binding ({2}) and address with conflicting settings. Specifically, the contract '{0}' specifies SessionMode.NotAllowed while the contract '{1}' specifies SessionMode.Required. You should either change one of the SessionMode values or specify a different address (or ListenUri) for each endpoint. +SFxCannotSetExtensionsByIndex=This collection does not support setting extensions by index. Please consider using the InsertItem or RemoveItem methods. +SFxChannelDispatcherDifferentHost0=This ChannelDispatcher is not currently attached to the provided ServiceHost. +SFxChannelDispatcherMultipleHost0=Cannot add a ChannelDispatcher to more than one ServiceHost. +SFxChannelDispatcherNoHost0=Cannot open ChannelDispatcher because it is not attached to a ServiceHost. +SFxChannelDispatcherNoMessageVersion=Cannot open ChannelDispatcher because it is does not have a MessageVersion set. +SFxChannelDispatcherUnableToOpen1=The ChannelDispatcher at '{0}' is unable to open its IChannelListener as there are no endpoints for the ChannelDispatcher. +SFxChannelDispatcherUnableToOpen2=The ChannelDispatcher at '{0}' with contract(s) '{1}' is unable to open its IChannelListener. +SFxChannelFactoryTypeMustBeInterface=The type argument passed to the generic ChannelFactory class must be an interface type. +SFxChannelFactoryCannotApplyConfigurationWithoutEndpoint=ApplyConfiguration requires that the Endpoint property be initialized. Either provide a valid ServiceEndpoint in the CreateDescription method or override the ApplyConfiguration method to provide an alternative implementation. +SFxChannelFactoryCannotCreateFactoryWithoutDescription=CreateFactory requires that the Endpoint property be initialized. Either provide a valid ServiceEndpoint in the CreateDescription method or override the CreateFactory method to provide an alternative implementation. +SFxChannelTerminated0=An operation marked as IsTerminating has already been invoked on this channel, causing the channel's connection to terminate. No more operations may be invoked on this channel. Please re-create the channel to continue communication. +SFxClientOutputSessionAutoClosed=This channel can no longer be used to send messages as the output session was auto-closed due to a server-initiated shutdown. Either disable auto-close by setting the DispatchRuntime.AutomaticInputSessionShutdown to false, or consider modifying the shutdown protocol with the remote server. +SFxCodeGenArrayTypeIsNotSupported=Array of type {0} is not supported. +SFxCodeGenCanOnlyStoreIntoArgOrLocGot0=Can only store into ArgBuilder or LocalBuilder. Got: {0}. +SFxCodeGenExpectingEnd=Expecting End {0}. +SFxCodeGenIsNotAssignableFrom={0} is not assignable from {1}. +SFxCodeGenNoConversionPossibleTo=No conversion possible to {0}. +SFxCodeGenWarning=CODEGEN: {0} +SFxCodeGenUnknownConstantType=Internal Error: Unrecognized constant type {0}. +SFxCollectionDoesNotSupportSet0=This collection does not support setting items by index. +SFxCollectionReadOnly=This operation is not supported because the collection is read-only. +SFxCollectionWrongType2=The collection of type {0} does not support values of type {1}. +SFxConflictingGlobalElement=Top level XML element with name {0} in namespace {1} cannot reference {2} type because it already references a different type ({3}). Use a different operation name or MessageBodyMemberAttribute to specify a different name for the Message or Message parts. +SFxConflictingGlobalType=Duplicate top level XML Schema type with name {0} in namespace {1}. +SFxContextModifiedInsideScope0=The value of OperationContext.Current is not the OperationContext value installed by this OperationContextScope. +SFxContractDescriptionNameCannotBeEmpty=ContractDescription's Name must be a non-empty string. +SFxContractHasZeroOperations=ContractDescription '{0}' has zero operations; a contract must have at least one operation. +SFxContractHasZeroInitiatingOperations=ContractDescription '{0}' has zero IsInitiating=true operations; a contract must have at least one IsInitiating=true operation. +SFxContractInheritanceRequiresInterfaces=The service class of type {0} both defines a ServiceContract and inherits a ServiceContract from type {1}. Contract inheritance can only be used among interface types. If a class is marked with ServiceContractAttribute, it must be the only type in the hierarchy with ServiceContractAttribute. Consider moving the ServiceContractAttribute on type {1} to a separate interface that type {1} implements. +SFxContractInheritanceRequiresInterfaces2=The service class of type {0} both defines a ServiceContract and inherits a ServiceContract from type {1}. Contract inheritance can only be used among interface types. If a class is marked with ServiceContractAttribute, then another service class cannot derive from it. +SFxCopyToRequiresICollection=SynchronizedReadOnlyCollection's CopyTo only works if the underlying list implements ICollection. +SFxCreateDuplexChannel1=The callback contract of contract {0} either does not exist or does not define any operations. If this is not a duplex contract, consider using ChannelFactory instead of DuplexChannelFactory. +SFxCreateDuplexChannelNoCallback=This CreateChannel overload cannot be called on this instance of DuplexChannelFactory, as the DuplexChannelFactory was not initialized with an InstanceContext. Please call the CreateChannel overload that takes an InstanceContext. +SFxCreateDuplexChannelNoCallback1=This CreateChannel overload cannot be called on this instance of DuplexChannelFactory, as the DuplexChannelFactory was initialized with a Type and no valid InstanceContext was provided. Please call the CreateChannel overload that takes an InstanceContext. +SFxCreateDuplexChannelNoCallbackUserObject=This CreateChannel overload cannot be called on this instance of DuplexChannelFactory, as the InstanceContext provided to the DuplexChannelFactory does not contain a valid UserObject. +SFxCreateDuplexChannelBadCallbackUserObject=The InstanceContext provided to the ChannelFactory contains a UserObject that does not implement the CallbackContractType '{0}'. +SFxCreateNonDuplexChannel1=ChannelFactory does not support the contract {0} as it defines a callback contract with one or more operations. Please consider using DuplexChannelFactory instead of ChannelFactory. +SFxCustomBindingNeedsTransport1=The CustomBinding on the ServiceEndpoint with contract '{0}' lacks a TransportBindingElement. Every binding must have at least one binding element that derives from TransportBindingElement. +SFxCustomBindingWithoutTransport=The Scheme cannot be computed for this binding because this CustomBinding lacks a TransportBindingElement. Every binding must have at least one binding element that derives from TransportBindingElement. +SFxDeserializationFailed1=The formatter threw an exception while trying to deserialize the message: {0} +SFxDictionaryIsEmpty=This operation is not possible since the dictionary is empty. +SFxDisallowedAttributeCombination=The type or member named '{0}' could not be loaded because it has two incompatible attributes: '{1}' and '{2}'. To fix the problem, remove one of the attributes from the type or member. +SFxEndpointAddressNotSpecified=The endpoint's address is not specified. +SFxEndpointContractNotSpecified=The endpoint's contract is not specified. +SFxEndpointBindingNotSpecified=The endpoint's binding is not specified. +SFxInitializationUINotCalled=The channel is configured to use interactive initializer '{0}', but the channel was Opened without calling DisplayInitializationUI. Call DisplayInitializationUI before calling Open or other methods on this channel. +SFxInitializationUIDisallowed=AllowInitializationUI was set to false for this channel, but the channel is configured to use the '{0}' as an interactive initializer. +SFxDocExt_NoMetadataSection1=This is a Windows© Communication Foundation service.

Metadata publishing for this service is currently disabled.

If you have access to the service, you can enable metadata publishing by completing the following steps to modify your web or application configuration file:

1. Create the following service behavior configuration, or add the <serviceMetadata> element to an existing service behavior configuration: +SFxDocExt_NoMetadataSection2=2. Add the behavior configuration to the service: +SFxDocExt_NoMetadataSection3=Note: the service name must match the configuration name for the service implementation.

3. Add the following endpoint to your service configuration: +SFxDocExt_NoMetadataSection4=Note: your service must have an http base address to add this endpoint.

The following is an example service configuration file with metadata publishing enabled: +SFxDocExt_NoMetadataSection5=For more information on publishing metadata please see the following documentation: http://go.microsoft.com/fwlink/?LinkId=65455. +SFxDocExt_NoMetadataConfigComment1=Note: the service name must match the configuration name for the service implementation. +SFxDocExt_NoMetadataConfigComment2=Add the following endpoint. +SFxDocExt_NoMetadataConfigComment3=Note: your service must have an http base address to add this endpoint. +SFxDocExt_NoMetadataConfigComment4=Add the following element to your service behavior configuration. +SFxDocExt_CS=

C#

+SFxDocExt_VB=

Visual Basic

+SFxDocExt_MainPageTitleNoServiceName=Service +SFxDocExt_MainPageTitle={0} Service +SFxDocExt_MainPageIntro1a=You have created a service.

To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:

+SFxDocExt_MainPageIntro1b=You have created a service.

To test this service, you will need to create a client and use it to call the service; however, metadata publishing via ?WSDL is currently disabled. This can be enabled via the service's configuration file.

+SFxDocExt_MainPageIntro2=This will generate a configuration file and a code file that contains the client class. Add the two files to your client application and use the generated client class to call the Service. For example:
+SFxDocExt_MainPageComment=Use the 'client' variable to call operations on the service. +SFxDocExt_MainPageComment2=Always close the client. +SFxDocExt_Error=The service encountered an error. +SFxDocEncodedNotSupported=Operation '{0}' could not be loaded as it uses an unsupported combination of Use and Style settings: Document with Encoded. To fix the problem, change the Use setting to Literal or change the Style setting to Rpc. +SFxDocEncodedFaultNotSupported=Fault could not be loaded as the Use setting is Encoded and it references a schema definition using Element attribute. To fix the problem, change the Use setting to Literal. +SFxDuplicateMessageParts=Message part {0} in namespace {1} appears more than once in Message. +SFxDuplicateInitiatingActionAtSameVia=This service has multiple endpoints listening at '{0}' which share the same initiating action '{1}'. As a result, messages with this action would be dropped since the dispatcher would not be able to determine the correct endpoint for handling the message. Please consider hosting these Endpoints at separate ListenUris. +SFXEndpointBehaviorUsedOnWrongSide=The IEndpointBehavior '{0}' cannot be used on the server side; this behavior can only be applied to clients. +SFxEndpointDispatcherMultipleChannelDispatcher0=Cannot add EndpointDispatcher to more than one ChannelDispatcher. +SFxEndpointDispatcherDifferentChannelDispatcher0=This EndpointDispatcher is not currently attached to the provided ChannelDispatcher. +SFxErrorCreatingMtomReader=Error creating a reader for the MTOM message +SFxErrorDeserializingRequestBody=Error in deserializing body of request message for operation '{0}'. +SFxErrorDeserializingRequestBodyMore=Error in deserializing body of request message for operation '{0}'. {1} +SFxErrorDeserializingReplyBody=Error in deserializing body of reply message for operation '{0}'. +SFxErrorDeserializingReplyBodyMore=Error in deserializing body of reply message for operation '{0}'. {1} +SFxErrorSerializingBody=There was an error in serializing body of message {0}: '{1}'. Please see InnerException for more details. +SFxErrorDeserializingHeader=There was an error in deserializing one of the headers in message {0}. Please see InnerException for more details. +SFxErrorSerializingHeader=There was an error in serializing one of the headers in message {0}: '{1}'. Please see InnerException for more details. +SFxErrorDeserializingFault=Server returned an invalid SOAP Fault. Please see InnerException for more details. +SFxErrorReflectingOnType2=An error occurred while loading attribute '{0}' on type '{1}'. Please see InnerException for more details. +SFxErrorReflectingOnMethod3=An error occurred while loading attribute '{0}' on method '{1}' in type '{2}'. Please see InnerException for more details. +SFxErrorReflectingOnParameter4=An error occurred while loading attribute '{0}' on parameter {1} of method '{2}' in type '{3}'. Please see InnerException for more details. +SFxErrorReflectionOnUnknown1=An error occurred while loading attribute '{0}'. Please see InnerException for more details. +SFxExceptionDetailEndOfInner=--- End of inner ExceptionDetail stack trace --- +SFxExceptionDetailFormat=An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: +SFxExpectedIMethodCallMessage=Internal Error: Message must be a valid IMethodCallMessage. +SFxExportMustHaveType=The specified ContractDescription could not be exported to WSDL because the Type property of the MessagePartDescription with name '{1}' in the OperationDescription with name '{0}' is not set. The Type property must be set in order to create WSDL. +SFxFaultCannotBeImported=Fault named {0} in operation {1} cannot be imported. {2} +SFxFaultContractDuplicateDetailType=In operation {0}, more than one fault is declared with detail type {1} +SFxFaultContractDuplicateElement=In operation {0}, more than one fault is declared with element name {1} in namespace {2} +SFxFaultExceptionToString3={0}: {1} (Fault Detail is equal to {2}). +SFxFaultReason=The creator of this fault did not specify a Reason. +SFxFaultTypeAnonymous=In operation {0}, the schema type corresponding to the fault detail type {1} is anonymous. Please set Fault name explicitly to export anonymous types. +SFxHeaderNameMismatchInMessageContract=Header name mismatch in member {1} of type {0}. The header name found in the description is {2}. The element name deduced by the formatter is {3}. This mismatch can happen if the ElementName specified in XmlElementAttribute or XmlArrayAttribute does not match the name specified in the MessageHeaderAttribute or MessageHeaderArrayAttribute or the member name. +SFxHeaderNameMismatchInOperation=Header name mismatch in operation {0} from contract {1}:{2}. The header name found in the description is {3}. The element name deduced by the formatter is {4}. This mismatch can happen if the ElementName specified in XmlElementAttribute or XmlArrayAttribute does not match the name specified in the MessageHeaderAttribute or MessageHeaderArrayAttribute or the member name. +SFxHeaderNamespaceMismatchInMessageContract=Header namespace mismatch in member {1} of type {0}. The header namespace found in the description is {2}. The element namespace deduced by the formatter is {3}. This mismatch can happen if the Namespace specified in XmlElementAttribute or XmlArrayAttribute does not match the namespace specified in the MessageHeaderAttribute or MessageHeaderArrayAttribute or the contract namespace. +SFxHeaderNamespaceMismatchInOperation=Header namespace mismatch in operation {0} from contract {1}:{2}. The header namespace found in the description is {3}. The element namespace deduced by the formatter is {4}. This mismatch can happen if the Namespace specified in XmlElementAttribute or XmlArrayAttribute does not match the namespace specified in the MessageHeaderAttribute or MessageHeaderArrayAttribute or the contract namespace. +SFxHeaderNotUnderstood=The header '{0}' from the namespace '{1}' was not understood by the recipient of this message, causing the message to not be processed. This error typically indicates that the sender of this message has enabled a communication protocol that the receiver cannot process. Please ensure that the configuration of the client's binding is consistent with the service's binding. +SFxHeadersAreNotSupportedInEncoded=Message {0} must not have headers to be used in RPC encoded style. +SFxImmutableServiceHostBehavior0=This value cannot be changed after the ServiceHost has opened. +SFxImmutableChannelFactoryBehavior0=This value cannot be changed after the ChannelFactory has opened. +SFxImmutableClientBaseCacheSetting=This value cannot be changed after the first ClientBase of type '{0}' has been created. +SFxImmutableThrottle1={0} cannot be changed after the ServiceHost has opened. +SFxInconsistentBindingBodyParts=Operation {0} binding {1} has extra part {2} that is not present in other bindings +SFxInconsistentWsdlOperationStyleInHeader=Style {1} on header {0} does not match expected style {2}. +SFxInconsistentWsdlOperationStyleInMessageParts=All parts of message in operation {0} must either contain type or element. +SFxInconsistentWsdlOperationStyleInOperationMessages=Style {1} inferred from messages in operation {0} does not match expected style {2} specified via bindings. +SFxInconsistentWsdlOperationUseAndStyleInBinding=Bindings for operation {0} cannot specify different use and style values. Binding {1} specifies use {2} and style {3} while binding {4} specifies use {5} and style {6}. +SFxInconsistentWsdlOperationUseInBindingExtensions=Extensions for operation {0} in binding {1} cannot specify different use values. +SFxInconsistentWsdlOperationUseInBindingMessages=Message bindings for operation {0} in binding {1} cannot specify different use values. +SFxInconsistentWsdlOperationUseInBindingFaults=Fault bindings for operation {0} in binding {1} cannot specify different use values. +SFxInputParametersToServiceInvalid=Service implementation object invoked with wrong number of input parameters, operation expects {0} parameters but was called with {1} parameters. +SFxInputParametersToServiceNull=Service implementation object invoked with null input parameters, but operation expects {0} parameters. +SFxInstanceNotInitialized=The InstanceContext has no provider for creating Service implementation objects. +SFxInterleavedContextScopes0=This OperationContextScope is being disposed out of order. +SFxInternalServerError=The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs. +SFxInternalCallbackError=The client was unable to process the callback request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from CallbackBehaviorAttribute or from the configuration behavior) on the client in order to send the exception information back to the server, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the client trace logs. +SFxInvalidAsyncResultState0=IAsyncResult's State must be the state argument passed to your Begin call. +SFxInvalidCallbackIAsyncResult=IAsyncResult not provided or of wrong type. +SFxInvalidCallbackContractType=The CallbackContract {0} is invalid because it is not an interface type. +SFxInvalidChannelToOperationContext=Invalid IContextChannel passed to OperationContext. Must be either a server dispatching channel or a client proxy channel. +SFxInvalidContextScopeThread0=This OperationContextScope is being disposed on a different thread than it was created. +SFxInvalidMessageBody=OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name '{0}' and namespace '{1}'. Found node type '{2}' with name '{3}' and namespace '{4}' +SFxInvalidMessageBodyEmptyMessage=The OperationFormatter could not deserialize any information from the Message because the Message is empty (IsEmpty = true). +SFxInvalidMessageBodyErrorSerializingParameter=There was an error while trying to serialize parameter {0}:{1}. The InnerException message was '{2}'. Please see InnerException for more details. +SFxInvalidMessageBodyErrorDeserializingParameter=There was an error while trying to deserialize parameter {0}:{1}. Please see InnerException for more details. +SFxInvalidMessageBodyErrorDeserializingParameterMore=There was an error while trying to deserialize parameter {0}:{1}. The InnerException message was '{2}'. Please see InnerException for more details. +SFxInvalidMessageContractSignature=The operation {0} either has a parameter or a return type that is attributed with MessageContractAttribute. In order to represent the request message using a Message Contract, the operation must have a single parameter attributed with MessageContractAttribute. In order to represent the response message using a Message Contract, the operation's return value must be a type that is attributed with MessageContractAttribute and the operation may not have any out or ref parameters. +SFxInvalidMessageHeaderArrayType=MessageHeaderArrayAttribute found on member {0} is not a single dimensional array. +SFxInvalidRequestAction=Outgoing request message for operation '{0}' specified Action='{1}', but contract for that operation specifies Action='{2}'. The Action specified in the Message must match the Action in the contract, or the operation contract must specify Action='*'. +SFxInvalidReplyAction=Outgoing reply message for operation '{0}' specified Action='{1}', but contract for that operation specifies ReplyAction='{2}'. The Action specified in the Message must match the ReplyAction in the contract, or the operation contract must specify ReplyAction='*'. +SFxInvalidStreamInTypedMessage=In order to use Streams with the MessageContract programming model, the type {0} must have a single member with MessageBodyMember attribute and the member type must be Stream. +SFxInvalidStreamInRequest=For request in operation {0} to be a stream the operation must have a single parameter whose type is Stream. +SFxInvalidStreamInResponse=For response in operation {0} to be a stream the operation must have a single out parameter or return value whose type is Stream. +SFxInvalidStreamOffsetLength=Buffer size must be at least {0} bytes. +SFxInvalidUseOfPrimitiveOperationFormatter=The PrimitiveOperationFormatter was given a parameter or return type which it does not support. +SFxInvalidStaticOverloadCalledForDuplexChannelFactory1=The static CreateChannel method cannot be used with the contract {0} because that contract defines a callback contract. Please try using one of the static CreateChannel overloads on DuplexChannelFactory. +SFxInvalidSoapAttribute=XmlSerializer attribute {0} is not valid in {1}. Only SoapElement attribute is supported. +SFxInvalidXmlAttributeInBare=XmlSerializer attribute {0} is not valid in {1}. Only XmlElement, XmlArray, XmlArrayItem and XmlAnyElement attributes are supported in MessageContract when IsWrapped is false. +SFxInvalidXmlAttributeInWrapped=XmlSerializer attribute {0} is not valid in {1}. Only XmlElement, XmlArray, XmlArrayItem, XmlAnyAttribute and XmlAnyElement attributes are supported when IsWrapped is true. +SFxKnownTypeAttributeInvalid1={0} must contain either a single ServiceKnownTypeAttribute that refers to a method or a set of ServiceKnownTypeAttributes, each specifying a valid type +SFxKnownTypeAttributeReturnType3=The return type of method {1} in type {2} must be IEnumerable to be used by ServiceKnownTypeAttribute in {0} +SFxKnownTypeAttributeUnknownMethod3=ServiceKnownTypeAttribute in {0} refers to a method {1} that does not exist in type {2} +SFxKnownTypeNull=KnownType cannot be null in operation {0} +SFxMessageContractBaseTypeNotValid=The type {1} defines a MessageContract but also derives from a type {0} that does not define a MessageContract. All of the objects in the inheritance hierarchy of {1} must defines a MessageContract. +SFxMessageContractRequiresDefaultConstructor=The message cannot be deserialized into MessageContract type {0} since it does not have a default (parameterless) constructor. +SFxMessageOperationFormatterCannotSerializeFault=MessageOperationFormatter cannot serialize faults. +SFxMetadataReferenceInvalidLocation=The value '{0}' is not valid for the Location property. The Location property must be a valid absolute or relative URI. +SFxMethodNotSupported1=Method {0} is not supported on this proxy, this can happen if the method is not marked with OperationContractAttribute or if the interface type is not marked with ServiceContractAttribute. +SFxMethodNotSupportedOnCallback1=Callback method {0} is not supported, this can happen if the method is not marked with OperationContractAttribute or if its interface type is not the target of the ServiceContractAttribute's CallbackContract. +SFxMethodNotSupportedByType2=ServiceHost implementation type {0} does not implement ServiceContract {1}. +SFxMismatchedOperationParent=A DispatchOperation (or ClientOperation) can only be added to its parent DispatchRuntime (or ClientRuntime). +SFxMissingActionHeader=No Action header was found with namespace '{0}' for the given message. +SFxMultipleCallbackFromSynchronizationContext=Calling Post() on '{0}' resulted in multiple callbacks. This indicates a problem in '{0}'. +SFxMultipleCallbackFromAsyncOperation=The callback passed to operation '{0}' was called more than once. This indicates an internal error in the implementation of that operation. +SFxMultipleUnknownHeaders=Method {0} in type {1} has more than one header part of type array of XmlElement. +SFxMultipleContractStarOperations0=A ServiceContract has more the one operation with an Action of "*". A ServiceContract can have at most one operation an Action = "*". +SFxMultipleContractsWithSameName=The Service contains multiple ServiceEndpoints with different ContractDescriptions which each have Name='{0}' and Namespace='{1}'. Either provide ContractDescriptions with unique Name and Namespaces, or ensure the ServiceEndpoints have the same ContractDescription instance. +SFxMultiplePartsNotAllowedInEncoded=Part {1}:{0} is repeating and is not supported in Soap Encoding. +SFxNameCannotBeEmpty=The Name property must be a non-empty string. +SFxConfigurationNameCannotBeEmpty=The ConfigurationName property must be a non-empty string. +SFxNeedProxyBehaviorOperationSelector2=Cannot handle invocation of {0} on interface {1} because the OperationSelector on ClientRuntime is null. +SFxNoDefaultConstructor=The service type provided could not be loaded as a service because it does not have a default (parameter-less) constructor. To fix the problem, add a default constructor to the type, or pass an instance of the type to the host. +SFxNoMostDerivedContract=The contract specified by type '{0}' is ambiguous. The type derives from at least two different types that each define its own service contract. For this type to be used as a contract type, exactly one of its inherited contracts must be more derived than any of the others. +SFxNullReplyFromExtension2=Extension {0} prevented call to operation '{1}' from replying by setting the reply to null. +SFxNullReplyFromFormatter2=Formatter {0} returned a null reply message for call to operation '{1}'. +SFxServiceChannelIdleAborted=The operation '{0}' could not be completed because the sessionful channel timed out waiting to receive a message. To increase the timeout, either set the receiveTimeout property on the binding in your configuration file, or set the ReceiveTimeout property on the Binding directly. +SFxServiceMetadataBehaviorUrlMustBeHttpOrRelative={0} must be a relative URI or an absolute URI with scheme '{1}'. '{2}' is an absolute URI with scheme '{3}'. +SFxServiceMetadataBehaviorNoHttpBaseAddress=The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http base address. Either supply an http base address or set HttpGetUrl to an absolute address. +SFxServiceMetadataBehaviorNoHttpsBaseAddress=The HttpsGetEnabled property of ServiceMetadataBehavior is set to true and the HttpsGetUrl property is a relative address, but there is no https base address. Either supply an https base address or set HttpsGetUrl to an absolute address. +SFxServiceMetadataBehaviorInstancingError=The ChannelDispatcher with ListenUri '{0}' has endpoints with the following contracts: {1}. Metadata endpoints cannot share ListenUris. The conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config. +SFxServiceTypeNotCreatable=Service implementation type is an interface or abstract class and no implementation object was provided. +SFxSetEnableFaultsOnChannelDispatcher0=This property sets EnableFaults on the client. To set EnableFaults on the server, use ChannelDispatcher's EnableFaults. +SFxSetManualAddresssingOnChannelDispatcher0=This property sets ManualAddressing on the client. To set ManualAddressing on the server, use ChannelDispatcher's ManualAddressing. +SFxNoBatchingForSession=TransactedBatchingBehavior validation failed. Service or client cannot be started. Transacted batching is not supported for session contracts. Remove transacted batching behavior from the endpoint or define a non-sessionful contract. +SFxNoBatchingForReleaseOnComplete=TransactedBatchingBehavior validation failed. Service cannot be started. Transacted batching requires ServiceBehavior.ReleaseServiceInstanceOnTransactionComplete to be false. +SFxNoServiceObject=The service implementation object was not initialized or is not available. +SFxNone2004=The WS-Addressing "none" value is not valid for the August 2004 version of WS-Addressing. +SFxNonExceptionThrown=An object that is not an exception was thrown. +SFxNonInitiatingOperation1=The operation '{0}' cannot be the first operation to be called because IsInitiating is false. +SfxNoTypeSpecifiedForParameter=There was no CLR type specified for parameter {0}, preventing the operation from being generated. +SFxOneWayAndTransactionsIncompatible=The one-way operation '{1}' on ServiceContract '{0}' is configured for transaction flow. Transactions cannot be flowed over one-way operations. +SFxOneWayMessageToTwoWayMethod0=The incoming message with action could not be processed because it is targeted at a request-reply operation, but cannot be replied to as the MessageId property is not set. +SFxOperationBehaviorAttributeOnlyOnServiceClass=OperationBehaviorAttribute can only go on the service class, it cannot be put on the ServiceContract interface. Method '{0}' on type '{1}' violates this. +SFxOperationBehaviorAttributeReleaseInstanceModeDoesNotApplyToCallback=The ReleaseInstanceMode property on OperationBehaviorAttribute can only be set on non-callback operations. Method '{0}' violates this. +SFxOperationContractOnNonServiceContract=Method '{0}' has OperationContractAttribute, but enclosing type '{1}' does not have ServiceContractAttribute. OperationContractAttribute can only be used on methods in ServiceContractAttribute types or on their CallbackContract types. +SFxOperationContractProviderOnNonServiceContract=Method '{1}' has {0}, but enclosing type '{2}' does not have ServiceContractAttribute. {0} can only be used on methods in ServiceContractAttribute types. +SFxOperationDescriptionNameCannotBeEmpty=OperationDescription's Name must be a non-empty string. +SFxParameterNameCannotBeNull=All parameter names used in operations that make up a service contract must not be null. +SFxOperationMustHaveOneOrTwoMessages=OperationDescription '{0}' is invalid because its Messages property contains an invalid number of MessageDescription instances. Each OperationDescription must have one or two messages. +SFxParameterCountMismatch=There was a mismatch between the number of supplied arguments and the number of expected arguments. Specifically, the argument '{0}' has '{1}' elements while the argument '{2}' has '{3}' elements. +SFxParameterMustBeMessage=The 'parameters' argument must be an array that contains a single Message object. +SFxParametersMustBeEmpty=The 'parameters' argument must be either null or an empty array. +SFxParameterMustBeArrayOfOneElement=The 'parameters' argument must be an array of one element. +SFxPartNameMustBeUniqueInRpc=Message part name {0} is not unique in an RPC Message. +SFxReceiveContextSettingsPropertyMissing=The contract '{0}' has at least one operation annotated with '{1}', but the binding used for the contract endpoint at address '{2}' does not support required binding property '{3}'. Please ensure that the binding used for the contract supports the ReceiveContext capability. +SFxReceiveContextPropertyMissing=Required message property '{0}' is missing from the IncomingProperties collections of the received message. Ensure that when the receive context is enabled on the binding, the created channel ensures that '{0}' is present on all received messages. +SFxRequestHasInvalidReplyToOnClient=The request message has ReplyTo='{0}' but IContextChannel.LocalAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress. Enable ManualAddressing or avoid setting ReplyTo on the message. +SFxRequestHasInvalidFaultToOnClient=The request message has FaultTo='{0}' but IContextChannel.LocalAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress. Enable ManualAddressing or avoid setting FaultTo on the message. +SFxRequestHasInvalidFromOnClient=The request message has From='{0}' but IContextChannel.LocalAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress. Enable ManualAddressing or avoid setting From on the message. +SFxRequestHasInvalidReplyToOnServer=The request message has ReplyTo='{0}' but IContextChannel.RemoteAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress because sending a reply to a different address than the original sender can create a security risk. If you want to process such messages, enable ManualAddressing. +SFxRequestHasInvalidFaultToOnServer=The request message has FaultTo='{0}' but IContextChannel.RemoteAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress because sending a reply to a different address than the original sender can create a security risk. If you want to process such messages, enable ManualAddressing. +SFxRequestHasInvalidFromOnServer=The request message has From='{0}' but IContextChannel.RemoteAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress because sending a reply to a different address than the original sender can create a security risk. If you want to process such messages, enable ManualAddressing. +SFxRequestReplyNone=A message was received with a WS-Addressing ReplyTo or FaultTo header targeted at the "None" address. These values are not valid for request-reply operations. Please consider using a one-way operation or enabling ManualAddressing if you need to support ReplyTo or FaultTo values of "None." +SFxRequestTimedOut1=This request operation did not receive a reply within the configured timeout ({0}). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client. +SFxRequestTimedOut2=This request operation sent to {0} did not receive a reply within the configured timeout ({1}). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client. +SFxReplyActionMismatch3=A reply message was received for operation '{0}' with action '{1}'. However, your client code requires action '{2}'. +SFxRequiredRuntimePropertyMissing=Required runtime property '{0}' is not initialized on DispatchRuntime. Do not remove ServiceBehaviorAttribute from ServiceDescription.Behaviors or ensure that you include a third-party service behavior that supplies this value. +SFxResolvedMaxResolvedReferences=The MetadataExchangeClient has resolved more than MaximumResolvedReferences. +SFxResultMustBeMessage=The 'result' argument must be of type Message. +SFxRevertImpersonationFailed0=Could not revert impersonation on current thread. Continuing would compromise system security. Terminating process. +SFxRpcMessageBodyPartNameInvalid=RPC Message {1} in operation {0} has an invalid body name {2}. It must be {3} +SFxRpcMessageMustHaveASingleBody=RPC Message {1} in operation {0} must have a single MessageBodyMember. +SFxSchemaDoesNotContainElement=There was a problem loading the XSD documents provided: a reference to a schema element with name '{0}' and namespace '{1}' could not be resolved because the element definition could not be found in the schema for targetNamespace '{1}'. Please check the XSD documents provided and try again. +SFxSchemaDoesNotContainType=There was a problem loading the XSD documents provided: a reference to a schema type with name '{0}' and namespace '{1}' could not be resolved because the type definition could not be found in the schema for targetNamespace '{1}'. Please check the XSD documents provided and try again. +SFxWsdlMessageDoesNotContainPart3=Service description message '{1}' from target namespace '{2}' does not contain part named '{0}'. +SFxSchemaNotFound=Schema with target namespace '{0}' could not be found. +SFxSecurityContextPropertyMissingFromRequestMessage=SecurityContextProperty is missing from the request Message, this may indicate security is configured incorrectly. +SFxServerDidNotReply=The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error. +SFxServiceHostBaseCannotAddEndpointAfterOpen=Endpoints cannot be added after the ServiceHost has been opened/faulted/aborted/closed. +SFxServiceHostBaseCannotAddEndpointWithoutDescription=Endpoints cannot be added before the Description property has been initialized. +SFxServiceHostBaseCannotApplyConfigurationWithoutDescription=ApplyConfiguration requires that the Description property be initialized. Either provide a valid ServiceDescription in the CreateDescription method or override the ApplyConfiguration method to provide an alternative implementation. +SFxServiceHostBaseCannotLoadConfigurationSectionWithoutDescription=LoadConfigurationSection requires that the Description property be initialized. Provide a valid ServiceDescription in the CreateDescription method. +SFxServiceHostBaseCannotInitializeRuntimeWithoutDescription=InitializeRuntime requires that the Description property be initialized. Either provide a valid ServiceDescription in the CreateDescription method or override the InitializeRuntime method to provide an alternative implementation. +SFxServiceHostCannotCreateDescriptionWithoutServiceType=InitializeDescription must be called with a serviceType or singletonInstance parameter. +SFxStaticMessageHeaderPropertiesNotAllowed=Header properties cannot be set in MessageHeaderAttribute of {0} as its type is MessageHeader. +SFxStreamIOException=An exception has been thrown when reading the stream. +SFxStreamRequestMessageClosed=The message containing this stream has been closed. Note that request streams cannot be accessed after the service operation returns. +SFxStreamResponseMessageClosed=The message containing this stream has been closed. +SFxTerminatingOperationAlreadyCalled1=This channel cannot send any more messages because IsTerminating operation '{0}' has already been called. +SFxThrottleLimitMustBeGreaterThanZero0=Throttle limit must be greater than zero. To disable, set to Int32.MaxValue. +SFxTimeoutInvalidStringFormat=The timeout value provided was not of a recognized format. Please see InnerException for more details. +SFxTimeoutOutOfRange0=Timeout must be greater than or equal to TimeSpan.Zero. To disable timeout, specify TimeSpan.MaxValue. +SFxTimeoutOutOfRangeTooBig=Timeouts larger than Int32.MaxValue TotalMilliseconds (approximately 24 days) cannot be honored. To disable timeout, specify TimeSpan.MaxValue. +SFxTooManyPartsWithSameName=Cannot create a unique part name for {0}. +SFxTraceCodeElementIgnored=An unrecognized element was encountered in the XML during deserialization which was ignored. +SfxTransactedBindingNeeded=TransactedBatchingBehavior validation failed. The service endpoint cannot be started. TransactedBatchingBehavior requires a binding that contains a binding element ITransactedBindingElement that returns true for ITransactedBindingElement.TransactedReceiveEnabled. If you are using NetMsmqBinding or MsmqIntegrationBinding make sure that ExactlyOnce is set to true. +SFxTransactionNonConcurrentOrAutoComplete2=TThe operation '{1}' on contract '{0}' is configured with TransactionAutoComplete set to false and with ConcurrencyMode not set to Single. TransactionAutoComplete set to false requires ConcurrencyMode.Single. +SFxTransactionNonConcurrentOrReleaseServiceInstanceOnTxComplete=The '{0}' service is configured with ReleaseServiceInstanceOnTransactionComplete set to true, but the ConcurrencyMode is not set to Single. The ReleaseServiceInstanceOnTransactionComplete requires the use of ConcurrencyMode.Single. +SFxNonConcurrentOrEnsureOrderedDispatch=The '{0}' service is configured with EnsureOrderedDispatch set to true, but the ConcurrencyMode is not set to Single. EnsureOrderedDispatch requires the use of ConcurrencyMode.Single. +SfxDispatchRuntimeNonConcurrentOrEnsureOrderedDispatch=The DispatchRuntime.EnsureOrderedDispatch property is set to true, but the DispatchRuntime.ConcurrencyMode is not set to Single. EnsureOrderedDispatch requires the use of ConcurrencyMode.Single. +SFxTransactionsNotSupported=The service does not support concurrent transactions. +SFxTransactionAsyncAborted=The transaction under which this method call was executing was asynchronously aborted. +SFxTransactionInvalidSetTransactionComplete=The SetTransactionComplete method was called in the operation '{0}' on contract '{1}' when TransactionAutoComplete was set to true. The SetTransactionComplete method can only be called when TransactionAutoComplete is set to false. This is an invalid scenario and the current transaction was aborted. +SFxMultiSetTransactionComplete=The SetTransactionComplete method was wrongly called more than once in the operation '{0}' on contract '{1}'. The SetTransactionComplete method can only be called once. This is an invalid scenario and the current transaction was aborted. +SFxTransactionFlowAndMSMQ=The binding for the endpoint at address '{0}' is configured with both the MsmqTransportBindingElement and the TransactionFlowBindingElement. These two elements cannot be used together. +SFxTransactionAutoCompleteFalseAndInstanceContextMode=The operation '{1}' on contract '{0}' is configured with TransactionAutoComplete set to false and the InstanceContextMode is not set to PerSession. TransactionAutoComplete set to false requires the use of InstanceContextMode.PerSession. +SFxTransactionAutoCompleteFalseOnCallbackContract=The operation '{0}' on callback contract '{1}' is configured with TransactionAutoComplete set to false. TransactionAutoComplete set to false cannot be used with operations on callback contracts. +SFxTransactionAutoCompleteFalseAndSupportsSession=The operation '{1}' on contract '{0}' is configured with TransactionAutoComplete set to false but SessionMode is not set to Required. TransactionAutoComplete set to false requires SessionMode.Required. +SFxTransactionAutoCompleteOnSessionCloseNoSession=The service '{0}' is configured with TransactionAutoCompleteOnSessionClose set to true and with an InstanceContextMode not set to PerSession. TransactionAutoCompleteOnSessionClose set to true requires an instancing mode that uses sessions. +SFxTransactionTransactionTimeoutNeedsScope=The service '{0}' is configured with a TransactionTimeout but no operations are configured with TransactionScopeRequired set to true. TransactionTimeout requires at least one operation with TransactionScopeRequired set to true. +SFxTransactionIsolationLevelNeedsScope=The service '{0}' is configured with a TransactionIsolationLevel but no operations are configured with TransactionScopeRequired set to true. TransactionIsolationLevel requires at least one operation with TransactionScopeRequired set to true. +SFxTransactionReleaseServiceInstanceOnTransactionCompleteNeedsScope=The service '{0}' is configured with ReleaseServiceInstanceOnTransactionComplete but no operations are configured with TransactionScopeRequired set to true. The ReleaseServiceInstanceOnTransactionComplete property requires at least one operation with TransactionScopeRequired set to true. Remove the ReleaseServiceInstanceOnTransactionComplete property from the service if this is the case. +SFxTransactionTransactionAutoCompleteOnSessionCloseNeedsScope=The service '{0}' is configured with TransactionAutoCompleteOnSessionClose, but no operations are configured with TransactionScopeRequired set to true. The TransactionAutoCompleteOnSessionClose property requires at least one operation with TransactionScopeRequired set to true. Remove the TransactionAutoCompleteOnSessionClose property from the service if this is the case. +SFxTransactionFlowRequired=The service operation requires a transaction to be flowed. +SFxTransactionUnmarshalFailed=The flowed transaction could not be unmarshaled. The following exception occurred: {0} +SFxTransactionDeserializationFailed=The incoming transaction cannot be deserialized. The transaction header in the message was either malformed or in an unrecognized format. The client and the service must be configured to use the same protocol and protocol version. The following exception occurred: {0} +SFxTransactionHeaderNotUnderstood=The transaction header '{0}' within the namespace '{1}' was not understood by the service. The client and the service must be configured to use the same protocol and protocol version ('{2}'). +SFxTryAddMultipleTransactionsOnMessage=An attempt was made to add more than one transaction to a message. At most one transaction can be added. +SFxTypedMessageCannotBeNull=Internal Error: The instance of the MessageContract cannot be null in {0}. +SFxTypedMessageCannotBeRpcLiteral=The operation '{0}' could not be loaded because it specifies "rpc-style" in "literal" mode, but uses message contract types or the System.ServiceModel.Channels.Message. This combination is disallowed -- specify a different value for style or use parameters other than message contract types or System.ServiceModel.Channels.Message. +SFxTypedOrUntypedMessageCannotBeMixedWithParameters=The operation '{0}' could not be loaded because it has a parameter or return type of type System.ServiceModel.Channels.Message or a type that has MessageContractAttribute and other parameters of different types. When using System.ServiceModel.Channels.Message or types with MessageContractAttribute, the method must not use any other types of parameters. +SFxTypedOrUntypedMessageCannotBeMixedWithVoidInRpc=When using the rpc-encoded style, message contract types or the System.ServiceModel.Channels.Message type cannot be used if the operation has no parameters or has a void return value. Add a blank message contract type as a parameter or return type to operation '{0}'. +SFxUnknownFaultNoMatchingTranslation1=This fault did not provide a matching translation: {0} +SFxUnknownFaultNullReason0=This fault did not provide a reason (MessageFault.Reason was null). +SFxUnknownFaultZeroReasons0=This fault did not provide a reason (MessageFault.Reason.Translations.Count was 0). +SFxUserCodeThrewException=User operation '{0}.{1}' threw an exception that is unhandled in user code. This exception will be rethrown. If this is a recurring problem, it may indicate an error in the implementation of the '{0}.{1}' method. +SfxUseTypedMessageForCustomAttributes=Parameter '{0}' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is '{1}'. +SFxWellKnownNonSingleton0=In order to use one of the ServiceHost constructors that takes a service instance, the InstanceContextMode of the service must be set to InstanceContextMode.Single. This can be configured via the ServiceBehaviorAttribute. Otherwise, please consider using the ServiceHost constructors that take a Type argument. +SFxVersionMismatchInOperationContextAndMessage2=Cannot add outgoing headers to message as MessageVersion in OperationContext.Current '{0}' does not match with the header version of message being processed '{1}'. +SFxWhenMultipleEndpointsShareAListenUriTheyMustHaveSameIdentity=When multiple endpoints on a service share the same ListenUri, those endpoints must all have the same Identity in their EndpointAddress. The endpoints at ListenUri '{0}' do not meet this criteria. +SFxWrapperNameCannotBeEmpty=Wrapper element name cannot be empty. +SFxWrapperTypeHasMultipleNamespaces=Wrapper type for message {0} cannot be projected as a data contract type since it has multiple namespaces. Consider using the XmlSerializer +SFxWsdlPartMustHaveElementOrType=WSDL part {0} in message {1} from namespace {2} must have either an element or a type name +SFxDataContractSerializerDoesNotSupportBareArray=DataContractSerializer does not support collection specified on element '{0}' +SFxDataContractSerializerDoesNotSupportEncoded=Invalid OperationFormatUse specified in the OperationFormatStyle of operation {0}, DataContractSerializer supports only Literal. +SFxXmlArrayNotAllowedForMultiple=XmlArrayAttribute cannot be used in repeating part {1}:{0}. +SFxConfigContractNotFound=Could not find default endpoint element that references contract '{0}' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element. +SFxConfigChannelConfigurationNotFound=Could not find endpoint element with name '{0}' and contract '{1}' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element. +SFxChannelFactoryEndpointAddressUri=The Address property on ChannelFactory.Endpoint was null. The ChannelFactory's Endpoint must have a valid Address specified. +SFxServiceContractGeneratorConfigRequired=In order to generate configuration information using the GenerateServiceEndpoint method, the ServiceContractGenerator instance must have been initialized with a valid Configuration object. +SFxCloseTimedOut1=The ServiceHost close operation timed out after {0}. This could be because a client failed to close a sessionful channel within the required time. The time allotted to this operation may have been a portion of a longer timeout. +SfxCloseTimedOutWaitingForDispatchToComplete=Close process timed out waiting for service dispatch to complete. +SFxInvalidWsdlBindingOpMismatch2=The WSDL binding named {0} is not valid because no match for operation {1} was found in the corresponding portType definition. +SFxInvalidWsdlBindingOpNoName=The WSDL binding named {0} is not valid because an operation binding doesn't have a name specified. +SFxChannelFactoryNoBindingFoundInConfig1=The underlying channel factory could not be created because no binding information was found in the configuration file for endpoint with name '{0}'. Please check the endpoint configuration section with name '{0}' to ensure that binding information is present and correct. +SFxChannelFactoryNoBindingFoundInConfigOrCode=The underlying channel factory could not be created because no Binding was passed to the ChannelFactory. Please supply a valid Binding instance via the ChannelFactory constructor. +SFxConfigLoaderMultipleEndpointMatchesSpecified2=The endpoint configuration section for contract '{0}' with name '{1}' could not be loaded because more than one endpoint configuration with the same name and contract were found. Please check your config and try again. +SFxConfigLoaderMultipleEndpointMatchesWildcard1=An endpoint configuration section for contract '{0}' could not be loaded because more than one endpoint configuration for that contract was found. Please indicate the preferred endpoint configuration section by name. +SFxProxyRuntimeMessageCannotBeNull=In operation '{0}', cannot pass null to methods that take Message as input parameter. +SFxDispatchRuntimeMessageCannotBeNull=In operation '{0}', cannot return null from methods that return Message. +SFxServiceHostNeedsClass=ServiceHost only supports class service types. +SfxReflectedContractKeyNotFound2=The contract name '{0}' could not be found in the list of contracts implemented by the service '{1}'. +SfxReflectedContractKeyNotFoundEmpty=In order to add an endpoint to the service '{0}', a non-empty contract name must be specified. +SfxReflectedContractKeyNotFoundIMetadataExchange=The contract name 'IMetadataExchange' could not be found in the list of contracts implemented by the service {0}. Add a ServiceMetadataBehavior to the configuration file or to the ServiceHost directly to enable support for this contract. +SfxServiceContractAttributeNotFound=The contract type {0} is not attributed with ServiceContractAttribute. In order to define a valid contract, the specified type (either contract interface or service class) must be attributed with ServiceContractAttribute. +SfxReflectedContractsNotInitialized1=An endpoint for type '{0}' could not be added because the ServiceHost instance was not initialized properly. In order to add endpoints by Type, the CreateDescription method must be called. If you are using a class derived from ServiceHost, ensure that the class is properly calling base.CreateDescription. +SFxMessagePartDescriptionMissingType=Instance of MessagePartDescription Name='{0}' Namespace='{1}' cannot be used in this context: required 'Type' property was not set. +SFxWsdlOperationInputNeedsMessageAttribute2=The wsdl operation input {0} in portType {1} does not reference a message. This is either because the message attribute is missing or empty. +SFxWsdlOperationOutputNeedsMessageAttribute2=The wsdl operation output {0} in portType {1} does not reference a message. This is either because the message attribute is missing or empty. +SFxWsdlOperationFaultNeedsMessageAttribute2=The wsdl operation {0} in portType {1} contains a fault that does not reference a message. This is either because the message attribute is missing or empty. +SFxMessageContractAttributeRequired=Cannot create a typed message from type '{0}'. The functionality only valid for types decorated with MessageContractAttribute. +AChannelServiceEndpointIsNull0=A Channel/Service Endpoint is null. +AChannelServiceEndpointSBindingIsNull0=A Channel/Service endpoint's Binding is null. +AChannelServiceEndpointSContractIsNull0=A Channel/Service endpoint's Contract is null. +AChannelServiceEndpointSContractSNameIsNull0=A Channel/Service endpoint's Contract's name is null or empty. +AChannelServiceEndpointSContractSNamespace0=A Channel/Service endpoint's Contract's namespace is null. +ServiceHasZeroAppEndpoints=Service '{0}' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element. +BindingRequirementsAttributeRequiresQueuedDelivery1=DeliveryRequirementsAttribute requires QueuedDelivery, but binding for the endpoint with contract '{0}' doesn't support it or isn't configured properly to support it. +BindingRequirementsAttributeDisallowsQueuedDelivery1=DeliveryRequirementsAttribute disallows QueuedDelivery, but binding for the endpoint with contract '{0}' supports it. +SinceTheBindingForDoesnTSupportIBindingCapabilities1_1=The DeliveryRequirementsAttribute on contract '{0}' specifies that the binding must support ordered delivery (RequireOrderedDelivery). This condition could not be verified because the configured binding does not implement IBindingDeliveryCapabilities. The DeliveryRequirementsAttribute may only be used with bindings that implement the IBindingDeliveryCapabilities interface. +SinceTheBindingForDoesnTSupportIBindingCapabilities2_1=The DeliveryRequirementsAttribute on contract '{0}' specifies a QueuedDeliveryRequirements constraint. This condition could not be verified because the configured binding does not implement IBindingDeliveryCapabilities. The DeliveryRequirementsAttribute may only be used with bindings that implement the IBindingDeliveryCapabilities interface. +TheBindingForDoesnTSupportOrderedDelivery1=The DeliveryRequirementsAttribute on contract '{0}' specifies a QueuedDeliveryRequirements value of NotAllowed. However, the configured binding for this contract specifies that it does support queued delivery. A queued binding may not be used with this contract. +ChannelHasAtLeastOneOperationWithTransactionFlowEnabled=At least one operation on the '{0}' contract is configured with the TransactionFlowAttribute attribute set to Mandatory but the channel's binding '{1}' is not configured with a TransactionFlowBindingElement. The TransactionFlowAttribute attribute set to Mandatory cannot be used without a TransactionFlowBindingElement. +ServiceHasAtLeastOneOperationWithTransactionFlowEnabled=At least one operation on the '{0}' contract is configured with the TransactionFlowAttribute attribute set to Mandatory but the channel's binding '{1}' is not configured with a TransactionFlowBindingElement. The TransactionFlowAttribute attribute set to Mandatory cannot be used without a TransactionFlowBindingElement. +SFxNoEndpointMatchingContract=The message with Action '{0}' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None). +SFxNoEndpointMatchingAddress=The message with To '{0}' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree. +SFxNoEndpointMatchingAddressForConnectionOpeningMessage=The message with Action '{0}' cannot be processed at the receiver because this Action is reserved for the connection opening messages only and cannot be sent from client to server. To invoke this operation on the server, call the '{1}' method on the client proxy instead. +SFxServiceChannelCannotBeCalledBecauseIsSessionOpenNotificationEnabled=The operation '{0}' could not be invoked because the property '{1}' on the OperationContract is set to '{2}'. To invoke this operation on the server, call the '{3}' method on the client proxy instead. +EndMethodsCannotBeDecoratedWithOperationContractAttribute=When using the IAsyncResult design pattern, the End method cannot be decorated with OperationContractAttribute. Only the corresponding Begin method can be decorated with OperationContractAttribute; that attribute will apply to the Begin-End pair of methods. Method '{0}' in type '{1}' violates this. +WsatMessagingInitializationFailed=The WS-AT messaging library failed to initialize. +WsatProxyCreationFailed=A client-side channel to the WS-AT protocol service could not be created. +DispatchRuntimeRequiresFormatter0=The DispatchOperation '{0}' requires Formatter, since DeserializeRequest and SerializeReply are not both false. +ClientRuntimeRequiresFormatter0=The ClientOperation '{0}' requires Formatter, since SerializeRequest and DeserializeReply are not both false. +RuntimeRequiresInvoker0=DispatchOperation requires Invoker. +CouldnTCreateChannelForType2=Channel requirements cannot be met by the ChannelFactory for Binding '{0}' since the contract requires support for one of these channel types '{1}' but the binding doesn't support any of them. +CouldnTCreateChannelForChannelType2=Channel type '{1}' was requested, but Binding '{0}' doesn't support it or isn't configured properly to support it. +EndpointListenerRequirementsCannotBeMetBy3=ChannelDispatcher requirements cannot be met by the IChannelListener for Binding '{0}' since the contract requires support for one of these channel types '{1}' but the binding only supports these channel types '{2}'. +UnknownListenerType1=The listener at Uri '{0}' could not be initialized because it was created for an unrecognized channel type. +BindingDoesnTSupportSessionButContractRequires1=Contract requires Session, but Binding '{0}' doesn't support it or isn't configured properly to support it. +BindingDoesntSupportDatagramButContractRequires=Contract does not allow Session, but Binding '{0}' does not support Datagram or is not configured properly to support it. +BindingDoesnTSupportOneWayButContractRequires1=Contract requires OneWay, but Binding '{0}' doesn't support it or isn't configured properly to support it. +BindingDoesnTSupportTwoWayButContractRequires1=Contract requires TwoWay (either request-reply or duplex), but Binding '{0}' doesn't support it or isn't configured properly to support it. +BindingDoesnTSupportRequestReplyButContract1=Contract requires Request/Reply, but Binding '{0}' doesn't support it or isn't configured properly to support it. +BindingDoesnTSupportDuplexButContractRequires1=Contract requires Duplex, but Binding '{0}' doesn't support it or isn't configured properly to support it. +BindingDoesnTSupportAnyChannelTypes1=Binding '{0}' doesn't support creating any channel types. This often indicates that the BindingElements in a CustomBinding have been stacked incorrectly or in the wrong order. A Transport is required at the bottom of the stack. The recommended order for BindingElements is: TransactionFlow, ReliableSession, Security, CompositeDuplex, OneWay, StreamSecurity, MessageEncoding, Transport. +ContractIsNotSelfConsistentItHasOneOrMore2=The contract '{0}' is not self-consistent -- it has one or more IsTerminating or non-IsInitiating operations, but it does not have the SessionMode property set to SessionMode.Required. The IsInitiating and IsTerminating attributes can only be used in the context of a session. +ContractIsNotSelfConsistentWhenIsSessionOpenNotificationEnabled=The operation contract '{0}' is not self-consistent. When the '{1}' is set to '{2}', both '{3}' and '{4}' properties must be true, and the operation must not have any input parameters. +InstanceSettingsMustHaveTypeOrWellKnownObject0=The ServiceHost must be configured with either a serviceType or a serviceInstance. Both of these values are currently null. +TheServiceMetadataExtensionInstanceCouldNot2_0=The ServiceMetadataExtension instance could not be added to the ServiceHost instance because it has already been added to another ServiceHost instance. +TheServiceMetadataExtensionInstanceCouldNot3_0=The ServiceMetadataExtension instance could not be removed from the ServiceHost instance because it has not been added to any ServiceHost instance. +TheServiceMetadataExtensionInstanceCouldNot4_0=The ServiceMetadataExtension instance could not be removed from the ServiceHost instance because it has already been added to a different ServiceHost instance. +SynchronizedCollectionWrongType1=A value of type '{0}' cannot be added to the generic collection, because the collection has been parameterized with a different type. +SynchronizedCollectionWrongTypeNull=A null value cannot be added to the generic collection, because the collection has been parameterized with a value type. +CannotAddTwoItemsWithTheSameKeyToSynchronizedKeyedCollection0=Cannot add two items with the same key to SynchronizedKeyedCollection. +ItemDoesNotExistInSynchronizedKeyedCollection0=Item does not exist in SynchronizedKeyedCollection. +SuppliedMessageIsNotAReplyItHasNoRelatesTo0=A reply message was received without a valid RelatesTo header. This may have been caused by a missing RelatesTo header or a RelatesTo header with an invalid WS-Addressing Relationship type. +channelIsNotAvailable0=Internal Error: The InnerChannel property is null. +channelDoesNotHaveADuplexSession0=The current channel does not support closing the output session as this channel does not implement ISessionChannel. +EndpointsMustHaveAValidBinding1=The ServiceEndpoint with name '{0}' could not be exported to WSDL because the Binding property is null. To fix this, set the Binding property to a valid Binding instance. +ABindingInstanceHasAlreadyBeenAssociatedTo1=A binding instance has already been associated to listen URI '{0}'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config. +; ------------------------------------------------------------------------------------------------------------------------------ +; Metadata Import/Export (WSDL, WS-Policy) +; ------------------------------------------------------------------------------------------------------------------------------ +UnabletoImportPolicy=The following Policy Assertions were not Imported:\r\n +UnImportedAssertionList= XPath:{0}\r\n Assertions: +XPathUnavailable="XPath Unavailable" +DuplicatePolicyInWsdlSkipped=A policy expression was ignored because another policy expression with that ID has already been read in this document.\r\nXPath:{0} +DuplicatePolicyDocumentSkipped=A policy document was ignored because a policy expression with that ID has already been imported.\r\nPolicy ID:{0} +PolicyDocumentMustHaveIdentifier=A metadata section containing policy did not have an identifier so it cannot be referenced. +XPathPointer=XPath:{0} +UnableToFindPolicyWithId=A policy reference was ignored because the policy with ID '{0}' could not be found. +PolicyReferenceInvalidId=A policy reference was ignored because the URI of the reference was empty. +PolicyReferenceMissingURI=A policy reference was ignored because the required {0} attribute was missing. +ExceededMaxPolicyComplexity=The policy expression was not fully imported because it exceeded the maximum allowable complexity. The import stopped at element '{0}' '{1}'. +ExceededMaxPolicySize=The policy expression was not fully imported because its normalized form was too large. +UnrecognizedPolicyElementInNamespace=Unrecognized policy element {0} in namespace {1}. +UnsupportedPolicyDocumentRoot="{0}" is not a supported WS-Policy document root element. +UnrecognizedPolicyDocumentNamespace=The "{0}" namespace is not a recognized WS-Policy namespace. +NoUsablePolicyAssertions=Cannot find usable policy alternatives. +PolicyInWsdlMustHaveFragmentId=Unreachable policy detected.\r\nA WS-Policy element embedded in WSDL is missing a fragment identifier. This policy cannot be referenced by any WS-PolicyAttachment mechanisms.\r\nXPath:{0} +FailedImportOfWsdl=The processing of the WSDL parameter failed. Error: {0} +OptionalWSDLExtensionIgnored=The optional WSDL extension element '{0}' from namespace '{1}' was not handled.\r\nXPath: {2} +RequiredWSDLExtensionIgnored=The required WSDL extension element '{0}' from namespace '{1}' was not handled. +UnknownWSDLExtensionIgnored=An unrecognized WSDL extension of Type '{0}' was not handled. +WsdlExporterIsFaulted=A previous call to this WsdlExporter left it in a faulted state. It is no longer usable. +WsdlImporterIsFaulted=A previous call to this WsdlImporter left it in a faulted state. It is no longer usable. +WsdlImporterContractMustBeInKnownContracts=The ContractDescription argument to ImportEndpoints must be contained in the KnownContracts collection. +WsdlItemAlreadyFaulted=A previous attempt to import this {0} already failed. +InvalidPolicyExtensionTypeInConfig=The type {0} registered as a policy extension does not implement IPolicyImportExtension +PolicyExtensionTypeRequiresDefaultConstructor=The type {0} registered as a policy extension does not have a public default constructor. Policy extensions must have a public default constructor +PolicyExtensionImportError=An exception was thrown in a call to a policy import extension.\r\nExtension: {0}\r\nError: {1} +PolicyExtensionExportError=An exception was thrown in a call to a policy export extension.\r\nExtension: {0}\r\nError: {1} +MultipleCallsToExportContractWithSameContract=Calling IWsdlExportExtension.ExportContract twice with the same ContractDescription is not supported. +DuplicateContractQNameNameOnExport=Duplicate contract XmlQualifiedNames are not supported.\r\nAnother ContractDescription with the Name: {0} and Namespace: {1} has already been exported. +WarnDuplicateBindingQNameNameOnExport=Similar ServiceEndpoints were exported. The WSDL export process was forced to suffix wsdl:binding names to avoid naming conflicts.\r\n Similar ServiceEndpoints means different binding instances having the Name: {0} and Namespace: {1} and either the same ContractDescription or at least the same contract Name: {2}. +WarnSkippingOpertationWithWildcardAction=An operation was skipped during export because it has a wildcard action. This is not supported in WSDL.\r\nContract Name:{0}\r\nContract Namespace:{1}\r\nOperation Name:{2} +WarnSkippingOpertationWithSessionOpenNotificationEnabled=An operation was skipped during export because the property '{0}' is set to '{1}'. This operation should be used for server only and should not be exposed from WSDL. \r\nContract Name:{2}\r\nContract Namespace:{3}\r\nOperation Name:{4} +InvalidWsdlExtensionTypeInConfig=The type {0} registered as a WSDL extension does not implement IWsdlImportExtension. +WsdlExtensionTypeRequiresDefaultConstructor=The type {0} registered as a WSDL extension does not have a public default constructor. WSDL extensions must have a public default constructor. +WsdlExtensionContractExportError=An exception was thrown in a call to a WSDL export extension: {0}\r\n contract: {1} +WsdlExtensionEndpointExportError=An exception was thrown in a call to a WSDL export extension: {0}\r\n Endpoint: {1} +WsdlExtensionBeforeImportError=A WSDL import extension threw an exception during the BeforeImport call: {0}\r\nError: {1} +WsdlExtensionImportError=An exception was thrown while running a WSDL import extension: {0}\r\nError: {1} +WsdlImportErrorMessageDetail=Cannot import {0}\r\nDetail: {2}\r\nXPath to Error Source: {1} +WsdlImportErrorDependencyDetail=There was an error importing a {0} that the {1} is dependent on.\r\nXPath to {0}: {2} +UnsupportedEnvelopeVersion=The {0} binding element requires envelope version '{1}' It doesn't support '{2}'. +NoValue0=No value. +UnsupportedBindingElementClone=The '{0}' binding element does not support cloning. +UnrecognizedBindingAssertions1=WsdlImporter encountered unrecognized policy assertions in ServiceDescription '{0}': + +ServicesWithoutAServiceContractAttributeCan2=The {0} declared on method '{1}' in type '{2}' is invalid. {0}s are only valid on methods that are declared in a type that has ServiceContractAttribute. Either add ServiceContractAttribute to type '{2}' or remove {0} from method '{1}'. +tooManyAttributesOfTypeOn2=Too many attributes of type {0} on {1}. +couldnTFindRequiredAttributeOfTypeOn2=Couldn't find required attribute of type {0} on {1}. +AttemptedToGetContractTypeForButThatTypeIs1=Attempted to get contract type for {0}, but that type is not a ServiceContract, nor does it inherit a ServiceContract. +NoEndMethodFoundForAsyncBeginMethod3=OperationContract method '{0}' in type '{1}' does not properly implement the async pattern, as no corresponding method '{2}' could be found. Either provide a method called '{2}' or set the AsyncPattern property on method '{0}' to false. +MoreThanOneEndMethodFoundForAsyncBeginMethod3=OperationContract method '{0}' in type '{1}' does not properly implement the async pattern, as more than one corresponding method '{2}' was found. When using the async pattern, exactly one end method must be provided. Either remove or rename one or more of the '{2}' methods such that there is just one, or set the AsyncPattern property on method '{0}' to false. +InvalidAsyncEndMethodSignatureForMethod2=Invalid async End method signature for method {0} in ServiceContract type {1}. Your end method must take an IAsyncResult as the last argument. +InvalidAsyncBeginMethodSignatureForMethod2=Invalid async Begin method signature for method {0} in ServiceContract type {1}. Your begin method must take an AsyncCallback and an object as the last two arguments and return an IAsyncResult. +InAContractInheritanceHierarchyIfParentHasCallbackChildMustToo=Because base ServiceContract '{0}' has a CallbackContract '{1}', derived ServiceContract '{2}' must also specify either '{1}' or a derived type as its CallbackContract. +InAContractInheritanceHierarchyTheServiceContract3_2=In a contract inheritance hierarchy, the ServiceContract's CallbackContract must be a subtype of the CallbackContracts of all of the CallbackContracts of the ServiceContracts inherited by the original ServiceContract, Types {0} and {1} violate this rule. +CannotHaveTwoOperationsWithTheSameName3=Cannot have two operations in the same contract with the same name, methods {0} and {1} in type {2} violate this rule. You can change the name of one of the operations by changing the method name or by using the Name property of OperationContractAttribute. +CannotHaveTwoOperationsWithTheSameElement5=The {0}.{1} operation references a message element [{2}] that has already been exported from the {3}.{4} operation. You can change the name of one of the operations by changing the method name or using the Name property of OperationContractAttribute. Alternatively, you can control the element name in greater detail using the MessageContract programming model. +CannotInheritTwoOperationsWithTheSameName3=Cannot inherit two different operations with the same name, operation '{0}' from contracts '{1}' and '{2}' violate this rule. You can change the name of one of the operations by changing the method name or by using the Name property of OperationContractAttribute. +SyncAsyncMatchConsistency_Parameters5=The synchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must define the same number and types of parameters. In this case, some of the arguments are different. To fix it, ensure that the OperationContracts define the same number and types of arguments, in the same order. Alternatively, changing the name of one of the methods will prevent matching. +SyncTaskMatchConsistency_Parameters5=The synchronous OperationContract method '{0}' in type '{1}' was matched with the task-based asynchronous OperationContract method '{2}' because they have the same operation name '{3}'. When a synchronous OperationContract method is matched to a task-based asynchronous OperationContract method, the two OperationContracts must define the same number and types of parameters. In this case, some of the arguments are different. To fix it, ensure that the OperationContracts define the same number and types of arguments, in the same order. Alternatively, changing the name of one of the methods will prevent matching. +TaskAsyncMatchConsistency_Parameters5=The task-based asynchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a task-based asynchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must define the same number and types of parameters. In this case, some of the arguments are different. To fix it, ensure that the OperationContracts define the same number and types of arguments, in the same order. Alternatively, changing the name of one of the methods will prevent matching. +SyncAsyncMatchConsistency_ReturnType5=The synchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must define the same return type. In this case, the return types are different. To fix it, ensure that method '{0}' and method '{3}' have the same return type. Alternatively, changing the name of one of the methods will prevent matching. +SyncTaskMatchConsistency_ReturnType5=The synchronous OperationContract method '{0}' in type '{1}' was matched with the task-based asynchronous OperationContract method '{2}' because they have the same operation name '{3}'. When a synchronous OperationContract method is matched to a task-based asynchronous OperationContract method, the two OperationContracts must define the same return type. In this case, the return types are different. To fix it, ensure that method '{0}' and method '{2}' have the same return type. Alternatively, changing the name of one of the methods will prevent matching. +TaskAsyncMatchConsistency_ReturnType5=The task-based asynchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must define the same return type. In this case, the return types are different. To fix it, ensure that method '{0}' and method '{3}' have the same return type. Alternatively, changing the name of one of the methods will prevent matching. +SyncAsyncMatchConsistency_Attributes6=The synchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, any additional attributes must be declared on the synchronous OperationContract method. In this case, the asynchronous OperationContract method '{2}' has one or more attributes of type '{5}'. To fix it, remove the '{5}' attribute or attributes from method '{2}'. Alternatively, changing the name of one of the methods will prevent matching. +SyncTaskMatchConsistency_Attributes6=The synchronous OperationContract method '{0}' in type '{1}' was matched with the task-based asynchronous OperationContract method '{2}' because they have the same operation name '{3}'. When a synchronous OperationContract method is matched to a task-based asynchronous OperationContract method, any additional attributes must be declared on the synchronous OperationContract method. In this case, the task-based asynchronous OperationContract method '{2}' has one or more attributes of type '{4}'. To fix it, remove the '{4}' attribute or attributes from method '{2}'. Alternatively, changing the name of one of the methods will prevent matching. +TaskAsyncMatchConsistency_Attributes6=The task-based asynchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a task-based asynchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, any additional attributes must be declared on the task-based asynchronous OperationContract method. In this case, the asynchronous OperationContract method '{2}' has one or more attributes of type '{5}'. To fix it, remove the '{5}' attribute or attributes from method '{2}'. Alternatively, changing the name of one of the methods will prevent matching. +SyncAsyncMatchConsistency_Property6=The synchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must have the same value for the '{5}' property. In this case, the values are different. To fix it, change the '{5} property of one of the OperationContracts to match the other. Alternatively, changing the name of one of the methods will prevent matching. +SyncTaskMatchConsistency_Property6=The synchronous OperationContract method '{0}' in type '{1}' was matched with the task-based asynchronous OperationContract method '{2}' because they have the same operation name '{3}'. When a synchronous OperationContract method is matched to a task-based asynchronous OperationContract method, the two OperationContracts must have the same value for the '{4}' property. In this case, the values are different. To fix it, change the '{4} property of one of the OperationContracts to match the other. Alternatively, changing the name of one of the methods will prevent matching. +TaskAsyncMatchConsistency_Property6=The task-based asynchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a task-based asynchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must have the same value for the '{5}' property. In this case, the values are different. To fix it, change the '{5} property of one of the OperationContracts to match the other. Alternatively, changing the name of one of the methods will prevent matching. +ServiceOperationsMarkedWithIsOneWayTrueMust0=Operations marked with IsOneWay=true must not declare output parameters, by-reference parameters or return values. +OneWayOperationShouldNotSpecifyAReplyAction1=One way operation {0} cannot not specify a reply action. +OneWayAndFaultsIncompatible2=The method '{1}' in type '{0}' is marked IsOneWay=true and declares one or more FaultContractAttributes. One-way methods cannot declare FaultContractAttributes. To fix it, change IsOneWay to false or remove the FaultContractAttributes. +OnlyMalformedMessagesAreSupported=Only malformed Messages are supported. +UnableToLocateOperation2=Cannot locate operation {0} in Contract {1}. +UnsupportedWSDLOnlyOneMessage=Unsupported WSDL, only one message part is supported for fault messages. This fault message references zero or more than one message part. If you have edit access to the WSDL file, you can fix the problem by removing the extra message parts such that fault message references just one part. +UnsupportedWSDLTheFault=Unsupported WSDL, the fault message part must reference an element. This fault message does not reference an element. If you have edit access to the WSDL document, you can fix the problem by referencing a schema element using the 'element' attribute. +AsyncEndCalledOnWrongChannel=Async End called on wrong channel. +AsyncEndCalledWithAnIAsyncResult=Async End called with an IAsyncResult from a different Begin method. +IsolationLevelMismatch2=The received transaction has an isolation level of '{0}' but the service is configured with a TransactionIsolationLevel of '{1}'. The isolation level for received transactions and the service must be the same. +MessageHeaderIsNull0=The value of the addressHeaders argument is invalid because the collection contains null values. Null is not a valid value for the AddressHeaderCollection. +MessagePropertiesArraySize0=The array passed does not have enough space to hold all the properties contained by this collection. +DuplicateBehavior1=The value could not be added to the collection, as the collection already contains an item of the same type: '{0}'. This collection only supports one instance of each type. +CantCreateChannelWithManualAddressing=Cannot create channel for a contract that requires request/reply and a binding that requires manual addressing but only supports duplex communication. +XsdMissingRequiredAttribute1=Missing required '{0}' attribute. +IgnoreSoapHeaderBinding3=Ignoring invalid SOAP header extension in wsdl:operation name='{0}' from targetNamespace='{1}'. Reason: {2} +IgnoreSoapFaultBinding3=Ignoring invalid SOAP fault extension in wsdl:operation name='{0}' from targetNamespace='{1}'. Reason: {2} +IgnoreMessagePart3=Ignoring invalid part in wsdl:message name='{0}' from targetNamespace='{1}'. Reason: {2} +CannotImportPrivacyNoticeElementWithoutVersionAttribute=PrivacyNotice element must have a Version attribute. +PrivacyNoticeElementVersionAttributeInvalid=PrivacyNotice element Version attribute must have an integer value. + +; ------------------------------------------------------------------------------------------------------------------------------ +; Queues +; ------------------------------------------------------------------------------------------------------------------------------ +MsmqActiveDirectoryRequiresNativeTransfer=Binding validation failed. The client cannot send messages. A conflict in the binding properties caused this failure. The UseActiveDirectory is set to true and QueueTransferProtocol is set to Native. To resolve the conflict, correct one of the properties. +MsmqAdvancedPoisonHandlingRequired=Binding validation failed because the binding's ReceiveErrorHandlig property is set to Move or Reject while the version of MSMQ installed on this system is not 4.0 or higher. The channel listener cannot be opened. Resolve the conflict by setting the ReceiveErrorHandling property to Drop or Fault, or by upgrading to MSMQ v4.0. +MsmqAmbientTransactionInactive=The Ambient transaction used to Complete the ReceiveContext Operation is not in an active state. +MsmqAuthCertificateRequiresProtectionSign=Binding validation failed because the binding's MsmqAuthenticationMode property is set to Certificate while the MsmqProtectionLevel property is not set to Sign or EncryptAndSign. The channel factory or service host cannot be opened. Resolve the conflict by correcting one of the properties. +MsmqAuthNoneRequiresProtectionNone=Binding validation failed. The service or the client cannot be started. A conflict in the binding properties caused this failure. The MsmqAuthenticationMode is set to None and MsmqProtectionLevel is not set to None. To resolve to conflict, correct one of the properties. +MsmqAuthWindowsRequiresProtectionNotNone=Binding validation failed because the binding's MsmqAuthenticationMode property is set to WindowsDomain while the MsmqProtectionLevel property is not set to Sign or EncryptAndSign. The channel factory or service host cannot be opened. Resolve the conflict by correcting one of the properties. +MsmqBadCertificate=Creation of a message security context failed because the attached sender certificate was invalid or cannot be validated. The message cannot be received. Ensure that a valid certificate is attached to the message and that the certificate is present in the receiver's certificate store. +MsmqBadContentType=The content type of an incoming message is unknown or not supported. The message cannot be received. Ensure that the sender was configured to use the same message encoder as the receiver. +MsmqBadFrame=An incoming MSMQ message contained invalid or unexpected .NET Message Framing information in its body. The message cannot be received. Ensure that the sender is using a compatible service contract with a matching SessionMode. +MsmqBadXml=An XML error was encountered while reading a WCF message. The message cannot be received. Ensure the message was sent by a WCF client which used an identical message encoder. +MsmqBatchRequiresTransactionScope=TransactedBatchingBehavior validation failed because none of the service operations had the TransactionScopeRequired property set to true on their OperationBehavior attribute. The service host cannot be started. Ensure this requirement is met if you wish to use this behavior. +MsmqByteArrayBodyExpected=A mismatch was detected between the serialization format specified in the MsmqIntegrationMessageProperty and the body of the MSMQ message. The message cannot be sent. The serialization format ByteArray requires the body of the MSMQ message to be of type byte[]. +MsmqCannotDeserializeActiveXMessage=An error occurred while deserializing an MSMQ message's ActiveX body. The message cannot be received. The specified variant type for the body does not match the actual MSMQ message body. +MsmqCannotDeserializeXmlMessage=An error occurred while deserializing an MSMQ message's XML body. The message cannot be received. Ensure that the service contract is decorated with appropriate [ServiceKnownType] attributes or the TargetSerializationTypes property is set on the MsmqIntegrationBindingElement. +MsmqCannotUseBodyTypeWithActiveXSerialization=The properties of the message are mismatched. The message cannot be sent. The BodyType message property cannot be specified if the ActiveX serialization format is used. +MsmqCertificateNotFound=The sender's X.509 certificate was not found. The message cannot be sent. Ensure the certificate is available in the sender's certificate store. +MsmqCustomRequiresPerAppDLQ=Binding validation failed. The client cannot send the message. The DeadLetterQueue is set to Custom, but the CustomDeadLetterQueue is not specified. Specify the URI of the dead letter queue for each application in the CustomDeadLetterQueue property. +MsmqDeserializationError=An error was encountered while deserializing the message. The message cannot be received. +MsmqDirectFormatNameRequiredForPoison=Binding validation failed because the endpoint listen URI does not represent an MSMQ direct format name. The service host cannot be opened. Make sure you use a direct format name for the endpoint's listen URI. +MsmqDLQNotLocal=The host in the CustomDeadLetterQueue URI is not "localhost" or the local machine name. A custom DLQ must reside on the sender's machine. +MsmqDLQNotWriteable=Binding validation failed. The client cannot send a message. The specified dead letter queue does not exist or cannot be written. Ensure the queue exists with the proper authorization to write to it. +MsmqEncryptRequiresUseAD=Binding validation failed because the binding's MsmqProtectionLevel property is set to EncryptAndSign while the UseActiveDirectory is not set to true. The channel factory or the service host cannot be opened. Resolve the conflict by correcting one of the properties. +MsmqExactlyOnceNeededForReceiveContext=Binding validation failed. The service or the client cannot be started. The ExactlyOnce property is set to false and ReceiveContext is enabled. This is not supported. To resolve the conflict, either set ExactlyOnce to true or disable ReceiveContext. +MsmqGetPrivateComputerInformationError=The version check failed with the error: '{0}'. The version of MSMQ cannot be detected All operations that are on the queued channel will fail. Ensure that MSMQ is installed and is available. +MsmqInvalidMessageId=The message ID '{0}' is not in the right format. +MsmqInvalidScheme=The specified addressing scheme is invalid for this binding. The NetMsmqBinding scheme must be net.msmq. The MsmqIntegrationBinding scheme must be msmq.formatname. +MsmqInvalidServiceOperationForMsmqIntegrationBinding=The MsmqIntegrationBinding validation failed. The service cannot be started. The {0} binding does not support the method signature for the service operation {1} in the {2} contract. Correct the service operation to use the MsmqIntegrationBinding. +MsmqInvalidTypeDeserialization=The ActiveX serialization failed because the serialization format cannot be recognized. The message cannot be received. +MsmqInvalidTypeSerialization=The variant type is not recognized. The ActiveX serialization failed. The message cannot be sent. The specified variant type is not supported. +MsmqKnownWin32Error={0} ({1}, 0x{2}) +MsmqMessageDoesntHaveIntegrationProperty=The message cannot be sent because it's missing an MsmqIntegrationMessageProperty. All messages sent over MSMQ integration channels must carry the MsmqIntegrationMessageProperty. +MsmqNoAssurancesForVolatile=Binding validation failed. The service or the client cannot be started. The ExactlyOnce property is set to true and the Durable property is set to false. This is not supported. To resolve the conflict, correct one of these properties. +MsmqNonNegativeArgumentExpected=Argument must be a positive number or zero. +MsmqNonTransactionalQueueNeeded=A mismatch between the binding and MSMQ queue configuration was detected. The service cannot be started. The ExactlyOnce property is set to false and the queue to read messages from is a transactional queue, Correct the error by setting the ExactlyOnce property to true or create a non-transactional binding. +MsmqNoMoveForSubqueues=Binding validation failed because the URI represents a subqueue and the ReceiveErrorHandling parameter is set to Move. The service host or channel listener cannot be opened. Resolve this conflict by setting the ReceiveErrorHandling to Fault, Drop or Reject. +MsmqNoSid=Creation of a message security context failed because the sender's SID was not found in the message. The message cannot be received. The WindowsDomain MsmqAuthenticationMode requires the sender's SID. +MsmqOpenError=An error occurred while opening the queue:{0}. The message cannot be sent or received from the queue. Ensure that MSMQ is installed and running. Also ensure that the queue is available to open with the required access mode and authorization. +MsmqPathLookupError=An error occurred when converting the '{0}' queue path name to the format name: {1}. All operations on the queued channel failed. Ensure that the queue address is valid. MSMQ must be installed with Active Directory integration enabled and access to it is available. +MsmqPerAppDLQRequiresCustom=Binding validation failed. The client cannot send messages. The CustomDeadLetterQueue property is set, but the DeadLetterQueue property is not set to Custom. Set the DeadLetterQueue property to Custom. +MsmqPerAppDLQRequiresExactlyOnce=Binding validation failed. The client cannot send messages. A conflict in the binding properties is causing the failure. To use the custom dead letter queue, ExactlyOnce must be set to true to resolve to conflict. +MsmqPerAppDLQRequiresMsmq4=A mismatch between the binding and MSMQ configuration was detected. The client cannot send messages. To use the custom dead letter queue, you must have MSMQ version 4.0 or higher. If you do not have MSMQ version 4.0 or higher set the DeadLetterQueue property to System or None. +MsmqPoisonMessage=The transport channel detected a poison message. This occurred because the message exceeded the maximum number of delivery attempts or because the channel detected a fundamental problem with the message. The inner exception may contain additional information. +MsmqQueueNotReadable=There was an error opening the queue. Ensure that MSMQ is installed and running, the queue exists and has proper authorization to be read from. The inner exception may contain additional information. +MsmqReceiveContextMessageNotReceived=The ReceiveContext delete operation failed because the message with Id '{0}' could not be received from the lock subqueue. +MsmqReceiveContextMessageNotMoved=The ReceiveContext unlock operation failed because the message with Id '{0}' could not be moved from the lock subqueue to the main queue. +MsmqReceiveContextSubqueuesNotSupported=The queue could not be opened because the ReceiveContext feature is not supported on subqueues. Specify a different queue to receive from, or disable ReceiveContext. +MsmqReceiveError=An error occurred while receiving a message from the queue: {0}. Ensure that MSMQ is installed and running. Make sure the queue is available to receive from. +MsmqSameTransactionExpected=A transaction error occurred for this session. The session channel is faulted. Messages in the session cannot be sent or received. A queued session cannot be associated with more than one transaction. Ensure that all messages in the session are sent or received using a single transaction. +MsmqSendError=An error occurred while sending to the queue: {0}.Ensure that MSMQ is installed and running. If you are sending to a local queue, ensure the queue exists with the required access mode and authorization. +MsmqSerializationTableFull=A serialization error occurred. The message cannot be sent or received. The MSMQ integration channel is able to serialize no more than {0} types. +MsmqSessionChannelAbort=The transaction associated with this session channel has been rolled back because Abort was called on the session channel before the transaction committed. +MsmqSessionChannelHasPendingItems=Session channels must not have pending messages when the transactions associated with these channels are committed. Pending messages are either messages that have not been received from the session channel or messages that have been received but Complete has not been called for them. The channel has faulted and the transaction was rolled back. +MsmqSessionChannelsMustBeClosed=Session channels must be closed before the transaction is committed. The channel has faulted and the transaction was rolled back. +MsmqSessionGramSizeMustBeInIntegerRange=The total size of messages sent in this session exceeded the maximum value of Int32. The messages in this session cannot be sent. +MsmqSessionMessagesNotConsumed=An attempt made to close the session channel while there are still messages pending in the session. Current transaction will be rolled back and the session channel will be faulted. Messages in a session must be consumed all at once. +MsmqSessionPrematureClose=An attempt was made to close the session channel while there are still messages pending in the session. The sessiongram will be rolled back to the queue and the session channel will be faulted. +MsmqStreamBodyExpected=A serialization error occurred because of a mismatch between the value of the SerializationFormat property and the type of the body. The message cannot be sent. Ensure the type of the body is Stream or use a different SerializationFormat. +MsmqTimeSpanTooLarge=The message time to live (TTL) is too large. The message cannot be sent. The message TTL cannot exceed the Int32 maximum value. +MsmqTokenProviderNeededForCertificates=A client X.509 certificate was not specified through the channel factory's Credentials property, but one is required when the binding's MsmqAuthenticationMode property is set to Certificate. The message cannot be sent. +MsmqTransactionNotActive=The current transaction is not active. Messages in this session cannot be sent or received and the session channel will be faulted. All messages in a session must be sent or received using a single transaction. +MsmqTransactionalQueueNeeded=Binding validation failed because the binding's ExactlyOnce property is set to true while the destination queue is non-transactional. The service host cannot be opened. Resolve this conflict by setting the ExactlyOnce property to false or creating a transactional queue for this binding. +MsmqTransactionCurrentRequired=A transaction was not found in Transaction.Current but one is required for this operation. The channel cannot be opened. Ensure this operation is being called within a transaction scope. +MsmqTransactionRequired=A transaction is required but is not available. Messages cannot be sent or received. Ensure that the transaction scope is specified to send or receive messages. +MsmqTransactedDLQExpected=A mismatch occurred between the binding and the MSMQ configuration. Messages cannot be sent. The custom dead letter queue specified in the binding must be a transactional queue. Ensure that the custom dead letter queue address is correct and the queue is a transactional queue. +MsmqUnexpectedPort=The net.msmq scheme does not support port numbers. To correct this, remove the port number from the URI. +MsmqUnknownWin32Error=Unrecognized error {0} (0x{1}) +MsmqUnsupportedSerializationFormat=The serialization failed because the serialization format '{0}' is not supported. The message cannot be sent or received. +MsmqWindowsAuthnRequiresAD=Binding validation failed because the binding's MsmqAuthenticationMode property is set to WindowsDomain but MSMQ is installed with Active Directory integration disabled. The channel factory or service host cannot be opened. +MsmqWrongPrivateQueueSyntax=The URL in invalid. The URL for the queue cannot contain the '$' character. Use the syntax in net.msmq://machine/private/queueName to address a private queue. +MsmqWrongUri=The URI is invalid because it is missing a host. +MsmqCannotReacquireLock=Failed to reacquire lock for message. + +; XD Gen +XDCannotFindValueInDictionaryString=Cannot find '{0}' value in dictionary string. +; ------------------------------------------------------------------------------------------------------------------------------ +WmiGetObject=WMI GetObject Query: {0} +WmiPutInstance=WMI PutInstance Class: {0} +; +; + +ObjectMustBeOpenedToDequeue=Cannot dequeue a '{0}' object while in the Created state. +NoChannelBuilderAvailable=The binding (Name={0}, Namespace={1}) cannot be used to create a ChannelFactory or a ChannelListener because it appears to be missing a TransportBindingElement. Every binding must have at least one binding element that derives from TransportBindingElement. +InvalidBindingScheme=The TransportBindingElement of type '{0}' in this CustomBinding returned a null or empty string for the Scheme. TransportBindingElement's Scheme must be a non-empty string. +CustomBindingRequiresTransport=Binding '{0}' lacks a TransportBindingElement. Every binding must have a binding element that derives from TransportBindingElement. This binding element must appear last in the BindingElementCollection. +TransportBindingElementMustBeLast=In Binding '{0}', TransportBindingElement '{1}' does not appear last in the BindingElementCollection. Please change the order of elements such that the TransportBindingElement is last. +MessageVersionMissingFromBinding=None of the binding elements in binding '{0}' define a message version. At least one binding element must define a message version and return it from the GetProperty method. +NotAllBindingElementsBuilt=Some of the binding elements in this binding were not used when building the ChannelFactory / ChannelListener. This may be have been caused by the binding elements being misordered. The recommended order for binding elements is: TransactionFlow, ReliableSession, Security, CompositeDuplex, OneWay, StreamSecurity, MessageEncoding, Transport. Note that the TransportBindingElement must be last. The following binding elements were not built: {0}. +MultipleMebesInParameters=More than one MessageEncodingBindingElement was found in the BindingParameters of the BindingContext. This usually is caused by having multiple MessageEncodingBindingElements in a CustomBinding. Remove all but one of these elements. +MultipleStreamUpgradeProvidersInParameters=More than one IStreamUpgradeProviderElement was found in the BindingParameters of the BindingContext. This usually is caused by having multiple IStreamUpgradeProviderElements in a CustomBinding. Remove all but one of these elements. +MultiplePeerResolverBindingElementsinParameters=More than one PeerResolverBindingElement was found in the BindingParameters of the BindingContext. This usually is caused by having multiple PeerResolverBindingElements in a CustomBinding. Remove all but one of these elements. +MultiplePeerCustomResolverBindingElementsInParameters=More than one PeerCustomResolverBindingElement was found in the BindingParameters of the BindingContext. This usually is caused by having multiple PeerCustomResolverBindingElement in a CustomBinding. Remove all but one of these elements. +SecurityCapabilitiesMismatched=The security capabilities of binding '{0}' do not match those of the generated runtime object. Most likely this means the binding contains a StreamSecurityBindingElement, but lacks a TransportBindingElement that supports Stream Security (such as TCP or Named Pipes). Either remove the unused StreamSecurityBindingElement or use a transport that supports this element. +BaseAddressMustBeAbsolute=Only an absolute Uri can be used as a base address. +BaseAddressDuplicateScheme=This collection already contains an address with scheme {0}. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'. +BaseAddressCannotHaveUserInfo=A base address cannot contain a Uri user info section. +TransportBindingElementNotFound=The binding does not contain a TransportBindingElement. +ChannelDemuxerBindingElementNotFound=The binding does not contain a ChannelDemuxerBindingElement. +BaseAddressCannotHaveQuery=A base address cannot contain a Uri query string. +BaseAddressCannotHaveFragment=A base address cannot contain a Uri fragment. +UriMustBeAbsolute=The given URI must be absolute. +; +; Configuration strings +; +BindingProtocolMappingNotDefined=The binding for scheme '{0}' specified in the protocol mapping does not exist and must be created. +ConfigBindingCannotBeConfigured=The binding on the service endpoint cannot be configured. +ConfigBindingExtensionNotFound=Configuration binding extension '{0}' could not be found. Verify that this binding extension is properly registered in system.serviceModel/extensions/bindingExtensions and that it is spelled correctly. +ConfigBindingReferenceCycleDetected=A binding reference cycle was detected in your configuration. The following reference cycle must be removed: {0}. +ConfigBindingTypeCannotBeNullOrEmpty=The binding specified cannot be null or an empty string. Please specify a valid binding. Valid binding values can be found in the system.serviceModel/extensions/bindingExtensions collection. +ConfigCannotParseXPathFilter=Cannot parse type '{0}' into a System.ServiceModel.Dispatcher.XPathMessageFilter. +ConfigEndpointExtensionNotFound=Configuration endpoint extension '{0}' could not be found. Verify that this endpoint extension is properly registered in system.serviceModel/extensions/endpointExtensions and that it is spelled correctly. +ConfigEndpointReferenceCycleDetected=An endpoint reference cycle was detected in your configuration. The following reference cycle must be removed: {0}. +ConfigEndpointTypeCannotBeNullOrEmpty=The endpoint specified cannot be null or an empty string. Please specify a valid endpoint. Valid endpoint values can be found in the system.serviceModel/extensions/endpointExtensions collection. +ConfigXPathFilterMustNotBeEmpty=Filter element body must not be empty. +ConfigDuplicateItem=An extension named {0} already appears in the {1}. Extension names must be unique. +ConfigDuplicateExtensionName= An extension of name '{0}' already appears in extension collection. Extension names must be unique. +ConfigDuplicateExtensionType=An extension of type '{0}' already appears in extension collection. Extension types must be unique. +ConfigDuplicateKey=A child element with the element name '{0}' already exists. Child elements can only be added once. +ConfigDuplicateKeyAtSameScope=A child element named '{0}' with same key already exists at the same configuration scope. Collection elements must be unique within the same configuration scope (e.g. the same application.config file). Duplicate key value: '{1}'. +ConfigElementKeyNull=The '{0}' configuration element key cannot be null. +ConfigElementKeysNull=At least one of the configuration element keys '{0}' must not be null. +ConfigElementTypeNotAllowed=Extension element '{0}' cannot be added to this element. Verify that the extension is registered in the extension collection at system.serviceModel/extensions/{1}. +ConfigExtensionCollectionNotFound=Extension collection '{0}' not found. +ConfigExtensionTypeNotRegisteredInCollection=The extension of type '{0}' is not registered in the extension collection '{1}'. +ConfigInvalidServiceAuthenticationManagerType=Invalid value for serviceAuthenticationManagerType. The serviceAuthenticationManagerType '{0}' does not derive from '{1}'. +ConfigInvalidAuthorizationPolicyType=Invalid value in policyType. The policyType '{0}' does not implement from '{1}'. +ConfigInvalidBindingConfigurationName=The {1} binding does not have a configured binding named '{0}'. +ConfigInvalidBindingName=The binding at {1} does not have a configured binding named '{0}'. This is an invalid value for {2}. +ConfigInvalidCommonEndpointBehaviorType=Cannot add the behavior extension '{0}' to the common endpoint behavior because it does not implement '{1}'. +ConfigInvalidCommonServiceBehaviorType=Cannot add the behavior extension '{0}' to the common service behavior because it does not implement '{1}'. +ConfigInvalidCertificateValidatorType=Invalid value for the certificate validator type. The type '{0}' does not derive from the appropriate base class '{1}'. +ConfigInvalidClientCredentialsType=Invalid value for the client credentials type. The type '{0}' does not derive from the appropriate base class '{1}'. +ConfigInvalidClassFactoryValue=The value '{0}' is not a valid instance of type '{1}'. +ConfigInvalidClassInstanceValue=The instance is not a valid configurable value of type '{0}'. +ConfigInvalidEncodingValue={0} is not a valid encoding string for System.Text.Encoding.GetEncoding(string). +ConfigInvalidEndpointBehavior=There is no endpoint behavior named '{0}'. +ConfigInvalidEndpointBehaviorType=Cannot add the '{0}' behavior extension to '{1}' endpoint behavior because the underlying behavior type does not implement the IEndpointBehavior interface. +ConfigInvalidEndpointName=The endpoint at {1} does not have a configured endpoint named '{0}'. This is an invalid value for {2}. +ConfigInvalidAttribute=The attribute '{0}' cannot be specified on element '{1}' when attribute '{2}' is not specified. +ConfigNoEndpointCreated=The CreateServiceEndpoint method in type '{0}' returned null instead of an instance of type '{1}'. +ConfigInvalidExtensionElement=Invalid element in configuration. The extension '{0}' does not derive from correct extension base type '{1}'. +ConfigInvalidExtensionElementName=Invalid element in configuration. The extension name '{0}' is not registered in the collection at system.serviceModel/extensions/{1}. +ConfigInvalidExtensionType=The '{0}' type must derive from {1} to be used in the {2} collection. +ConfigInvalidKeyType=The element {0} requires a key of type '{1}'. Type of the key passed in: '{2}'. +ConfigInvalidReliableMessagingVersionValue='{0}' is not a valid reliable messaging version. Valid values are 'WSReliableMessagingFebruary2005' and 'WSReliableMessaging11'. +ConfigInvalidSamlSerializerType=Invalid value for the saml serializer type. The type '{0}' does not derive from the appropriate base class: '{1}'. +ConfigInvalidSection=Invalid binding path. There is no binding registered with the configuration path '{0}'. +ConfigInvalidServiceCredentialsType=Invalid value for the service credentials type. The type '{0}' does not derive from the appropriate base class '{1}'. +ConfigInvalidSecurityStateEncoderType=Invalid value for the security state encoder type. The type '{0}' does not derive from the appropriate base class '{1}'. +ConfigInvalidUserNamePasswordValidatorType=Invalid value for the username password validator type. The type '{0}' does not derive from the appropriate base class '{1}'. +ConfigInvalidServiceAuthorizationManagerType=Invalid value for serviceAuthorizationManagerType. The serviceAuthorizationManagerType '{0}' does not derive from '{1}'. +ConfigInvalidServiceBehavior=There is no service behavior named '{0}'. +ConfigInvalidServiceBehaviorType=Cannot add the behavior extension '{0}' to the service behavior named '{1}' because the underlying behavior type does not implement the IServiceBehavior interface. +ConfigInvalidStartValue=Start must be between 0 and {0}. Value passed in is {1}. +ConfigInvalidTransactionFlowProtocolValue='{0}' is not a valid transaction protocol. Valid values are 'OleTransactions', 'WSAtomicTransactionOctober2004', and 'WSAtomicTransaction11'. +ConfigInvalidType=The type '{0}' registered for extension '{1}' could not be loaded. +ConfigInvalidTypeForBinding=Invalid binding type for binding extension configuration object. This binding extension manages configuration of binding type '{0}' and cannot act upon type '{1}'. +ConfigInvalidTypeForBindingElement=Invalid binding element type for binding element extension configuration object. This binding element extension manages configuration of binding element type '{0}' and cannot act upon type '{1}'. +ConfigInvalidTypeForEndpoint=Invalid endpoint type for endpoint extension configuration object. This endpoint extension manages configuration of endpoint type '{0}' and cannot act upon type '{1}'. +ConfigKeyNotFoundInElementCollection=No elements matching the key '{0}' were found in the configuration element collection. +ConfigKeysDoNotMatch=The key does not match the indexer key. When setting the value of a specific index, the key of the desired value must match the index at which it is being set. Key on element (expected value): {0}. Key provided to indexer: {1}. +ConfigMessageEncodingAlreadyInBinding=Cannot add the message encoding element '{0}'. Another message encoding element already exists in the binding '{1}'. There can only be one message encoding element for each binding. +ConfigNoExtensionCollectionAssociatedWithType=Cannot find the extension collection associated with extension of type '{0}'. +ConfigNullIssuerAddress=Federated issuer address cannot be null when specifying an issuer binding. +ConfigReadOnly=The configuration is read only. +ConfigSectionNotFound=The '{0}' configuration section cannot be created. The machine.config file is missing information. Verify that this configuration section is properly registered and that you have correctly spelled the section name. For Windows Communication Foundation sections, run ServiceModelReg.exe -i to fix this error. +ConfigStreamUpgradeElementAlreadyInBinding=Cannot add stream upgrade element '{0}'. Another stream upgrade element already exists in the binding '{1}'. There can only be one stream update element per binding. +ConfigTransportAlreadyInBinding=Cannot add the transport element '{0}'. Another transport element already exists in the binding '{1}'. There can only be one transport element for each binding. +ConfigXmlElementMustBeSet=The XmlElement must contain XML content. +ConfigXPathFilterIsNull=The XPathFilter for an XPathFilterElement cannot be null. +ConfigXPathNamespacePrefixNotFound=Namespace prefix '{0}' referenced in XPath expression was not found. +Default=(Default) + +; +; Administration Strings +; +AdminMTAWorkerThreadException=MTAWorkerThread exception +; +; WSTransfer/WSEnumeration strings +; +InternalError=An unexpected error has occurred. +; +; COM+ Integration strings +; +ClsidNotInApplication=The CLSID specified in the service file is not configured in the specified application. (The CLSID is {0}, the AppID is {1}.) +ClsidNotInConfiguration=The CLSID specified in the service file does not have a service element in a configuration file. (The CLSID is {0}.) +EndpointNotAnIID=An endpoint configured for the COM+ CLSID {0} is not a configured interface on the class. (The contract type is {1}.) +ServiceStringFormatError=The COM+ string in the .svc file was formatted incorrectly. (The string is "{0}".) +ContractTypeNotAnIID=The contract type name in the configuration file was not in the form of an interface identifier. (The string is "{0}".) +ApplicationNotFound=The configured application was not found. (The Application ID was {0}.) +NoVoteIssued= A transaction vote request was completed, but there was no outstanding vote request. +FailedToConvertTypelibraryToAssembly=Failed to convert type library to assembly +BadInterfaceVersion=Incorrect Interface version in registry +FailedToLoadTypeLibrary=Failed to load type library +NativeTypeLibraryNotAllowed= An attempt to load the native type library '{0}' was made. Native type libraries cannot be loaded. +InterfaceNotFoundInAssembly=Could not find interface in the Assembly +UdtNotFoundInAssembly=The '{0}' user-defined type could not be found. Ensure that the correct type and type library are registered and specified. +UnknownMonikerKeyword=Could not find keyword {0}. +MonikerIncorectSerializer=Invalid serializer specified. The only valid values are 'xml' and 'datacontract'. +NoEqualSignFound=The keyword '{0}' has no equal sign following it. Ensure that each keyword is followed by an equal sign and a value. +KewordMissingValue=No value found for a keyword. +BadlyTerminatedValue=Badly terminated value {0}. +MissingQuote=Missing Quote in value {0}. +RepeatedKeyword=Repeated moniker keyword. +InterfaceNotFoundInConfig=Interface {0} not found in configuration. +CannotHaveNullOrEmptyNameOrNamespaceForIID=Interface {0} has a null namespace or name. +MethodGivenInConfigNotFoundOnInterface=Method {0} given in config was not found on interface {1}. +MonikerIncorrectServerIdentityForMex=Only one type of server identity can be specified. +MonikerAddressNotSpecified=Address not specified. +MonikerMexBindingSectionNameNotSpecified=Mex binding section name attribute not specified. +MonikerMexAddressNotSpecified=Mex address not specified. +MonikerContractNotSpecified=Contract not specified. +MonikerBindingNotSpecified=Binding not specified. +MonikerBindingNamespacetNotSpecified=Binding namespace not specified. +MonikerFailedToDoMexRetrieve=Failed to do mex retrieval:{0}. +MonikerContractNotFoundInRetreivedMex=None of the contract in metadata matched the contract specified. +MonikerNoneOfTheBindingMatchedTheSpecifiedBinding=The contract does not have an endpoint supporting the binding specified. +MonikerMissingColon=Moniker Missing Colon +MonikerIncorrectServerIdentity=Multiple server identity keywords were specified. Ensure that at most one identity keyword is specified. +NoInterface=The object does not support the interface '{0}'. +DuplicateTokenExFailed=Could not duplicate the token (error=0x{0:X}). +AccessCheckFailed=Could not perform an AccessCheck (error=0x{0:X}). +ImpersonateAnonymousTokenFailed=Could not impersonate the anonymous user (error=0x{0:X}). +OnlyByRefVariantSafeArraysAllowed=The provided SafeArray parameter was passed by value. SafeArray parameters must be passed by reference. +OnlyOneDimensionalSafeArraysAllowed= Multi-dimensional SafeArray parameters cannot be used. +OnlyVariantTypeElementsAllowed=The elements of the SafeArray must be of the type VARIANT. +OnlyZeroLBoundAllowed=The lower bound of the SafeArray was not zero. SafeArrays with a lower bound other than zero cannot be used. +OpenThreadTokenFailed=Could not open the thread token (error=0x{0:X}). +OpenProcessTokenFailed=Could not open the process token (error=0x{0:X}). +InvalidIsolationLevelValue=The isolation level for component {0} is invalid. (The value was {1}.) +UnsupportedConversion=The conversion between the client parameter type '{0}' to the required server parameter type '{1}' cannot be performed. +FailedProxyProviderCreation=The required outer proxy could not be created. Ensure that the service moniker is correctly installed and registered. +UnableToLoadDll=Cannot load library {0}. Ensure that WCF is properly installed. +InterfaceNotRegistered=Interface Not Registered +BadInterfaceRegistration=Bad Interface Registration +NotAComObject=The argument passed to SetObject is not a COM object. +NoTypeLibraryFoundForInterface=No type library available for interface +CannotFindClsidInApplication=Cannot find CLSID {0} in COM+ application {1}. +ComActivationAccessDenied=Cannot create an instance of the specified service: access is denied. +ComActivationFailure=An internal error occurred attempting to create an instance of the specified service. +ComDllHostInitializerFoundNoServices=No services are configured for the application. +ComRequiresWindowsSecurity=Access is denied. The message was not authenticated with a valid windows identity. +ComInconsistentSessionRequirements=The session requirements of the contracts are inconsistent. All COM contracts in a service must have the same session requirement. +ComMessageAccessDenied=Access is denied. +VariantArrayNull=Parameter at index {0} is null. +UnableToRetrievepUnk=Unable to retrieve IUnknown for object. +PersistWrapperIsNull=QueryInterface succeeded but the persistable type wrapper was null. +UnexpectedThreadingModel=Unexpected threading model. WCF/COM+ integration only supports STA and MTA threading models. +NoneOfTheMethodsForInterfaceFoundInConfig=None of the methods were found for interface {0}. +ComOperationNotFound=The {0} operation on the service {1} could not be found in the catalog. +InvalidWebServiceInterface=The interface with IID {0} cannot be exposed as a web service +InvalidWebServiceParameter=The parameter named {0} of type {1} on method {2} of interface {3} cannot be serialized. +InvalidWebServiceReturnValue=The return value of type {0} on method {1} of interface {2} cannot be serialized. +OnlyClsidsAllowedForServiceType=The COM+ Integration service '{0}' specified in configuration is not in a supported format and could not be started. Ensure that the configuration is correctly specified. +OperationNotFound=The method '{0}' could not be found. Ensure that the correct method name is specified. +BadDispID=The Dispatch ID '{0}' could not be found or is invalid. +ComNoAsyncOperationsAllowed=At least one operation is asynchronous. Asynchronous operations are not allowed. +ComDuplicateOperation=There are duplicate operations, which is invalid. Remove the duplicates. +BadParamCount=The number of parameters in the request did not match the number supported by the method. Ensure that the correct number of parameters are specified. +BindingNotFoundInConfig=Binding type {0} instance {1} not found in config. +AddressNotSpecified=The required address keyword was not specified. +BindingNotSpecified=The required binding keyword was not specified or is not valid. +OnlyVariantAllowedByRef=A VARIANT parameter was passed by value. VARIANT parameters must be passed by reference. +CannotResolveTypeForParamInMessageDescription=The type for the '{0}' parameter in '{1}' within the namespace '{2}' cannot not be resolved. +TooLate=The operation cannot be performed after the communications channel has been created. +RequireConfiguredMethods=The interface with IID {0} has no methods configured in the COM+ catalog and cannot be exposed as a web service. +RequireConfiguredInterfaces=The interface with IID {0} is not configured in the COM+ catalog and cannot be exposed as a web service. +CannotCreateChannelOption=The channeloption intrinsic object cannot be created because the channel builder is not initialized. +NoTransactionInContext=There is no transaction in the context of the operation. +IssuedTokenFlowNotAllowed=The service does not accept issued tokens. +GeneralSchemaValidationError=There was an error verifying some XML Schemas generated during export:\r\n{0} +SchemaValidationError=There was a validation error on a schema generated during export:\r\n Source: {0}\r\n Line: {1} Column: {2}\r\n Validation Error: {3} +ContractBindingAddressCannotBeNull=The Address, Binding and Contract keywords are required. +TypeLoadForContractTypeIIDFailedWith=Type load for contract interface ID {0} failed with Error:{1}. +BindingLoadFromConfigFailedWith=Fail to load binding {0} from config. Error:{1}. +PooledApplicationNotSupportedForComplusHostedScenarios=Application {0} is marked Pooled. Pooled applications are not supported under COM+ hosting. +RecycledApplicationNotSupportedForComplusHostedScenarios=Application {0} has recycling enabled. Recycling of applications is not supported under COM+ hosting. +BadImpersonationLevelForOutOfProcWas=The client token at least needs to have the SecurityImpersonationLevel of at least Impersonation for Out of process Webhost activations. +ComPlusInstanceProviderRequiresMessage0=This InstanceContext requires a valid Message to obtain the instance. +ComPlusInstanceCreationRequestSchema=From: {0}\nAppId: {1}\nClsId: {2}\nIncoming TransactionId: {3}\nRequesting Identity: {4} +ComPlusMethodCallSchema=From: {0}\nAppId: {1}\nClsId: {2}\nIid: {3}\nAction: {4}\nInstance Id: {5}\nManaged Thread Id: {6}\nUnmanaged Thread Id: {7}\nRequesting Identity: {8} +ComPlusServiceSchema=AppId: {0}\nClsId: {1}\n +ComPlusServiceSchemaDllHost=AppId: {0} +ComPlusTLBImportSchema=Iid: {0}\nType Library ID: {1} +ComPlusServiceHostStartingServiceErrorNoQFE=A Windows hotfix or later service pack is required on Windows XP and Windows Server 2003 to use WS-AtomicTransaction and COM+ Integration Web service transaction functionality. See the Microsoft .NET Framework release notes for instructions on installing the required hotfix. +ComIntegrationManifestCreationFailed=Generating manifest file {0} failed with {1}. +TempDirectoryNotFound=Directory {0} not found. +CannotAccessDirectory=Cannot access directory {0}. +CLSIDDoesNotSupportIPersistStream=The object with CLSID '{0}' does not support the required IPersistStream interface. +CLSIDOfTypeDoesNotMatch=CLSID of type {0} does not match the CLSID on PersistStreamTypeWrapper which is {1}. +TargetObjectDoesNotSupportIPersistStream=Target object does not support IPersistStream. +TargetTypeIsAnIntefaceButCorrespoindingTypeIsNotPersistStreamTypeWrapper=Target type is an interface but corresponding type is not PersistStreamTypeWrapper. +NotAllowedPersistableCLSID=CLSID {0} is not allowed. +TransferringToComplus=Transferring to ComPlus logical thread {0}. +NamedArgsNotSupported=The cNamedArgs parameter is not supported and must be 0. +MexBindingNotFoundInConfig=Binding '{0}' was not found in config. The config file must be present and contain a binding matching the one specified in the moniker. +; +; System.ServiceModel.Security.Tokens +; +ClaimTypeCannotBeEmpty=The claimType cannot be an empty string. +X509ChainIsEmpty=X509Chain does not have any valid certificates. +MissingCustomCertificateValidator=X509CertificateValidationMode.Custom requires a CustomCertificateValidator. Specify the CustomCertificateValidator property. +MissingMembershipProvider=UserNamePasswordValidationMode.MembershipProvider requires a MembershipProvider. Specify the MembershipProvider property. +MissingCustomUserNamePasswordValidator=UserNamePasswordValidationMode.Custom requires a CustomUserNamePasswordValidator. Specify the CustomUserNamePasswordValidator property. +SpnegoImpersonationLevelCannotBeSetToNone=The Security Support Provider Interface does not support Impersonation level 'None'. Specify Identification, Impersonation or Delegation level. +PublicKeyNotRSA=The public key is not an RSA key. +SecurityAuditFailToLoadDll=The '{0}' dynamic link library (dll) failed to load. +SecurityAuditPlatformNotSupported=Writing audit messages to the Security log is not supported by the current platform. You must write audit messages to the Application log. +NoPrincipalSpecifiedInAuthorizationContext=No custom principal is specified in the authorization context. +AccessDenied=Access is denied. +SecurityAuditNotSupportedOnChannelFactory=SecurityAuditBehavior is not supported on the channel factory. +; +; Infocard related strings +; +ExpiredTokenInChannelParameters=The Infocard token created during channel intialization has expired. Please create a new channel to reacquire token. +NoTokenInChannelParameters=No Infocard token was found in the ChannelParameters. Infocard requires that the security token be created during channel intialization. +; +; KerberosToken SSPI errors +; +; +; Peer Channel strings +; +PeerMessageMustHaveVia=Message with action {0} received from a neighbor is missing a via Header. +PeerLinkUtilityInvalidValues=The LinkUtility message received from a neighbor has invalid values for usefull '{0}' and total '{1}'. +PeerNeighborInvalidState=Internal Error: Peer Neighbor state change from {0} to {1} is invalid. +PeerMaxReceivedMessageSizeConflict=The MaxReceivedMessageSize of the associated listener ({0}) is greater than the MaxReceivedMessageSize of the PeerNode ({1}) with the meshid ({2}), ensure that all ChannelFactories and Endpoints for this mesh have the same configuration for MaxRecievedMessageSize. +PeerConflictingPeerNodeSettings=Binding settings conflict with an existing instance that is using the same mesh name. Check the value of the property {0}. +ArgumentOutOfRange=value must be >= {0} and <= {1}. +PeerChannelViaTooLong=Invalid message: the peer channel via ({0}) has a size of ({1}) it exceeds the maximum via size of ({2}). +PeerNodeAborted=The PeerNode cannot be opened because it has been Aborted. +PeerPnrpNotAvailable=PNRP is not available. Please refer to the documentation with your system for details on how to install and enable PNRP. +PeerPnrpNotInstalled=The PNRP service is not installed on this machine. Please refer to the documentation with your system for details on how to install and enable PNRP. +PeerResolverBindingElementRequired=A PeerResolverBindingElement is required in the {0} binding. The default resolver (PNRP) is not available. +PeerResolverRequired=Resolver must be specified. The default resolver (PNRP) is not available. Please refer to the documentation with your system for details on how to install and enable PNRP. +PeerResolverInvalid=The specified ResolverType: {0} cannot be loaded. Please ensure that the type name specified refers to a type that can be loaded. +PeerResolverSettingsInvalid=Specified resolver settings are not enough to create a valid resolver. Please ensure that a ResolverType and an Address is specified for the custom resolver. +PeerListenIPAddressInvalid=The ListenIPAddress {0} is invalid. +PeerFlooderDisposed=Internal Error. PeerFlooder instance is already disposed. It cannot be used to send messages. +PeerPnrpIllegalUri=Internal Error. Address of the Service cannot be registered with PNRP. +PeerInvalidRegistrationId=The registrationId {0} is invalid. +PeerConflictingHeader=Application message contains a header that conflicts with a PeerChannel specific header. Name = {0} and Namespace = {1}. +PnrpNoClouds=PNRP could not find any clouds that match the current operation. +PnrpAddressesUnsupported="Specified addresses can not be registered with PNRP because either PNRP is not enabled or the specified addresses do not have corresponding clouds. Please refer to the documentation with your system for details on how to install and enable PNRP." +InsufficientCryptoSupport=The binding's PeerTransportSecuritySettings can not be supported under the current system security configuration. +InsufficientCredentials=Credentials specified are not sufficient to carry requested operation. Please specify a valid value for {0}. +UnexpectedSecurityTokensDuringHandshake=Connection was not accepted because the SecurityContext contained tokens that do not match the current security settings. +PnrpAddressesExceedLimit=Addresses specified in the registration exceed PNRP's per registration address limit. +InsufficientResolverSettings=Provided information is Insufficient to create a valid connection to the resolver service. +InvalidResolverMode=Specified PeerResolverMode value {0} is invalid. Please specify either PeerResolveMode.Auto, Default, or Pnrp. +MustOverrideInitialize=concrete PeerResolver implementation must override Initialize to accept metadata about resolver service. +NotValidWhenOpen=The operation: {0} is not valid while the object is in open state. +NotValidWhenClosed=The operation: {0} is not valid while the object is in closed state. +PeerNullRegistrationInfo=Registration info can not be null. Please ensure that the Register operation is invoked with a valid RegistrationInfo object. +PeerNullResolveInfo=Resolve info can not be null. Please ensure that the Resolve operation is invoked with a valid ResolveInfo object. +PeerNullRefreshInfo=Refresh info can not be null. Please ensure that the Refresh operation is invoked with a valid RefreshInfo object. +PeerInvalidMessageBody=MessageBody does not contain a valid {0} message. Please ensure that the message is well formed. +DuplicatePeerRegistration=A peer registration with the service address {0} already exists. +PeerNodeToStringFormat=MeshId: {0}, Node Id: {1}, Online: {2}, Open: {3}, Port: {4} +MessagePropagationException=The MessagePropagationFilter threw an exception. Please refer to InnerException. +NotificationException=An event notification threw an exception. Please refer to InnerException. +ResolverException=The Peer resolver threw an exception. Please refer to InnerException. +PnrpCloudNotFound=One of the addresses specified doesn't match any PNRP cloud for registration.{0} +PnrpCloudDisabled=Specified cloud {0} could not be used for the specified operation because it is disabled. +PnrpCloudResolveOnly=Specified cloud {0} is configured for Resolve operations only. +PnrpPortBlocked=Requested PNRP operation {0} could not be performed because the port is blocked possibly by a firewall. +PnrpDuplicatePeerName=Specified mesh name {0} cannot be used because a name can only be registered once per process. +RefreshIntervalMustBeGreaterThanZero=Invalid RefreshInterval value of {0}; it must be greater than zero +CleanupIntervalMustBeGreaterThanZero=Invalid CleanupInterval value of {0}; it must be greater than zero +AmbiguousConnectivitySpec=Multiple link-local only interfaces detected. Please specifiy the interface you require by using the ListenIpAddress attribute in the PeerTransportBindingElement +MustRegisterMoreThanZeroAddresses=Registration with zero addresses detected. Please call Register with more than zero addresses. +PeerCertGenFailure=Certificate generation has failed. Please see the inner exception for more information. +PeerThrottleWaiting=Throttle on the mesh {0} waiting. +PeerThrottlePruning=Attempting to prune the slow neighbor for the mesh {0}. +PeerMaintainerStarting=Maintainer is starting for the mesh {0}. +PeerMaintainerConnect=Maintainer is attempting a connection to Peer {0} for the mesh {1}. +PeerMaintainerConnectFailure=Maintainer encountered exception when attempting a connection to Peer {0} for the mesh {1}. Exception is {2}. +PeerMaintainerInitialConnect=Mantainer's InitialConnect is running for the mesh {0}. +PeerMaintainerPruneMode=Mantainer is attempting to prune connections for the mesh {0}. +PeerMaintainerConnectMode=Mantainer is attempting to establish additional connections for the mesh {0}. + +; +; Context Channel strings +; +BasicHttpContextBindingRequiresAllowCookie=BasicHttpContextBinding {0}:{1} requires that AllowCookies property is set to true. +CallbackContextOnlySupportedInWSAddressing10=The message contains a callback context header with an endpoint reference for AddressingVersion '{0}'. Callback context can only be transmitted when the AddressingVersion is configured with 'WSAddressing10'. +ListenAddressAlreadyContainsContext=The callback address already has a context header in it. +MultipleContextHeadersFoundInCallbackAddress=The callback address contains multiple context headers. There can be at most one context header in a callback address. +CallbackContextNotExpectedOnIncomingMessageAtClient=The incoming message with action '{0}' contains a callback context header with name '{1}' and namespace '{2}'. Callback context headers are not expected in incoming messages at the client. +CallbackContextOnlySupportedInSoap=The message contains a callback context message property. Callback context can be transmitted only when the ContextBindingElement is configured with ContextExchangeMechanism of ContextSoapHeader. +ContextBindingElementCannotProvideChannelFactory=ContextBindingElement cannot provide channel factory for the requested channel shape {0}. +ContextBindingElementCannotProvideChannelListener=ContextBindingElement cannot provide channel listener for the requested channel shape {0}. +InvalidCookieContent=Value '{0}' specified for 'name' attribute of ContextMessageProperty is either null or has invalid character(s). Please ensure value of 'name' is within the allowed value space. +SchemaViolationInsideContextHeader=Context protocol was unable to parse the context header. Nodes disallowed by the context header schema were found inside the context header. +CallbackContextNotExpectedOnOutgoingMessageAtServer=The outgoing message with action '{0}' contains a callback context message property. Callback context cannot be transmitted in outgoing messages at the server. +ChannelIsOpen=Channel context management cannot be enabled or disabled after the channel is opened. +ContextManagementNotEnabled=Context cached at the channel cannot be set or retrieved when the context management is disabled at the channel layer. Ensure context channel property 'IContextManager.Enabled' is set to true. +CachedContextIsImmutable=Context cached at the channel layer cannot be changed after the channel is opened. +InvalidMessageContext=Cannot specify 'ContextMessageProperty' in message when using context channel with context management enabled. Ensure the message does not have 'ContextMessageProperty' or disable context management by setting channel property 'IContextManager.Enabled' to false. +InvalidContextReceived=Context channel received a message with context which does not match the current context cached at the channel. Ensure service does not change context after it was originally set or disable context management by setting channel property 'IContextManager.Enabled' to false. +BehaviorRequiresContextProtocolSupportInBinding=Service behavior {0} requires that the binding associated with endpoint {1} listening on {2} supports the context protocol, because the contract associated with this endpoint may require a session. Currently configured binding for this endpoint does not support the context protocol. Please modify the binding to add support for the context protocol or modify the SessionMode on the contract to NotAllowed. +HttpCookieContextExchangeMechanismNotCompatibleWithTransportType=Binding {1}:{2} is configured with ContextExchangeMechanism.HttpCookie which is not compatible with the transport type {0}. Please modify the ContextExchangeMechanism or use HTTP or HTTPS transport. +HttpCookieContextExchangeMechanismNotCompatibleWithTransportCookieSetting=ContextBindingElement of binding {0}:{1} is configured with ContextExchangeMode.HttpCookie but the configuration of this binding's HttpTransportBindingElement prevents upper channel layers from managing cookies. Please set the HttpTransportBindingElement.AllowCookies property to false or change the ContextExchangeMechanism of ContextBindingElement to SoapHeader. +PolicyImportContextBindingElementCollectionIsNull=ContextBindingElementImporter cannot import policy because PolicyImportContext.BindingElements collection is null. +ContextChannelFactoryChannelCreatedDetail=EndpointAddress: {0}, Via:{1} +XmlFormatViolationInContextHeader=Context protocol was unable to parse the context header. +XmlFormatViolationInCallbackContextHeader=Context protocol was unable to parse the callback context header. + +; +; Transaction formatter strings +; +OleTxHeaderCorrupt=The OLE Transactions header was invalid or corrupt. +WsatHeaderCorrupt=The WS-AtomicTransaction header was invalid or corrupt. +FailedToDeserializeIssuedToken=The issued token accompanying the WS-AtomicTransaction coordination context was invalid or corrupt. +InvalidPropagationToken=The OLE Transactions propagation token received in the message could not be used to unmarshal a transaction. It may be invalid or corrupt. +InvalidWsatExtendedInfo=The WS-AtomicTransaction extended information included in the OLE Transactions propagation token was invalid or corrupt. +TMCommunicationError=An error occurred communicating with the distributed transaction manager. +UnmarshalTransactionFaulted=The WS-AtomicTransaction protocol service could not unmarshal the flowed transaction. The following exception occured: {0} +InvalidRegistrationHeaderTransactionId=The transaction identifier element in the registration header is invalid +InvalidRegistrationHeaderIdentifier=The context identifier element in the registration header is invalid. +InvalidRegistrationHeaderTokenId=The token identifier element in the registration header is invalid. +InvalidCoordinationContextTransactionId=The transaction identifier element in the coordination context is invalid. +WsatRegistryValueReadError=The WS-AtomicTransaction transaction formatter could not read the registry value '{0}'. +WsatProtocolServiceDisabled=The MSDTC transaction manager's WS-AtomicTransaction protocol service '{0}' is disabled and cannot unmarshal incoming transactions. +InboundTransactionsDisabled=The MSDTC transaction manager has disabled incoming transactions. +SourceTransactionsDisabled=The incoming transaction cannot be unmarshaled because the source MSDTC transaction manager has either disabled outbound transactions or disabled its WS-AtomicTransaction protocol service. +WsatUriCreationFailed=A registration service address could not be created from MSDTC whereabouts information. +WhereaboutsReadFailed=The MSDTC whereabouts information could not be deserialized. +WhereaboutsSignatureMissing=The standard whereabouts signature was missing from the MSDTC whereabouts information. +WhereaboutsImplausibleProtocolCount=The MSDTC whereabouts information's protocol count was invalid. +WhereaboutsImplausibleHostNameByteCount=The MSDTC whereabouts information's host name byte count was invalid. +WhereaboutsInvalidHostName=The MSDTC whereabouts information's host name was invalid. +WhereaboutsNoHostName=The MSDTC whereabouts information did not contain a host name. +InvalidWsatProtocolVersion=The specified WSAT protocol version is invalid. +; +; SOAP Redirection +; +ParameterCannotBeEmpty=The parameter cannot be empty. +RedirectCache=The requested resouce has not changed and should be taken from cache. +RedirectResource=The requested resource has moved to one of the following locations:\n{0} +RedirectUseIntermediary=The requested resource must be accessed through one of the following intermediary service locations:\n{0} +RedirectGenericMessage=The requested resource has been moved. +RedirectMustProvideLocation=At least one RedirectionLocation must be provided for this RedirectionType. +RedirectCacheNoLocationAllowed=RedirectionType 'Cache' does not allow any RedirectionLocation objects be passed into the constructor. +RedirectionInfoStringFormatWithNamespace={0} ({1}) +RedirectionInfoStringFormatNoNamespace={0} +RetryGenericMessage=The requested resource is available. +; +; Activity Names +; +ActivityCallback=Executing user callback. +ActivityClose=Close '{0}'. +ActivityConstructChannelFactory=Construct ChannelFactory. Contract type: '{0}'. +ActivityConstructServiceHost=Construct ServiceHost '{0}'. +ActivityExecuteMethod=Execute '{0}.{1}'. +ActivityExecuteAsyncMethod=Execute Async: Begin: '{0}.{1}'; End: '{2}.{3}'. +ActivityCloseChannelFactory=Close ChannelFactory. Contract type: '{0}'. +ActivityCloseClientBase=Close ClientBase. Contract type: '{0}'. +ActivityCloseServiceHost=Close ServiceHost '{0}'. +ActivityListenAt=Listen at '{0}'. +ActivityOpen=Open '{0}'. +ActivityOpenServiceHost=Open ServiceHost '{0}'. +ActivityOpenChannelFactory=Open ChannelFactory. Contract type: '{0}'. +ActivityOpenClientBase=Open ClientBase. Contract type: '{0}'. +ActivityProcessAction=Process action '{0}'. +ActivityProcessingMessage=Processing message {0}. +ActivityReceiveBytes=Receive bytes on connection '{0}'. +ActivitySecuritySetup=Set up Secure Session. +ActivitySecurityRenew=Renew Secure Session. +ActivitySecurityClose=Close Security Session. +ActivitySharedListenerConnection=Shared listener connection: '{0}'. +ActivitySocketConnection=Socket connection: '{0}'. +ActivityReadOnConnection=Reading data from connection on '{0}'. +ActivityReceiveAtVia=Receiving data at via '{0}'. +; +; Trace Codes +; +TraceCodeBeginExecuteMethod=Begin method execution. +TraceCodeChannelCreated=Created: {0} +TraceCodeChannelDisposed=Disposed: {0} +TraceCodeChannelMessageSent=Sent a message over a channel +TraceCodeChannelPreparedMessage=Prepared message for sending over a channel +TraceCodeComIntegrationChannelCreated=ComPlus:channel created. +TraceCodeComIntegrationDispatchMethod=ComPlus:Dispatch method details. +TraceCodeComIntegrationDllHostInitializerAddingHost=ComPlus:DllHost initializer:Adding host. +TraceCodeComIntegrationDllHostInitializerStarted=ComPlus:Started DllHost initializer. +TraceCodeComIntegrationDllHostInitializerStarting=ComPlus:Starting DllHost initializer. +TraceCodeComIntegrationDllHostInitializerStopped=ComPlus:Stopped DllHost initializer. +TraceCodeComIntegrationDllHostInitializerStopping=ComPlus:Stopping DllHost initializer. +TraceCodeComIntegrationEnteringActivity=ComPlus:Entering COM+ activity. +TraceCodeComIntegrationExecutingCall=ComPlus:Executing COM call. +TraceCodeComIntegrationInstanceCreationRequest=ComPlus:Received instance creation request. +TraceCodeComIntegrationInstanceCreationSuccess=ComPlus:Created instance. +TraceCodeComIntegrationInstanceReleased=ComPlus:Released instance. +TraceCodeComIntegrationInvokedMethod=ComPlus:Invoked method. +TraceCodeComIntegrationInvokingMethod=ComPlus:Invoking method. +TraceCodeComIntegrationInvokingMethodContextTransaction=Complus:Invoking method with transaction in COM+ context. +TraceCodeComIntegrationInvokingMethodNewTransaction=Complus:Invoking method with new incoming transaction. +TraceCodeComIntegrationLeftActivity=ComPlus:Left COM+ activity. +TraceCodeComIntegrationMexChannelBuilderLoaded=Complus:Mex channel loader loaded. +TraceCodeComIntegrationMexMonikerMetadataExchangeComplete=Complus:Metadata exchange completed successfully. +TraceCodeComIntegrationServiceHostCreatedServiceContract=ComPlus:Created service contract. +TraceCodeComIntegrationServiceHostCreatedServiceEndpoint=ComPlus:Created service endpoint. +TraceCodeComIntegrationServiceHostStartedService=ComPlus:Started service. +TraceCodeComIntegrationServiceHostStartedServiceDetails=ComPlus:Started service:details. +TraceCodeComIntegrationServiceHostStartingService=ComPlus:Starting service. +TraceCodeComIntegrationServiceHostStoppedService=ComPlus:Stopped service. +TraceCodeComIntegrationServiceHostStoppingService=ComPlus:Stopping service. +TraceCodeComIntegrationServiceMonikerParsed=ComPlus:Service moniker parsed. +TraceCodeComIntegrationTLBImportConverterEvent=ComPlus:Type library converter event. +TraceCodeComIntegrationTLBImportFinished=ComPlus:Finished type library import. +TraceCodeComIntegrationTLBImportFromAssembly=ComPlus:Type library import: using assembly. +TraceCodeComIntegrationTLBImportFromTypelib=ComPlus:Type library import: using type library. +TraceCodeComIntegrationTLBImportStarting=ComPlus:Starting type library import. +TraceCodeComIntegrationTxProxyTxAbortedByContext=ComPlus:Transaction aborted by COM+ context. +TraceCodeComIntegrationTxProxyTxAbortedByTM=ComPlus:Transaction aborted by Transaction Manager. +TraceCodeComIntegrationTxProxyTxCommitted=ComPlus:Transaction committed. +TraceCodeComIntegrationTypedChannelBuilderLoaded=ComPlus:Typed channel builder loaded. +TraceCodeComIntegrationWsdlChannelBuilderLoaded=ComPlus:WSDL channel builder loaded. +TraceCodeCommunicationObjectAborted=Aborted '{0}'. +TraceCodeCommunicationObjectAbortFailed=Failed to abort {0} +TraceCodeCommunicationObjectCloseFailed=Failed to close {0} +TraceCodeCommunicationObjectClosed=Closed {0} +TraceCodeCommunicationObjectCreated=Created {0} +TraceCodeCommunicationObjectClosing=Closing {0} +TraceCodeCommunicationObjectDisposing=Disposing {0} +TraceCodeCommunicationObjectFaultReason=CommunicationObject faulted due to exception. +TraceCodeCommunicationObjectFaulted=Faulted {0} +TraceCodeCommunicationObjectOpenFailed=Failed to open {0} +TraceCodeCommunicationObjectOpened=Opened {0} +TraceCodeCommunicationObjectOpening=Opening {0} +TraceCodeConfigurationIsReadOnly=The configuration is read-only. +TraceCodeConfiguredExtensionTypeNotFound=Extension type is not configured. +TraceCodeConnectionAbandoned=The connection has been abandoned. +TraceCodeConnectToIPEndpoint=Connection information. +TraceCodeConnectionPoolCloseException=An exception occurred while closing the connections in this connection pool. +TraceCodeConnectionPoolIdleTimeoutReached=A connection has exceeded the idle timeout of this connection pool ({0}) and been closed. +TraceCodeConnectionPoolLeaseTimeoutReached=A connection has exceeded the connection lease timeout of this connection pool ({0}) and been closed. +TraceCodeConnectionPoolMaxOutboundConnectionsPerEndpointQuotaReached=MaxOutboundConnectionsPerEndpoint quota ({0}) has been reached, so connection was closed and not stored in this connection pool. +TraceCodeServerMaxPooledConnectionsQuotaReached=MaxOutboundConnectionsPerEndpoint quota ({0}) has been reached, so the connection was closed and not reused by the listener. +TraceCodeDefaultEndpointsAdded=No matching tag was found. Default endpoints added. +TraceCodeDiagnosticsFailedMessageTrace=Failed to trace a message +TraceCodeDidNotUnderstandMessageHeader=Did not understand message header. +TraceCodeDroppedAMessage=A response message was received, but there are no outstanding requests waiting for this message. The message is being dropped. +TraceCodeCannotBeImportedInCurrentFormat=The given schema cannot be imported in this format. +TraceCodeElementTypeDoesntMatchConfiguredType=The type of the element does not match the configuration type. +TraceCodeEndExecuteMethod=End method execution. +TraceCodeEndpointListenerClose=Endpoint listener closed. +TraceCodeEndpointListenerOpen=Endpoint listener opened. +TraceCodeErrorInvokingUserCode=Error invoking user code +TraceCodeEvaluationContextNotFound=Configuration evaluation context not found. +TraceCodeExportSecurityChannelBindingEntry=Starting Security ExportChannelBinding +TraceCodeExportSecurityChannelBindingExit=Finished Security ExportChannelBinding +TraceCodeExtensionCollectionDoesNotExist=The extension collection does not exist. +TraceCodeExtensionCollectionIsEmpty=The extension collection is empty. +TraceCodeExtensionCollectionNameNotFound=Extension element not associated with an extension collection. +TraceCodeExtensionElementAlreadyExistsInCollection=The extension element already exists in the collection. +TraceCodeExtensionTypeNotFound=Extension type not found. +TraceCodeFailedToAddAnActivityIdHeader=Failed to set an activity id header on an outgoing message +TraceCodeFailedToReadAnActivityIdHeader=Failed to read an activity id header on a message +TraceCodeFilterNotMatchedNodeQuotaExceeded=Evaluating message logging filter against the message exceeded the node quota set on the filter. +TraceCodeGetBehaviorElement=Get BehaviorElement. +TraceCodeGetChannelEndpointElement=Get ChannelEndpointElement. +TraceCodeGetCommonBehaviors=Get machine.config common behaviors. +TraceCodeGetConfigurationSection=Get configuration section. +TraceCodeGetConfiguredBinding=Get configured binding. +TraceCodeGetDefaultConfiguredBinding=Get default configured binding. +TraceCodeGetConfiguredEndpoint=Get configured endpoint. +TraceCodeGetDefaultConfiguredEndpoint=Get default configured endpoint. +TraceCodeGetServiceElement=Get ServiceElement. +TraceCodeHttpAuthFailed=Authentication failed for HTTP(S) connection +TraceCodeHttpActionMismatch=The HTTP SOAPAction header and the wsa:Action SOAP header did not match. +TraceCodeHttpChannelMessageReceiveFailed=Failed to lookup a channel to receive an incoming message. Either the endpoint or the SOAP action was not found. +TraceCodeHttpChannelRequestAborted=Failed to send request message over HTTP +TraceCodeHttpChannelResponseAborted=Failed to send response message over HTTP +TraceCodeHttpChannelUnexpectedResponse=Received bad HTTP response +TraceCodeHttpResponseReceived=HTTP response was received +TraceCodeHttpChannelConcurrentReceiveQuotaReached=The HTTP concurrent receive quota was reached. +TraceCodeHttpsClientCertificateInvalid=Client certificate is invalid. +TraceCodeHttpsClientCertificateInvalid1=Client certificate is invalid with native error code {0} (see http://go.microsoft.com/fwlink/?LinkId=187517 for details). +TraceCodeHttpsClientCertificateNotPresent=Client certificate is required. No certificate was found in the request. This might be because the client certificate could not be successfully validated by the operating system or IIS. For information on how to bypass those validations and use a custom X509CertificateValidator in WCF please see http://go.microsoft.com/fwlink/?LinkId=208540. +TraceCodeImportSecurityChannelBindingEntry=Starting Security ImportChannelBinding +TraceCodeImportSecurityChannelBindingExit=Finished Security ImportChannelBinding +TraceCodeIncompatibleExistingTransportManager=An existing incompatible transport manager was found for the specified URI. +TraceCodeInitiatingNamedPipeConnection=Initiating Named Pipe connection. +TraceCodeInitiatingTcpConnection=Initiating TCP connection. +TraceCodeIssuanceTokenProviderBeginSecurityNegotiation=The IssuanceTokenProvider has started a new security negotiation. +TraceCodeIssuanceTokenProviderEndSecurityNegotiation=The IssuanceTokenProvider has completed the security negotiation. +TraceCodeIssuanceTokenProviderRedirectApplied=The IssuanceTokenProvider applied a redirection header. +TraceCodeIssuanceTokenProviderRemovedCachedToken=The IssuanceTokenProvider removed the expired service token. +TraceCodeIssuanceTokenProviderServiceTokenCacheFull=IssuanceTokenProvider pruned service token cache. +TraceCodeIssuanceTokenProviderUsingCachedToken=The IssuanceTokenProvider used the cached service token. +TraceCodeListenerCreated=Listener created +TraceCodeListenerDisposed=Listener disposed +TraceCodeMaxPendingConnectionsReached=Maximum number of pending connections has been reached. +TraceCodeMaxAcceptedChannelsReached=Maximum number of inbound session channel has been reached. +TraceCodeMessageClosed=A message was closed +TraceCodeMessageClosedAgain=A message was closed again +TraceCodeMessageCopied=A message was copied +TraceCodeMessageCountLimitExceeded=Reached the limit of messages to log. Message logging is stopping. +TraceCodeMessageNotLoggedQuotaExceeded=Message not logged because its size exceeds configured quota +TraceCodeMessageRead=A message was read +TraceCodeMessageSent=Sent a message over a channel. +TraceCodeMessageReceived=Received a message over a channel. +TraceCodeMessageWritten=A message was written +TraceCodeMessageProcessingPaused=Switched threads while processing a message. +TraceCodeMsmqCannotPeekOnQueue=MsmqActivation service cannot peek on the queue. +TraceCodeMsmqCannotReadQueues=MsmqActivation service cannot discover queues. +TraceCodeMsmqDatagramReceived=MSMQ datagram message received. +TraceCodeMsmqDatagramSent=MSMQ datagram message sent. +TraceCodeMsmqDetected=MSMQ detected successfully. +TraceCodeMsmqEnteredBatch=Entered batching mode. +TraceCodeMsmqExpectedException=Expected exception caught. +TraceCodeMsmqFoundBaseAddress=Hosting environment found the base address for the service. +TraceCodeMsmqLeftBatch=Left batching mode. +TraceCodeMsmqMatchedApplicationFound=MsmqActivation service found application matching queue. +TraceCodeMsmqMessageLockedUnderTheTransaction=Cannot move or delete message because it is still locked under the transaction. +TraceCodeMsmqMessageDropped=Message was dropped. +TraceCodeMsmqMessageRejected=Message was rejected. +TraceCodeMsmqMoveOrDeleteAttemptFailed=Cannot move or delete message. +TraceCodeMsmqPoisonMessageMovedPoison=Poison message moved to the poison subqueue. +TraceCodeMsmqPoisonMessageMovedRetry=Poison message moved to the retry subqueue. +TraceCodeMsmqPoisonMessageRejected=Poison message rejected. +TraceCodeMsmqPoolFull=Pool of the native MSMQ messages is full. This may affect performance. +TraceCodeMsmqPotentiallyPoisonMessageDetected=Transaction which received this message was aborted at least once. +TraceCodeMsmqQueueClosed=MSMQ queue closed. +TraceCodeMsmqQueueOpened=MSMQ queue opened. +TraceCodeMsmqQueueTransactionalStatusUnknown=Cannot detect if the queue is transactional. +TraceCodeMsmqScanStarted=MsmqActivation service started scan for queues. +TraceCodeMsmqSessiongramReceived=MSMQ transport session received. +TraceCodeMsmqSessiongramSent=MSMQ transport session sent. +TraceCodeMsmqStartingApplication=MSMQ Activation service started application. +TraceCodeMsmqStartingService=Hosting environment started service. +TraceCodeMsmqUnexpectedAcknowledgment=Unexpected acknowledgment value. +TraceCodeNamedPipeChannelMessageReceiveFailed=Failed to receive a message over a named pipe channel. +TraceCodeNamedPipeChannelMessageReceived=Received a message over a named pipe channel. +TraceCodeNegotiationAuthenticatorAttached=NegotiationTokenAuthenticator was attached. +TraceCodeNegotiationTokenProviderAttached=NegotiationTokenProvider was attached. +TraceCodeNoExistingTransportManager=No existing transport manager was found for the specified URI. +TraceCodeOpenedListener=Transport is listening at base URI. +TraceCodeOverridingDuplicateConfigurationKey=The configuration system has detected a duplicate key in a different configuration scope and is overriding with the more recent value. +TraceCodePeerChannelMessageReceived=A message was received by a peer channel. +TraceCodePeerChannelMessageSent=A message was sent on a peer channel. +TraceCodePeerFloodedMessageNotMatched=A PeerNode received a message that did not match any local channels. +TraceCodePeerFloodedMessageNotPropagated=A PeerNode received a flooded message that was not propagated further. +TraceCodePeerFloodedMessageReceived=A PeerNode received a flooded message. +TraceCodePeerFlooderReceiveMessageQuotaExceeded=Received message could not be forwarded to other neighbors since it exceeded the quota set for the peer node. +TraceCodePeerNeighborCloseFailed=A Peer Neighbor close has failed. +TraceCodePeerNeighborClosingFailed=A Peer Neighbor closing has failed. +TraceCodePeerNeighborManagerOffline=A Peer Neighbor Manager is offline. +TraceCodePeerNeighborManagerOnline=A Peer Neighbor Manager is online. +TraceCodePeerNeighborMessageReceived=A message was received by a Peer Neighbor. +TraceCodePeerNeighborNotAccepted=A Peer Neighbor was not accepted. +TraceCodePeerNeighborNotFound=A Peer Neighbor was not found. +TraceCodePeerNeighborOpenFailed=A Peer Neighbor open has failed. +TraceCodePeerNeighborStateChangeFailed=A Peer Neighbor state change has failed. +TraceCodePeerNeighborStateChanged=A Peer Neighbor state has changed. +TraceCodePeerNodeAddressChanged=A PeerNode address has changed. +TraceCodePeerNodeAuthenticationFailure=A neighbor connection could not be established due to insufficient or wrong credentials. +TraceCodePeerNodeAuthenticationTimeout=A neighbor security handshake as timed out. +TraceCodePeerNodeClosed=A PeerNode was closed. +TraceCodePeerNodeClosing=A PeerNode is closing. +TraceCodePeerNodeOpenFailed=Peer node open failed. +TraceCodePeerNodeOpened=A PeerNode was opened. +TraceCodePeerNodeOpening=A PeerNode is opening. +TraceCodePeerReceiveMessageAuthenticationFailure=Message source could not be authenticated. +TraceCodePeerServiceOpened=PeerService Opened and listening at '{0}'. +TraceCodePerformanceCounterFailedToLoad=A performance counter failed to load. Some performance counters will not be available. +TraceCodePerformanceCountersFailed=Failed to load the performance counter '{0}'. Some performance counters will not be available +TraceCodePerformanceCountersFailedDuringUpdate=There was an error while updating the performance counter '{0}'. This performance counter will be disabled. +TraceCodePerformanceCountersFailedForService=Loading performance counters for the service failed. Performance counters will not be available for this service. +TraceCodePerformanceCountersFailedOnRelease=Unloading the performance counters failed. +TraceCodePnrpRegisteredAddresses=Registered addresses in PNRP. +TraceCodePnrpResolvedAddresses=Resolved addresses in PNRP. +TraceCodePnrpResolveException=Unexpected Exception during PNRP resolve operation. +TraceCodePnrpUnregisteredAddresses=Unregistered addresses in PNRP. +TraceCodePrematureDatagramEof=A null Message (signalling end of channel) was received from a datagram channel, but the channel is still in the Opened state. This indicates a bug in the datagram channel, and the demuxer receive loop has been prematurely stalled. +TraceCodePeerMaintainerActivity=PeerMaintainer Activity. +TraceCodeReliableChannelOpened=A reliable channel has been opened. +TraceCodeRemoveBehavior=Behavior type already exists in the collection +TraceCodeRequestChannelReplyReceived=Received reply over request channel +TraceCodeSecurity=A failure occured while performing a security related operation. +TraceCodeSecurityActiveServerSessionRemoved=An active security session was removed by the server. +TraceCodeSecurityAuditWrittenFailure=A failure occurred while writing to the security audit log. +TraceCodeSecurityAuditWrittenSuccess=The security audit log is written successfully. +TraceCodeSecurityBindingIncomingMessageVerified=The security protocol verified the incoming message. +TraceCodeSecurityBindingOutgoingMessageSecured=The security protocol secured the outgoing message. +TraceCodeSecurityBindingSecureOutgoingMessageFailure=The security protocol cannot secure the outgoing message. +TraceCodeSecurityBindingVerifyIncomingMessageFailure=The security protocol cannot verify the incoming message. +TraceCodeSecurityClientSessionKeyRenewed=The client security session renewed the session key. +TraceCodeSecurityClientSessionCloseSent=A Close message was sent by the client security session. +TraceCodeSecurityClientSessionCloseResponseSent=Close response message was sent by client security session. +TraceCodeSecurityClientSessionCloseMessageReceived=Close message was received by client security session.TraceCodeSecurityClientSessionKeyRenewed=Client security session renewed session key. +TraceCodeSecurityClientSessionPreviousKeyDiscarded=The client security session discarded the previous session key. +TraceCodeSecurityContextTokenCacheFull=The SecurityContextSecurityToken cache is full. +TraceCodeSecurityIdentityDeterminationFailure=Identity cannot be determined for an EndpointReference. +TraceCodeSecurityIdentityDeterminationSuccess=Identity was determined for an EndpointReference. +TraceCodeSecurityIdentityHostNameNormalizationFailure=The HostName portion of an endpoint address cannot be normalized. +TraceCodeSecurityIdentityVerificationFailure=Identity verification failed. +TraceCodeSecurityIdentityVerificationSuccess=Identity verification succeeded. +TraceCodeSecurityImpersonationFailure=Security impersonation failed at the server. +TraceCodeSecurityImpersonationSuccess=Security Impersonation succeeded at the server. +TraceCodeSecurityInactiveSessionFaulted=An inactive security session was faulted by the server. +TraceCodeSecurityNegotiationProcessingFailure=Service security negotiation processing failure. +TraceCodeSecurityNewServerSessionKeyIssued=A new security session key was issued by the server. +TraceCodeSecurityPendingServerSessionAdded=A pending security session was added to the server. +TraceCodeSecurityPendingServerSessionClosed=The pending security session was closed by the server. +TraceCodeSecurityPendingServerSessionActivated=A pending security session was activated by the server. +TraceCodeSecurityServerSessionCloseReceived=The server security session received a close message from the client. +TraceCodeSecurityServerSessionCloseResponseReceived=Server security session received Close response message from client. +TraceCodeSecurityServerSessionAbortedFaultSent=Server security session sent session aborted fault to client. +TraceCodeSecurityServerSessionKeyUpdated=The security session key was updated by the server. +TraceCodeSecurityServerSessionRenewalFaultSent=The server security session sent a key renewal fault to the client. +TraceCodeSecuritySessionCloseResponseSent=The server security session sent a close response to the client. +TraceCodeSecuritySessionServerCloseSent=Server security session sent Close to client. +TraceCodeSecuritySessionAbortedFaultReceived=Client security session received session aborted fault from server. +TraceCodeSecuritySessionAbortedFaultSendFailure=Failure sending security session aborted fault to client. +TraceCodeSecuritySessionClosedResponseReceived=The client security session received a closed reponse from the server. +TraceCodeSecuritySessionClosedResponseSendFailure=A failure occurred when sending a security session Close response to the client. +TraceCodeSecuritySessionServerCloseSendFailure=Failure sending security session Close to client. +TraceCodeSecuritySessionKeyRenewalFaultReceived=The client security session received a key renewal fault from the server. +TraceCodeSecuritySessionRedirectApplied=The client security session was redirected. +TraceCodeSecuritySessionRenewFaultSendFailure=A failure occurred when sending a renewal fault on the security session key to the client. +TraceCodeSecuritySessionRequestorOperationFailure=The client security session operation failed. +TraceCodeSecuritySessionRequestorOperationSuccess=The security session operation completed successfully at the client. +TraceCodeSecuritySessionRequestorStartOperation=A security session operation was started at the client. +TraceCodeSecuritySessionResponderOperationFailure=The security session operation failed at the server. +TraceCodeSecuritySpnToSidMappingFailure=The ServicePrincipalName could not be mapped to a SecurityIdentifier. +TraceCodeSecurityTokenAuthenticatorClosed=Security Token Authenticator was closed. +TraceCodeSecurityTokenAuthenticatorOpened=Security Token Authenticator was opened. +TraceCodeSecurityTokenProviderClosed=Security Token Provider was closed. +TraceCodeSecurityTokenProviderOpened=Security Token Provider was opened. +TraceCodeServiceChannelLifetime=ServiceChannel information. +TraceCodeServiceHostBaseAddresses=ServiceHost base addresses. +TraceCodeServiceHostTimeoutOnClose=ServiceHost close operation timedout. +TraceCodeServiceHostFaulted=ServiceHost faulted. +TraceCodeServiceHostErrorOnReleasePerformanceCounter=ServiceHost error on calling ReleasePerformanceCounters. +TraceCodeServiceThrottleLimitReached=The system hit the limit set for throttle '{0}'. Limit for this throttle was set to {1}. Throttle value can be changed by modifying attribute '{2}' in serviceThrottle element or by modifying '{0}' property on behavior ServiceThrottlingBehavior. +TraceCodeServiceThrottleLimitReachedInternal=The system hit an internal throttle limit. Limit for this throttle was set to {0}. This throttle cannot be configured. +TraceCodeManualFlowThrottleLimitReached=The system hit the limit set for the '{0}' throttle. Throttle value can be changed by modifying {0} property on {1}. +TraceCodeProcessMessage2Paused=Switched threads while processing a message for Contract '{0}' at Address '{1}'. ConcurrencyMode for service is set to Single/Reentrant and the service is currently processing another message. +TraceCodeProcessMessage3Paused=Switched threads while processing a message for Contract '{0}' at Address '{1}'. Cannot process more than one transaction at a time and the transaction associated with the previous message is not yet complete. Ensure that the caller has committed the transaction. +TraceCodeProcessMessage31Paused=Switched threads while processing a message for Contract '{0}' at Address '{1}'. Waiting for the completion of ReceiveContext acknowledgement. If your service seems to be not processing the message ensure that the channel implementation of receive context completes the operation. +TraceCodeProcessMessage4Paused=Switched threads while processing a message for Contract '{0}' at Address '{1}'. UseSynchronizationContext property on ServiceBehaviorAttribute is set to true, and SynchronizationContext.Current was non-null when opening ServiceHost. If your service seems to be not processing messages, consider setting UseSynchronizationContext to false. +TraceCodeServiceOperationExceptionOnReply=Replying to an operation threw a exception. +TraceCodeServiceOperationMissingReply=The Request/Reply operation {0} has no Reply Message. +TraceCodeServiceOperationMissingReplyContext=The Request/Reply operation {0} has no IRequestContext to use for the reply. +TraceCodeServiceSecurityNegotiationCompleted=Service security negotiation completed. +TraceCodeSecuritySessionDemuxFailure=The incoming message is not part of an existing security session. +TraceCodeServiceHostCreation=Create ServiceHost. +TraceCodePortSharingClosed=The TransportManager was successfully closed. +TraceCodePortSharingDuplicatedPipe=A named pipe was successfully duplicated. +TraceCodePortSharingDuplicatedSocket=A socket was successfully duplicated. +TraceCodePortSharingDupHandleGranted=The PROCESS_DUP_HANDLE access right has been granted to the {0} service's account with SID '{1}'. +TraceCodePortSharingListening=The TransportManager is now successfully listening. +TraceCodeSkipBehavior=Behavior type is not of expected type +TraceCodeFailedAcceptFromPool=An attempt to reuse a pooled connection failed. Another attempt will be made with {0} remaining in the overall timeout. +TraceCodeFailedPipeConnect=An attempt to connect to the named pipe endpoint at '{1}' failed. Another attempt will be made with {0} remaining in the overall timeout. +TraceCodeSystemTimeResolution=The operating system's timer resolution was detected as {0} ticks, which is about {1} milliseconds. +TraceCodeRequestContextAbort=RequestContext aborted +TraceCodePipeConnectionAbort=PipeConnection aborted +TraceCodeSharedManagerServiceEndpointNotExist=The shared memory for the endpoint of the service '{0}' does not exist. The service may not be started. +TraceCodeSocketConnectionAbort=SocketConnection aborted +TraceCodeSocketConnectionAbortClose=SocketConnection aborted under Close +TraceCodeSocketConnectionClose=SocketConnection close +TraceCodeSocketConnectionCreate=SocketConnection create +TraceCodeSpnegoClientNegotiationCompleted=SpnegoTokenProvider completed SSPI negotiation. +TraceCodeSpnegoServiceNegotiationCompleted=SpnegoTokenAuthenticator completed SSPI negotiation. +TraceCodeSpnegoClientNegotiation=Client's outgoing SSPI negotiation. +TraceCodeSpnegoServiceNegotiation=Service's outgoing SSPI negotiation. +TraceCodeSslClientCertMissing=The remote SSL client failed to provide a required certificate. +TraceCodeStreamSecurityUpgradeAccepted=The stream security upgrade was accepted successfully. +TraceCodeTcpChannelMessageReceiveFailed=Failed to receive a message over TCP channel +TraceCodeTcpChannelMessageReceived=Received a message over TCP channel +TraceCodeUnderstoodMessageHeader=Understood message header. +TraceCodeUnhandledAction=No service available to handle this action +TraceCodeUnhandledExceptionInUserOperation=Unhandled exception in user operation '{0}.{1}'. +TraceCodeWebHostFailedToActivateService=Webhost could not activate service +TraceCodeWebHostFailedToCompile=Webhost couldn't compile service +TraceCodeWmiPut=Setting a value via WMI. +TraceCodeWsmexNonCriticalWsdlExportError=A non-critical error or warning occurred during WSDL Export +TraceCodeWsmexNonCriticalWsdlImportError=A non-critical error or warning occurred in the MetadataExchangeClient during WSDL Import This could result in some endpoints not being imported. +TraceCodeFailedToOpenIncomingChannel=An incoming channel was disposed because there was an error while attempting to open it. +TraceCodeTransportListen=Listen at '{0}'. +TraceCodeWsrmInvalidCreateSequence=An invalid create sequence message was received. +TraceCodeWsrmInvalidMessage=An invalid WS-RM message was received. +TraceCodeWsrmMaxPendingChannelsReached=An incoming create sequence request was rejected because the maximum pending channel count was reached. +TraceCodeWsrmMessageDropped=A message in a WS-RM sequence has been dropped because it could not be buffered. +TraceCodeWsrmNegativeElapsedTimeDetected=The reliable session infrastructure detected a system clock change. This will temporarily result in a less optimal message retry strategy. +TraceCodeWsrmReceiveAcknowledgement=WS-RM SequenceAcknowledgement received. +TraceCodeWsrmReceiveLastSequenceMessage=WS-RM Last Sequence message received. +TraceCodeWsrmReceiveSequenceMessage=WS-RM Sequence message received. +TraceCodeWsrmSendAcknowledgement=WS-RM SequenceAcknowledgement sent. +TraceCodeWsrmSendLastSequenceMessage=WS-RM Last Sequence message sent. +TraceCodeWsrmSendSequenceMessage=WS-RM Sequence message sent. +TraceCodeWsrmSequenceFaulted=A WS-RM sequence has faulted. +TraceCodeChannelConnectionDropped=Channel connection was dropped +TraceCodeAsyncCallbackThrewException=An async callback threw an exception! +TraceCodeMetadataExchangeClientSendRequest=The MetadataExchangeClient is sending a request for metadata. +TraceCodeMetadataExchangeClientReceiveReply=The MetadataExchangeClient received a reply. +TraceCodeWarnHelpPageEnabledNoBaseAddress=The ServiceDebugBehavior Help Page is enabled at a relative address and cannot be created because there is no base address. +TraceCodeTcpConnectError=The TCP connect operation failed. +TraceCodeTxSourceTxScopeRequiredIsTransactedTransport=The transaction '{0}' was received for operation '{1}' from a transacted transport, such as MSMQ. +TraceCodeTxSourceTxScopeRequiredIsTransactionFlow=The transaction '{0}' was flowed to operation '{1}'. +TraceCodeTxSourceTxScopeRequiredIsAttachedTransaction=The transaction '{0}' was received for operation '{1}' from an InstanceContext transaction. +TraceCodeTxSourceTxScopeRequiredUsingExistingTransaction=Existing transaction '{0}' being used for operation '{1}'. +TraceCodeTxCompletionStatusCompletedForAutocomplete=The transaction '{0}' for operation '{1}' was completed due to the TransactionAutoComplete OperationBehaviorAttribute member being set to true. +TraceCodeTxCompletionStatusCompletedForError=The transaction '{0}' for operation '{1}' was completed due to an unhandled execution exception. +TraceCodeTxCompletionStatusCompletedForSetComplete=The transaction '{0}' for operation '{1}' was completed due to a call to SetTransactionComplete. +TraceCodeTxCompletionStatusCompletedForTACOSC=The transaction '{0}' was completed when the session was closed due to the TransactionAutoCompleteOnSessionClose ServiceBehaviorAttribute member. +TraceCodeTxCompletionStatusCompletedForAsyncAbort=The transaction '{0}' for operation '{1}' was completed due to asynchronous abort. +TraceCodeTxCompletionStatusRemainsAttached=The transaction '{0}' for operation '{1}' remains attached to the InstanceContext. +TraceCodeTxCompletionStatusAbortedOnSessionClose=The transaction '{0}' was aborted because it was uncompleted when the session was closed and the TransactionAutoCompleteOnSessionClose OperationBehaviorAttribute was set to false. +TraceCodeTxReleaseServiceInstanceOnCompletion=The service instance was released on the completion of the transaction '{0}' because the ReleaseServiceInstanceOnTransactionComplete ServiceBehaviorAttribute was set to true. +TraceCodeTxAsyncAbort=The transaction '{0}' was asynchronously aborted. +TraceCodeTxFailedToNegotiateOleTx=The OleTransactions protocol negotiation failed for coordination context '{0}'. +TraceCodeTxSourceTxScopeRequiredIsCreateNewTransaction=The transaction '{0}' for operation '{1}' was newly created. + +; +;CfxGreen TraceCodes +; +TraceCodeActivatingMessageReceived=Activating message received. +TraceCodeDICPInstanceContextCached=InstanceContext cached for InstanceId {0}. +TraceCodeDICPInstanceContextRemovedFromCache=InstanceContext for InstanceId {0} removed from cache. +TraceCodeInstanceContextBoundToDurableInstance=DurableInstance's InstanceContext refcount incremented. +TraceCodeInstanceContextDetachedFromDurableInstance=DurableInstance's InstanceContext refcount decremented. +TraceCodeContextChannelFactoryChannelCreated=ContextChannel created. +TraceCodeContextChannelListenerChannelAccepted=A new ContextChannel was accepted. +TraceCodeContextProtocolContextAddedToMessage=Context added to Message. +TraceCodeContextProtocolContextRetrievedFromMessage=Context retrieved from Message. +TraceCodeWorkflowServiceHostCreated=WorkflowServiceHost created. +TraceCodeServiceDurableInstanceDeleted=ServiceDurableInstance '{0}' deleted from persistence store. +TraceCodeServiceDurableInstanceDisposed=ServiceDurableInstance '{0}' disposed. +TraceCodeServiceDurableInstanceLoaded=ServiceDurableInstance loaded from persistence store. +TraceCodeServiceDurableInstanceSaved=ServiceDurableInstance saved to persistence store. +TraceCodeWorkflowDurableInstanceLoaded=WorkflowDurableInstance '{0}' loaded. +TraceCodeWorkflowDurableInstanceActivated=WorkflowDurableInstance '{0}' activated. +TraceCodeWorkflowDurableInstanceAborted=WorkflowDurableInstance aborted. +TraceCodeWorkflowOperationInvokerItemQueued=Work item enqueued. +TraceCodeWorkflowRequestContextReplySent=Reply sent for InstanceId {0}. +TraceCodeWorkflowRequestContextFaultSent=Fault Sent for InstanceId {0}. +TraceCodeSqlPersistenceProviderSQLCallStart=Sql execution started. +TraceCodeSqlPersistenceProviderSQLCallEnd=Sql execution complete. +TraceCodeSqlPersistenceProviderOpenParameters=SqlPersistenceProvider.Open() parameters. +TraceCodeSyncContextSchedulerServiceTimerCancelled=SynchronizationContextWorkflowSchedulerService - Timer {0} cancelled. +TraceCodeSyncContextSchedulerServiceTimerCreated=SynchronizationContextWorkflowSchedulerService - Timer {0} created for InstanceId {1}. +TraceCodeSyndicationReadFeedBegin=Reading of a syndication feed started. +TraceCodeSyndicationReadFeedEnd=Reading of a syndication feed completed. +TraceCodeSyndicationReadItemBegin=Reading of a syndication item started. +TraceCodeSyndicationReadItemEnd=Reading of a syndication item completed. +TraceCodeSyndicationWriteFeedBegin=Writing of a syndication feed started. +TraceCodeSyndicationWriteFeedEnd=Writing of a syndication feed completed. +TraceCodeSyndicationWriteItemBegin=Writing of a syndication item started. +TraceCodeSyndicationWriteItemEnd=Writing of a syndication item completed. +TraceCodeSyndicationProtocolElementIgnoredOnWrite=Syndication element with name '{0}' and namespace '{1}' was not written. +TraceCodeSyndicationProtocolElementInvalid=Syndication element with name '{0}' and namespace '{1}' is invalid. +TraceCodeWebUnknownQueryParameterIgnored=HTTP query string parameter with name '{0}' was ignored. +TraceCodeWebRequestMatchesOperation=Incoming HTTP request with URI '{0}' matched operation '{1}'. +TraceCodeWebRequestDoesNotMatchOperations=Incoming HTTP request with URI '{0}' does not match any operation. +; +; UriTemplate strings +; +UTTMustBeAbsolute=Parameter 'baseAddress' must an absolute uri. +UTTBaseAddressMustBeAbsolute=BaseAddress must an absolute uri. +UTTCannotChangeBaseAddress=Cannot change BaseAddress after calling MakeReadOnly. +UTTMultipleMatches=There were multiple UriTemplateMatch results, but MatchSingle was called. +UTTBaseAddressNotSet=BaseAddress has not been set. Set the BaseAddress property before calling MakeReadOnly, Match, or MatchSingle. +UTTEmptyKeyValuePairs=KeyValuePairs must have at least one element. +UTBindByPositionWrongCount=UriTemplate '{0}' contains {1} path variables and {2} query variables but {3} values were passed to the BindByPosition method. The number of values passed to BindByPosition should be greater than or equal to the number of path variables in the template and cannot be greater than the total number of variables in the template. +UTBadBaseAddress=baseAddress must an absolute Uri. +UTQueryNamesMustBeUnique=The UriTemplate '{0}' is not valid; each portion of the query string must be of the form 'name' or of the form 'name=value', where each name is unique. Note that the names are case-insensitive. See the documentation for UriTemplate for more details. +UTQueryCannotEndInAmpersand=The UriTemplate '{0}' is not valid; the query string cannot end with '&'. See the documentation for UriTemplate for more details. +UTQueryCannotHaveEmptyName=The UriTemplate '{0}' is not valid; each portion of the query string must be of the form 'name' or of the form 'name=value'. See the documentation for UriTemplate for more details. +UTVarNamesMustBeUnique=The UriTemplate '{0}' is not valid; the UriTemplate variable named '{1}' appears multiple times in the template. Note that UriTemplate variable names are case-insensitive. See the documentation for UriTemplate for more details. +UTTAmbiguousQueries=UriTemplateTable does not support '{0}' and '{1}' since they are not equivalent, but cannot be disambiguated because they have equivalent paths and the same common literal values for the query string. See the documentation for UriTemplateTable for more detail. +UTTOtherAmbiguousQueries=UriTemplateTable does not support multiple templates that have equivalent path as template '{0}' but have different query strings, where the query strings cannot all be disambiguated via literal values. See the documentation for UriTemplateTable for more detail. +UTTDuplicate=UriTemplateTable (with allowDuplicateEquivalentUriTemplates = false) does not support both '{0}' and '{1}', since they are equivalent. Call MakeReadOnly with allowDuplicateEquivalentUriTemplates = true to use both of these UriTemplates in the same table. See the documentation for UriTemplateTable for more detail. +UTInvalidFormatSegmentOrQueryPart=UriTemplate does not support '{0}' as a valid format for a segment or a query part. +BindUriTemplateToNullOrEmptyPathParam=The path variable '{0}' in the UriTemplate must be bound to a non-empty string value. +UTBindByPositionNoVariables=UriTemplate '{0}' contains no variables; yet the BindByPosition method was called with {1} values. +UTCSRLookupBeforeMatch=UTCSR - Lookup was called before match +UTDoesNotSupportAdjacentVarsInCompoundSegment=The UriTemplate '{0}' is not valid; UriTemplate does not support two adjacent variables with no literal in compound segments, such as in the segment '{1}'. +UTQueryCannotHaveCompoundValue=The UriTemplate '{0}' is not valid; each portion of the query string must be of the form 'name=value', when value cannot be a compound segment. See the documentation for UriTemplate for more details. +UTQueryMustHaveLiteralNames=The UriTemplate '{0}' is not valid; each portion of the query string must be of the form 'name' or of the form 'name=value', where name is a simple literal. See the documentation for UriTemplate for more details. +UTAdditionalDefaultIsInvalid=Changing an inline default value with information from the additional default values is not supported; the default value to the variable '{0}' was already provided as part of the UriTemplate '{1}'. See the documentation for UriTemplate for more details. +UTDefaultValuesAreImmutable=The default values of UriTemplate are immutable; they cannot be modified after the construction of the UriTemplate instance. See the documentation of UriTemplate for more details. +UTDefaultValueToCompoundSegmentVar=The UriTemplate '{0}' is not valid; the UriTemplate compound path segment '{1}' provides a default value to variable '{2}'. Note that UriTemplate doesn't support default values to variables in compound segments. See the documentation for UriTemplate for more details. +UTDefaultValueToQueryVar=The UriTemplate '{0}' is not valid; the UriTemplate variable declaration '{1}' provides a default value to query variable '{2}'. Note that UriTemplate doesn't support default values to query variables. See the documentation for UriTemplate for more details. +UTInvalidDefaultPathValue=The UriTemplate '{0}' is not valid; the UriTemplate variable declaration '{1}' provides an empty default value to path variable '{2}'. Note that UriTemplate path variables cannot be bound to a null or empty value. See the documentation for UriTemplate for more details. +UTInvalidVarDeclaration=The UriTemplate '{0}' is not valid; the UriTemplate variable declaration '{1}' isn't a valid variable construct. Note that UriTemplate variable definitions are either a simple, non-empty, variable name or a 'name=value' format, where the name must not be empty and the value provides a default value to the variable. See the documentation for UriTemplate for more details. +UTInvalidWildcardInVariableOrLiteral=The UriTemplate '{0}' is not valid; the wildcard ('{1}') cannot appear in a variable name or literal, unless as a construct for a wildcard segment. Note that a wildcard segment, either a literal or a variable, is valid only as the last path segment in the template; the wildcard can appear only once. See the documentation for UriTemplate for more details. +UTStarVariableWithDefaults=The UriTemplate '{0}' is not valid; the UriTemplate last path segment '{1}' provides a default value to final star variable '{2}'. Note that UriTemplate doesn't support default values to final star variable. See the documentation for UriTemplate for more details. +UTDefaultValueToCompoundSegmentVarFromAdditionalDefaults=The UriTemplate '{0}' is not valid; the path variable '{1}', defined as part of a compound path segment has been provided with a default value as part of the additional defaults. Note that UriTemplate doesn't support default values to variables in compound segments. See the documentation for UriTemplate for more details. +UTDefaultValueToQueryVarFromAdditionalDefaults=The UriTemplate '{0}' is not valid; the query variable '{1}' has been provided a default value as part of the additional defaults. Note that UriTemplate doesn't support default values to query variables. See the documentation for UriTemplate for more details. +UTNullableDefaultAtAdditionalDefaults=The UriTemplate '{0}' is not valid; the additional default value '{1}' has a null value as default value. Note that null default values must be only provided to concrete path variables. See the documentation for UriTemplate for more details. +UTNullableDefaultMustBeFollowedWithNullables=The UriTemplate '{0}' is not valid; the UriTemplate path variable '{1}' has a null default value while following path variable '{2}' has no defaults or provides a non-null default value. Note that UriTemplate path variable with null default value must be followed only with other path variables with null defaulted values. See the documentation for UriTemplate for more details. +UTNullableDefaultMustNotBeFollowedWithLiteral=The UriTemplate '{0}' is not valid; the UriTemplate path variable '{1}' has a null default value while the following path segment '{2}' is not a variable segment with a null default value. Note that UriTemplate path variable with null default values must be followed only with other path variables with null defaulted value. See the documentation for UriTemplate for more details. +UTNullableDefaultMustNotBeFollowedWithWildcard=The UriTemplate '{0}' is not valid; the UriTemplate path variable '{1}' has a null default value while the template is finished with a wildcard. Note that UriTemplate path variable with null default values must be followed only with other path variables with null defaulted value. See the documentation for UriTemplate for more details. +UTStarVariableWithDefaultsFromAdditionalDefaults=The UriTemplate '{0}' is not valid; the UriTemplate final star variable '{1}' has been provides a default value as part of the additional defaults information. Note that UriTemplate doesn't support default values to final star variable. See the documentation for UriTemplate for more details. +UTTInvalidTemplateKey=An invalid template '{0}' was passed as the key in a pair of template and its associated object. UriTemplateTable Key-Value pairs must always contain a valid UriTemplate object as key; note that UriTemplateTable doesn't support templates that are ignoring the trailing slash in respect to matching. See the documentation for UriTemplateTable for more details. +UTTNullTemplateKey=A null UriTemplate was passed as the key in a pair of template and its associated object. UriTemplateTable Key-Value pairs must always contain a valid UriTemplate object as key. See the documentation for UriTemplateTable for more details. +UTBindByNameCalledWithEmptyKey=The BindByName method of UriTemplate was called with an empty name in the collection of arguments for the bind. Note that the NameValueCollection or the Dictionary passed to BindByName cannot contain an empty (or null) name as a key. See the documentation of UriTemplate for more details. +UTBothLiteralAndNameValueCollectionKey=The UriTemplate contains a literal value for query key '{0}', but that key also is present in the NameValueCollection. Either remove that key from the NameValueCollection, or else change the UriTemplate to not have a query literal for that key. +; +; Syndication strings +; +ExtensionNameNotSpecified=The name of the extension element must be specified. +UnsupportedRssVersion=The Rss20Serializer does not support RSS version '{0}'. +Atom10SpecRequiresTextConstruct=The Atom10 specification requires '{0}' to have one of these values: \"text\", \"html\", \"xhtml\", however this value is '{1}' in the document being deserialized. +ErrorInLine=Error in line {0} position {1}. +ErrorParsingFeed=An error was encountered when parsing the feed's XML. Refer to the inner exception for more details. +ErrorParsingDocument=An error was encountered when parsing the document's XML. Refer to the inner exception for more details. +ErrorParsingItem=An error was encountered when parsing the item's XML. Refer to the inner exception for more details. +ErrorParsingDateTime=An error was encountered when parsing a DateTime value in the XML. +OuterElementNameNotSpecified=The outer element name must be specified. +UnknownFeedXml=The element with name '{0}' and namespace '{1}' is not an allowed feed format. +UnknownDocumentXml=The element with name '{0}' and namespace '{1}' is not an allowed document format. +UnknownItemXml=The element with name '{0}' and namespace '{1}' is not an allowed item format. +FeedFormatterDoesNotHaveFeed=The syndication feed formatter must be configured with a syndication feed. +DocumentFormatterDoesNotHaveDocument=The document formatter must be configured with a document. +ItemFormatterDoesNotHaveItem=The syndication item formatter must be configured with a syndication item. +UnbufferedItemsCannotBeCloned=A feed containing items that are not buffered (i.e. the items are not stored in an IList) cannot clone its items. Buffer the items in the feed before calling Clone on it or pass false to the Clone method. +FeedHasNonContiguousItems=The feed being deserialized has non-contiguous sets of items in it. This is not supported by '{0}'. +FeedCreatedNullCategory=The feed created a null category. +ItemCreatedNullCategory=The item created a null category. +FeedCreatedNullPerson=The feed created a null person. +ItemCreatedNullPerson=The item created a null person. +FeedCreatedNullItem==The feed created a null item. +TraceCodeSyndicationFeedReadBegin=Reading of a syndication feed started. +TraceCodeSyndicationFeedReadEnd=Reading of a syndication feed completed. +TraceCodeSyndicationItemReadBegin=Reading of a syndication item started. +TraceCodeSyndicationItemReadEnd=Reading of a syndication item completed. +TraceCodeSyndicationFeedWriteBegin=Writing of a syndication feed started. +TraceCodeSyndicationFeedWriteEnd=Writing of a syndication feed completed. +TraceCodeSyndicationItemWriteBegin=Writing of a syndication item started. +TraceCodeSyndicationItemWriteEnd=Writing of a syndication item completed. +TraceCodeSyndicationProtocolElementIgnoredOnRead=Syndication XML node of type '{0}' with name '{1}' and namespace '{2}' ignored on read. +TraceCodeSyndicationReadServiceDocumentBegin=Reading of a service document started. +TraceCodeSyndicationReadServiceDocumentEnd=Reading of a service document completed. +TraceCodeSyndicationWriteServiceDocumentBegin=Writing of a service document started. +TraceCodeSyndicationWriteServiceDocumentEnd=Writing of a service document completed. +TraceCodeSyndicationReadCategoriesDocumentBegin=Reading of a categories document started. +TraceCodeSyndicationReadCategoriesDocumentEnd=Reading of a categories document completed. +TraceCodeSyndicationWriteCategoriesDocumentBegin=Writing of a categories document started. +TraceCodeSyndicationWriteCategoriesDocumentEnd=Writing of a categories document completed. +FeedAuthorsIgnoredOnWrite=The feed's authors were not serialized as part of serializing the feed in RSS 2.0 format. +FeedContributorsIgnoredOnWrite=The feed's contributors were not serialized as part of serializing the feed in RSS 2.0 format. +FeedIdIgnoredOnWrite=The feed's id was not serialized as part of serializing the feed in RSS 2.0 format. +FeedLinksIgnoredOnWrite=The feed's links were not serialized as part of serializing the feed in RSS 2.0 format. +ItemAuthorsIgnoredOnWrite=The item's authors were not serialized as part of serializing the feed in RSS 2.0 format. +ItemContributorsIgnoredOnWrite=The item's contributors were not serialized as part of serializing the feed in RSS 2.0 format. +ItemLinksIgnoredOnWrite=The item's links were not serialized as part of serializing the feed in RSS 2.0 format. +ItemCopyrightIgnoredOnWrite=The item's copyrights were not serialized as part of serializing the feed in RSS 2.0 format. +ItemContentIgnoredOnWrite=The item's content was not serialized as part of serializing the feed in RSS 2.0 format. +ItemLastUpdatedTimeIgnoredOnWrite=The item's last updated time was not serialized as part of serializing the feed in RSS 2.0 format. +OuterNameOfElementExtensionEmpty=The outer name of the element extension cannot be empty. +InvalidObjectTypePassed=The Type of object passed as parameter '{0}' is not derived from {1}. Ensure that the type of object passed is either of type {1} or derived from {1}. +UnableToImpersonateWhileSerializingReponse=Failed to impersonate client identity during serialization of the response message. +XmlLineInfo=Line {0}, position {1}. +XmlFoundEndOfFile=end of file +XmlFoundElement=element '{0}' from namespace '{1}' +XmlFoundEndElement=end element '{0}' from namespace '{1}' +XmlFoundText=text '{0}' +XmlFoundCData=cdata '{0}' +XmlFoundComment=comment '{0}' +XmlFoundNodeType=node {0} +XmlStartElementExpected=Start element expected. Found {0}. +; +; Single WSDL Strings +; +SingleWsdlNotGenerated=A single WSDL document could not be generated for this service. Multiple service contract namespaces were found ({0}). Ensure that all your service contracts have the same namespace. +SFxDocExt_MainPageIntroSingleWsdl=You can also access the service description as a single file: +; +; Task-based asynchronous method Strings +; +TaskMethodParameterNotSupported=The use of '{0}' on the task-based asynchronous method is not supported. +TaskMethodMustNotHaveOutParameter=Client side task-based asynchronous method must not have any out or ref parameters. Any data that would have been returned through an out or ref parameter should instead be returned as part of the TResult in the resulting task. +SFxCannotImportAsParameters_OutputParameterAndTask=Generating message contract since the operation has multiple return values. + + + + +; +; WIF (Windows Identity Foundation) +; +ID0020=ID0020: The collection is empty. +ID2004=ID2004: IAsyncResult must be the AsyncResult instance returned from the Begin call. The runtime is expecting '{0}', and the actual type is '{1}'. +ID3002=ID3002: WSTrustServiceContract could not create a SecurityTokenService instance from WSTrustServiceContract.SecurityTokenServiceConfiguration. +ID3004=ID3004: Cannot obtain the schema for namespace: '{0}'. +ID3022=ID3022: The WSTrustServiceContract only supports receiving RequestSecurityToken messages. If you need to support more message types, override the WSTrustServiceContract.DispatchRequest method. +ID3023=ID3023: The WSTrustServiceContract only supports receiving RequestSecurityToken messages asynchronously. If you need to support more message types, override the WSTrustServiceContract.BeginDispatchRequest and EndDispatchRequest. +ID3097=ID3097: ServiceHost does not contain any valid Endpoints. Add at least one valid endpoint in the SecurityTokenServiceConfiguration.TrustEndpoints collection. +ID3112=ID3112: Unrecognized RequestType '{0}' specified in the incoming request. +ID3113=ID3113: The WSTrustServiceContract does not support receiving '{0}' messages with the '{1}' SOAP action. If you need to support this, override the ValidateDispatchContext method. +ID3114=ID3114: The WSTrustServiceContract cannot deserialize the WS-Trust request. +ID3137=ID3137: The TrustVersion '{0}', is not supported, only 'TrustVersion.WSTrust13' and 'TrustVersion.WSTrustFeb2005' is supported. +ID3138=ID3138: The RequestSecurityTokenResponse that was received did not contain a SecurityToken. +ID3139=ID3139: The WSTrustChannel cannot compute a proof key. The KeyType '{0}' is not supported. Valid proof key types supported by the WSTrustChannel are WSTrust13 and WSTrustFeb2005. +ID3140=ID3140: Specify one or more BaseAddresses to enable metadata or set DisableWsdl to true in the SecurityTokenServiceConfiguration. +ID3141=ID3141: The RequestType '{0}', is not supported. If you need to support this RequestType, override the corresponding virtual method in your SecurityTokenService derived class. +ID3144=ID3144: The PortType '{0}' Operation '{1}' has Message '{2}' is expected to have only one part but contains '{3}'. +ID3146=ID3146: WsdlEndpointConversionContext.WsdlPort cannot be null. +ID3147=ID3147: WsdlEndpointConversionContext.WsdlPort.Service cannot be null. +ID3148=ID3148: WsdlEndpointConversionContext.WsdlPort.Service.ServiceDescription cannot be null. +ID3149=ID3149: Cannot find an input message type for PortType '({0}, {1})' for operation '{2}' in the given ServiceDescription. +ID3150=ID3150: Cannot find an output message type for PortType '({0}, {1})' for operation '{2}' in the given ServiceDescription. +ID3190=ID3190: The WSTrustChannel cannot compute a proof key without a valid SecurityToken set as the RequestSecurityToken.UseKey when the RequestSecurityToken.KeyType is '{0}'. +ID3191=ID3191: The WSTrustChannel received a RequestedSecurityTokenResponse message containing an Entropy without a ComputedKeyAlgorithm. +ID3192=ID3192: The WSTrustChannel cannot compute a proof key. The received RequestedSecurityTokenResponse does not contain a RequestedProofToken and the ComputedKeyAlgorithm specified in the response is not supported: '{0}'. +ID3193=ID3193: The WSTrustChannel cannot compute a proof key. The received RequestedSecurityTokenResponse indicates that the proof key is computed using combined entropy. However, the response does not include an entropy. +ID3194=ID3194: The WSTrustChannel cannot compute a proof key. The received RequestedSecurityTokenResponse indicates that the proof key is computed using combined entropy. However, the request does not include an entropy. +ID3269=ID3269: Cannot determine the TrustVersion. It must either be specified explicitly, or a SecurityBindingElement must be present in the binding. +ID3270=ID3270: The WSTrustChannel does not support multi-leg issuance protocols. The RSTR received from the STS must be enclosed in a RequestSecurityTokenResponseCollection element. +ID3285=ID3285: The WS-Trust operation '{0}' is not valid or unsupported. +ID3286=ID3286: The 'inner' parameter must implement the 'System.ServiceModel.Channels.IChannel' interface. +ID3287=ID3287: WSTrustChannelFactory does not support changing the value of this property after a channel is created. +ID4008=ID4008: '{0}' does not provide an implementation for '{1}'. +ID4039=ID4039: A custom ServiceAuthorizationManager has been configured. Any custom ServiceAuthorizationManager must be derived from IdentityModelServiceAuthorizationManager. +ID4041=ID4041: Cannot configure the ServiceHost '{0}'. The ServiceHost is in a bad state and cannot be configured. +ID4053=ID4053: The token has WS-SecureConversation version '{0}'. Version '{1}' was expected. +ID4072=ID4072: The SecurityTokenHandler '{0}' registered for TokenType '{1}' must derive from '{2}'. +ID4101=ID4101: The token cannot be validated because it is not a SamlSecurityToken or a Saml2SecurityToken. Token type: '{0}' +ID4192=ID4192: The reader is not positioned on a KeyInfo element that can be read. +ID4240=ID4240: The tokenRequirement must derived from 'RecipientServiceModelSecurityTokenRequirement' for SecureConversationSecurityTokens. The tokenRequirement is of type '{0}'. +ID4244=ID4244: Internal error: sessionAuthenticator must support IIssuanceSecurityTokenAuthenticator. +ID4245=ID4245: Internal error: sessionAuthenticator must support ICommunicationObject. +ID4268=ID4268: MergeClaims must have at least one identity that is not null. +ID4271=ID4271: No IAuthorizationPolicy was found for the Transport security token '{0}'. +ID4274=ID4274: The Configuration property of this SecurityTokenHandler is set to null. Tokens cannot be read or validated in this state. Set this property or add this SecurityTokenHandler to a SecurityTokenHandlerCollection with a valid Configuration property. +ID4285=ID4285: Cannot replace SecurityToken with Id '{0}' in cache with new one. Token must exist in cache to be replaced. +ID4287=ID4287: The SecurityTokenRequirement '{0}' doesn't contain a ListenUri. +ID5004=ID5004: Unrecognized namespace: '{0}'. + +TraceAuthorize=Authorize +TraceOnAuthorizeRequestFailed=OnAuthorizeRequest Failed. +TraceOnAuthorizeRequestSucceed=OnAuthorizeRequest Succeeded. + + + +;WIF resource strings +;ID3024=AuthFailed +AuthFailed=Authentication failed. +;ID3266=DuplicateFederatedClientCredentialsParameters +DuplicateFederatedClientCredentialsParameters=The IssuedSecurityTokenProvider cannot support the FederatedClientCredentialsParameters. The FederatedClientCredentialsParameters has already provided the '{0}' parameter. +;ID3137=UnsupportedTrustVersion +UnsupportedTrustVersion=The TrustVersion '{0}', is not supported, only 'TrustVersion.WSTrust13' and 'TrustVersion.WSTrustFeb2005' is supported. + +;HttpPipeline +InputMustBeDelegatingHandlerElementError=The input {0} must be a '{1}' object. +InputTypeListEmptyError=The input handler list cannot be empty. +DelegatingHandlerArrayHasNonNullInnerHandler=The '{0}' list is invalid because the property '{1}' of '{2}' is not null. +DelegatingHandlerArrayFromFuncContainsNullItem=The '{0}' list created by the Func '{1}' is invalid because it contains one or more null items. +HttpMessageHandlerFactoryConfigInvalid_WithBothTypeAndHandlerList=The config element '{0}' is invalid because the attribute '{1}' and the sub element '{2}' were both specified. These are mutually exclusive items and cannot be used simultaneouly. +HttpMessageHandlerFactoryWithFuncCannotGenerateConfig=This '{0}' object cannot be used to generate configuration because it was created with the constructor that takes a '{1}' as the paramter. This functionality is not supported through configuration files. Please use a different constructor if you wish to generate a configuration file. +HttpMessageHandlerTypeNotSupported=Invalid type: '{0}'. It must inherit from base type '{1}', cannot be abstract, and must expose a public default constructor. +HttpMessageHandlerChannelFactoryNullPipeline='{0}' cannot return a null '{1}' instance. Please ensure that '{0}' returns a valid '{1}' instance. +HttpPipelineOperationCanceledError=HTTP pipeline operation cancelled. +HttpPipelineMessagePropertyMissingError=The message property '{0}' is missing in the HttpRequestMessage. Please make sure this property not removed or changed from the properties of the HttpRequestMessage. If you are creating a new HttpRequestMessage, please copy this property from the old message to the new one. +HttpPipelineMessagePropertyTypeError=The message property '{0}' inside the HttpRequestMessage is not with expected type '{1}'. Please make sure this property not removed or changed from the properties of the HttpRequestMessage. If you are creating a new HttpRequestMessage, please copy this property from the old message to the new one. +InvalidContentTypeError=The value '{0}' is not a valid content type. +HttpPipelineNotSupportedOnClientSide=The property '{0}' is not supported when building a ChannelFactory. The property value must be null when calling BuildChannelFactory. +CanNotLoadTypeGotFromConfig=Cound not load type '{0}' from the assemblies in current AppDomain. +HttpPipelineNotSupportNullResponseMessage=The HTTP response message should not be null. Please ensure your '{0}' instance returns a non-null '{1}' object. + +;WebSocket +WebSocketInvalidProtocolNoHeader=The subprotocol '{0}' was not requested by the client - no '{1}' header was included in the request. +WebSocketInvalidProtocolNotInClientList=The subprotocol '{0}' was not requested by the client. The client requested the following subprotocol(s): '{1}'. +WebSocketInvalidProtocolInvalidCharInProtocolString=The subprotocol '{0}' is invalid because it contains the invalid character '{1}'. +WebSocketInvalidProtocolContainsMultipleSubProtocolString=The value specified ('{0}') contains more than one subprotocol which is not supported. +WebSocketInvalidProtocolEmptySubprotocolString=Empty string is not a valid subprotocol value. Please use "null" to specify no value. +WebSocketOpaqueStreamContentNotSupportError=This method is not supported for this HTTP content. +WebSocketElementConfigInvalidHttpMessageHandlerFactoryType=Invalid value for the {0} type. The type '{1}' does not derive from the appropriate base class '{2}' or is abstract. +WebSocketEndpointOnlySupportWebSocketError=This service only supports WebSocket connections. +WebSocketEndpointDoesNotSupportWebSocketError=This service does not support WebSocket connections. +WebSocketUpgradeFailedError=WebSocket upgrade request failed. Received response status code '{0} ({1})', expected: '{2} ({3})'. +WebSocketUpgradeFailedHeaderMissingError=WebSocket upgrade request failed. The header '{0}' is missing in the response. +WebSocketUpgradeFailedWrongHeaderError=WebSocket upgrade request failed. The value of header '{0}' is '{1}'. The expected value is '{2}'. +WebSocketUpgradeFailedInvalidProtocolError=Unexpected response - the server accepted the upgrade request but specified the subprotocol '{0}' when no subprotocol was requested. +WebSocketContextWebSocketCannotBeAccessedError=WebSocket object cannot be accessed directly. +WebSocketTransportError=A WebSocket error occurred. +WebSocketUnexpectedCloseMessageError=Unexpected WebSocket close message received when receiving a message. +WebSocketStreamWriteCalledAfterEOMSent=Cannot write to the stream because the end of the stream marker was already written. +WebSocketCannotCreateRequestClientChannelWithCertainWebSocketTransportUsage=HttpChannelFactory cannot create the channel with shape '{0}' when the {1} of {2} was set as '{3}'. +WebSocketMaxPendingConnectionsReached=Maximum number of pending WebSocket connections ({0}) has been reached. Consider increasing the '{1}' quota on the '{2}' property of the transport. +WebSocketOpeningHandshakePropertiesNotAvailable=The opening handshake properties associated with the current WebSocket connection are not available. The most likely cause is that the property '{0}' on the '{1}' object returned from the custom '{2}' is not set. +AcceptWebSocketTimedOutError=The operation to establish the WebSocket connection timed out. To increase this time limit, use the OpenTimeout property on the service endpoint's binding. +TaskCancelledError=The task was cancelled. +ClientWebSocketFactory_GetWebSocketVersionFailed=An error occured when getting the WebSocketVersion from the WebSocket factory of type '{0}'. See the inner exception for details. +ClientWebSocketFactory_InvalidWebSocketVersion=The WebSocketVersion returned by the WebSocket factory of type '{0}' is either null, empty or invalid. +ClientWebSocketFactory_CreateWebSocketFailed=An error occurred when creating the WebSocket with the factory of type '{0}'. See the inner exception for details. +ClientWebSocketFactory_InvalidWebSocket=WebSocket creation failed. The '{0}' returned a WebSocket that is either null or not opened. +ClientWebSocketFactory_InvalidSubProtocol=The WebSocket returned by the factory of type '{0}' has the SubProtocol '{1}' that doesn't match the requested SubProtocol value '{2}'. +MultipleClientWebSocketFactoriesSpecified=The '{0}' contains multiple '{1}' objects, which is invalid. At most one '{1}' should be specified. +WebSocketSendTimedOut=The Send operation timed out after '{0}'. Increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. +WebSocketReceiveTimedOut=The Receive operation timed out after '{0}'. For duplex sessionful channels, the receive timeout is also the idle timeout for the channel, so consider setting a suitably large value for the ReceiveTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. +WebSocketOperationTimedOut=The '{0}' operation timed out after '{1}'. The time allotted to this operation may have been a portion of a longer timeout. +WebSocketsServerSideNotSupported=This platform does not support server side WebSockets. +WebSocketsClientSideNotSupported=This platform does not support client side WebSockets natively. Support for client side WebSockets can be enabled on this platform by providing an implementation of {0}. +WebSocketsNotSupportedInClassicPipeline=WebSockets are not supported in the classic pipeline mode. Consider using the integrated pipeline mode for the application pool. +WebSocketModuleNotLoaded=The WebSocketModule is not loaded. Check if the WebSocket feature is installed and the WebSocketModule is enabled in the list of IIS modules (see http://go.microsoft.com/fwlink/?LinkId=231398 for details). +WebSocketTransportPolicyAssertionInvalid=The name of the policy being imported for contract '{0}:{1}' is invalid:'{2}'. It should be either '{3}', '{4}' or '{5}'. +WebSocketVersionMismatchFromServer=The server didn't accept the connection request. It is possible that the WebSocket protocol version on your client doesn't match the one on the server('{0}'). +WebSocketSubProtocolMismatchFromServer=The server didn't accept the connection request. It is possible that the WebSocket subprotocol sent by your client is not supported by the server. Protocol(s) supported by the server are '{0}'. +WebSocketContentTypeMismatchFromServer=The server didn't accept the connection request. It is possible that the client side message encoding format doesn't match the setting on the server side. Please check your binding settings. +WebSocketContentTypeAndTransferModeMismatchFromServer=The server didn't accept the connection request. It is possible that the client side message encoding format or message transfer mode doesn't match the setting on the server side. Please check your binding settings. + +;HttpMessage +ResponseHeaderWithRequestHeadersCollection=This collection holds request headers and cannot contain the specified response header '{0}'. +RequestHeaderWithResponseHeadersCollection=This collection holds response headers and cannot contain the specified request header '{0}'. +MessageVersionNoneRequiredForHttpMessageSupport=Support for {0} and {1} can not be enabled with {2} when the {3} of the {4} is '{5}'. Ensure the {4} used with the binding has a {3} of '{6}'. +; copied for code cloned from WebHeaderCollection +WebHeaderEnumOperationCantHappen=Enumeration has either not started or has already finished. +WebHeaderEmptyStringCall=The parameter '{0}' cannot be an empty string. +WebHeaderInvalidControlChars=Specified value has invalid Control characters. +WebHeaderInvalidCRLFChars=Specified value has invalid CRLF characters. +WebHeaderInvalidHeaderChars=Specified value has invalid HTTP Header characters. +WebHeaderInvalidNonAsciiChars=Specified value has invalid non-ASCII characters. +WebHeaderArgumentOutOfRange=Specified argument was out of the range of valid values. +CopyHttpHeaderFailed=Failed to copy the HTTP header '{0}' with value '{1}' to '{2}'. diff --git a/src/System.ServiceModel.Syndication/src/Resources/SR.Designer.cs b/src/System.ServiceModel.Syndication/src/Resources/SR.Designer.cs new file mode 100644 index 000000000000..a12b894167d3 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/Resources/SR.Designer.cs @@ -0,0 +1,23403 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.ServiceModel.Syndication.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class SR { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal SR() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.ServiceModel.Syndication.Resources.SR", typeof(SR).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to A binding instance has already been associated to listen URI '{0}'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config. . + /// + internal static string ABindingInstanceHasAlreadyBeenAssociatedTo1 { + get { + return ResourceManager.GetString("ABindingInstanceHasAlreadyBeenAssociatedTo1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation to establish the WebSocket connection timed out. To increase this time limit, use the OpenTimeout property on the service endpoint's binding.. + /// + internal static string AcceptWebSocketTimedOutError { + get { + return ResourceManager.GetString("AcceptWebSocketTimedOutError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not perform an AccessCheck (error=0x{0:X}).. + /// + internal static string AccessCheckFailed { + get { + return ResourceManager.GetString("AccessCheckFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Access is denied.. + /// + internal static string AccessDenied { + get { + return ResourceManager.GetString("AccessDenied", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Channel/Service Endpoint is null.. + /// + internal static string AChannelServiceEndpointIsNull0 { + get { + return ResourceManager.GetString("AChannelServiceEndpointIsNull0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Channel/Service endpoint's Binding is null.. + /// + internal static string AChannelServiceEndpointSBindingIsNull0 { + get { + return ResourceManager.GetString("AChannelServiceEndpointSBindingIsNull0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Channel/Service endpoint's Contract is null.. + /// + internal static string AChannelServiceEndpointSContractIsNull0 { + get { + return ResourceManager.GetString("AChannelServiceEndpointSContractIsNull0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Channel/Service endpoint's Contract's name is null or empty.. + /// + internal static string AChannelServiceEndpointSContractSNameIsNull0 { + get { + return ResourceManager.GetString("AChannelServiceEndpointSContractSNameIsNull0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Channel/Service endpoint's Contract's namespace is null.. + /// + internal static string AChannelServiceEndpointSContractSNamespace0 { + get { + return ResourceManager.GetString("AChannelServiceEndpointSContractSNamespace0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint requested an address for acknowledgements that is not the same as the address for application messages. The channel could not be opened because this is not supported. Ensure the endpoint address used to create the channel is identical to the one the remote endpoint was set up with.. + /// + internal static string AcksToMustBeSameAsRemoteAddress { + get { + return ResourceManager.GetString("AcksToMustBeSameAsRemoteAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The address for acknowledgements must be the same as the address for application messages. Verify that your endpoint is configured to use the same URI for these two addresses.. + /// + internal static string AcksToMustBeSameAsRemoteAddressReason { + get { + return ResourceManager.GetString("AcksToMustBeSameAsRemoteAddressReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The set of actions cannot be empty.. + /// + internal static string ActionFilterEmptyList { + get { + return ResourceManager.GetString("ActionFilterEmptyList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Executing user callback.. + /// + internal static string ActivityCallback { + get { + return ResourceManager.GetString("ActivityCallback", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close '{0}'.. + /// + internal static string ActivityClose { + get { + return ResourceManager.GetString("ActivityClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close ChannelFactory. Contract type: '{0}'.. + /// + internal static string ActivityCloseChannelFactory { + get { + return ResourceManager.GetString("ActivityCloseChannelFactory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close ClientBase. Contract type: '{0}'.. + /// + internal static string ActivityCloseClientBase { + get { + return ResourceManager.GetString("ActivityCloseClientBase", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close ServiceHost '{0}'.. + /// + internal static string ActivityCloseServiceHost { + get { + return ResourceManager.GetString("ActivityCloseServiceHost", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Construct ChannelFactory. Contract type: '{0}'.. + /// + internal static string ActivityConstructChannelFactory { + get { + return ResourceManager.GetString("ActivityConstructChannelFactory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Construct ServiceHost '{0}'.. + /// + internal static string ActivityConstructServiceHost { + get { + return ResourceManager.GetString("ActivityConstructServiceHost", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Execute Async: Begin: '{0}.{1}'; End: '{2}.{3}'.. + /// + internal static string ActivityExecuteAsyncMethod { + get { + return ResourceManager.GetString("ActivityExecuteAsyncMethod", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Execute '{0}.{1}'.. + /// + internal static string ActivityExecuteMethod { + get { + return ResourceManager.GetString("ActivityExecuteMethod", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Listen at '{0}'.. + /// + internal static string ActivityListenAt { + get { + return ResourceManager.GetString("ActivityListenAt", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open '{0}'.. + /// + internal static string ActivityOpen { + get { + return ResourceManager.GetString("ActivityOpen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open ChannelFactory. Contract type: '{0}'.. + /// + internal static string ActivityOpenChannelFactory { + get { + return ResourceManager.GetString("ActivityOpenChannelFactory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open ClientBase. Contract type: '{0}'.. + /// + internal static string ActivityOpenClientBase { + get { + return ResourceManager.GetString("ActivityOpenClientBase", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open ServiceHost '{0}'.. + /// + internal static string ActivityOpenServiceHost { + get { + return ResourceManager.GetString("ActivityOpenServiceHost", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Process action '{0}'.. + /// + internal static string ActivityProcessAction { + get { + return ResourceManager.GetString("ActivityProcessAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Processing message {0}.. + /// + internal static string ActivityProcessingMessage { + get { + return ResourceManager.GetString("ActivityProcessingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reading data from connection on '{0}'.. + /// + internal static string ActivityReadOnConnection { + get { + return ResourceManager.GetString("ActivityReadOnConnection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Receiving data at via '{0}'.. + /// + internal static string ActivityReceiveAtVia { + get { + return ResourceManager.GetString("ActivityReceiveAtVia", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Receive bytes on connection '{0}'.. + /// + internal static string ActivityReceiveBytes { + get { + return ResourceManager.GetString("ActivityReceiveBytes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close Security Session.. + /// + internal static string ActivitySecurityClose { + get { + return ResourceManager.GetString("ActivitySecurityClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Renew Secure Session.. + /// + internal static string ActivitySecurityRenew { + get { + return ResourceManager.GetString("ActivitySecurityRenew", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set up Secure Session.. + /// + internal static string ActivitySecuritySetup { + get { + return ResourceManager.GetString("ActivitySecuritySetup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shared listener connection: '{0}'.. + /// + internal static string ActivitySharedListenerConnection { + get { + return ResourceManager.GetString("ActivitySharedListenerConnection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Socket connection: '{0}'.. + /// + internal static string ActivitySocketConnection { + get { + return ResourceManager.GetString("ActivitySocketConnection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Addressing10 ({0}). + /// + internal static string Addressing10ToStringFormat { + get { + return ResourceManager.GetString("Addressing10ToStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Addressing200408 ({0}). + /// + internal static string Addressing200408ToStringFormat { + get { + return ResourceManager.GetString("Addressing200408ToStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The element '{0}' in namespace '{1}' is not valid. This either means that element '{0}' is a duplicate element, or that it is not a legal extension because extension elements cannot be in the addressing namespace.. + /// + internal static string AddressingExtensionInBadNS { + get { + return ResourceManager.GetString("AddressingExtensionInBadNS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Addressing Version '{0}' does not support adding WS-Addressing headers.. + /// + internal static string AddressingHeadersCannotBeAddedToAddressingVersion { + get { + return ResourceManager.GetString("AddressingHeadersCannotBeAddedToAddressingVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AddressingNone ({0}). + /// + internal static string AddressingNoneToStringFormat { + get { + return ResourceManager.GetString("AddressingNoneToStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Addressing Version '{0}' is not supported.. + /// + internal static string AddressingVersionNotSupported { + get { + return ResourceManager.GetString("AddressingVersionNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The required address keyword was not specified.. + /// + internal static string AddressNotSpecified { + get { + return ResourceManager.GetString("AddressNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MTAWorkerThread exception. + /// + internal static string AdminMTAWorkerThreadException { + get { + return ResourceManager.GetString("AdminMTAWorkerThreadException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple link-local only interfaces detected. Please specifiy the interface you require by using the ListenIpAddress attribute in the PeerTransportBindingElement. + /// + internal static string AmbiguousConnectivitySpec { + get { + return ResourceManager.GetString("AmbiguousConnectivitySpec", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service does not allow you to log on anonymously.. + /// + internal static string AnonymousLogonsAreNotAllowed { + get { + return ResourceManager.GetString("AnonymousLogonsAreNotAllowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configured application was not found. (The Application ID was {0}.). + /// + internal static string ApplicationNotFound { + get { + return ResourceManager.GetString("ApplicationNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to value must be >= {0} and <= {1}.. + /// + internal static string ArgumentOutOfRange { + get { + return ResourceManager.GetString("ArgumentOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string asd { + get { + return ResourceManager.GetString("asd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0}:{1} assertion is not supported.. + /// + internal static string AssertionNotSupported { + get { + return ResourceManager.GetString("AssertionNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AsymmetricSecurityBindingElement cannot build a channel or listener factory. The InitiatorTokenParameters property is required but not set. Binding element configuration: {0}. + /// + internal static string AsymmetricSecurityBindingElementNeedsInitiatorTokenParameters { + get { + return ResourceManager.GetString("AsymmetricSecurityBindingElementNeedsInitiatorTokenParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AsymmetricSecurityBindingElement cannot build a channel or listener factory. The RecipientTokenParameters property is required but not set. Binding element configuration: {0}. + /// + internal static string AsymmetricSecurityBindingElementNeedsRecipientTokenParameters { + get { + return ResourceManager.GetString("AsymmetricSecurityBindingElementNeedsRecipientTokenParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An AsyncCallback threw an exception.. + /// + internal static string AsyncCallbackException { + get { + return ResourceManager.GetString("AsyncCallbackException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Async End called on wrong channel.. + /// + internal static string AsyncEndCalledOnWrongChannel { + get { + return ResourceManager.GetString("AsyncEndCalledOnWrongChannel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Async End called with an IAsyncResult from a different Begin method.. + /// + internal static string AsyncEndCalledWithAnIAsyncResult { + get { + return ResourceManager.GetString("AsyncEndCalledWithAnIAsyncResult", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request message must be protected. This is required by an operation of the contract ('{0}','{1}'). The protection must be provided by the binding ('{2}','{3}').. + /// + internal static string AtLeastOneContractOperationRequestRequiresProtectionLevelNotSupportedByBinding { + get { + return ResourceManager.GetString("AtLeastOneContractOperationRequestRequiresProtectionLevelNotSupportedByBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The response message must be protected. This is required by an operation of the contract ('{0}', '{1}'). The protection must be provided by the binding ('{2}', '{3}').. + /// + internal static string AtLeastOneContractOperationResponseRequiresProtectionLevelNotSupportedByBinding { + get { + return ResourceManager.GetString("AtLeastOneContractOperationResponseRequiresProtectionLevelNotSupportedByBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to At least one fault reason must be specified.. + /// + internal static string AtLeastOneFaultReasonMustBeSpecified { + get { + return ResourceManager.GetString("AtLeastOneFaultReasonMustBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Only one primary signature is allowed in a security header.. + /// + internal static string AtMostOnePrimarySignatureInReceiveSecurityHeader { + get { + return ResourceManager.GetString("AtMostOnePrimarySignatureInReceiveSecurityHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to At most one reference list is supported with default policy check.. + /// + internal static string AtMostOneReferenceListIsSupportedWithDefaultPolicyCheck { + get { + return ResourceManager.GetString("AtMostOneReferenceListIsSupportedWithDefaultPolicyCheck", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to At most one signature is supported with default policy check.. + /// + internal static string AtMostOneSignatureIsSupportedWithDefaultPolicyCheck { + get { + return ResourceManager.GetString("AtMostOneSignatureIsSupportedWithDefaultPolicyCheck", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Atom10 specification requires '{0}' to have one of these values: "text", "html", "xhtml", however this value is '{1}' in the document being deserialized.. + /// + internal static string Atom10SpecRequiresTextConstruct { + get { + return ResourceManager.GetString("Atom10SpecRequiresTextConstruct", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Attempted to get contract type for {0}, but that type is not a ServiceContract, nor does it inherit a ServiceContract.. + /// + internal static string AttemptedToGetContractTypeForButThatTypeIs1 { + get { + return ResourceManager.GetString("AttemptedToGetContractTypeForButThatTypeIs1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The initial request context was already specified. Can not create two for same message.. + /// + internal static string AttemptToCreateMultipleRequestContext { + get { + return ResourceManager.GetString("AttemptToCreateMultipleRequestContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The authenticate method in the ServiceAuthenticationManager returned null. If you do not want to return any authorization policies in the collection then return an empty ReadOnlyCollection instead. . + /// + internal static string AuthenticationManagerShouldNotReturnNull { + get { + return ResourceManager.GetString("AuthenticationManagerShouldNotReturnNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The caller was not authenticated by the service.. + /// + internal static string AuthenticationOfClientFailed { + get { + return ResourceManager.GetString("AuthenticationOfClientFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The authentication schemes configured on the host ('{0}') do not allow those configured on the binding '{1}' ('{2}'). Please ensure that the SecurityMode is set to Transport or TransportCredentialOnly. Additionally, this may be resolved by changing the authentication schemes for this application through the IIS management tool, through the ServiceHost.Authentication.AuthenticationSchemes property, in the application configuration file at the <serviceAuthenticationManager> element, by updating the ClientCr [rest of string was truncated]";. + /// + internal static string AuthenticationSchemes_BindingAndHostConflict { + get { + return ResourceManager.GetString("AuthenticationSchemes_BindingAndHostConflict", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The authentication schemes cannot be inherited from the host for binding '{0}'. No AuthenticationScheme was specified on the ServiceHost or in the virtual application in IIS. This may be resolved by enabling at least one authentication scheme for this virtual application in IIS, through the ServiceHost.Authentication.AuthenticationSchemes property or in the configuration at the <serviceAuthenticationManager> element.. + /// + internal static string AuthenticationSchemesCannotBeInheritedFromHost { + get { + return ResourceManager.GetString("AuthenticationSchemesCannotBeInheritedFromHost", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RequestSecurityTokenResponseCollection does not contain an authenticator.. + /// + internal static string AuthenticatorNotPresentInRSTRCollection { + get { + return ResourceManager.GetString("AuthenticatorNotPresentInRSTRCollection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Authentication failed.. + /// + internal static string AuthFailed { + get { + return ResourceManager.GetString("AuthFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The CloseTarget specified '{0}' does not identify the security token that signed the message.. + /// + internal static string BadCloseTarget { + get { + return ResourceManager.GetString("BadCloseTarget", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security context token is expired or is not valid. The message was not processed.. + /// + internal static string BadContextTokenFaultReason { + get { + return ResourceManager.GetString("BadContextTokenFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message could not be processed. This is most likely because the action '{0}' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding.. + /// + internal static string BadContextTokenOrActionFaultReason { + get { + return ResourceManager.GetString("BadContextTokenOrActionFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid data buffer.. + /// + internal static string BadData { + get { + return ResourceManager.GetString("BadData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Dispatch ID '{0}' could not be found or is invalid.. + /// + internal static string BadDispID { + get { + return ResourceManager.GetString("BadDispID", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid format for encrypted body.. + /// + internal static string BadEncryptedBody { + get { + return ResourceManager.GetString("BadEncryptedBody", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The EncryptedData or EncryptedKey is in an invalid state for this operation.. + /// + internal static string BadEncryptionState { + get { + return ResourceManager.GetString("BadEncryptionState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client token at least needs to have the SecurityImpersonationLevel of at least Impersonation for Out of process Webhost activations.. + /// + internal static string BadImpersonationLevelForOutOfProcWas { + get { + return ResourceManager.GetString("BadImpersonationLevelForOutOfProcWas", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Bad Interface Registration. + /// + internal static string BadInterfaceRegistration { + get { + return ResourceManager.GetString("BadInterfaceRegistration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Incorrect Interface version in registry. + /// + internal static string BadInterfaceVersion { + get { + return ResourceManager.GetString("BadInterfaceVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The issued token is of unexpected type '{0}'. Expected token type '{1}'.. + /// + internal static string BadIssuedTokenType { + get { + return ResourceManager.GetString("BadIssuedTokenType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid key encryption algorithm {0}.. + /// + internal static string BadKeyEncryptionAlgorithm { + get { + return ResourceManager.GetString("BadKeyEncryptionAlgorithm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Badly terminated value {0}.. + /// + internal static string BadlyTerminatedValue { + get { + return ResourceManager.GetString("BadlyTerminatedValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The number of parameters in the request did not match the number supported by the method. Ensure that the correct number of parameters are specified.. + /// + internal static string BadParamCount { + get { + return ResourceManager.GetString("BadParamCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no endorsing session token that matches the specified RenewTarget '{0}'.. + /// + internal static string BadRenewTarget { + get { + return ResourceManager.GetString("BadRenewTarget", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security negotiation failure because an incorrect Context attribute specified in RequestSecurityToken/RequestSecurityTokenResponse from the other party.. + /// + internal static string BadSecurityNegotiationContext { + get { + return ResourceManager.GetString("BadSecurityNegotiationContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A base address cannot contain a Uri fragment.. + /// + internal static string BaseAddressCannotHaveFragment { + get { + return ResourceManager.GetString("BaseAddressCannotHaveFragment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A base address cannot contain a Uri query string.. + /// + internal static string BaseAddressCannotHaveQuery { + get { + return ResourceManager.GetString("BaseAddressCannotHaveQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A base address cannot contain a Uri user info section.. + /// + internal static string BaseAddressCannotHaveUserInfo { + get { + return ResourceManager.GetString("BaseAddressCannotHaveUserInfo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This collection already contains an address with scheme {0}. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'.. + /// + internal static string BaseAddressDuplicateScheme { + get { + return ResourceManager.GetString("BaseAddressDuplicateScheme", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Only an absolute Uri can be used as a base address.. + /// + internal static string BaseAddressMustBeAbsolute { + get { + return ResourceManager.GetString("BaseAddressMustBeAbsolute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to BasicHttpContextBinding {0}:{1} requires that AllowCookies property is set to true.. + /// + internal static string BasicHttpContextBindingRequiresAllowCookie { + get { + return ResourceManager.GetString("BasicHttpContextBindingRequiresAllowCookie", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to BasicHttp binding requires that BasicHttpBinding.Security.Message.ClientCredentialType be equivalent to the BasicHttpMessageCredentialType.Certificate credential type for secure messages. Select Transport or TransportWithMessageCredential security for UserName credentials.. + /// + internal static string BasicHttpMessageSecurityRequiresCertificate { + get { + return ResourceManager.GetString("BasicHttpMessageSecurityRequiresCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Supporting SecurityToken cannot be written without encryption.. + /// + internal static string BasicTokenCannotBeWrittenWithoutEncryption { + get { + return ResourceManager.GetString("BasicTokenCannotBeWrittenWithoutEncryption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A basic token is not expected in the security header in this context.. + /// + internal static string BasicTokenNotExpected { + get { + return ResourceManager.GetString("BasicTokenNotExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Bearer Key Type is not supported with WSFederationHttpBinding. Please use WS2007FederationHttpBinding.. + /// + internal static string BearerKeyIncompatibleWithWSFederationHttpBinding { + get { + return ResourceManager.GetString("BearerKeyIncompatibleWithWSFederationHttpBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Proof Token was found in the response that was returned by the Security Token Service for a Bearer Key Type token request. Note that Proof Tokens should not be generated when a Bearer Key Type request is made.. + /// + internal static string BearerKeyTypeCannotHaveProofKey { + get { + return ResourceManager.GetString("BearerKeyTypeCannotHaveProofKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service behavior {0} requires that the binding associated with endpoint {1} listening on {2} supports the context protocol, because the contract associated with this endpoint may require a session. Currently configured binding for this endpoint does not support the context protocol. Please modify the binding to add support for the context protocol or modify the SessionMode on the contract to NotAllowed.. + /// + internal static string BehaviorRequiresContextProtocolSupportInBinding { + get { + return ResourceManager.GetString("BehaviorRequiresContextProtocolSupportInBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binary encoder session is not valid. There was an error decoding a previous message.. + /// + internal static string BinaryEncoderSessionInvalid { + get { + return ResourceManager.GetString("BinaryEncoderSessionInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binary encoder session information is not properly formed.. + /// + internal static string BinaryEncoderSessionMalformed { + get { + return ResourceManager.GetString("BinaryEncoderSessionMalformed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binary encoder session information exceeded the maximum size quota ({0}). To increase this quota, use the MaxSessionSize property on the BinaryMessageEncodingBindingElement.. + /// + internal static string BinaryEncoderSessionTooLarge { + get { + return ResourceManager.GetString("BinaryEncoderSessionTooLarge", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding ('{0}','{1}') for contract ('{2}','{3}') is configured with SecureConversation, but the authentication mode is not able to provide the request/reply-based integrity and confidentiality required for the negotiation.. + /// + internal static string BindingDoesNotSupportProtectionForRst { + get { + return ResourceManager.GetString("BindingDoesNotSupportProtectionForRst", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The contract operation '{0}' requires Windows identity for automatic impersonation. A Windows identity that represents the caller is not provided by binding ('{1}','{2}') for contract ('{3}','{4}'.. + /// + internal static string BindingDoesNotSupportWindowsIdenityForImpersonation { + get { + return ResourceManager.GetString("BindingDoesNotSupportWindowsIdenityForImpersonation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding '{0}' doesn't support creating any channel types. This often indicates that the BindingElements in a CustomBinding have been stacked incorrectly or in the wrong order. A Transport is required at the bottom of the stack. The recommended order for BindingElements is: TransactionFlow, ReliableSession, Security, CompositeDuplex, OneWay, StreamSecurity, MessageEncoding, Transport. . + /// + internal static string BindingDoesnTSupportAnyChannelTypes1 { + get { + return ResourceManager.GetString("BindingDoesnTSupportAnyChannelTypes1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Contract does not allow Session, but Binding '{0}' does not support Datagram or is not configured properly to support it.. + /// + internal static string BindingDoesntSupportDatagramButContractRequires { + get { + return ResourceManager.GetString("BindingDoesntSupportDatagramButContractRequires", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Contract requires Duplex, but Binding '{0}' doesn't support it or isn't configured properly to support it.. + /// + internal static string BindingDoesnTSupportDuplexButContractRequires1 { + get { + return ResourceManager.GetString("BindingDoesnTSupportDuplexButContractRequires1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Contract requires OneWay, but Binding '{0}' doesn't support it or isn't configured properly to support it.. + /// + internal static string BindingDoesnTSupportOneWayButContractRequires1 { + get { + return ResourceManager.GetString("BindingDoesnTSupportOneWayButContractRequires1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Contract requires Request/Reply, but Binding '{0}' doesn't support it or isn't configured properly to support it.. + /// + internal static string BindingDoesnTSupportRequestReplyButContract1 { + get { + return ResourceManager.GetString("BindingDoesnTSupportRequestReplyButContract1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Contract requires Session, but Binding '{0}' doesn't support it or isn't configured properly to support it.. + /// + internal static string BindingDoesnTSupportSessionButContractRequires1 { + get { + return ResourceManager.GetString("BindingDoesnTSupportSessionButContractRequires1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Contract requires TwoWay (either request-reply or duplex), but Binding '{0}' doesn't support it or isn't configured properly to support it.. + /// + internal static string BindingDoesnTSupportTwoWayButContractRequires1 { + get { + return ResourceManager.GetString("BindingDoesnTSupportTwoWayButContractRequires1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fail to load binding {0} from config. Error:{1}.. + /// + internal static string BindingLoadFromConfigFailedWith { + get { + return ResourceManager.GetString("BindingLoadFromConfigFailedWith", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding type {0} instance {1} not found in config.. + /// + internal static string BindingNotFoundInConfig { + get { + return ResourceManager.GetString("BindingNotFoundInConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The required binding keyword was not specified or is not valid.. + /// + internal static string BindingNotSpecified { + get { + return ResourceManager.GetString("BindingNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding for scheme '{0}' specified in the protocol mapping does not exist and must be created.. + /// + internal static string BindingProtocolMappingNotDefined { + get { + return ResourceManager.GetString("BindingProtocolMappingNotDefined", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DeliveryRequirementsAttribute disallows QueuedDelivery, but binding for the endpoint with contract '{0}' supports it.. + /// + internal static string BindingRequirementsAttributeDisallowsQueuedDelivery1 { + get { + return ResourceManager.GetString("BindingRequirementsAttributeDisallowsQueuedDelivery1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DeliveryRequirementsAttribute requires QueuedDelivery, but binding for the endpoint with contract '{0}' doesn't support it or isn't configured properly to support it.. + /// + internal static string BindingRequirementsAttributeRequiresQueuedDelivery1 { + get { + return ResourceManager.GetString("BindingRequirementsAttributeRequiresQueuedDelivery1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The path variable '{0}' in the UriTemplate must be bound to a non-empty string value.. + /// + internal static string BindUriTemplateToNullOrEmptyPathParam { + get { + return ResourceManager.GetString("BindUriTemplateToNullOrEmptyPathParam", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The body writer does not support writing more than once because it is not buffered.. + /// + internal static string BodyWriterCanOnlyBeWrittenOnce { + get { + return ResourceManager.GetString("BodyWriterCanOnlyBeWrittenOnce", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The body writer returned from OnCreateBufferedCopy was not buffered.. + /// + internal static string BodyWriterReturnedIsNotBuffered { + get { + return ResourceManager.GetString("BodyWriterReturnedIsNotBuffered", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security binding element for bootstrap security was not specified on '{0}'.. + /// + internal static string BootstrapSecurityBindingElementNotSet { + get { + return ResourceManager.GetString("BootstrapSecurityBindingElementNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to finish reading Base64 data as the given buffer quota has been exceeded. Buffer quota: {0}. Consider increasing the MaxReceivedMessageSize quota on the TransportBindingElement. Please note that a very high value for MaxReceivedMessageSize will result in buffering a large message and might open the system to DOS attacks.. + /// + internal static string BufferQuotaExceededReadingBase64 { + get { + return ResourceManager.GetString("BufferQuotaExceededReadingBase64", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Context cached at the channel layer cannot be changed after the channel is opened.. + /// + internal static string CachedContextIsImmutable { + get { + return ResourceManager.GetString("CachedContextIsImmutable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service cannot cache the negotiation state as the capacity '{0}' has been reached. Retry the request.. + /// + internal static string CachedNegotiationStateQuotaReached { + get { + return ResourceManager.GetString("CachedNegotiationStateQuotaReached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The item cannot be added. The maximum cache size is ({0} items).. + /// + internal static string CacheQuotaReached { + get { + return ResourceManager.GetString("CacheQuotaReached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The incoming message with action '{0}' contains a callback context header with name '{1}' and namespace '{2}'. Callback context headers are not expected in incoming messages at the client.. + /// + internal static string CallbackContextNotExpectedOnIncomingMessageAtClient { + get { + return ResourceManager.GetString("CallbackContextNotExpectedOnIncomingMessageAtClient", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The outgoing message with action '{0}' contains a callback context message property. Callback context cannot be transmitted in outgoing messages at the server.. + /// + internal static string CallbackContextNotExpectedOnOutgoingMessageAtServer { + get { + return ResourceManager.GetString("CallbackContextNotExpectedOnOutgoingMessageAtServer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message contains a callback context message property. Callback context can be transmitted only when the ContextBindingElement is configured with ContextExchangeMechanism of ContextSoapHeader.. + /// + internal static string CallbackContextOnlySupportedInSoap { + get { + return ResourceManager.GetString("CallbackContextOnlySupportedInSoap", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message contains a callback context header with an endpoint reference for AddressingVersion '{0}'. Callback context can only be transmitted when the AddressingVersion is configured with 'WSAddressing10'.. + /// + internal static string CallbackContextOnlySupportedInWSAddressing10 { + get { + return ResourceManager.GetString("CallbackContextOnlySupportedInWSAddressing10", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot access directory {0}.. + /// + internal static string CannotAccessDirectory { + get { + return ResourceManager.GetString("CannotAccessDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot add two items with the same key to SynchronizedKeyedCollection.. + /// + internal static string CannotAddTwoItemsWithTheSameKeyToSynchronizedKeyedCollection0 { + get { + return ResourceManager.GetString("CannotAddTwoItemsWithTheSameKeyToSynchronizedKeyedCollection0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot authenticate the other party.. + /// + internal static string CannotAuthenticateServer { + get { + return ResourceManager.GetString("CannotAuthenticateServer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The channeloption intrinsic object cannot be created because the channel builder is not initialized.. + /// + internal static string CannotCreateChannelOption { + get { + return ResourceManager.GetString("CannotCreateChannelOption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to create a bi-directional (request-reply or duplex) channel for security negotiation. Please ensure that the binding is capable of creating a bi-directional channel.. + /// + internal static string CannotCreateTwoWayListenerForNegotiation { + get { + return ResourceManager.GetString("CannotCreateTwoWayListenerForNegotiation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot detect WS-Addressing version. EndpointReference does not start with an Element.. + /// + internal static string CannotDetectAddressingVersion { + get { + return ResourceManager.GetString("CannotDetectAddressingVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Client cannot determine the Service Principal Name based on the identity in the target address '{0}' for the purpose of SspiNegotiation/Kerberos. The target address identity must be a UPN identity (like acmedomain\alice) or SPN identity (like host/bobs-machine).. + /// + internal static string CannotDetermineSPNBasedOnAddress { + get { + return ResourceManager.GetString("CannotDetermineSPNBasedOnAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the X.509 certificate using the following search criteria: StoreName '{0}', StoreLocation '{1}', FindType '{2}', FindValue '{3}'.. + /// + internal static string CannotFindCert { + get { + return ResourceManager.GetString("CannotFindCert", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find The X.509 certificate using the following search criteria: StoreName '{0}', StoreLocation '{1}', FindType '{2}', FindValue '{3}' for target '{4}'.. + /// + internal static string CannotFindCertForTarget { + get { + return ResourceManager.GetString("CannotFindCertForTarget", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find CLSID {0} in COM+ application {1}.. + /// + internal static string CannotFindClsidInApplication { + get { + return ResourceManager.GetString("CannotFindClsidInApplication", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the correlation state for applying security to reply at the responder.. + /// + internal static string CannotFindCorrelationStateForApplyingSecurity { + get { + return ResourceManager.GetString("CannotFindCorrelationStateForApplyingSecurity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The token's crypto collection does not support algorithm '{0}'.. + /// + internal static string CannotFindMatchingCrypto { + get { + return ResourceManager.GetString("CannotFindMatchingCrypto", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the negotiation state for the context '{0}'.. + /// + internal static string CannotFindNegotiationState { + get { + return ResourceManager.GetString("CannotFindNegotiationState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the security session with the ID '{0}'.. + /// + internal static string CannotFindSecuritySession { + get { + return ResourceManager.GetString("CannotFindSecuritySession", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Interface {0} has a null namespace or name.. + /// + internal static string CannotHaveNullOrEmptyNameOrNamespaceForIID { + get { + return ResourceManager.GetString("CannotHaveNullOrEmptyNameOrNamespaceForIID", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0}.{1} operation references a message element [{2}] that has already been exported from the {3}.{4} operation. You can change the name of one of the operations by changing the method name or using the Name property of OperationContractAttribute. Alternatively, you can control the element name in greater detail using the MessageContract programming model.. + /// + internal static string CannotHaveTwoOperationsWithTheSameElement5 { + get { + return ResourceManager.GetString("CannotHaveTwoOperationsWithTheSameElement5", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot have two operations in the same contract with the same name, methods {0} and {1} in type {2} violate this rule. You can change the name of one of the operations by changing the method name or by using the Name property of OperationContractAttribute.. + /// + internal static string CannotHaveTwoOperationsWithTheSameName3 { + get { + return ResourceManager.GetString("CannotHaveTwoOperationsWithTheSameName3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to PrivacyNotice element must have a Version attribute.. + /// + internal static string CannotImportPrivacyNoticeElementWithoutVersionAttribute { + get { + return ResourceManager.GetString("CannotImportPrivacyNoticeElementWithoutVersionAttribute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The policy to import a process cannot import a binding for contract ({0},{1}). The protection requirements for the binding are not compatible with a binding already imported for the contract. You must reconfigure the binding.. + /// + internal static string CannotImportProtectionLevelForContract { + get { + return ResourceManager.GetString("CannotImportProtectionLevelForContract", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security policy import failed. The security policy contains supporting token requirements at the operation scope. The contract description does not specify the action for the request message associated with this operation.. + /// + internal static string CannotImportSupportingTokensForOperationWithoutRequestAction { + get { + return ResourceManager.GetString("CannotImportSupportingTokensForOperationWithoutRequestAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot inherit two different operations with the same name, operation '{0}' from contracts '{1}' and '{2}' violate this rule. You can change the name of one of the operations by changing the method name or by using the Name property of OperationContractAttribute.. + /// + internal static string CannotInheritTwoOperationsWithTheSameName3 { + get { + return ResourceManager.GetString("CannotInheritTwoOperationsWithTheSameName3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot issue the token type '{0}'.. + /// + internal static string CannotIssueRstTokenType { + get { + return ResourceManager.GetString("CannotIssueRstTokenType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cound not load type '{0}' from the assemblies in current AppDomain.. + /// + internal static string CanNotLoadTypeGotFromConfig { + get { + return ResourceManager.GetString("CanNotLoadTypeGotFromConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot determine the key size of the issued token.. + /// + internal static string CannotObtainIssuedTokenKeySize { + get { + return ResourceManager.GetString("CannotObtainIssuedTokenKeySize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service was unable to verify the cipher strengths negotiated as part of the SSL handshake.. + /// + internal static string CannotObtainSslConnectionInfo { + get { + return ResourceManager.GetString("CannotObtainSslConnectionInfo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Impersonation using the client token is not possible. The binding ('{0}', '{1}') for contract ('{2}', '{3}') uses the Username Security Token for client authentication with a Membership Provider registered. Use a different type of security token for the client.. + /// + internal static string CannotPerformImpersonationOnUsernameToken { + get { + return ResourceManager.GetString("CannotPerformImpersonationOnUsernameToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding ('{0}','{1}') for contract ('{2}','{3}') supports impersonation only on Windows 2003 Server and newer version of Windows. Use SspiNegotiated authentication and a binding with Secure Conversation with cancellation enabled.. + /// + internal static string CannotPerformS4UImpersonationOnPlatform { + get { + return ResourceManager.GetString("CannotPerformS4UImpersonationOnPlatform", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot read the token from the '{0}' element with the '{1}' namespace for BinarySecretSecurityToken, with a '{2}' ValueType. If this element is expected to be valid, ensure that security is configured to consume tokens with the name, namespace and value type specified.. + /// + internal static string CannotReadToken { + get { + return ResourceManager.GetString("CannotReadToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The result cannot be represented as a nodeset. Only results of type XPathResultType.NodeSet can be represented as nodesets.. + /// + internal static string CannotRepresentResultAsNodeset { + get { + return ResourceManager.GetString("CannotRepresentResultAsNodeset", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type for the '{0}' parameter in '{1}' within the namespace '{2}' cannot not be resolved.. + /// + internal static string CannotResolveTypeForParamInMessageDescription { + get { + return ResourceManager.GetString("CannotResolveTypeForParamInMessageDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The 'Name' property cannot be set on an invalid InstanceKey.. + /// + internal static string CannotSetNameOnTheInvalidKey { + get { + return ResourceManager.GetString("CannotSetNameOnTheInvalidKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot create channel for a contract that requires request/reply and a binding that requires manual addressing but only supports duplex communication.. + /// + internal static string CantCreateChannelWithManualAddressing { + get { + return ResourceManager.GetString("CantCreateChannelWithManualAddressing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can't infer an external reference for '{0}' token type.. + /// + internal static string CantInferReferenceForToken { + get { + return ResourceManager.GetString("CantInferReferenceForToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate-based client authentication is not supported in TransportCredentialOnly security mode. Select the Transport security mode.. + /// + internal static string CertificateUnsupportedForHttpTransportCredentialOnly { + get { + return ResourceManager.GetString("CertificateUnsupportedForHttpTransportCredentialOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding does not contain a ChannelDemuxerBindingElement.. + /// + internal static string ChannelDemuxerBindingElementNotFound { + get { + return ResourceManager.GetString("ChannelDemuxerBindingElementNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The current channel does not support closing the output session as this channel does not implement ISessionChannel<IDuplexSession>.. + /// + internal static string channelDoesNotHaveADuplexSession0 { + get { + return ResourceManager.GetString("channelDoesNotHaveADuplexSession0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A call to IChannelFactory.CreateChannel made on an object of type {0} failed because Open has not been called on this object.. + /// + internal static string ChannelFactoryCannotBeUsedToCreateChannels { + get { + return ResourceManager.GetString("ChannelFactoryCannotBeUsedToCreateChannels", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to At least one operation on the '{0}' contract is configured with the TransactionFlowAttribute attribute set to Mandatory but the channel's binding '{1}' is not configured with a TransactionFlowBindingElement. The TransactionFlowAttribute attribute set to Mandatory cannot be used without a TransactionFlowBindingElement.. + /// + internal static string ChannelHasAtLeastOneOperationWithTransactionFlowEnabled { + get { + return ResourceManager.GetString("ChannelHasAtLeastOneOperationWithTransactionFlowEnabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A newly accepted connection did not receive initialization data from the sender within the configured ChannelInitializationTimeout ({0}). As a result, the connection will be aborted. If you are on a highly congested network, or your sending machine is heavily loaded, consider increasing this value or load-balancing your server.. + /// + internal static string ChannelInitializationTimeout { + get { + return ResourceManager.GetString("ChannelInitializationTimeout", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Error: The InnerChannel property is null.. + /// + internal static string channelIsNotAvailable0 { + get { + return ResourceManager.GetString("channelIsNotAvailable0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Channel context management cannot be enabled or disabled after the channel is opened.. + /// + internal static string ChannelIsOpen { + get { + return ResourceManager.GetString("ChannelIsOpen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The session channel must be opened before the session ID can be accessed.. + /// + internal static string ChannelMustBeOpenedToGetSessionId { + get { + return ResourceManager.GetString("ChannelMustBeOpenedToGetSessionId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The channel is not open.. + /// + internal static string ChannelNotOpen { + get { + return ResourceManager.GetString("ChannelNotOpen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot modify channel parameters because the {0} is in the {1} state. This operation is only supported in the Created state.. + /// + internal static string ChannelParametersCannotBeModified { + get { + return ResourceManager.GetString("ChannelParametersCannotBeModified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot propagate channel parameters because the {0} is in the {1} state. This operation is only supported in the Opening or Opened state when the collection is locked.. + /// + internal static string ChannelParametersCannotBePropagated { + get { + return ResourceManager.GetString("ChannelParametersCannotBePropagated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified channel type {0} is not supported by this channel manager.. + /// + internal static string ChannelTypeNotSupported { + get { + return ResourceManager.GetString("ChannelTypeNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The XML element {0} does not have a child of type {1}.. + /// + internal static string ChildNodeTypeMissing { + get { + return ResourceManager.GetString("ChildNodeTypeMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The claimType cannot be an empty string.. + /// + internal static string ClaimTypeCannotBeEmpty { + get { + return ResourceManager.GetString("ClaimTypeCannotBeEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid CleanupInterval value of {0}; it must be greater than zero. + /// + internal static string CleanupIntervalMustBeGreaterThanZero { + get { + return ResourceManager.GetString("CleanupIntervalMustBeGreaterThanZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The certificate for the client has not been provided. The certificate can be set on the ClientCredentials or ServiceCredentials.. + /// + internal static string ClientCertificateNotProvided { + get { + return ResourceManager.GetString("ClientCertificateNotProvided", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client certificate is not provided. Specify a client certificate in ClientCredentials. . + /// + internal static string ClientCertificateNotProvidedOnClientCredentials { + get { + return ResourceManager.GetString("ClientCertificateNotProvidedOnClientCredentials", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client certificate is not provided. Specify a client certificate in ServiceCredentials. . + /// + internal static string ClientCertificateNotProvidedOnServiceCredentials { + get { + return ResourceManager.GetString("ClientCertificateNotProvidedOnServiceCredentials", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ClientCredentials cannot create a local token provider for token requirement {0}.. + /// + internal static string ClientCredentialsUnableToCreateLocalTokenProvider { + get { + return ResourceManager.GetString("ClientCredentialsUnableToCreateLocalTokenProvider", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ClientCredentialType.None is not valid for the TransportWithMessageCredential security mode. Specify a message credential type or use a different security mode.. + /// + internal static string ClientCredentialTypeMustBeSpecifiedForMixedMode { + get { + return ResourceManager.GetString("ClientCredentialTypeMustBeSpecifiedForMixedMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ClientOperation '{0}' requires Formatter, since SerializeRequest and DeserializeReply are not both false.. + /// + internal static string ClientRuntimeRequiresFormatter0 { + get { + return ResourceManager.GetString("ClientRuntimeRequiresFormatter0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client's security session did not receive a 'close response' message from the service within the configured timeout ({0}).. + /// + internal static string ClientSecurityCloseTimeout { + get { + return ResourceManager.GetString("ClientSecurityCloseTimeout", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Client is unable to finish the security negotiation within the configured timeout ({0}). The current negotiation leg is {1} ({2}). . + /// + internal static string ClientSecurityNegotiationTimeout { + get { + return ResourceManager.GetString("ClientSecurityNegotiationTimeout", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client's security session was not able to close its output session within the configured timeout ({0}).. + /// + internal static string ClientSecurityOutputSessionCloseTimeout { + get { + return ResourceManager.GetString("ClientSecurityOutputSessionCloseTimeout", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Client is unable to request the security session within the configured timeout ({0}).. + /// + internal static string ClientSecuritySessionRequestTimeout { + get { + return ResourceManager.GetString("ClientSecuritySessionRequestTimeout", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred when creating the WebSocket with the factory of type '{0}'. See the inner exception for details.. + /// + internal static string ClientWebSocketFactory_CreateWebSocketFailed { + get { + return ResourceManager.GetString("ClientWebSocketFactory_CreateWebSocketFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occured when getting the WebSocketVersion from the WebSocket factory of type '{0}'. See the inner exception for details.. + /// + internal static string ClientWebSocketFactory_GetWebSocketVersionFailed { + get { + return ResourceManager.GetString("ClientWebSocketFactory_GetWebSocketVersionFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The WebSocket returned by the factory of type '{0}' has the SubProtocol '{1}' that doesn't match the requested SubProtocol value '{2}'.. + /// + internal static string ClientWebSocketFactory_InvalidSubProtocol { + get { + return ResourceManager.GetString("ClientWebSocketFactory_InvalidSubProtocol", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSocket creation failed. The '{0}' returned a WebSocket that is either null or not opened.. + /// + internal static string ClientWebSocketFactory_InvalidWebSocket { + get { + return ResourceManager.GetString("ClientWebSocketFactory_InvalidWebSocket", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The WebSocketVersion returned by the WebSocket factory of type '{0}' is either null, empty or invalid.. + /// + internal static string ClientWebSocketFactory_InvalidWebSocketVersion { + get { + return ResourceManager.GetString("ClientWebSocketFactory_InvalidWebSocketVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Clone() was not implemented properly by '{0}'. The cloned object was '{1}'.. + /// + internal static string CloneNotImplementedCorrectly { + get { + return ResourceManager.GetString("CloneNotImplementedCorrectly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An unexpected error occurred while attempting to close the output half of the duplex reliable session.. + /// + internal static string CloseOutputSessionErrorReason { + get { + return ResourceManager.GetString("CloseOutputSessionErrorReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close timed out after {0}. Increase the timeout value passed to the call to Close or increase the CloseTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string CloseTimedOut { + get { + return ResourceManager.GetString("CloseTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The object with CLSID '{0}' does not support the required IPersistStream interface.. + /// + internal static string CLSIDDoesNotSupportIPersistStream { + get { + return ResourceManager.GetString("CLSIDDoesNotSupportIPersistStream", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The CLSID specified in the service file is not configured in the specified application. (The CLSID is {0}, the AppID is {1}.). + /// + internal static string ClsidNotInApplication { + get { + return ResourceManager.GetString("ClsidNotInApplication", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The CLSID specified in the service file does not have a service element in a configuration file. (The CLSID is {0}.). + /// + internal static string ClsidNotInConfiguration { + get { + return ResourceManager.GetString("ClsidNotInConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CLSID of type {0} does not match the CLSID on PersistStreamTypeWrapper which is {1}.. + /// + internal static string CLSIDOfTypeDoesNotMatch { + get { + return ResourceManager.GetString("CLSIDOfTypeDoesNotMatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot create an instance of the specified service: access is denied.. + /// + internal static string ComActivationAccessDenied { + get { + return ResourceManager.GetString("ComActivationAccessDenied", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An internal error occurred attempting to create an instance of the specified service.. + /// + internal static string ComActivationFailure { + get { + return ResourceManager.GetString("ComActivationFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No services are configured for the application.. + /// + internal static string ComDllHostInitializerFoundNoServices { + get { + return ResourceManager.GetString("ComDllHostInitializerFoundNoServices", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There are duplicate operations, which is invalid. Remove the duplicates.. + /// + internal static string ComDuplicateOperation { + get { + return ResourceManager.GetString("ComDuplicateOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The session requirements of the contracts are inconsistent. All COM contracts in a service must have the same session requirement.. + /// + internal static string ComInconsistentSessionRequirements { + get { + return ResourceManager.GetString("ComInconsistentSessionRequirements", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generating manifest file {0} failed with {1}.. + /// + internal static string ComIntegrationManifestCreationFailed { + get { + return ResourceManager.GetString("ComIntegrationManifestCreationFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Access is denied.. + /// + internal static string ComMessageAccessDenied { + get { + return ResourceManager.GetString("ComMessageAccessDenied", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The communication object, {0}, cannot be used for communication because it has been Aborted.. + /// + internal static string CommunicationObjectAborted1 { + get { + return ResourceManager.GetString("CommunicationObjectAborted1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The communication object, {0}, cannot be used for communication because it has been Aborted: {1}. + /// + internal static string CommunicationObjectAbortedStack2 { + get { + return ResourceManager.GetString("CommunicationObjectAbortedStack2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The communication object, {0}, has overridden the virtual function {1} but it does not call version defined in the base class.. + /// + internal static string CommunicationObjectBaseClassMethodNotCalled { + get { + return ResourceManager.GetString("CommunicationObjectBaseClassMethodNotCalled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The communication object, {0}, cannot be modified unless it is in the Created state.. + /// + internal static string CommunicationObjectCannotBeModified { + get { + return ResourceManager.GetString("CommunicationObjectCannotBeModified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The communication object, {0}, cannot be modified while it is in the {1} state.. + /// + internal static string CommunicationObjectCannotBeModifiedInState { + get { + return ResourceManager.GetString("CommunicationObjectCannotBeModifiedInState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The communication object, {0}, is in the {1} state. Communication objects cannot be used for communication unless they are in the Opened state.. + /// + internal static string CommunicationObjectCannotBeUsed { + get { + return ResourceManager.GetString("CommunicationObjectCannotBeUsed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The communication object, {0}, cannot be used due to an error that occurred during close.. + /// + internal static string CommunicationObjectCloseInterrupted1 { + get { + return ResourceManager.GetString("CommunicationObjectCloseInterrupted1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The communication object, {0}, cannot be used for communication because it is in the Faulted state.. + /// + internal static string CommunicationObjectFaulted1 { + get { + return ResourceManager.GetString("CommunicationObjectFaulted1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The communication object, {0}, cannot be used for communication because it is in the Faulted state: {1}. + /// + internal static string CommunicationObjectFaultedStack2 { + get { + return ResourceManager.GetString("CommunicationObjectFaultedStack2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The communication object, {0}, is not part of WCF and is in an unsupported state '{1}'. This indicates an internal error in the implementation of that communication object.. + /// + internal static string CommunicationObjectInInvalidState { + get { + return ResourceManager.GetString("CommunicationObjectInInvalidState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to At least one operation is asynchronous. Asynchronous operations are not allowed.. + /// + internal static string ComNoAsyncOperationsAllowed { + get { + return ResourceManager.GetString("ComNoAsyncOperationsAllowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} operation on the service {1} could not be found in the catalog.. + /// + internal static string ComOperationNotFound { + get { + return ResourceManager.GetString("ComOperationNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to From: {0} + ///AppId: {1} + ///ClsId: {2} + ///Incoming TransactionId: {3} + ///Requesting Identity: {4}. + /// + internal static string ComPlusInstanceCreationRequestSchema { + get { + return ResourceManager.GetString("ComPlusInstanceCreationRequestSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This InstanceContext requires a valid Message to obtain the instance.. + /// + internal static string ComPlusInstanceProviderRequiresMessage0 { + get { + return ResourceManager.GetString("ComPlusInstanceProviderRequiresMessage0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to From: {0} + ///AppId: {1} + ///ClsId: {2} + ///Iid: {3} + ///Action: {4} + ///Instance Id: {5} + ///Managed Thread Id: {6} + ///Unmanaged Thread Id: {7} + ///Requesting Identity: {8}. + /// + internal static string ComPlusMethodCallSchema { + get { + return ResourceManager.GetString("ComPlusMethodCallSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Windows hotfix or later service pack is required on Windows XP and Windows Server 2003 to use WS-AtomicTransaction and COM+ Integration Web service transaction functionality. See the Microsoft .NET Framework release notes for instructions on installing the required hotfix.. + /// + internal static string ComPlusServiceHostStartingServiceErrorNoQFE { + get { + return ResourceManager.GetString("ComPlusServiceHostStartingServiceErrorNoQFE", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AppId: {0} + ///ClsId: {1} + ///. + /// + internal static string ComPlusServiceSchema { + get { + return ResourceManager.GetString("ComPlusServiceSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AppId: {0}. + /// + internal static string ComPlusServiceSchemaDllHost { + get { + return ResourceManager.GetString("ComPlusServiceSchemaDllHost", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Iid: {0} + ///Type Library ID: {1}. + /// + internal static string ComPlusTLBImportSchema { + get { + return ResourceManager.GetString("ComPlusTLBImportSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Access is denied. The message was not authenticated with a valid windows identity.. + /// + internal static string ComRequiresWindowsSecurity { + get { + return ResourceManager.GetString("ComRequiresWindowsSecurity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding on the service endpoint cannot be configured.. + /// + internal static string ConfigBindingCannotBeConfigured { + get { + return ResourceManager.GetString("ConfigBindingCannotBeConfigured", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration binding extension '{0}' could not be found. Verify that this binding extension is properly registered in system.serviceModel/extensions/bindingExtensions and that it is spelled correctly.. + /// + internal static string ConfigBindingExtensionNotFound { + get { + return ResourceManager.GetString("ConfigBindingExtensionNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A binding reference cycle was detected in your configuration. The following reference cycle must be removed: {0}.. + /// + internal static string ConfigBindingReferenceCycleDetected { + get { + return ResourceManager.GetString("ConfigBindingReferenceCycleDetected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding specified cannot be null or an empty string. Please specify a valid binding. Valid binding values can be found in the system.serviceModel/extensions/bindingExtensions collection.. + /// + internal static string ConfigBindingTypeCannotBeNullOrEmpty { + get { + return ResourceManager.GetString("ConfigBindingTypeCannotBeNullOrEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot parse type '{0}' into a System.ServiceModel.Dispatcher.XPathMessageFilter.. + /// + internal static string ConfigCannotParseXPathFilter { + get { + return ResourceManager.GetString("ConfigCannotParseXPathFilter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An extension of name '{0}' already appears in extension collection. Extension names must be unique.. + /// + internal static string ConfigDuplicateExtensionName { + get { + return ResourceManager.GetString("ConfigDuplicateExtensionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An extension of type '{0}' already appears in extension collection. Extension types must be unique.. + /// + internal static string ConfigDuplicateExtensionType { + get { + return ResourceManager.GetString("ConfigDuplicateExtensionType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An extension named {0} already appears in the {1}. Extension names must be unique.. + /// + internal static string ConfigDuplicateItem { + get { + return ResourceManager.GetString("ConfigDuplicateItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A child element with the element name '{0}' already exists. Child elements can only be added once.. + /// + internal static string ConfigDuplicateKey { + get { + return ResourceManager.GetString("ConfigDuplicateKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A child element named '{0}' with same key already exists at the same configuration scope. Collection elements must be unique within the same configuration scope (e.g. the same application.config file). Duplicate key value: '{1}'.. + /// + internal static string ConfigDuplicateKeyAtSameScope { + get { + return ResourceManager.GetString("ConfigDuplicateKeyAtSameScope", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' configuration element key cannot be null.. + /// + internal static string ConfigElementKeyNull { + get { + return ResourceManager.GetString("ConfigElementKeyNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to At least one of the configuration element keys '{0}' must not be null.. + /// + internal static string ConfigElementKeysNull { + get { + return ResourceManager.GetString("ConfigElementKeysNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Extension element '{0}' cannot be added to this element. Verify that the extension is registered in the extension collection at system.serviceModel/extensions/{1}.. + /// + internal static string ConfigElementTypeNotAllowed { + get { + return ResourceManager.GetString("ConfigElementTypeNotAllowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration endpoint extension '{0}' could not be found. Verify that this endpoint extension is properly registered in system.serviceModel/extensions/endpointExtensions and that it is spelled correctly.. + /// + internal static string ConfigEndpointExtensionNotFound { + get { + return ResourceManager.GetString("ConfigEndpointExtensionNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An endpoint reference cycle was detected in your configuration. The following reference cycle must be removed: {0}.. + /// + internal static string ConfigEndpointReferenceCycleDetected { + get { + return ResourceManager.GetString("ConfigEndpointReferenceCycleDetected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint specified cannot be null or an empty string. Please specify a valid endpoint. Valid endpoint values can be found in the system.serviceModel/extensions/endpointExtensions collection.. + /// + internal static string ConfigEndpointTypeCannotBeNullOrEmpty { + get { + return ResourceManager.GetString("ConfigEndpointTypeCannotBeNullOrEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Extension collection '{0}' not found.. + /// + internal static string ConfigExtensionCollectionNotFound { + get { + return ResourceManager.GetString("ConfigExtensionCollectionNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The extension of type '{0}' is not registered in the extension collection '{1}'.. + /// + internal static string ConfigExtensionTypeNotRegisteredInCollection { + get { + return ResourceManager.GetString("ConfigExtensionTypeNotRegisteredInCollection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The attribute '{0}' cannot be specified on element '{1}' when attribute '{2}' is not specified.. + /// + internal static string ConfigInvalidAttribute { + get { + return ResourceManager.GetString("ConfigInvalidAttribute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid value in policyType. The policyType '{0}' does not implement from '{1}'. . + /// + internal static string ConfigInvalidAuthorizationPolicyType { + get { + return ResourceManager.GetString("ConfigInvalidAuthorizationPolicyType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {1} binding does not have a configured binding named '{0}'.. + /// + internal static string ConfigInvalidBindingConfigurationName { + get { + return ResourceManager.GetString("ConfigInvalidBindingConfigurationName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding at {1} does not have a configured binding named '{0}'. This is an invalid value for {2}.. + /// + internal static string ConfigInvalidBindingName { + get { + return ResourceManager.GetString("ConfigInvalidBindingName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid value for the certificate validator type. The type '{0}' does not derive from the appropriate base class '{1}'.. + /// + internal static string ConfigInvalidCertificateValidatorType { + get { + return ResourceManager.GetString("ConfigInvalidCertificateValidatorType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value '{0}' is not a valid instance of type '{1}'.. + /// + internal static string ConfigInvalidClassFactoryValue { + get { + return ResourceManager.GetString("ConfigInvalidClassFactoryValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The instance is not a valid configurable value of type '{0}'.. + /// + internal static string ConfigInvalidClassInstanceValue { + get { + return ResourceManager.GetString("ConfigInvalidClassInstanceValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid value for the client credentials type. The type '{0}' does not derive from the appropriate base class '{1}'.. + /// + internal static string ConfigInvalidClientCredentialsType { + get { + return ResourceManager.GetString("ConfigInvalidClientCredentialsType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot add the behavior extension '{0}' to the common endpoint behavior because it does not implement '{1}'.. + /// + internal static string ConfigInvalidCommonEndpointBehaviorType { + get { + return ResourceManager.GetString("ConfigInvalidCommonEndpointBehaviorType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot add the behavior extension '{0}' to the common service behavior because it does not implement '{1}'.. + /// + internal static string ConfigInvalidCommonServiceBehaviorType { + get { + return ResourceManager.GetString("ConfigInvalidCommonServiceBehaviorType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is not a valid encoding string for System.Text.Encoding.GetEncoding(string).. + /// + internal static string ConfigInvalidEncodingValue { + get { + return ResourceManager.GetString("ConfigInvalidEncodingValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no endpoint behavior named '{0}'.. + /// + internal static string ConfigInvalidEndpointBehavior { + get { + return ResourceManager.GetString("ConfigInvalidEndpointBehavior", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot add the '{0}' behavior extension to '{1}' endpoint behavior because the underlying behavior type does not implement the IEndpointBehavior interface.. + /// + internal static string ConfigInvalidEndpointBehaviorType { + get { + return ResourceManager.GetString("ConfigInvalidEndpointBehaviorType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint at {1} does not have a configured endpoint named '{0}'. This is an invalid value for {2}.. + /// + internal static string ConfigInvalidEndpointName { + get { + return ResourceManager.GetString("ConfigInvalidEndpointName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid element in configuration. The extension '{0}' does not derive from correct extension base type '{1}'. . + /// + internal static string ConfigInvalidExtensionElement { + get { + return ResourceManager.GetString("ConfigInvalidExtensionElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid element in configuration. The extension name '{0}' is not registered in the collection at system.serviceModel/extensions/{1}. . + /// + internal static string ConfigInvalidExtensionElementName { + get { + return ResourceManager.GetString("ConfigInvalidExtensionElementName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' type must derive from {1} to be used in the {2} collection.. + /// + internal static string ConfigInvalidExtensionType { + get { + return ResourceManager.GetString("ConfigInvalidExtensionType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The element {0} requires a key of type '{1}'. Type of the key passed in: '{2}'.. + /// + internal static string ConfigInvalidKeyType { + get { + return ResourceManager.GetString("ConfigInvalidKeyType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is not a valid reliable messaging version. Valid values are 'WSReliableMessagingFebruary2005' and 'WSReliableMessaging11'.. + /// + internal static string ConfigInvalidReliableMessagingVersionValue { + get { + return ResourceManager.GetString("ConfigInvalidReliableMessagingVersionValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid value for the saml serializer type. The type '{0}' does not derive from the appropriate base class: '{1}'.. + /// + internal static string ConfigInvalidSamlSerializerType { + get { + return ResourceManager.GetString("ConfigInvalidSamlSerializerType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid binding path. There is no binding registered with the configuration path '{0}'.. + /// + internal static string ConfigInvalidSection { + get { + return ResourceManager.GetString("ConfigInvalidSection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid value for the security state encoder type. The type '{0}' does not derive from the appropriate base class '{1}'.. + /// + internal static string ConfigInvalidSecurityStateEncoderType { + get { + return ResourceManager.GetString("ConfigInvalidSecurityStateEncoderType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid value for serviceAuthenticationManagerType. The serviceAuthenticationManagerType '{0}' does not derive from '{1}'. . + /// + internal static string ConfigInvalidServiceAuthenticationManagerType { + get { + return ResourceManager.GetString("ConfigInvalidServiceAuthenticationManagerType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid value for serviceAuthorizationManagerType. The serviceAuthorizationManagerType '{0}' does not derive from '{1}'. . + /// + internal static string ConfigInvalidServiceAuthorizationManagerType { + get { + return ResourceManager.GetString("ConfigInvalidServiceAuthorizationManagerType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no service behavior named '{0}'.. + /// + internal static string ConfigInvalidServiceBehavior { + get { + return ResourceManager.GetString("ConfigInvalidServiceBehavior", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot add the behavior extension '{0}' to the service behavior named '{1}' because the underlying behavior type does not implement the IServiceBehavior interface.. + /// + internal static string ConfigInvalidServiceBehaviorType { + get { + return ResourceManager.GetString("ConfigInvalidServiceBehaviorType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid value for the service credentials type. The type '{0}' does not derive from the appropriate base class '{1}'.. + /// + internal static string ConfigInvalidServiceCredentialsType { + get { + return ResourceManager.GetString("ConfigInvalidServiceCredentialsType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start must be between 0 and {0}. Value passed in is {1}.. + /// + internal static string ConfigInvalidStartValue { + get { + return ResourceManager.GetString("ConfigInvalidStartValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is not a valid transaction protocol. Valid values are 'OleTransactions', 'WSAtomicTransactionOctober2004', and 'WSAtomicTransaction11'.. + /// + internal static string ConfigInvalidTransactionFlowProtocolValue { + get { + return ResourceManager.GetString("ConfigInvalidTransactionFlowProtocolValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type '{0}' registered for extension '{1}' could not be loaded.. + /// + internal static string ConfigInvalidType { + get { + return ResourceManager.GetString("ConfigInvalidType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid binding type for binding extension configuration object. This binding extension manages configuration of binding type '{0}' and cannot act upon type '{1}'.. + /// + internal static string ConfigInvalidTypeForBinding { + get { + return ResourceManager.GetString("ConfigInvalidTypeForBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid binding element type for binding element extension configuration object. This binding element extension manages configuration of binding element type '{0}' and cannot act upon type '{1}'.. + /// + internal static string ConfigInvalidTypeForBindingElement { + get { + return ResourceManager.GetString("ConfigInvalidTypeForBindingElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid endpoint type for endpoint extension configuration object. This endpoint extension manages configuration of endpoint type '{0}' and cannot act upon type '{1}'.. + /// + internal static string ConfigInvalidTypeForEndpoint { + get { + return ResourceManager.GetString("ConfigInvalidTypeForEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid value for the username password validator type. The type '{0}' does not derive from the appropriate base class '{1}'.. + /// + internal static string ConfigInvalidUserNamePasswordValidatorType { + get { + return ResourceManager.GetString("ConfigInvalidUserNamePasswordValidatorType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No elements matching the key '{0}' were found in the configuration element collection.. + /// + internal static string ConfigKeyNotFoundInElementCollection { + get { + return ResourceManager.GetString("ConfigKeyNotFoundInElementCollection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The key does not match the indexer key. When setting the value of a specific index, the key of the desired value must match the index at which it is being set. Key on element (expected value): {0}. Key provided to indexer: {1}.. + /// + internal static string ConfigKeysDoNotMatch { + get { + return ResourceManager.GetString("ConfigKeysDoNotMatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot add the message encoding element '{0}'. Another message encoding element already exists in the binding '{1}'. There can only be one message encoding element for each binding.. + /// + internal static string ConfigMessageEncodingAlreadyInBinding { + get { + return ResourceManager.GetString("ConfigMessageEncodingAlreadyInBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The CreateServiceEndpoint method in type '{0}' returned null instead of an instance of type '{1}'.. + /// + internal static string ConfigNoEndpointCreated { + get { + return ResourceManager.GetString("ConfigNoEndpointCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the extension collection associated with extension of type '{0}'.. + /// + internal static string ConfigNoExtensionCollectionAssociatedWithType { + get { + return ResourceManager.GetString("ConfigNoExtensionCollectionAssociatedWithType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to null. + /// + internal static string ConfigNull { + get { + return ResourceManager.GetString("ConfigNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Federated issuer address cannot be null when specifying an issuer binding.. + /// + internal static string ConfigNullIssuerAddress { + get { + return ResourceManager.GetString("ConfigNullIssuerAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configuration is read only.. + /// + internal static string ConfigReadOnly { + get { + return ResourceManager.GetString("ConfigReadOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' configuration section cannot be created. The machine.config file is missing information. Verify that this configuration section is properly registered and that you have correctly spelled the section name. For Windows Communication Foundation sections, run ServiceModelReg.exe -i to fix this error.. + /// + internal static string ConfigSectionNotFound { + get { + return ResourceManager.GetString("ConfigSectionNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot add stream upgrade element '{0}'. Another stream upgrade element already exists in the binding '{1}'. There can only be one stream update element per binding.. + /// + internal static string ConfigStreamUpgradeElementAlreadyInBinding { + get { + return ResourceManager.GetString("ConfigStreamUpgradeElementAlreadyInBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot add the transport element '{0}'. Another transport element already exists in the binding '{1}'. There can only be one transport element for each binding.. + /// + internal static string ConfigTransportAlreadyInBinding { + get { + return ResourceManager.GetString("ConfigTransportAlreadyInBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The wsdl schema that was used to create this configuration file contained a 'RequireIssuerSerialReference' assertion for a X509Token. This can not be represented in configuration, you will need to programatically adjust the appropriate X509SecurityTokenParameters.X509KeyIdentifierClauseType to X509KeyIdentifierClauseType.IssuerSerial. The default of X509KeyIdentifierClauseType.Thumbprint will be used, which may cause interop issues.. + /// + internal static string ConfigurationSchemaContainsX509IssuerSerialReference { + get { + return ResourceManager.GetString("ConfigurationSchemaContainsX509IssuerSerialReference", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configuration schema is insufficient to describe the non-standard configuration of the following security binding element: . + /// + internal static string ConfigurationSchemaInsuffientForSecurityBindingElementInstance { + get { + return ResourceManager.GetString("ConfigurationSchemaInsuffientForSecurityBindingElementInstance", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The XmlElement must contain XML content.. + /// + internal static string ConfigXmlElementMustBeSet { + get { + return ResourceManager.GetString("ConfigXmlElementMustBeSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The XPathFilter for an XPathFilterElement cannot be null.. + /// + internal static string ConfigXPathFilterIsNull { + get { + return ResourceManager.GetString("ConfigXPathFilterIsNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filter element body must not be empty.. + /// + internal static string ConfigXPathFilterMustNotBeEmpty { + get { + return ResourceManager.GetString("ConfigXPathFilterMustNotBeEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Namespace prefix '{0}' referenced in XPath expression was not found.. + /// + internal static string ConfigXPathNamespacePrefixNotFound { + get { + return ResourceManager.GetString("ConfigXPathNamespacePrefixNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint sent conflicting requests to create a reliable session. The conflicting requests have inconsistent filter criteria such as address or action. The reliable session has been faulted.. + /// + internal static string ConflictingAddress { + get { + return ResourceManager.GetString("ConflictingAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint sent conflicting requests to create a reliable session. The remote endpoint requested both a one way and a two way session. The reliable session has been faulted.. + /// + internal static string ConflictingOffer { + get { + return ResourceManager.GetString("ConflictingOffer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Content Type {0} was sent to a service expecting {1}. The client and service bindings may be mismatched.. + /// + internal static string ContentTypeMismatch { + get { + return ResourceManager.GetString("ContentTypeMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The context-id={0} (generation-id={1}) is already registered with SecurityContextSecurityTokenAuthenticator.. + /// + internal static string ContextAlreadyRegistered { + get { + return ResourceManager.GetString("ContextAlreadyRegistered", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The context-id={0} (no key generation-id) is already registered with SecurityContextSecurityTokenAuthenticator.. + /// + internal static string ContextAlreadyRegisteredNoKeyGeneration { + get { + return ResourceManager.GetString("ContextAlreadyRegisteredNoKeyGeneration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ContextBindingElement cannot provide channel factory for the requested channel shape {0}.. + /// + internal static string ContextBindingElementCannotProvideChannelFactory { + get { + return ResourceManager.GetString("ContextBindingElementCannotProvideChannelFactory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ContextBindingElement cannot provide channel listener for the requested channel shape {0}.. + /// + internal static string ContextBindingElementCannotProvideChannelListener { + get { + return ResourceManager.GetString("ContextBindingElementCannotProvideChannelListener", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to EndpointAddress: {0}, Via:{1}. + /// + internal static string ContextChannelFactoryChannelCreatedDetail { + get { + return ResourceManager.GetString("ContextChannelFactoryChannelCreatedDetail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Context cached at the channel cannot be set or retrieved when the context management is disabled at the channel layer. Ensure context channel property 'IContextManager.Enabled' is set to true.. + /// + internal static string ContextManagementNotEnabled { + get { + return ResourceManager.GetString("ContextManagementNotEnabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no SecurityContextSecurityToken with context-id={0} (generation-id={1}) registered with SecurityContextSecurityTokenAuthenticator.. + /// + internal static string ContextNotPresent { + get { + return ResourceManager.GetString("ContextNotPresent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no SecurityContextSecurityToken with context-id={0} (no key generation-id) registered with SecurityContextSecurityTokenAuthenticator.. + /// + internal static string ContextNotPresentNoKeyGeneration { + get { + return ResourceManager.GetString("ContextNotPresentNoKeyGeneration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Address, Binding and Contract keywords are required.. + /// + internal static string ContractBindingAddressCannotBeNull { + get { + return ResourceManager.GetString("ContractBindingAddressCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The contract '{0}' is not self-consistent -- it has one or more IsTerminating or non-IsInitiating operations, but it does not have the SessionMode property set to SessionMode.Required. The IsInitiating and IsTerminating attributes can only be used in the context of a session.. + /// + internal static string ContractIsNotSelfConsistentItHasOneOrMore2 { + get { + return ResourceManager.GetString("ContractIsNotSelfConsistentItHasOneOrMore2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation contract '{0}' is not self-consistent. When the '{1}' is set to '{2}', both '{3}' and '{4}' properties must be true, and the operation must not have any input parameters.. + /// + internal static string ContractIsNotSelfConsistentWhenIsSessionOpenNotificationEnabled { + get { + return ResourceManager.GetString("ContractIsNotSelfConsistentWhenIsSessionOpenNotificationEnabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The contract type name in the configuration file was not in the form of an interface identifier. (The string is "{0}".). + /// + internal static string ContractTypeNotAnIID { + get { + return ResourceManager.GetString("ContractTypeNotAnIID", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' can only be used with HTTP (or HTTPS) transport.. + /// + internal static string CookieContainerBindingElementNeedsHttp { + get { + return ResourceManager.GetString("CookieContainerBindingElementNeedsHttp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to copy the HTTP header '{0}' with value '{1}' to '{2}'.. + /// + internal static string CopyHttpHeaderFailed { + get { + return ResourceManager.GetString("CopyHttpHeaderFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no namespace binding for prefix '{0}' in scope.. + /// + internal static string CouldNotFindNamespaceForPrefix { + get { + return ResourceManager.GetString("CouldNotFindNamespaceForPrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A message with action {0} could not be parsed.. + /// + internal static string CouldNotParseWithAction { + get { + return ResourceManager.GetString("CouldNotParseWithAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Channel type '{1}' was requested, but Binding '{0}' doesn't support it or isn't configured properly to support it.. + /// + internal static string CouldnTCreateChannelForChannelType2 { + get { + return ResourceManager.GetString("CouldnTCreateChannelForChannelType2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Channel requirements cannot be met by the ChannelFactory for Binding '{0}' since the contract requires support for one of these channel types '{1}' but the binding doesn't support any of them.. + /// + internal static string CouldnTCreateChannelForType2 { + get { + return ResourceManager.GetString("CouldnTCreateChannelForType2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Couldn't find required attribute of type {0} on {1}.. + /// + internal static string couldnTFindRequiredAttributeOfTypeOn2 { + get { + return ResourceManager.GetString("couldnTFindRequiredAttributeOfTypeOn2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creation time must be before expiration time.. + /// + internal static string CreationTimeUtcIsAfterExpiryTime { + get { + return ResourceManager.GetString("CreationTimeUtcIsAfterExpiryTime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The NTLM authentication scheme was specified, but the target credential does not allow NTLM.. + /// + internal static string CredentialDisallowsNtlm { + get { + return ResourceManager.GetString("CredentialDisallowsNtlm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request to create a reliable session has been refused by the RM Destination. {0} The channel could not be opened.. + /// + internal static string CSRefused { + get { + return ResourceManager.GetString("CSRefused", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint processing requests to create a reliable session only supports sessions in which the AcksTo Uri and the Endpoint Uri are the same.. + /// + internal static string CSRefusedAcksToMustEqualEndpoint { + get { + return ResourceManager.GetString("CSRefusedAcksToMustEqualEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint processing requests to create a reliable session only supports sessions in which the AcksTo Uri and the ReplyTo Uri are the same.. + /// + internal static string CSRefusedAcksToMustEqualReplyTo { + get { + return ResourceManager.GetString("CSRefusedAcksToMustEqualReplyTo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint at {0} processes duplex sessions. The create sequence request must contain an offer for a return sequence. This is likely caused by a binding mismatch.. + /// + internal static string CSRefusedDuplexNoOffer { + get { + return ResourceManager.GetString("CSRefusedDuplexNoOffer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint at {0} processes input sessions. The create sequence request must not contain an offer for a return sequence. This is likely caused by a binding mismatch.. + /// + internal static string CSRefusedInputOffer { + get { + return ResourceManager.GetString("CSRefusedInputOffer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request to create a reliable session contains an invalid wsrm:IncompleteSequenceBehavior value. This is a WS-ReliableMessaging protocol violation.. + /// + internal static string CSRefusedInvalidIncompleteSequenceBehavior { + get { + return ResourceManager.GetString("CSRefusedInvalidIncompleteSequenceBehavior", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request to create a reliable session contains the wsse:SecurityTokenReference but does not carry a wsrm:UsesSequenceSTR header. This is a WS-ReliableMessaging protocol violation. The session could not be created.. + /// + internal static string CSRefusedNoSTRWSSecurity { + get { + return ResourceManager.GetString("CSRefusedNoSTRWSSecurity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint at {0} processes reply sessions. The create sequence request must contain an offer for a return sequence. This is likely caused by a binding mismatch.. + /// + internal static string CSRefusedReplyNoOffer { + get { + return ResourceManager.GetString("CSRefusedReplyNoOffer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RM Destination requires the WS-SecureConversation protocol in the binding. This is likely caused by a binding mismatch.. + /// + internal static string CSRefusedRequiredSecurityElementMissing { + get { + return ResourceManager.GetString("CSRefusedRequiredSecurityElementMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint processing requests to create a reliable session does not support sessions that use SSL. This is likely caused by a binding mismatch. The session could not be created.. + /// + internal static string CSRefusedSSLNotSupported { + get { + return ResourceManager.GetString("CSRefusedSSLNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request to create a reliable session carries a wsrm:UsesSequenceSTR header, but does not contain the wsse:SecurityTokenReference. This is a WS-ReliableMessaging protocol violation. The session could not be created.. + /// + internal static string CSRefusedSTRNoWSSecurity { + get { + return ResourceManager.GetString("CSRefusedSTRNoWSSecurity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message is not a valid SOAP message. The body contains more than 1 root element.. + /// + internal static string CSRefusedUnexpectedElementAtEndOfCSMessage { + get { + return ResourceManager.GetString("CSRefusedUnexpectedElementAtEndOfCSMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint replied to a request for a two way session with an offer for a one way session. This is likely caused by a binding mismatch. The channel could not be opened.. + /// + internal static string CSResponseOfferRejected { + get { + return ResourceManager.GetString("CSResponseOfferRejected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client requested creation of a two way session. A one way session was created. The session cannot continue without as a one way session. This is likely caused by a binding mismatch.. + /// + internal static string CSResponseOfferRejectedReason { + get { + return ResourceManager.GetString("CSResponseOfferRejectedReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The response to the request to create a reliable session contains an invalid wsrm:IncompleteSequenceBehavior value. This is a WS-ReliableMessaging protocol violation.. + /// + internal static string CSResponseWithInvalidIncompleteSequenceBehavior { + get { + return ResourceManager.GetString("CSResponseWithInvalidIncompleteSequenceBehavior", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint replied to a request for a one way session with an offer for a two way session. This is a WS-ReliableMessaging protocol violation. The channel could not be opened.. + /// + internal static string CSResponseWithOffer { + get { + return ResourceManager.GetString("CSResponseWithOffer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A return sequence was not offered by the create sequence request. The create sequence response cannot accept a return sequence.. + /// + internal static string CSResponseWithOfferReason { + get { + return ResourceManager.GetString("CSResponseWithOfferReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint replied to a request for a two way session with an offer for a one way session. This is a WS-ReliableMessaging protocol violation. The channel could not be opened.. + /// + internal static string CSResponseWithoutOffer { + get { + return ResourceManager.GetString("CSResponseWithoutOffer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A return sequence was offered by the create sequence request but the create sequence response did not accept this sequence.. + /// + internal static string CSResponseWithoutOfferReason { + get { + return ResourceManager.GetString("CSResponseWithoutOfferReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The supporting token in the renew message has a different generation '{0}' than the current session token's generation '{1}'.. + /// + internal static string CurrentSessionTokenNotRenewed { + get { + return ResourceManager.GetString("CurrentSessionTokenNotRenewed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding '{0}' lacks a TransportBindingElement. Every binding must have a binding element that derives from TransportBindingElement. This binding element must appear last in the BindingElementCollection.. + /// + internal static string CustomBindingRequiresTransport { + get { + return ResourceManager.GetString("CustomBindingRequiresTransport", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The custom crypto algorithm '{0}' obtained using CryptoConfig is not a valid or supported asymmetric signature algorithm.. + /// + internal static string CustomCryptoAlgorithmIsNotValidAsymmetricSignature { + get { + return ResourceManager.GetString("CustomCryptoAlgorithmIsNotValidAsymmetricSignature", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The custom crypto algorithm '{0}' obtained using CryptoConfig is not a valid or supported hash algorithm.. + /// + internal static string CustomCryptoAlgorithmIsNotValidHashAlgorithm { + get { + return ResourceManager.GetString("CustomCryptoAlgorithmIsNotValidHashAlgorithm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to decrypt an encrypted data block. Please verify that the encryption algorithm and keys used by the sender and receiver match.. + /// + internal static string DecryptionFailed { + get { + return ResourceManager.GetString("DecryptionFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (Default). + /// + internal static string Default { + get { + return ResourceManager.GetString("Default", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delayed security application has already been completed.. + /// + internal static string DelayedSecurityApplicationAlreadyCompleted { + get { + return ResourceManager.GetString("DelayedSecurityApplicationAlreadyCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' list created by the Func '{1}' is invalid because it contains one or more null items.. + /// + internal static string DelegatingHandlerArrayFromFuncContainsNullItem { + get { + return ResourceManager.GetString("DelegatingHandlerArrayFromFuncContainsNullItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' list is invalid because the property '{1}' of '{2}' is not null.. + /// + internal static string DelegatingHandlerArrayHasNonNullInnerHandler { + get { + return ResourceManager.GetString("DelegatingHandlerArrayHasNonNullInnerHandler", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The WS-RM policy under the namespace {0} requires the wsrmp:ExactlyOnce, wsrmp:AtLeastOnce, or wsrmp:AtMostOnce assertion. The {1} element under the {2} namespace was found.. + /// + internal static string DeliveryAssuranceRequired { + get { + return ResourceManager.GetString("DeliveryAssuranceRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The WS-RM policy under the namespace {0} requires the wsrmp:ExactlyOnce, wsrmp:AtLeastOnce, or wsrmp:AtMostOnce assertion. Nothing was found.. + /// + internal static string DeliveryAssuranceRequiredNothingFound { + get { + return ResourceManager.GetString("DeliveryAssuranceRequiredNothingFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Derived Key Token cannot derive key from the secret.. + /// + internal static string DerivedKeyCannotDeriveFromSecret { + get { + return ResourceManager.GetString("DerivedKeyCannotDeriveFromSecret", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The received derived key token has a invalid generation value specified. Value: {0}. The value should be greater than or equal to zero.. + /// + internal static string DerivedKeyInvalidGenerationSpecified { + get { + return ResourceManager.GetString("DerivedKeyInvalidGenerationSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The received derived key token has a invalid offset value specified. Value: {0}. The value should be greater than or equal to zero.. + /// + internal static string DerivedKeyInvalidOffsetSpecified { + get { + return ResourceManager.GetString("DerivedKeyInvalidOffsetSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Implicit derived key clause '{0}' specifies a derivation key length ({1}) which exceeds the allowed maximum length ({2}).. + /// + internal static string DerivedKeyLengthSpecifiedInImplicitDerivedKeyClauseTooLong { + get { + return ResourceManager.GetString("DerivedKeyLengthSpecifiedInImplicitDerivedKeyClauseTooLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DerivedKey length ({0}) exceeds the allowed settings ({1}).. + /// + internal static string DerivedKeyLengthTooLong { + get { + return ResourceManager.GetString("DerivedKeyLengthTooLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The number of derived keys in the message has exceeded the maximum allowed number '{0}'.. + /// + internal static string DerivedKeyLimitExceeded { + get { + return ResourceManager.GetString("DerivedKeyLimitExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The derived key has not been computed for the security token.. + /// + internal static string DerivedKeyNotInitialized { + get { + return ResourceManager.GetString("DerivedKeyNotInitialized", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Both offset and generation cannot be specified for Derived Key Token.. + /// + internal static string DerivedKeyPosAndGenBothSpecified { + get { + return ResourceManager.GetString("DerivedKeyPosAndGenBothSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Either offset or generation must be specified for Derived Key Token.. + /// + internal static string DerivedKeyPosAndGenNotSpecified { + get { + return ResourceManager.GetString("DerivedKeyPosAndGenNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The derived key's generation ('{0}') and length ('{1}' bytes) result in a key derivation offset that is greater than the maximum offset ('{2}' bytes) allowed.. + /// + internal static string DerivedKeyTokenGenerationAndLengthTooHigh { + get { + return ResourceManager.GetString("DerivedKeyTokenGenerationAndLengthTooHigh", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The length ('{0}' bytes) of the derived key's Label exceeds the maximum length ('{1}' bytes) allowed.. + /// + internal static string DerivedKeyTokenLabelTooLong { + get { + return ResourceManager.GetString("DerivedKeyTokenLabelTooLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The length ('{0}' bytes) of the derived key's Nonce exceeds the maximum length ('{1}' bytes) allowed.. + /// + internal static string DerivedKeyTokenNonceTooLong { + get { + return ResourceManager.GetString("DerivedKeyTokenNonceTooLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The derived key's Offset ('{0}' bytes) exceeds the maximum offset ('{1}' bytes) allowed.. + /// + internal static string DerivedKeyTokenOffsetTooHigh { + get { + return ResourceManager.GetString("DerivedKeyTokenOffsetTooHigh", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DerivedKeyToken requires a reference to a token.. + /// + internal static string DerivedKeyTokenRequiresTokenReference { + get { + return ResourceManager.GetString("DerivedKeyTokenRequiresTokenReference", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The impersonation level '{0}' was specified, yet HTTP Digest authentication can only support 'Impersonation' level when used with an explicit credential.. + /// + internal static string DigestExplicitCredsImpersonationLevel { + get { + return ResourceManager.GetString("DigestExplicitCredsImpersonationLevel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The DispatchOperation '{0}' requires Formatter, since DeserializeRequest and SerializeReply are not both false.. + /// + internal static string DispatchRuntimeRequiresFormatter0 { + get { + return ResourceManager.GetString("DispatchRuntimeRequiresFormatter0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Identity check failed for incoming message. The expected DNS identity of the remote endpoint was '{0}' but the remote endpoint provided DNS claim '{1}'. If this is a legitimate remote endpoint, you can fix the problem by explicitly specifying DNS identity '{1}' as the Identity property of EndpointAddress when creating channel proxy. . + /// + internal static string DnsIdentityCheckFailedForIncomingMessage { + get { + return ResourceManager.GetString("DnsIdentityCheckFailedForIncomingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Identity check failed for the incoming message. The remote endpoint did not provide a domain name system (DNS) claim and therefore did not satisfied DNS identity '{0}'. This may be caused by lack of DNS or CN name in the remote endpoint X.509 certificate's distinguished name.. + /// + internal static string DnsIdentityCheckFailedForIncomingMessageLackOfDnsClaim { + get { + return ResourceManager.GetString("DnsIdentityCheckFailedForIncomingMessageLackOfDnsClaim", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Identity check failed for outgoing message. The expected DNS identity of the remote endpoint was '{0}' but the remote endpoint provided DNS claim '{1}'. If this is a legitimate remote endpoint, you can fix the problem by explicitly specifying DNS identity '{1}' as the Identity property of EndpointAddress when creating channel proxy. . + /// + internal static string DnsIdentityCheckFailedForOutgoingMessage { + get { + return ResourceManager.GetString("DnsIdentityCheckFailedForOutgoingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Identity check failed for the outgoing message. The remote endpoint did not provide a domain name system (DNS) claim and therefore did not satisfied DNS identity '{0}'. This may be caused by lack of DNS or CN name in the remote endpoint X.509 certificate's distinguished name.. + /// + internal static string DnsIdentityCheckFailedForOutgoingMessageLackOfDnsClaim { + get { + return ResourceManager.GetString("DnsIdentityCheckFailedForOutgoingMessageLackOfDnsClaim", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No DNS entries exist for host {0}.. + /// + internal static string DnsResolveFailed { + get { + return ResourceManager.GetString("DnsResolveFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The document formatter must be configured with a document.. + /// + internal static string DocumentFormatterDoesNotHaveDocument { + get { + return ResourceManager.GetString("DocumentFormatterDoesNotHaveDocument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot map Windows user '{0}' to a UserPrincipalName that can be used for S4U impersonation.. + /// + internal static string DownlevelNameCannotMapToUpn { + get { + return ResourceManager.GetString("DownlevelNameCannotMapToUpn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Duplex channel to {0} was aborted during the open process.. + /// + internal static string DuplexChannelAbortedDuringOpen { + get { + return ResourceManager.GetString("DuplexChannelAbortedDuringOpen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No duplex session listener was listening at {0}. This could be due to an incorrect via set on the client or a binding mismatch.. + /// + internal static string DuplexSessionListenerNotFound { + get { + return ResourceManager.GetString("DuplexSessionListenerNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value could not be added to the collection, as the collection already contains an item of the same type: '{0}'. This collection only supports one instance of each type.. + /// + internal static string DuplicateBehavior1 { + get { + return ResourceManager.GetString("DuplicateBehavior1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Duplicate contract XmlQualifiedNames are not supported. + ///Another ContractDescription with the Name: {0} and Namespace: {1} has already been exported.. + /// + internal static string DuplicateContractQNameNameOnExport { + get { + return ResourceManager.GetString("DuplicateContractQNameNameOnExport", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The IssuedSecurityTokenProvider cannot support the FederatedClientCredentialsParameters. The FederatedClientCredentialsParameters has already provided the '{0}' parameter.. + /// + internal static string DuplicateFederatedClientCredentialsParameters { + get { + return ResourceManager.GetString("DuplicateFederatedClientCredentialsParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' id occurred twice in the message that is supplied for verification.. + /// + internal static string DuplicateIdInMessageToBeVerified { + get { + return ResourceManager.GetString("DuplicateIdInMessageToBeVerified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A property with the name '{0}' already exists.. + /// + internal static string DuplicateMessageProperty { + get { + return ResourceManager.GetString("DuplicateMessageProperty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A peer registration with the service address {0} already exists.. + /// + internal static string DuplicatePeerRegistration { + get { + return ResourceManager.GetString("DuplicatePeerRegistration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A policy document was ignored because a policy expression with that ID has already been imported. + ///Policy ID:{0}. + /// + internal static string DuplicatePolicyDocumentSkipped { + get { + return ResourceManager.GetString("DuplicatePolicyDocumentSkipped", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A policy expression was ignored because another policy expression with that ID has already been read in this document. + ///XPath:{0}. + /// + internal static string DuplicatePolicyInWsdlSkipped { + get { + return ResourceManager.GetString("DuplicatePolicyInWsdlSkipped", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A registration already exists for URI '{0}'.. + /// + internal static string DuplicateRegistration { + get { + return ResourceManager.GetString("DuplicateRegistration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More than one Timestamp element was present in security header.. + /// + internal static string DuplicateTimestampInSecurityHeader { + get { + return ResourceManager.GetString("DuplicateTimestampInSecurityHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not duplicate the token (error=0x{0:X}).. + /// + internal static string DuplicateTokenExFailed { + get { + return ResourceManager.GetString("DuplicateTokenExFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint sent a TerminateSequence protocol message before fully acknowledging all messages in the reply sequence. This is a violation of the reliable request reply protocol. The reliable session was faulted.. + /// + internal static string EarlyRequestTerminateSequence { + get { + return ResourceManager.GetString("EarlyRequestTerminateSequence", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint has closed the underlying secure session before the reliable session fully completed. The reliable session was faulted.. + /// + internal static string EarlySecurityClose { + get { + return ResourceManager.GetString("EarlySecurityClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The underlying secure session has faulted before the reliable session fully completed. The reliable session was faulted.. + /// + internal static string EarlySecurityFaulted { + get { + return ResourceManager.GetString("EarlySecurityFaulted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint has errantly sent a TerminateSequence protocol message before the sequence finished.. + /// + internal static string EarlyTerminateSequence { + get { + return ResourceManager.GetString("EarlyTerminateSequence", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The valid from time is greater than the valid to time.. + /// + internal static string EffectiveGreaterThanExpiration { + get { + return ResourceManager.GetString("EffectiveGreaterThanExpiration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0}:{1} element requires a {2}:{3} child element but has the {4} child element under the {5} namespace.. + /// + internal static string ElementFound { + get { + return ResourceManager.GetString("ElementFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0}:{1} element requires a {2}:{3} child element but has no child elements.. + /// + internal static string ElementRequired { + get { + return ResourceManager.GetString("ElementRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Element to sign must have id.. + /// + internal static string ElementToSignMustHaveId { + get { + return ResourceManager.GetString("ElementToSignMustHaveId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An empty value was found for the required base-64 attribute name '{0}', namespace '{1}'.. + /// + internal static string EmptyBase64Attribute { + get { + return ResourceManager.GetString("EmptyBase64Attribute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Element {0} cannot be empty.. + /// + internal static string EmptyXmlElementError { + get { + return ResourceManager.GetString("EmptyXmlElementError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot process contentType.. + /// + internal static string EncoderBadContentType { + get { + return ResourceManager.GetString("EncoderBadContentType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The envelope version of the incoming message ({0}) does not match that of the encoder ({1}). Make sure the binding is configured with the same version as the expected messages.. + /// + internal static string EncoderEnvelopeVersionMismatch { + get { + return ResourceManager.GetString("EncoderEnvelopeVersionMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message version of the outgoing message ({0}) does not match that of the encoder ({1}). Make sure the binding is configured with the same version as the message.. + /// + internal static string EncoderMessageVersionMismatch { + get { + return ResourceManager.GetString("EncoderMessageVersionMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unrecognized charSet '{0}' in contentType.. + /// + internal static string EncoderUnrecognizedCharSet { + get { + return ResourceManager.GetString("EncoderUnrecognizedCharSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unrecognized contentType ({0}). Expected: {1}.. + /// + internal static string EncoderUnrecognizedContentType { + get { + return ResourceManager.GetString("EncoderUnrecognizedContentType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to obtain XmlDictionaryReaderQuotas from the Binding. If you have specified a custom EncodingBindingElement, verify that the EncodingBindingElement can handle XmlDictionaryReaderQuotas in its GetProperty<T>() method.. + /// + internal static string EncodingBindingElementDoesNotHandleReaderQuotas { + get { + return ResourceManager.GetString("EncodingBindingElementDoesNotHandleReaderQuotas", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Encrypted Header and the Security Header '{0}' attribute did not match. Encrypted Header: {1}. Security Header: {2}.. + /// + internal static string EncryptedHeaderAttributeMismatch { + get { + return ResourceManager.GetString("EncryptedHeaderAttributeMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Header ('{0}', '{1}') was encrypted but not signed. All encrypted headers outside the security header should be signed.. + /// + internal static string EncryptedHeaderNotSigned { + get { + return ResourceManager.GetString("EncryptedHeaderNotSigned", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An encrypted header must have an id.. + /// + internal static string EncryptedHeaderXmlMustHaveId { + get { + return ResourceManager.GetString("EncryptedHeaderXmlMustHaveId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The EncryptedKey clause was not wrapped with the required encryption token '{0}'.. + /// + internal static string EncryptedKeyWasNotEncryptedWithTheRequiredEncryptingToken { + get { + return ResourceManager.GetString("EncryptedKeyWasNotEncryptedWithTheRequiredEncryptingToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to EncryptedKey with ReferenceList is not allowed according to the current settings.. + /// + internal static string EncryptedKeyWithReferenceListNotAllowed { + get { + return ResourceManager.GetString("EncryptedKeyWithReferenceListNotAllowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The encryption method is missing in encrypted data.. + /// + internal static string EncryptionMethodMissingInEncryptedData { + get { + return ResourceManager.GetString("EncryptionMethodMissingInEncryptedData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Encryption not expected for this message.. + /// + internal static string EncryptionNotExpected { + get { + return ResourceManager.GetString("EncryptionNotExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When using the IAsyncResult design pattern, the End method cannot be decorated with OperationContractAttribute. Only the corresponding Begin method can be decorated with OperationContractAttribute; that attribute will apply to the Begin-End pair of methods. Method '{0}' in type '{1}' violates this.. + /// + internal static string EndMethodsCannotBeDecoratedWithOperationContractAttribute { + get { + return ResourceManager.GetString("EndMethodsCannotBeDecoratedWithOperationContractAttribute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ChannelDispatcher requirements cannot be met by the IChannelListener for Binding '{0}' since the contract requires support for one of these channel types '{1}' but the binding only supports these channel types '{2}'.. + /// + internal static string EndpointListenerRequirementsCannotBeMetBy3 { + get { + return ResourceManager.GetString("EndpointListenerRequirementsCannotBeMetBy3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An endpoint configured for the COM+ CLSID {0} is not a configured interface on the class. (The contract type is {1}.). + /// + internal static string EndpointNotAnIID { + get { + return ResourceManager.GetString("EndpointNotAnIID", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was no endpoint listening at {0} that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.. + /// + internal static string EndpointNotFound { + get { + return ResourceManager.GetString("EndpointNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ServiceEndpoint with name '{0}' could not be exported to WSDL because the Binding property is null. To fix this, set the Binding property to a valid Binding instance.. + /// + internal static string EndpointsMustHaveAValidBinding1 { + get { + return ResourceManager.GetString("EndpointsMustHaveAValidBinding1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Performance counter instance names may not be unique. See "http://go.microsoft.com/fwlink/?LinkId=524462" for details.. + /// + internal static string EnsureCategoriesExistFailedPermission { + get { + return ResourceManager.GetString("EnsureCategoriesExistFailedPermission", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The issuer cannot provide a computed key in key entropy mode '{0}'.. + /// + internal static string EntropyModeCannotHaveComputedKey { + get { + return ResourceManager.GetString("EntropyModeCannotHaveComputedKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The issuer cannot provide key entropy or a proof token in key entropy mode '{0}'.. + /// + internal static string EntropyModeCannotHaveProofTokenOrIssuerEntropy { + get { + return ResourceManager.GetString("EntropyModeCannotHaveProofTokenOrIssuerEntropy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client cannot provide key entropy in key entropy mode '{0}'.. + /// + internal static string EntropyModeCannotHaveRequestorEntropy { + get { + return ResourceManager.GetString("EntropyModeCannotHaveRequestorEntropy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The issuer must provide a computed key in key entropy mode '{0}'.. + /// + internal static string EntropyModeRequiresComputedKey { + get { + return ResourceManager.GetString("EntropyModeRequiresComputedKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The issuer must provide key entropy in key entropy mode '{0}'.. + /// + internal static string EntropyModeRequiresIssuerEntropy { + get { + return ResourceManager.GetString("EntropyModeRequiresIssuerEntropy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The issuer must provide a proof token in key entropy mode '{0}'.. + /// + internal static string EntropyModeRequiresProofToken { + get { + return ResourceManager.GetString("EntropyModeRequiresProofToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client must provide key entropy in key entropy mode '{0}'.. + /// + internal static string EntropyModeRequiresRequestorEntropy { + get { + return ResourceManager.GetString("EntropyModeRequiresRequestorEntropy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to EnvelopeNone ({0}). + /// + internal static string EnvelopeNoneToStringFormat { + get { + return ResourceManager.GetString("EnvelopeNoneToStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Envelope Version '{0}' is not supported.. + /// + internal static string EnvelopeVersionNotSupported { + get { + return ResourceManager.GetString("EnvelopeVersionNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unrecognized envelope version: {0}.. + /// + internal static string EnvelopeVersionUnknown { + get { + return ResourceManager.GetString("EnvelopeVersionUnknown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error creating the security key identifier clause from the security token XML. Please see the inner exception for more details.. + /// + internal static string ErrorDeserializingKeyIdentifierClauseFromTokenXml { + get { + return ResourceManager.GetString("ErrorDeserializingKeyIdentifierClauseFromTokenXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error deserializing the security token XML. Please see the inner exception for more details.. + /// + internal static string ErrorDeserializingTokenXml { + get { + return ResourceManager.GetString("ErrorDeserializingTokenXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Importing metadata from issuer '{0}' failed with error '{1}'.. + /// + internal static string ErrorImportingIssuerMetadata { + get { + return ResourceManager.GetString("ErrorImportingIssuerMetadata", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error in line {0} position {1}.. + /// + internal static string ErrorInLine { + get { + return ResourceManager.GetString("ErrorInLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error was encountered when parsing a DateTime value in the XML.. + /// + internal static string ErrorParsingDateTime { + get { + return ResourceManager.GetString("ErrorParsingDateTime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error was encountered when parsing the document's XML. Refer to the inner exception for more details.. + /// + internal static string ErrorParsingDocument { + get { + return ResourceManager.GetString("ErrorParsingDocument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error was encountered when parsing the feed's XML. Refer to the inner exception for more details.. + /// + internal static string ErrorParsingFeed { + get { + return ResourceManager.GetString("ErrorParsingFeed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error was encountered when parsing the item's XML. Refer to the inner exception for more details.. + /// + internal static string ErrorParsingItem { + get { + return ResourceManager.GetString("ErrorParsingItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error serializing the security token. Please see the inner exception for more details.. + /// + internal static string ErrorSerializingSecurityToken { + get { + return ResourceManager.GetString("ErrorSerializingSecurityToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The policy expression was not fully imported because it exceeded the maximum allowable complexity. The import stopped at element '{0}' '{1}'.. + /// + internal static string ExceededMaxPolicyComplexity { + get { + return ResourceManager.GetString("ExceededMaxPolicyComplexity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The policy expression was not fully imported because its normalized form was too large.. + /// + internal static string ExceededMaxPolicySize { + get { + return ResourceManager.GetString("ExceededMaxPolicySize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Element '{0}' with namespace '{1}' not found.. + /// + internal static string ExpectedElementMissing { + get { + return ResourceManager.GetString("ExpectedElementMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expected element '{0}' or element '{1}' (from namespace '{2}').. + /// + internal static string ExpectedOneOfTwoElementsFromNamespace { + get { + return ResourceManager.GetString("ExpectedOneOfTwoElementsFromNamespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Infocard token created during channel intialization has expired. Please create a new channel to reacquire token. . + /// + internal static string ExpiredTokenInChannelParameters { + get { + return ResourceManager.GetString("ExpiredTokenInChannelParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security policy export failed. The binding contains a TransportSecurityBindingElement but no transport binding element that implements ITransportTokenAssertionProvider. Policy export for such a binding is not supported. Make sure the transport binding element in the binding implements the ITransportTokenAssertionProvider interface.. + /// + internal static string ExportOfBindingWithTransportSecurityBindingElementAndNoTransportSecurityNotSupported { + get { + return ResourceManager.GetString("ExportOfBindingWithTransportSecurityBindingElementAndNoTransportSecurityNotSuppor" + + "ted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Extended protection is not supported on this platform. Please install the appropriate patch or change the ExtendedProtectionPolicy on the Binding or BindingElement to a value with a PolicyEnforcement value of "Never" or "WhenSupported".. + /// + internal static string ExtendedProtectionNotSupported { + get { + return ResourceManager.GetString("ExtendedProtectionNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Authentication Scheme "Basic" does not support Extended Protection. Please use a different authentication scheme or disable the ExtendedProtectionPolicy on the Binding or BindingElement by creating a new ExtendedProtectionPolicy with a PolicyEnforcement value of "Never".. + /// + internal static string ExtendedProtectionPolicyBasicAuthNotSupported { + get { + return ResourceManager.GetString("ExtendedProtectionPolicyBasicAuthNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CustomChannelBindings are not supported. Please remove the CustomChannelBinding from the ExtendedProtectionPolicy".. + /// + internal static string ExtendedProtectionPolicyCustomChannelBindingNotSupported { + get { + return ResourceManager.GetString("ExtendedProtectionPolicyCustomChannelBindingNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the extension element must be specified.. + /// + internal static string ExtensionNameNotSpecified { + get { + return ResourceManager.GetString("ExtensionNameNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Additional XML content is present in the fault detail element. Only a single element is allowed.. + /// + internal static string ExtraContentIsPresentInFaultDetail { + get { + return ResourceManager.GetString("ExtraContentIsPresentInFaultDetail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to At least one security token in the message could not be validated.. + /// + internal static string FailedAuthenticationFaultReason { + get { + return ResourceManager.GetString("FailedAuthenticationFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request for security token could not be satisfied because authentication failed.. + /// + internal static string FailedAuthenticationTrustFaultCode { + get { + return ResourceManager.GetString("FailedAuthenticationTrustFaultCode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The processing of the WSDL parameter failed. Error: {0}. + /// + internal static string FailedImportOfWsdl { + get { + return ResourceManager.GetString("FailedImportOfWsdl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The required outer proxy could not be created. Ensure that the service moniker is correctly installed and registered.. + /// + internal static string FailedProxyProviderCreation { + get { + return ResourceManager.GetString("FailedProxyProviderCreation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The signature verification failed. Please see inner exception for fault details.. + /// + internal static string FailedSignatureVerification { + get { + return ResourceManager.GetString("FailedSignatureVerification", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Secure channel cannot be opened because security negotiation with the remote endpoint has failed. This may be due to absent or incorrectly specified EndpointIdentity in the EndpointAddress used to create the channel. Please verify the EndpointIdentity specified or implied by the EndpointAddress correctly identifies the remote endpoint. . + /// + internal static string FailedSspiNegotiation { + get { + return ResourceManager.GetString("FailedSspiNegotiation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to convert type library to assembly. + /// + internal static string FailedToConvertTypelibraryToAssembly { + get { + return ResourceManager.GetString("FailedToConvertTypelibraryToAssembly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The issued token accompanying the WS-AtomicTransaction coordination context was invalid or corrupt.. + /// + internal static string FailedToDeserializeIssuedToken { + get { + return ResourceManager.GetString("FailedToDeserializeIssuedToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to load type library. + /// + internal static string FailedToLoadTypeLibrary { + get { + return ResourceManager.GetString("FailedToLoadTypeLibrary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security negotiation failed because the remote party did not send back a reply in a timely manner. This may be because the underlying transport connection was aborted.. + /// + internal static string FailToRecieveReplyFromNegotiation { + get { + return ResourceManager.GetString("FailToRecieveReplyFromNegotiation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} returned false from OnTryCreateException, but returned a non-null Exception (See InnerException for details).. + /// + internal static string FaultConverterCreatedException { + get { + return ResourceManager.GetString("FaultConverterCreatedException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} returned false from OnTryCreateFaultMessage, but returned a non-null fault message.. + /// + internal static string FaultConverterCreatedFaultMessage { + get { + return ResourceManager.GetString("FaultConverterCreatedFaultMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} returned true from OnTryCreateException, but did not return an Exception.. + /// + internal static string FaultConverterDidNotCreateException { + get { + return ResourceManager.GetString("FaultConverterDidNotCreateException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} returned true from OnTryCreateFaultMessage, but did not return a fault message.. + /// + internal static string FaultConverterDidNotCreateFaultMessage { + get { + return ResourceManager.GetString("FaultConverterDidNotCreateFaultMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The fault does not have detail information.. + /// + internal static string FaultDoesNotHaveAnyDetail { + get { + return ResourceManager.GetString("FaultDoesNotHaveAnyDetail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The feed's authors were not serialized as part of serializing the feed in RSS 2.0 format.. + /// + internal static string FeedAuthorsIgnoredOnWrite { + get { + return ResourceManager.GetString("FeedAuthorsIgnoredOnWrite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The feed's contributors were not serialized as part of serializing the feed in RSS 2.0 format.. + /// + internal static string FeedContributorsIgnoredOnWrite { + get { + return ResourceManager.GetString("FeedContributorsIgnoredOnWrite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The feed created a null category.. + /// + internal static string FeedCreatedNullCategory { + get { + return ResourceManager.GetString("FeedCreatedNullCategory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to =The feed created a null item.. + /// + internal static string FeedCreatedNullItem { + get { + return ResourceManager.GetString("FeedCreatedNullItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The feed created a null person.. + /// + internal static string FeedCreatedNullPerson { + get { + return ResourceManager.GetString("FeedCreatedNullPerson", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The syndication feed formatter must be configured with a syndication feed.. + /// + internal static string FeedFormatterDoesNotHaveFeed { + get { + return ResourceManager.GetString("FeedFormatterDoesNotHaveFeed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The feed being deserialized has non-contiguous sets of items in it. This is not supported by '{0}'.. + /// + internal static string FeedHasNonContiguousItems { + get { + return ResourceManager.GetString("FeedHasNonContiguousItems", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The feed's id was not serialized as part of serializing the feed in RSS 2.0 format.. + /// + internal static string FeedIdIgnoredOnWrite { + get { + return ResourceManager.GetString("FeedIdIgnoredOnWrite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The feed's links were not serialized as part of serializing the feed in RSS 2.0 format.. + /// + internal static string FeedLinksIgnoredOnWrite { + get { + return ResourceManager.GetString("FeedLinksIgnoredOnWrite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The IMessageFilterTable created for a Filter cannot be a MessageFilterTable or a subclass of MessageFilterTable.. + /// + internal static string FilterBadTableType { + get { + return ResourceManager.GetString("FilterBadTableType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Value cannot be negative.. + /// + internal static string FilterCapacityNegative { + get { + return ResourceManager.GetString("FilterCapacityNegative", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not compile the XPath expression '{0}' with the given XsltContext.. + /// + internal static string FilterCouldNotCompile { + get { + return ResourceManager.GetString("FilterCouldNotCompile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parameter value cannot be an empty string.. + /// + internal static string FilterEmptyString { + get { + return ResourceManager.GetString("FilterEmptyString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The filter already exists in the filter table.. + /// + internal static string FilterExists { + get { + return ResourceManager.GetString("FilterExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid attribute on the XPath.. + /// + internal static string FilterInvalidAttribute { + get { + return ResourceManager.GetString("FilterInvalidAttribute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When present, the dialect attribute must have the value '{0}'.. + /// + internal static string FilterInvalidDialect { + get { + return ResourceManager.GetString("FilterInvalidDialect", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Required inner element '{0}' was not found.. + /// + internal static string FilterInvalidInner { + get { + return ResourceManager.GetString("FilterInvalidInner", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple filters matched.. + /// + internal static string FilterMultipleMatches { + get { + return ResourceManager.GetString("FilterMultipleMatches", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The number of XML infoset nodes inspected by the navigator has exceeded the quota ({0}).. + /// + internal static string FilterNodeQuotaExceeded { + get { + return ResourceManager.GetString("FilterNodeQuotaExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to NodeQuota must be greater than 0.. + /// + internal static string FilterQuotaRange { + get { + return ResourceManager.GetString("FilterQuotaRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XmlReader not positioned at a start element.. + /// + internal static string FilterReaderNotStartElem { + get { + return ResourceManager.GetString("FilterReaderNotStartElem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Session filter's isStrictMode differs from filter table's isStrictMode.. + /// + internal static string FilterStrictModeDifferent { + get { + return ResourceManager.GetString("FilterStrictModeDifferent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MessageFilterTable state is corrupt. The requested lookup cannot be performed.. + /// + internal static string FilterTableInvalidForLookup { + get { + return ResourceManager.GetString("FilterTableInvalidForLookup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type of IMessageFilterTable created for a particular Filter type must always be the same.. + /// + internal static string FilterTableTypeMismatch { + get { + return ResourceManager.GetString("FilterTableTypeMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The prefix '{0}' is not defined.. + /// + internal static string FilterUndefinedPrefix { + get { + return ResourceManager.GetString("FilterUndefinedPrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An internal error has occurred. Unexpected error modifying filter table.. + /// + internal static string FilterUnexpectedError { + get { + return ResourceManager.GetString("FilterUnexpectedError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Object type must be an enum with the flag attribute. '{0}' is not an enum - or the flag attribute is not set. Please use an enum type with the flag attribute instead.. + /// + internal static string FlagEnumTypeExpected { + get { + return ResourceManager.GetString("FlagEnumTypeExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot write to a buffer which is currently being flushed. . + /// + internal static string FlushBufferAlreadyInUse { + get { + return ResourceManager.GetString("FlushBufferAlreadyInUse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to For replay detection to be done ProtectionLevel must be Sign or EncryptAndSign.. + /// + internal static string ForReplayDetectionToBeDoneRequireIntegrityMustBeSet { + get { + return ResourceManager.GetString("ForReplayDetectionToBeDoneRequireIntegrityMustBeSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Found multiple X.509 certificates using the following search criteria: StoreName '{0}', StoreLocation '{1}', FindType '{2}', FindValue '{3}'. Provide a more specific find value.. + /// + internal static string FoundMultipleCerts { + get { + return ResourceManager.GetString("FoundMultipleCerts", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Found multiple X.509 certificates using the following search criteria: StoreName '{0}', StoreLocation '{1}', FindType '{2}', FindValue '{3}' for target '{4}'. Provide a more specific find value.. + /// + internal static string FoundMultipleCertsForTarget { + get { + return ResourceManager.GetString("FoundMultipleCertsForTarget", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request did not have any signatures but the reply has signature confirmations.. + /// + internal static string FoundUnexpectedSignatureConfirmations { + get { + return ResourceManager.GetString("FoundUnexpectedSignatureConfirmations", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An attempt was made to decode a value after the framing stream was ended.. + /// + internal static string FramingAtEnd { + get { + return ResourceManager.GetString("FramingAtEnd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Content Type {0} was not supported by service {1}. The client and service bindings may be mismatched.. + /// + internal static string FramingContentTypeMismatch { + get { + return ResourceManager.GetString("FramingContentTypeMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The framing content type size ({0}) exceeds the quota.. + /// + internal static string FramingContentTypeTooLong { + get { + return ResourceManager.GetString("FramingContentTypeTooLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Content type '{0}' is too long to be processed by the remote host. See the server logs for more details.. + /// + internal static string FramingContentTypeTooLongFault { + get { + return ResourceManager.GetString("FramingContentTypeTooLongFault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error while reading message framing format at position {0} of stream (state: {1}). + /// + internal static string FramingError { + get { + return ResourceManager.GetString("FramingError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The framing fault size ({0}) exceeds the quota.. + /// + internal static string FramingFaultTooLong { + get { + return ResourceManager.GetString("FramingFaultTooLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server faulted with code '{0}'.. + /// + internal static string FramingFaultUnrecognized { + get { + return ResourceManager.GetString("FramingFaultUnrecognized", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The maximum message size quota for incoming messages has been exceeded for the remote channel. See the server logs for more details.. + /// + internal static string FramingMaxMessageSizeExceeded { + get { + return ResourceManager.GetString("FramingMaxMessageSizeExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Framing mode {0} is not supported.. + /// + internal static string FramingModeNotSupported { + get { + return ResourceManager.GetString("FramingModeNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The .Net Framing mode being used is not supported by '{0}'. See the server logs for more details.. + /// + internal static string FramingModeNotSupportedFault { + get { + return ResourceManager.GetString("FramingModeNotSupportedFault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More data was expected, but EOF was reached.. + /// + internal static string FramingPrematureEOF { + get { + return ResourceManager.GetString("FramingPrematureEOF", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expected record type '{0}', found '{1}'.. + /// + internal static string FramingRecordTypeMismatch { + get { + return ResourceManager.GetString("FramingRecordTypeMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specified size is too large for this implementation.. + /// + internal static string FramingSizeTooLarge { + get { + return ResourceManager.GetString("FramingSizeTooLarge", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The requested upgrade is not supported by '{0}'. This could be due to mismatched bindings (for example security enabled on the client and not on the server).. + /// + internal static string FramingUpgradeInvalid { + get { + return ResourceManager.GetString("FramingUpgradeInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value cannot be accessed because it has not yet been fully decoded.. + /// + internal static string FramingValueNotAvailable { + get { + return ResourceManager.GetString("FramingValueNotAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Framing major version {0} is not supported.. + /// + internal static string FramingVersionNotSupported { + get { + return ResourceManager.GetString("FramingVersionNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The .Net Framing version being used is not supported by '{0}'. See the server logs for more details.. + /// + internal static string FramingVersionNotSupportedFault { + get { + return ResourceManager.GetString("FramingVersionNotSupportedFault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The framing via ({0}) is not a valid URI.. + /// + internal static string FramingViaNotUri { + get { + return ResourceManager.GetString("FramingViaNotUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The framing via size ({0}) exceeds the quota.. + /// + internal static string FramingViaTooLong { + get { + return ResourceManager.GetString("FramingViaTooLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Via '{0}' is too long to be processed by the remote host. See the server logs for more details.. + /// + internal static string FramingViaTooLongFault { + get { + return ResourceManager.GetString("FramingViaTooLongFault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Binding with name {0} failed validation because it contains a BindingElement with type {1} which is not supported in partial trust. Consider using BasicHttpBinding or WSHttpBinding, or hosting your application in a full-trust environment.. + /// + internal static string FullTrustOnlyBindingElementSecurityCheck1 { + get { + return ResourceManager.GetString("FullTrustOnlyBindingElementSecurityCheck1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The WSHttpBinding with name {0} failed validation because it contains a BindingElement with type {1} which is not supported in partial trust. Consider disabling the message security and reliable session options, using BasicHttpBinding, or hosting your application in a full-trust environment.. + /// + internal static string FullTrustOnlyBindingElementSecurityCheckWSHttpBinding1 { + get { + return ResourceManager.GetString("FullTrustOnlyBindingElementSecurityCheckWSHttpBinding1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Binding with name {0} failed validation because the Binding type {1} is not supported in partial trust. Consider using BasicHttpBinding or WSHttpBinding, or hosting your application in a full-trust environment.. + /// + internal static string FullTrustOnlyBindingSecurityCheck1 { + get { + return ResourceManager.GetString("FullTrustOnlyBindingSecurityCheck1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error verifying some XML Schemas generated during export: + ///{0}. + /// + internal static string GeneralSchemaValidationError { + get { + return ResourceManager.GetString("GeneralSchemaValidationError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not get token information (error=0x{0:X}).. + /// + internal static string GetTokenInfoFailed { + get { + return ResourceManager.GetString("GetTokenInfoFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message header with name '{0}' and namespace '{1}' is not present in the set of understood headers.. + /// + internal static string HeaderAlreadyNotUnderstood { + get { + return ResourceManager.GetString("HeaderAlreadyNotUnderstood", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message header with name '{0}' and namespace '{1}' is already present in the set of understood headers.. + /// + internal static string HeaderAlreadyUnderstood { + get { + return ResourceManager.GetString("HeaderAlreadyUnderstood", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SecurityVersion.WSSecurityJan2004 does not support header decryption. Use SecurityVersion.WsSecurity11 and above or use transport security to encrypt the full message.. + /// + internal static string HeaderDecryptionNotSupportedInWsSecurityJan2004 { + get { + return ResourceManager.GetString("HeaderDecryptionNotSupportedInWsSecurityJan2004", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SecurityVersion.WSSecurityJan2004 does not support header encryption. Header with name '{0}' and namespace '{1}' is configured for encryption. Consider using SecurityVersion.WsSecurity11 and above or use transport security to encrypt the full message.. + /// + internal static string HeaderEncryptionNotSupportedInWsSecurityJan2004 { + get { + return ResourceManager.GetString("HeaderEncryptionNotSupportedInWsSecurityJan2004", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is not a header with name {0} and namespace {1} in the message.. + /// + internal static string HeaderNotFound { + get { + return ResourceManager.GetString("HeaderNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Envelope Version '{0}' does not support adding Message Headers.. + /// + internal static string HeadersCannotBeAddedToEnvelopeVersion { + get { + return ResourceManager.GetString("HeadersCannotBeAddedToEnvelopeVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The BaseUriWithWildcard object has invalid fields after deserialization.. + /// + internal static string Hosting_BaseUriDeserializedNotValid { + get { + return ResourceManager.GetString("Hosting_BaseUriDeserializedNotValid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This service requires ASP.NET compatibility and must be hosted in IIS. Either host the service in IIS with ASP.NET compatibility turned on in web.config or set the AspNetCompatibilityRequirementsAttribute.AspNetCompatibilityRequirementsMode property to a value other than Required.. + /// + internal static string Hosting_CompatibilityServiceNotHosted { + get { + return ResourceManager.GetString("Hosting_CompatibilityServiceNotHosted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Setting minFreeMemoryPercentageToActivateService requires full trust privilege. Please change the application's trust level or remove this setting from the configuration file.. + /// + internal static string Hosting_MemoryGatesCheckFailedUnderPartialTrust { + get { + return ResourceManager.GetString("Hosting_MemoryGatesCheckFailedUnderPartialTrust", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The protocol binding '{0}' does not conform to the syntax for '{1}'. The following is an example of valid '{1}' protocol bindings: '{2}'.. + /// + internal static string Hosting_MisformattedBinding { + get { + return ResourceManager.GetString("Hosting_MisformattedBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The protocol binding '{0}' is not valid for '{1}'. This might be because the port number is out of range.. + /// + internal static string Hosting_MisformattedBindingData { + get { + return ResourceManager.GetString("Hosting_MisformattedBindingData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' protocol binding '{1}' specifies an invalid port number '{2}'.. + /// + internal static string Hosting_MisformattedPort { + get { + return ResourceManager.GetString("Hosting_MisformattedPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an absolute address. The supported relativeAddress formats are "[subfolder/]filename" or "~/[subfolder/]filename". . + /// + internal static string Hosting_NoAbsoluteRelativeAddress { + get { + return ResourceManager.GetString("Hosting_NoAbsoluteRelativeAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no compatible TransportManager found for URI '{0}'. This may be because you have used an absolute address that points outside of the virtual application. Please use a relative address instead.. + /// + internal static string Hosting_NoHttpTransportManagerForUri { + get { + return ResourceManager.GetString("Hosting_NoHttpTransportManagerForUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no compatible TransportManager found for URI '{0}'. This may be because you have used an absolute address that points outside of the virtual application, or the binding settings of the endpoint do not match those that have been set by other services or endpoints. Note that all bindings for the same protocol should have the same settings in the same application.. + /// + internal static string Hosting_NoTcpPipeTransportManagerForUri { + get { + return ResourceManager.GetString("Hosting_NoTcpPipeTransportManagerForUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The protocol '{0}' is not supported.. + /// + internal static string Hosting_NotSupportedProtocol { + get { + return ResourceManager.GetString("Hosting_NotSupportedProtocol", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' cannot be invoked within the current hosting environment. This API requires that the calling application be hosted in IIS or WAS.. + /// + internal static string Hosting_ProcessNotExecutingUnderHostedContext { + get { + return ResourceManager.GetString("Hosting_ProcessNotExecutingUnderHostedContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Registered relativeAddress '{0}' in configuration file is not a valid one. Possible causes could be : You specified an empty addreess or an absolute address (i.e., starting with '/' or '\'), or the address contains invalid character[s]. The supported relativeAddress formats are "[folder/]filename" or "~/[folder/]filename". . + /// + internal static string Hosting_RelativeAddressFormatError { + get { + return ResourceManager.GetString("Hosting_RelativeAddressFormatError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The requested service, '{0}' could not be activated. See the server's diagnostic trace logs for more information.. + /// + internal static string Hosting_ServiceActivationFailed { + get { + return ResourceManager.GetString("Hosting_ServiceActivationFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value for the Service attribute was not provided in the ServiceHost directive.. + /// + internal static string Hosting_ServiceTypeNotProvided { + get { + return ResourceManager.GetString("Hosting_ServiceTypeNotProvided", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to VirtualPathExtension is not allowed to be removed.. + /// + internal static string Hosting_VirtualPathExtenstionCanNotBeDetached { + get { + return ResourceManager.GetString("Hosting_VirtualPathExtenstionCanNotBeDetached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The incoming message contains a SOAP header representing the WS-Addressing '{0}', yet the HTTP transport is configured with AddressingVersion.None. As a result, the message is being dropped. If this is not desired, then update your HTTP binding to support a different AddressingVersion.. + /// + internal static string HttpAddressingNoneHeaderOnWire { + get { + return ResourceManager.GetString("HttpAddressingNoneHeaderOnWire", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to HTTP request streaming cannot be used in conjunction with HTTP authentication. Either disable request streaming or specify anonymous HTTP authentication.. + /// + internal static string HttpAuthDoesNotSupportRequestStreaming { + get { + return ResourceManager.GetString("HttpAuthDoesNotSupportRequestStreaming", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP request with client authentication scheme '{0}' failed with '{1}' status.. + /// + internal static string HttpAuthenticationFailed { + get { + return ResourceManager.GetString("HttpAuthenticationFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP request is unauthorized with client authentication scheme '{0}'. The authentication header received from the server was '{1}'.. + /// + internal static string HttpAuthorizationFailed { + get { + return ResourceManager.GetString("HttpAuthorizationFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP request was forbidden with client authentication scheme '{0}'.. + /// + internal static string HttpAuthorizationForbidden { + get { + return ResourceManager.GetString("HttpAuthorizationForbidden", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTPS listener factory was configured to require a client certificate and the '{0}' authentication scheme. However, only one form of client authentication can be required at once.. + /// + internal static string HttpAuthSchemeAndClientCert { + get { + return ResourceManager.GetString("HttpAuthSchemeAndClientCert", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value specified for the AuthenticationScheme property on the HttpTransportBindingElement ('{0}') is not allowed when building a ChannelFactory. If you used a standard binding, ensure the ClientCredentialType is not set to HttpClientCredentialType.InheritedFromHost, a value which is invalid on a client. If you set the value to '{0}' directly on the HttpTransportBindingElement, please set it to Digest, Negotiate, NTLM, Basic, or Anonymous.. + /// + internal static string HttpAuthSchemeCannotBeNone { + get { + return ResourceManager.GetString("HttpAuthSchemeCannotBeNone", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ClientCredentialType '{0}' can only be used on the server side, not the client side. Please use one of the following values instead 'None, Basic, Client, Digest, Ntlm, Windows'.. + /// + internal static string HttpClientCredentialTypeInvalid { + get { + return ResourceManager.GetString("HttpClientCredentialTypeInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The number of bytes available is inconsistent with the HTTP Content-Length header. There may have been a network error or the client may be sending invalid requests.. + /// + internal static string HttpContentLengthIncorrect { + get { + return ResourceManager.GetString("HttpContentLengthIncorrect", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error ({0}) occurred while parsing the content type of the HTTP request. The content type was: {1}.. + /// + internal static string HttpContentTypeFormatException { + get { + return ResourceManager.GetString("HttpContentTypeFormatException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An HTTP Content-Type header is required for SOAP messaging and none was found.. + /// + internal static string HttpContentTypeHeaderRequired { + get { + return ResourceManager.GetString("HttpContentTypeHeaderRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ContextBindingElement of binding {0}:{1} is configured with ContextExchangeMode.HttpCookie but the configuration of this binding's HttpTransportBindingElement prevents upper channel layers from managing cookies. Please set the HttpTransportBindingElement.AllowCookies property to false or change the ContextExchangeMechanism of ContextBindingElement to SoapHeader.. + /// + internal static string HttpCookieContextExchangeMechanismNotCompatibleWithTransportCookieSetting { + get { + return ResourceManager.GetString("HttpCookieContextExchangeMechanismNotCompatibleWithTransportCookieSetting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding {1}:{2} is configured with ContextExchangeMechanism.HttpCookie which is not compatible with the transport type {0}. Please modify the ContextExchangeMechanism or use HTTP or HTTPS transport.. + /// + internal static string HttpCookieContextExchangeMechanismNotCompatibleWithTransportType { + get { + return ResourceManager.GetString("HttpCookieContextExchangeMechanismNotCompatibleWithTransportType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value specified, '{0}', for the If-Modified-Since header does not parse into a valid date. Check the property value and ensure that it is of the proper format.. + /// + internal static string HttpIfModifiedSinceParseError { + get { + return ResourceManager.GetString("HttpIfModifiedSinceParseError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to start the HTTP listener. The URI provided, '{0}', is invalid for listening. Check the base address of your service and verify that it is a valid URI.. + /// + internal static string HttpInvalidListenURI { + get { + return ResourceManager.GetString("HttpInvalidListenURI", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value of MaxPendingAccepts should not be larger than {0}.. + /// + internal static string HttpMaxPendingAcceptsTooLargeError { + get { + return ResourceManager.GetString("HttpMaxPendingAcceptsTooLargeError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' cannot return a null '{1}' instance. Please ensure that '{0}' returns a valid '{1}' instance.. + /// + internal static string HttpMessageHandlerChannelFactoryNullPipeline { + get { + return ResourceManager.GetString("HttpMessageHandlerChannelFactoryNullPipeline", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The config element '{0}' is invalid because the attribute '{1}' and the sub element '{2}' were both specified. These are mutually exclusive items and cannot be used simultaneouly.. + /// + internal static string HttpMessageHandlerFactoryConfigInvalid_WithBothTypeAndHandlerList { + get { + return ResourceManager.GetString("HttpMessageHandlerFactoryConfigInvalid_WithBothTypeAndHandlerList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This '{0}' object cannot be used to generate configuration because it was created with the constructor that takes a '{1}' as the paramter. This functionality is not supported through configuration files. Please use a different constructor if you wish to generate a configuration file.. + /// + internal static string HttpMessageHandlerFactoryWithFuncCannotGenerateConfig { + get { + return ResourceManager.GetString("HttpMessageHandlerFactoryWithFuncCannotGenerateConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid type: '{0}'. It must inherit from base type '{1}', cannot be abstract, and must expose a public default constructor.. + /// + internal static string HttpMessageHandlerTypeNotSupported { + get { + return ResourceManager.GetString("HttpMessageHandlerTypeNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote HTTP server did not satisfy the mutual authentication requirement.. + /// + internal static string HttpMutualAuthNotSatisfied { + get { + return ResourceManager.GetString("HttpMutualAuthNotSatisfied", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}. This often indicates that the HTTP client has prematurely closed the underlying TCP connection.. + /// + internal static string HttpNetnameDeleted { + get { + return ResourceManager.GetString("HttpNetnameDeleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}. This often indicates that a service that HTTP.SYS depends upon (such as httpfilter) is not started.. + /// + internal static string HttpNoTrackingService { + get { + return ResourceManager.GetString("HttpNoTrackingService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message property '{0}' is missing in the HttpRequestMessage. Please make sure this property not removed or changed from the properties of the HttpRequestMessage. If you are creating a new HttpRequestMessage, please copy this property from the old message to the new one.. + /// + internal static string HttpPipelineMessagePropertyMissingError { + get { + return ResourceManager.GetString("HttpPipelineMessagePropertyMissingError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message property '{0}' inside the HttpRequestMessage is not with expected type '{1}'. Please make sure this property not removed or changed from the properties of the HttpRequestMessage. If you are creating a new HttpRequestMessage, please copy this property from the old message to the new one.. + /// + internal static string HttpPipelineMessagePropertyTypeError { + get { + return ResourceManager.GetString("HttpPipelineMessagePropertyTypeError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The property '{0}' is not supported when building a ChannelFactory. The property value must be null when calling BuildChannelFactory.. + /// + internal static string HttpPipelineNotSupportedOnClientSide { + get { + return ResourceManager.GetString("HttpPipelineNotSupportedOnClientSide", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP response message should not be null. Please ensure your '{0}' instance returns a non-null '{1}' object.. + /// + internal static string HttpPipelineNotSupportNullResponseMessage { + get { + return ResourceManager.GetString("HttpPipelineNotSupportNullResponseMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to HTTP pipeline operation cancelled.. + /// + internal static string HttpPipelineOperationCanceledError { + get { + return ResourceManager.GetString("HttpPipelineOperationCanceledError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' authentication scheme has been specified for the proxy on the HTTP factory. However, the factory only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous.. + /// + internal static string HttpProxyRequiresSingleAuthScheme { + get { + return ResourceManager.GetString("HttpProxyRequiresSingleAuthScheme", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while receiving the HTTP response to {0}. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.. + /// + internal static string HttpReceiveFailure { + get { + return ResourceManager.GetString("HttpReceiveFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to HTTP could not register URL {0}. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details).. + /// + internal static string HttpRegistrationAccessDenied { + get { + return ResourceManager.GetString("HttpRegistrationAccessDenied", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to HTTP could not register URL {0}. Another application has already registered this URL with HTTP.SYS.. + /// + internal static string HttpRegistrationAlreadyExists { + get { + return ResourceManager.GetString("HttpRegistrationAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to HTTP could not register URL {0} because the MaxEndpoints quota has been exceeded. To correct this, either close other HTTP-based services, or increase your MaxEndpoints registry key setting (see http://go.microsoft.com/fwlink/?LinkId=70352 for details).. + /// + internal static string HttpRegistrationLimitExceeded { + get { + return ResourceManager.GetString("HttpRegistrationLimitExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to HTTP could not register URL {0} because TCP port {1} is being used by another application.. + /// + internal static string HttpRegistrationPortInUse { + get { + return ResourceManager.GetString("HttpRegistrationPortInUse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP request to '{0}' was aborted. This may be due to the local channel being closed while the request was still in progress. If this behavior is not desired, then update your code so that it does not close the channel while request operations are still in progress.. + /// + internal static string HttpRequestAborted { + get { + return ResourceManager.GetString("HttpRequestAborted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP request to '{0}' has exceeded the allotted timeout of {1}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string HttpRequestTimedOut { + get { + return ResourceManager.GetString("HttpRequestTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' authentication scheme has been specified on the HTTP factory. However, the factory only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous.. + /// + internal static string HttpRequiresSingleAuthScheme { + get { + return ResourceManager.GetString("HttpRequiresSingleAuthScheme", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP request context was aborted while writing the response. As a result, the response may not have been completely written to the network. This can be remedied by gracefully closing the request context rather than aborting it.. + /// + internal static string HttpResponseAborted { + get { + return ResourceManager.GetString("HttpResponseAborted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP request to '{0}' has exceeded the allotted timeout of {1} while reading the response. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string HttpResponseTimedOut { + get { + return ResourceManager.GetString("HttpResponseTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while making the HTTP request to {0}. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server.. + /// + internal static string HttpSendFailure { + get { + return ResourceManager.GetString("HttpSendFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP service located at {0} is unavailable. This could be because the service is too busy or because no endpoint was found listening at the specified address. Please ensure that the address is correct and try accessing the service again later.. + /// + internal static string HttpServerTooBusy { + get { + return ResourceManager.GetString("HttpServerTooBusy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTPS channel factory does not support explicit specification of an identity in the EndpointAddress unless the authentication scheme is NTLM or Negotiate.. + /// + internal static string HttpsExplicitIdentity { + get { + return ResourceManager.GetString("HttpsExplicitIdentity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint identity specified when creating the HTTPS channel to '{0}' contains multiple server certificates. However, the HTTPS transport only supports the specification of a single server certificate. In order to create an HTTPS channel, please specify no more than one server certificate in the endpoint identity.. + /// + internal static string HttpsIdentityMultipleCerts { + get { + return ResourceManager.GetString("HttpsIdentityMultipleCerts", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SOAP action specified on the message, '{0}', does not match the action specified on the HttpRequestMessageProperty, '{1}'.. + /// + internal static string HttpSoapActionMismatch { + get { + return ResourceManager.GetString("HttpSoapActionMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SOAP action specified on the message, '{0}', does not match the action specified in the content-type of the HttpRequestMessageProperty, '{1}'.. + /// + internal static string HttpSoapActionMismatchContentType { + get { + return ResourceManager.GetString("HttpSoapActionMismatchContentType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SOAP action specified on the message, '{0}', does not match the HTTP SOAP Action, '{1}'. . + /// + internal static string HttpSoapActionMismatchFault { + get { + return ResourceManager.GetString("HttpSoapActionMismatchFault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SPN for the responding server at URI '{0}' could not be determined.. + /// + internal static string HttpSpnNotFound { + get { + return ResourceManager.GetString("HttpSpnNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server certificate with name '{0}' failed identity verification because its thumbprint ('{1}') does not match the one specified in the endpoint identity ('{2}'). As a result, the current HTTPS request has failed. Please update the endpoint identity used on the client or the certificate used by the server.. + /// + internal static string HttpsServerCertThumbprintMismatch { + get { + return ResourceManager.GetString("HttpsServerCertThumbprintMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The entry found in AuthenticationManager's CustomTargetNameDictionary for {0} does not match the requested identity of {1}.. + /// + internal static string HttpTargetNameDictionaryConflict { + get { + return ResourceManager.GetString("HttpTargetNameDictionaryConflict", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding specified requires that the to and via URIs must match because the Addressing Version is set to None. The to URI specified was '{0}'. The via URI specified was '{1}'.. + /// + internal static string HttpToMustEqualVia { + get { + return ResourceManager.GetString("HttpToMustEqualVia", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error ({0}) occurred while transmitting data over the HTTP channel.. + /// + internal static string HttpTransferError { + get { + return ResourceManager.GetString("HttpTransferError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The policy being imported for contract '{0}:{1}' contains multiple HTTP authentication scheme assertions. Since at most one such assertion is allowed, policy import has failed. This may be resolved by updating the policy to contain no more than one HTTP authentication scheme assertion.. + /// + internal static string HttpTransportCannotHaveMultipleAuthenticationSchemes { + get { + return ResourceManager.GetString("HttpTransportCannotHaveMultipleAuthenticationSchemes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID0020: The collection is empty.. + /// + internal static string ID0020 { + get { + return ResourceManager.GetString("ID0020", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID2004: IAsyncResult must be the AsyncResult instance returned from the Begin call. The runtime is expecting '{0}', and the actual type is '{1}'.. + /// + internal static string ID2004 { + get { + return ResourceManager.GetString("ID2004", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3002: WSTrustServiceContract could not create a SecurityTokenService instance from WSTrustServiceContract.SecurityTokenServiceConfiguration.. + /// + internal static string ID3002 { + get { + return ResourceManager.GetString("ID3002", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3004: Cannot obtain the schema for namespace: '{0}'.. + /// + internal static string ID3004 { + get { + return ResourceManager.GetString("ID3004", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3022: The WSTrustServiceContract only supports receiving RequestSecurityToken messages. If you need to support more message types, override the WSTrustServiceContract.DispatchRequest method.. + /// + internal static string ID3022 { + get { + return ResourceManager.GetString("ID3022", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3023: The WSTrustServiceContract only supports receiving RequestSecurityToken messages asynchronously. If you need to support more message types, override the WSTrustServiceContract.BeginDispatchRequest and EndDispatchRequest.. + /// + internal static string ID3023 { + get { + return ResourceManager.GetString("ID3023", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3097: ServiceHost does not contain any valid Endpoints. Add at least one valid endpoint in the SecurityTokenServiceConfiguration.TrustEndpoints collection.. + /// + internal static string ID3097 { + get { + return ResourceManager.GetString("ID3097", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3112: Unrecognized RequestType '{0}' specified in the incoming request.. + /// + internal static string ID3112 { + get { + return ResourceManager.GetString("ID3112", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3113: The WSTrustServiceContract does not support receiving '{0}' messages with the '{1}' SOAP action. If you need to support this, override the ValidateDispatchContext method.. + /// + internal static string ID3113 { + get { + return ResourceManager.GetString("ID3113", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3114: The WSTrustServiceContract cannot deserialize the WS-Trust request.. + /// + internal static string ID3114 { + get { + return ResourceManager.GetString("ID3114", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3137: The TrustVersion '{0}', is not supported, only 'TrustVersion.WSTrust13' and 'TrustVersion.WSTrustFeb2005' is supported.. + /// + internal static string ID3137 { + get { + return ResourceManager.GetString("ID3137", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3138: The RequestSecurityTokenResponse that was received did not contain a SecurityToken.. + /// + internal static string ID3138 { + get { + return ResourceManager.GetString("ID3138", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3139: The WSTrustChannel cannot compute a proof key. The KeyType '{0}' is not supported. Valid proof key types supported by the WSTrustChannel are WSTrust13 and WSTrustFeb2005.. + /// + internal static string ID3139 { + get { + return ResourceManager.GetString("ID3139", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3140: Specify one or more BaseAddresses to enable metadata or set DisableWsdl to true in the SecurityTokenServiceConfiguration.. + /// + internal static string ID3140 { + get { + return ResourceManager.GetString("ID3140", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3141: The RequestType '{0}', is not supported. If you need to support this RequestType, override the corresponding virtual method in your SecurityTokenService derived class.. + /// + internal static string ID3141 { + get { + return ResourceManager.GetString("ID3141", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3144: The PortType '{0}' Operation '{1}' has Message '{2}' is expected to have only one part but contains '{3}'.. + /// + internal static string ID3144 { + get { + return ResourceManager.GetString("ID3144", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3146: WsdlEndpointConversionContext.WsdlPort cannot be null.. + /// + internal static string ID3146 { + get { + return ResourceManager.GetString("ID3146", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3147: WsdlEndpointConversionContext.WsdlPort.Service cannot be null.. + /// + internal static string ID3147 { + get { + return ResourceManager.GetString("ID3147", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3148: WsdlEndpointConversionContext.WsdlPort.Service.ServiceDescription cannot be null.. + /// + internal static string ID3148 { + get { + return ResourceManager.GetString("ID3148", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3149: Cannot find an input message type for PortType '({0}, {1})' for operation '{2}' in the given ServiceDescription.. + /// + internal static string ID3149 { + get { + return ResourceManager.GetString("ID3149", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3150: Cannot find an output message type for PortType '({0}, {1})' for operation '{2}' in the given ServiceDescription.. + /// + internal static string ID3150 { + get { + return ResourceManager.GetString("ID3150", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3190: The WSTrustChannel cannot compute a proof key without a valid SecurityToken set as the RequestSecurityToken.UseKey when the RequestSecurityToken.KeyType is '{0}'.. + /// + internal static string ID3190 { + get { + return ResourceManager.GetString("ID3190", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3191: The WSTrustChannel received a RequestedSecurityTokenResponse message containing an Entropy without a ComputedKeyAlgorithm.. + /// + internal static string ID3191 { + get { + return ResourceManager.GetString("ID3191", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3192: The WSTrustChannel cannot compute a proof key. The received RequestedSecurityTokenResponse does not contain a RequestedProofToken and the ComputedKeyAlgorithm specified in the response is not supported: '{0}'.. + /// + internal static string ID3192 { + get { + return ResourceManager.GetString("ID3192", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3193: The WSTrustChannel cannot compute a proof key. The received RequestedSecurityTokenResponse indicates that the proof key is computed using combined entropy. However, the response does not include an entropy.. + /// + internal static string ID3193 { + get { + return ResourceManager.GetString("ID3193", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3194: The WSTrustChannel cannot compute a proof key. The received RequestedSecurityTokenResponse indicates that the proof key is computed using combined entropy. However, the request does not include an entropy.. + /// + internal static string ID3194 { + get { + return ResourceManager.GetString("ID3194", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3269: Cannot determine the TrustVersion. It must either be specified explicitly, or a SecurityBindingElement must be present in the binding.. + /// + internal static string ID3269 { + get { + return ResourceManager.GetString("ID3269", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3270: The WSTrustChannel does not support multi-leg issuance protocols. The RSTR received from the STS must be enclosed in a RequestSecurityTokenResponseCollection element.. + /// + internal static string ID3270 { + get { + return ResourceManager.GetString("ID3270", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3285: The WS-Trust operation '{0}' is not valid or unsupported.. + /// + internal static string ID3285 { + get { + return ResourceManager.GetString("ID3285", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3286: The 'inner' parameter must implement the 'System.ServiceModel.Channels.IChannel' interface.. + /// + internal static string ID3286 { + get { + return ResourceManager.GetString("ID3286", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID3287: WSTrustChannelFactory does not support changing the value of this property after a channel is created.. + /// + internal static string ID3287 { + get { + return ResourceManager.GetString("ID3287", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID4008: '{0}' does not provide an implementation for '{1}'.. + /// + internal static string ID4008 { + get { + return ResourceManager.GetString("ID4008", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID4039: A custom ServiceAuthorizationManager has been configured. Any custom ServiceAuthorizationManager must be derived from IdentityModelServiceAuthorizationManager.. + /// + internal static string ID4039 { + get { + return ResourceManager.GetString("ID4039", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID4041: Cannot configure the ServiceHost '{0}'. The ServiceHost is in a bad state and cannot be configured.. + /// + internal static string ID4041 { + get { + return ResourceManager.GetString("ID4041", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID4053: The token has WS-SecureConversation version '{0}'. Version '{1}' was expected.. + /// + internal static string ID4053 { + get { + return ResourceManager.GetString("ID4053", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID4072: The SecurityTokenHandler '{0}' registered for TokenType '{1}' must derive from '{2}'.. + /// + internal static string ID4072 { + get { + return ResourceManager.GetString("ID4072", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID4101: The token cannot be validated because it is not a SamlSecurityToken or a Saml2SecurityToken. Token type: '{0}'. + /// + internal static string ID4101 { + get { + return ResourceManager.GetString("ID4101", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID4192: The reader is not positioned on a KeyInfo element that can be read.. + /// + internal static string ID4192 { + get { + return ResourceManager.GetString("ID4192", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID4240: The tokenRequirement must derived from 'RecipientServiceModelSecurityTokenRequirement' for SecureConversationSecurityTokens. The tokenRequirement is of type '{0}'.. + /// + internal static string ID4240 { + get { + return ResourceManager.GetString("ID4240", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID4244: Internal error: sessionAuthenticator must support IIssuanceSecurityTokenAuthenticator.. + /// + internal static string ID4244 { + get { + return ResourceManager.GetString("ID4244", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID4245: Internal error: sessionAuthenticator must support ICommunicationObject.. + /// + internal static string ID4245 { + get { + return ResourceManager.GetString("ID4245", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID4268: MergeClaims must have at least one identity that is not null.. + /// + internal static string ID4268 { + get { + return ResourceManager.GetString("ID4268", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID4271: No IAuthorizationPolicy was found for the Transport security token '{0}'.. + /// + internal static string ID4271 { + get { + return ResourceManager.GetString("ID4271", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID4274: The Configuration property of this SecurityTokenHandler is set to null. Tokens cannot be read or validated in this state. Set this property or add this SecurityTokenHandler to a SecurityTokenHandlerCollection with a valid Configuration property.. + /// + internal static string ID4274 { + get { + return ResourceManager.GetString("ID4274", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID4285: Cannot replace SecurityToken with Id '{0}' in cache with new one. Token must exist in cache to be replaced.. + /// + internal static string ID4285 { + get { + return ResourceManager.GetString("ID4285", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID4287: The SecurityTokenRequirement '{0}' doesn't contain a ListenUri.. + /// + internal static string ID4287 { + get { + return ResourceManager.GetString("ID4287", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID5004: Unrecognized namespace: '{0}'.. + /// + internal static string ID5004 { + get { + return ResourceManager.GetString("ID5004", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The identity check failed for the incoming message. The expected identity is '{0}' for the '{1}' target endpoint.. + /// + internal static string IdentityCheckFailedForIncomingMessage { + get { + return ResourceManager.GetString("IdentityCheckFailedForIncomingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The identity check failed for the outgoing message. The expected identity is '{0}' for the '{1}' target endpoint.. + /// + internal static string IdentityCheckFailedForOutgoingMessage { + get { + return ResourceManager.GetString("IdentityCheckFailedForOutgoingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ignoring invalid part in wsdl:message name='{0}' from targetNamespace='{1}'. Reason: {2}. + /// + internal static string IgnoreMessagePart3 { + get { + return ResourceManager.GetString("IgnoreMessagePart3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ignoring invalid SOAP fault extension in wsdl:operation name='{0}' from targetNamespace='{1}'. Reason: {2}. + /// + internal static string IgnoreSoapFaultBinding3 { + get { + return ResourceManager.GetString("IgnoreSoapFaultBinding3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ignoring invalid SOAP header extension in wsdl:operation name='{0}' from targetNamespace='{1}'. Reason: {2}. + /// + internal static string IgnoreSoapHeaderBinding3 { + get { + return ResourceManager.GetString("IgnoreSoapHeaderBinding3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not impersonate the anonymous user (error=0x{0:X}).. + /// + internal static string ImpersonateAnonymousTokenFailed { + get { + return ResourceManager.GetString("ImpersonateAnonymousTokenFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Because base ServiceContract '{0}' has a CallbackContract '{1}', derived ServiceContract '{2}' must also specify either '{1}' or a derived type as its CallbackContract.. + /// + internal static string InAContractInheritanceHierarchyIfParentHasCallbackChildMustToo { + get { + return ResourceManager.GetString("InAContractInheritanceHierarchyIfParentHasCallbackChildMustToo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In a contract inheritance hierarchy, the ServiceContract's CallbackContract must be a subtype of the CallbackContracts of all of the CallbackContracts of the ServiceContracts inherited by the original ServiceContract, Types {0} and {1} violate this rule.. + /// + internal static string InAContractInheritanceHierarchyTheServiceContract3_2 { + get { + return ResourceManager.GetString("InAContractInheritanceHierarchyTheServiceContract3_2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MSDTC transaction manager has disabled incoming transactions.. + /// + internal static string InboundTransactionsDisabled { + get { + return ResourceManager.GetString("InboundTransactionsDisabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to For this security protocol, the incoming signing token must be an EncryptedKey.. + /// + internal static string IncomingSigningTokenMustBeAnEncryptedKey { + get { + return ResourceManager.GetString("IncomingSigningTokenMustBeAnEncryptedKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TransactedBatchingBehavior cannot be used when ReceiveContext is being used.. + /// + internal static string IncompatibleBehaviors { + get { + return ResourceManager.GetString("IncompatibleBehaviors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint specified two different last message numbers. The reliable session is in an inconsistent state since it cannot determine the actual last message. The reliable session was faulted.. + /// + internal static string InconsistentLastMsgNumberExceptionString { + get { + return ResourceManager.GetString("InconsistentLastMsgNumberExceptionString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Incoming binary negotiation has invalid ValueType {0}.. + /// + internal static string IncorrectBinaryNegotiationValueType { + get { + return ResourceManager.GetString("IncorrectBinaryNegotiationValueType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security Support Provider Interface (SSPI) authentication failed. The server may not be running in an account with identity '{0}'. If the server is running in a service account (Network Service for example), specify the account's ServicePrincipalName as the identity in the EndpointAddress for the server. If the server is running in a user account, specify the account's UserPrincipalName as the identity in the EndpointAddress for the server.. + /// + internal static string IncorrectSpnOrUpnSpecified { + get { + return ResourceManager.GetString("IncorrectSpnOrUpnSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Policy chain contains self issued URI or a managed issuer in the wrong position.. + /// + internal static string InfoCardInvalidChain { + get { + return ResourceManager.GetString("InfoCardInvalidChain", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot open ChannelFactory as the inner channel factory was not set during the initialization process.. + /// + internal static string InnerChannelFactoryWasNotSet { + get { + return ResourceManager.GetString("InnerChannelFactoryWasNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Inner listener factory of {0} must be set before this operation.. + /// + internal static string InnerListenerFactoryNotSet { + get { + return ResourceManager.GetString("InnerListenerFactoryNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The input {0} must be a '{1}' object.. + /// + internal static string InputMustBeDelegatingHandlerElementError { + get { + return ResourceManager.GetString("InputMustBeDelegatingHandlerElementError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The input handler list cannot be empty.. + /// + internal static string InputTypeListEmptyError { + get { + return ResourceManager.GetString("InputTypeListEmptyError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ServiceHost must be configured with either a serviceType or a serviceInstance. Both of these values are currently null.. + /// + internal static string InstanceSettingsMustHaveTypeOrWellKnownObject0 { + get { + return ResourceManager.GetString("InstanceSettingsMustHaveTypeOrWellKnownObject0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Insufficient memory avaliable to complete the operation.. + /// + internal static string InsufficentMemory { + get { + return ResourceManager.GetString("InsufficentMemory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Credentials specified are not sufficient to carry requested operation. Please specify a valid value for {0}. . + /// + internal static string InsufficientCredentials { + get { + return ResourceManager.GetString("InsufficientCredentials", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding's PeerTransportSecuritySettings can not be supported under the current system security configuration.. + /// + internal static string InsufficientCryptoSupport { + get { + return ResourceManager.GetString("InsufficientCryptoSupport", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Provided information is Insufficient to create a valid connection to the resolver service.. + /// + internal static string InsufficientResolverSettings { + get { + return ResourceManager.GetString("InsufficientResolverSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find interface in the Assembly. + /// + internal static string InterfaceNotFoundInAssembly { + get { + return ResourceManager.GetString("InterfaceNotFoundInAssembly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Interface {0} not found in configuration.. + /// + internal static string InterfaceNotFoundInConfig { + get { + return ResourceManager.GetString("InterfaceNotFoundInConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Interface Not Registered. + /// + internal static string InterfaceNotRegistered { + get { + return ResourceManager.GetString("InterfaceNotRegistered", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An unexpected error has occurred.. + /// + internal static string InternalError { + get { + return ResourceManager.GetString("InternalError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SequenceAcknowledgement violates the cumulative acknowledgement invariant.. + /// + internal static string InvalidAcknowledgementFaultReason { + get { + return ResourceManager.GetString("InvalidAcknowledgementFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A violation of acknowledgement protocol has been detected. An InvalidAcknowledgement fault was sent to the remote endpoint and the reliable session was faulted.. + /// + internal static string InvalidAcknowledgementReceived { + get { + return ResourceManager.GetString("InvalidAcknowledgementReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security negotiation message has incorrect action '{0}'.. + /// + internal static string InvalidActionForNegotiationMessage { + get { + return ResourceManager.GetString("InvalidActionForNegotiationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid async Begin method signature for method {0} in ServiceContract type {1}. Your begin method must take an AsyncCallback and an object as the last two arguments and return an IAsyncResult.. + /// + internal static string InvalidAsyncBeginMethodSignatureForMethod2 { + get { + return ResourceManager.GetString("InvalidAsyncBeginMethodSignatureForMethod2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid async End method signature for method {0} in ServiceContract type {1}. Your end method must take an IAsyncResult as the last argument.. + /// + internal static string InvalidAsyncEndMethodSignatureForMethod2 { + get { + return ResourceManager.GetString("InvalidAsyncEndMethodSignatureForMethod2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The asynchronous result object used to end this operation was not the object that was returned when the operation was initiated.. + /// + internal static string InvalidAsyncResult { + get { + return ResourceManager.GetString("InvalidAsyncResult", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expecting all chars - c - of id to be in set [Char.IsLetter(c), Char.IsNumber(c), '.', '_', '-'], found '{0}'.. + /// + internal static string InValidateId { + get { + return ResourceManager.GetString("InValidateId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expecting first char - c - to be in set [Char.IsLetter(c) && c == '_', found '{0}'.. + /// + internal static string InValidateIdPrefix { + get { + return ResourceManager.GetString("InValidateIdPrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ('{0}', '{1}') signed header contains the ('{2}', '{3}') attribute. The expected attribute is ('{4}', '{5}').. + /// + internal static string InvalidAttributeInSignedHeader { + get { + return ResourceManager.GetString("InvalidAttributeInSignedHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding ('{0}', '{1}') uses an Issued Token with Bearer Key Type in a invalid context. The Issued Token with a Bearer Key Type can only be used as a Signed Supporting token or a Signed Encrypted Supporting token. See the SecurityBindingElement.EndpointSupportingTokenParameters property.. + /// + internal static string InvalidBearerKeyUsage { + get { + return ResourceManager.GetString("InvalidBearerKeyUsage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The TransportBindingElement of type '{0}' in this CustomBinding returned a null or empty string for the Scheme. TransportBindingElement's Scheme must be a non-empty string.. + /// + internal static string InvalidBindingScheme { + get { + return ResourceManager.GetString("InvalidBindingScheme", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An acknowledgement was received indicating the remaining buffer space on the remote endpoint is {0}. This number cannot be less than zero. The reliable session was faulted.. + /// + internal static string InvalidBufferRemaining { + get { + return ResourceManager.GetString("InvalidBufferRemaining", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client credential entered was invalid.. + /// + internal static string InvalidClientCredentials { + get { + return ResourceManager.GetString("InvalidClientCredentials", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A security session close response was received with an invalid action '{0}',. + /// + internal static string InvalidCloseResponseAction { + get { + return ResourceManager.GetString("InvalidCloseResponseAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value '{0}' is not a valid content type.. + /// + internal static string InvalidContentTypeError { + get { + return ResourceManager.GetString("InvalidContentTypeError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Context channel received a message with context which does not match the current context cached at the channel. Ensure service does not change context after it was originally set or disable context management by setting channel property 'IContextManager.Enabled' to false.. + /// + internal static string InvalidContextReceived { + get { + return ResourceManager.GetString("InvalidContextReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Value '{0}' specified for 'name' attribute of ContextMessageProperty is either null or has invalid character(s). Please ensure value of 'name' is within the allowed value space.. + /// + internal static string InvalidCookieContent { + get { + return ResourceManager.GetString("InvalidCookieContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction identifier element in the coordination context is invalid.. + /// + internal static string InvalidCoordinationContextTransactionId { + get { + return ResourceManager.GetString("InvalidCoordinationContextTransactionId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid decoder state machine.. + /// + internal static string InvalidDecoderStateMachine { + get { + return ResourceManager.GetString("InvalidDecoderStateMachine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected internal enum value: {0}.. + /// + internal static string InvalidEnumValue { + get { + return ResourceManager.GetString("InvalidEnumValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Object type must be an enum with the flag attribute and may only contain powers of two for the flags enum values or a combination of such values. Please use an enum type according to these rules.. + /// + internal static string InvalidFlagEnumType { + get { + return ResourceManager.GetString("InvalidFlagEnumType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot read the Identity element. The Identity type is not supported or the Identity element is empty.. + /// + internal static string InvalidIdentityElement { + get { + return ResourceManager.GetString("InvalidIdentityElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The isolation level for component {0} is invalid. (The value was {1}.). + /// + internal static string InvalidIsolationLevelValue { + get { + return ResourceManager.GetString("InvalidIsolationLevelValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The issued token has an invalid key size '{0}'.. + /// + internal static string InvalidIssuedTokenKeySize { + get { + return ResourceManager.GetString("InvalidIssuedTokenKeySize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The key length '{0}' requested is invalid.. + /// + internal static string InvalidKeyLengthRequested { + get { + return ResourceManager.GetString("InvalidKeyLengthRequested", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified key size {0} is invalid. The key size must be between {1} and {2}.. + /// + internal static string InvalidKeySizeSpecifiedInNegotiation { + get { + return ResourceManager.GetString("InvalidKeySizeSpecifiedInNegotiation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username/password Membership provider {0} specified in the configuration is invalid. No such provider was found registered under system.web/membership/providers.. + /// + internal static string InvalidMembershipProviderSpecifiedInConfig { + get { + return ResourceManager.GetString("InvalidMembershipProviderSpecifiedInConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot specify 'ContextMessageProperty' in message when using context channel with context management enabled. Ensure the message does not have 'ContextMessageProperty' or disable context management by setting channel property 'IContextManager.Enabled' to false.. + /// + internal static string InvalidMessageContext { + get { + return ResourceManager.GetString("InvalidMessageContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An internal error has occurred. Invalid MessageState.. + /// + internal static string InvalidMessageState { + get { + return ResourceManager.GetString("InvalidMessageState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Type of object passed as parameter '{0}' is not derived from {1}. Ensure that the type of object passed is either of type {1} or derived from {1}.. + /// + internal static string InvalidObjectTypePassed { + get { + return ResourceManager.GetString("InvalidObjectTypePassed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The nonce is invalid or replayed.. + /// + internal static string InvalidOrReplayedNonce { + get { + return ResourceManager.GetString("InvalidOrReplayedNonce", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message could not be processed because the action '{0}' is invalid or unrecognized.. + /// + internal static string InvalidOrUnrecognizedAction { + get { + return ResourceManager.GetString("InvalidOrUnrecognizedAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type {0} registered as a policy extension does not implement IPolicyImportExtension. + /// + internal static string InvalidPolicyExtensionTypeInConfig { + get { + return ResourceManager.GetString("InvalidPolicyExtensionTypeInConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The OLE Transactions propagation token received in the message could not be used to unmarshal a transaction. It may be invalid or corrupt.. + /// + internal static string InvalidPropagationToken { + get { + return ResourceManager.GetString("InvalidPropagationToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The QName is invalid.. + /// + internal static string InvalidQName { + get { + return ResourceManager.GetString("InvalidQName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The XmlReader used for the body of the message must be positioned on an element.. + /// + internal static string InvalidReaderPositionOnCreateMessage { + get { + return ResourceManager.GetString("InvalidReaderPositionOnCreateMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The context identifier element in the registration header is invalid.. + /// + internal static string InvalidRegistrationHeaderIdentifier { + get { + return ResourceManager.GetString("InvalidRegistrationHeaderIdentifier", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The token identifier element in the registration header is invalid.. + /// + internal static string InvalidRegistrationHeaderTokenId { + get { + return ResourceManager.GetString("InvalidRegistrationHeaderTokenId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction identifier element in the registration header is invalid. + /// + internal static string InvalidRegistrationHeaderTransactionId { + get { + return ResourceManager.GetString("InvalidRegistrationHeaderTransactionId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A security session renew response was received with an invalid action '{0}'.. + /// + internal static string InvalidRenewResponseAction { + get { + return ResourceManager.GetString("InvalidRenewResponseAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request for security token has invalid or malformed elements.. + /// + internal static string InvalidRequestTrustFaultCode { + get { + return ResourceManager.GetString("InvalidRequestTrustFaultCode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specified PeerResolverMode value {0} is invalid. Please specify either PeerResolveMode.Auto, Default, or Pnrp.. + /// + internal static string InvalidResolverMode { + get { + return ResourceManager.GetString("InvalidResolverMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RoleProvider {0} specified in the configuration is invalid. No such provider was found registered under system.web/roleManager/providers.. + /// + internal static string InvalidRoleProviderSpecifiedInConfig { + get { + return ResourceManager.GetString("InvalidRoleProviderSpecifiedInConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RequestSecurityToken has an invalid or unspecified RequestType '{0}'.. + /// + internal static string InvalidRstRequestType { + get { + return ResourceManager.GetString("InvalidRstRequestType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SecurityContextSecurityToken has an invalid Cookie. The following error occurred when processing the Cookie: '{0}'.. + /// + internal static string InvalidSecurityContextCookie { + get { + return ResourceManager.GetString("InvalidSecurityContextCookie", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred when verifying security for the message.. + /// + internal static string InvalidSecurityFaultReason { + get { + return ResourceManager.GetString("InvalidSecurityFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred when processing the security tokens in the message.. + /// + internal static string InvalidSecurityTokenFaultReason { + get { + return ResourceManager.GetString("InvalidSecurityTokenFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A message was received with a sequence number of {0}. Sequence numbers cannot be less than 1. The reliable session was faulted.. + /// + internal static string InvalidSequenceNumber { + get { + return ResourceManager.GetString("InvalidSequenceNumber", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An acknowledgement range starting at {0} and ending at {1} was received. This is an invalid acknowledgement range. The reliable session was faulted.. + /// + internal static string InvalidSequenceRange { + get { + return ResourceManager.GetString("InvalidSequenceRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The hour can't be lower than 0 or greater than 23.. + /// + internal static string InvalidSkipHours { + get { + return ResourceManager.GetString("InvalidSkipHours", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Security Support Provider Interface (SSPI) negotiation failed.. + /// + internal static string InvalidSspiNegotiation { + get { + return ResourceManager.GetString("InvalidSspiNegotiation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The token provider of type '{0}' did not return a token of type '{1}'. Check the credential configuration.. + /// + internal static string InvalidTokenProvided { + get { + return ResourceManager.GetString("InvalidTokenProvided", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided URI scheme '{0}' is invalid; expected '{1}'.. + /// + internal static string InvalidUriScheme { + get { + return ResourceManager.GetString("InvalidUriScheme", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Value '{0}' provided for '{1}' from namespace '{2}' is an invalid absolute URI.. + /// + internal static string InvalidUriValue { + get { + return ResourceManager.GetString("InvalidUriValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The interface with IID {0} cannot be exposed as a web service. + /// + internal static string InvalidWebServiceInterface { + get { + return ResourceManager.GetString("InvalidWebServiceInterface", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter named {0} of type {1} on method {2} of interface {3} cannot be serialized.. + /// + internal static string InvalidWebServiceParameter { + get { + return ResourceManager.GetString("InvalidWebServiceParameter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The return value of type {0} on method {1} of interface {2} cannot be serialized.. + /// + internal static string InvalidWebServiceReturnValue { + get { + return ResourceManager.GetString("InvalidWebServiceReturnValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The WS-AtomicTransaction extended information included in the OLE Transactions propagation token was invalid or corrupt.. + /// + internal static string InvalidWsatExtendedInfo { + get { + return ResourceManager.GetString("InvalidWsatExtendedInfo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified WSAT protocol version is invalid.. + /// + internal static string InvalidWsatProtocolVersion { + get { + return ResourceManager.GetString("InvalidWsatProtocolVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type {0} registered as a WSDL extension does not implement IWsdlImportExtension.. + /// + internal static string InvalidWsdlExtensionTypeInConfig { + get { + return ResourceManager.GetString("InvalidWsdlExtensionTypeInConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint responded to the {0} request with a response with action {1}. The response must be a {0}Response with action {2}. The channel could not be opened.. + /// + internal static string InvalidWsrmResponseChannelNotOpened { + get { + return ResourceManager.GetString("InvalidWsrmResponseChannelNotOpened", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint responded to the {0} request with a response with action {1}. The response must be a {0}Response with action {2}. The channel was faulted.. + /// + internal static string InvalidWsrmResponseSessionFaultedExceptionString { + get { + return ResourceManager.GetString("InvalidWsrmResponseSessionFaultedExceptionString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} request's response was a message with action {1}. The response must be a {0}Response with action {2}. The reliable session cannot continue.. + /// + internal static string InvalidWsrmResponseSessionFaultedFaultString { + get { + return ResourceManager.GetString("InvalidWsrmResponseSessionFaultedFaultString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid binary representation of an X.509 certificate.. + /// + internal static string InvalidX509RawData { + get { + return ResourceManager.GetString("InvalidX509RawData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expected XML qualified name, found '{0}'.. + /// + internal static string InvalidXmlQualifiedName { + get { + return ResourceManager.GetString("InvalidXmlQualifiedName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The received transaction has an isolation level of '{0}' but the service is configured with a TransactionIsolationLevel of '{1}'. The isolation level for received transactions and the service must be the same.. + /// + internal static string IsolationLevelMismatch2 { + get { + return ResourceManager.GetString("IsolationLevelMismatch2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding ('{0}', '{1}') has been configured with a security algorithm suite '{2}' that is incompatible with the issued token key size '{3}' specified on the binding.. + /// + internal static string IssuedKeySizeNotCompatibleWithAlgorithmSuite { + get { + return ResourceManager.GetString("IssuedKeySizeNotCompatibleWithAlgorithmSuite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security token parameters to use for the issued token are not set on '{0}'.. + /// + internal static string IssuedSecurityTokenParametersNotSet { + get { + return ResourceManager.GetString("IssuedSecurityTokenParametersNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The IssuedToken security authentication mode requires the issued token to contain a symmetric key.. + /// + internal static string IssuedTokenAuthenticationModeRequiresSymmetricIssuedKey { + get { + return ResourceManager.GetString("IssuedTokenAuthenticationModeRequiresSymmetricIssuedKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The issued token cache was not specified on '{0}'.. + /// + internal static string IssuedTokenCacheNotSet { + get { + return ResourceManager.GetString("IssuedTokenCacheNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service does not accept issued tokens.. + /// + internal static string IssuedTokenFlowNotAllowed { + get { + return ResourceManager.GetString("IssuedTokenFlowNotAllowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The key length '{0}' is not a multiple of 8 for symmetric keys.. + /// + internal static string IssuerBindingNotPresentInTokenRequirement { + get { + return ResourceManager.GetString("IssuerBindingNotPresentInTokenRequirement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The context for building the issuer channel was not specified on '{0}'.. + /// + internal static string IssuerBuildContextNotSet { + get { + return ResourceManager.GetString("IssuerBuildContextNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The channel behaviors configured for the issuer address '{0}' cannot contain a behavior of type '{1}'.. + /// + internal static string IssuerChannelBehaviorsCannotContainSecurityCredentialsManager { + get { + return ResourceManager.GetString("IssuerChannelBehaviorsCannotContainSecurityCredentialsManager", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no handler registered for session token issuance event.. + /// + internal static string IssueSessionTokenHandlerNotSet { + get { + return ResourceManager.GetString("IssueSessionTokenHandlerNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The item's authors were not serialized as part of serializing the feed in RSS 2.0 format.. + /// + internal static string ItemAuthorsIgnoredOnWrite { + get { + return ResourceManager.GetString("ItemAuthorsIgnoredOnWrite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is only available in a deserialized RequestSecurityToken.. + /// + internal static string ItemAvailableInDeserializedRSTOnly { + get { + return ResourceManager.GetString("ItemAvailableInDeserializedRSTOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is only available in a deserialized RequestSecurityTokenResponse.. + /// + internal static string ItemAvailableInDeserializedRSTROnly { + get { + return ResourceManager.GetString("ItemAvailableInDeserializedRSTROnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The item's content was not serialized as part of serializing the feed in RSS 2.0 format.. + /// + internal static string ItemContentIgnoredOnWrite { + get { + return ResourceManager.GetString("ItemContentIgnoredOnWrite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The item's contributors were not serialized as part of serializing the feed in RSS 2.0 format.. + /// + internal static string ItemContributorsIgnoredOnWrite { + get { + return ResourceManager.GetString("ItemContributorsIgnoredOnWrite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The item's copyrights were not serialized as part of serializing the feed in RSS 2.0 format.. + /// + internal static string ItemCopyrightIgnoredOnWrite { + get { + return ResourceManager.GetString("ItemCopyrightIgnoredOnWrite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The item created a null category.. + /// + internal static string ItemCreatedNullCategory { + get { + return ResourceManager.GetString("ItemCreatedNullCategory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The item created a null person.. + /// + internal static string ItemCreatedNullPerson { + get { + return ResourceManager.GetString("ItemCreatedNullPerson", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Item does not exist in SynchronizedKeyedCollection.. + /// + internal static string ItemDoesNotExistInSynchronizedKeyedCollection0 { + get { + return ResourceManager.GetString("ItemDoesNotExistInSynchronizedKeyedCollection0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The syndication item formatter must be configured with a syndication item.. + /// + internal static string ItemFormatterDoesNotHaveItem { + get { + return ResourceManager.GetString("ItemFormatterDoesNotHaveItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The item's last updated time was not serialized as part of serializing the feed in RSS 2.0 format.. + /// + internal static string ItemLastUpdatedTimeIgnoredOnWrite { + get { + return ResourceManager.GetString("ItemLastUpdatedTimeIgnoredOnWrite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The item's links were not serialized as part of serializing the feed in RSS 2.0 format.. + /// + internal static string ItemLinksIgnoredOnWrite { + get { + return ResourceManager.GetString("ItemLinksIgnoredOnWrite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is not available in deserialized RequestSecurityToken.. + /// + internal static string ItemNotAvailableInDeserializedRST { + get { + return ResourceManager.GetString("ItemNotAvailableInDeserializedRST", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is not available in deserialized RequestSecurityTokenResponse.. + /// + internal static string ItemNotAvailableInDeserializedRSTR { + get { + return ResourceManager.GetString("ItemNotAvailableInDeserializedRSTR", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No value found for a keyword.. + /// + internal static string KewordMissingValue { + get { + return ResourceManager.GetString("KewordMissingValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Key length '{0}' is not a multiple of 8 for symmetric keys.. + /// + internal static string KeyLengthMustBeMultipleOfEight { + get { + return ResourceManager.GetString("KeyLengthMustBeMultipleOfEight", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The key effective and expiration times must be bounded by the token effective and expiration times.. + /// + internal static string KeyLifetimeNotWithinTokenLifetime { + get { + return ResourceManager.GetString("KeyLifetimeNotWithinTokenLifetime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The key rollover interval cannot be greater than the key renewal interval.. + /// + internal static string KeyRolloverGreaterThanKeyRenewal { + get { + return ResourceManager.GetString("KeyRolloverGreaterThanKeyRenewal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A message was received with a sequence number higher than the sequence number of the last message in this sequence. This is a violation of the sequence number protocol. The reliable session was faulted.. + /// + internal static string LastMessageNumberExceeded { + get { + return ResourceManager.GetString("LastMessageNumberExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value for wsrm:MessageNumber exceeds the value of the MessageNumber accompanying a LastMessage element in this Sequence.. + /// + internal static string LastMessageNumberExceededFaultReason { + get { + return ResourceManager.GetString("LastMessageNumberExceededFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The callback address already has a context header in it.. + /// + internal static string ListenAddressAlreadyContainsContext { + get { + return ResourceManager.GetString("ListenAddressAlreadyContainsContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified channel listener at '{0}' is not registered with this transport manager.. + /// + internal static string ListenerFactoryNotRegistered { + get { + return ResourceManager.GetString("ListenerFactoryNotRegistered", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A listen URI must be specified in order to open this {0}.. + /// + internal static string ListenUriNotSet { + get { + return ResourceManager.GetString("ListenUriNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal SSL error (refer to Win32 status code for details). Check the server certificate to determine if it is capable of key exchange.. + /// + internal static string LsaAuthorityNotContacted { + get { + return ResourceManager.GetString("LsaAuthorityNotContacted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed because the TransportBindingElement's ManualAddressing property was set to true on a binding that is configured to create reliable sessions. This combination is not supported and the channel factory or service host was not opened.. + /// + internal static string ManualAddressingNotSupported { + get { + return ResourceManager.GetString("ManualAddressingNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Manual addressing is enabled on this factory, so all messages sent must be pre-addressed.. + /// + internal static string ManualAddressingRequiresAddressedMessages { + get { + return ResourceManager.GetString("ManualAddressingRequiresAddressedMessages", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to For TransferMode.Buffered, MaxReceivedMessageSize and MaxBufferSize must be the same value.. + /// + internal static string MaxBufferSizeMustMatchMaxReceivedMessageSize { + get { + return ResourceManager.GetString("MaxBufferSizeMustMatchMaxReceivedMessageSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MaxBufferSize must not exceed MaxReceivedMessageSize.. + /// + internal static string MaxBufferSizeMustNotExceedMaxReceivedMessageSize { + get { + return ResourceManager.GetString("MaxBufferSizeMustNotExceedMaxReceivedMessageSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The recursive policy fetching limit has been reached. Check to determine if there is a loop in the federation service chain.. + /// + internal static string MaximumPolicyRedirectionsExceeded { + get { + return ResourceManager.GetString("MaximumPolicyRedirectionsExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The maximum retry count has been exceeded with no response from the remote endpoint. The reliable session was faulted. This is often an indication that the remote endpoint is no longer available.. + /// + internal static string MaximumRetryCountExceeded { + get { + return ResourceManager.GetString("MaximumRetryCountExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The maximum message size quota for incoming messages ({0}) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.. + /// + internal static string MaxReceivedMessageSizeExceeded { + get { + return ResourceManager.GetString("MaxReceivedMessageSizeExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This factory buffers messages, so the message sizes must be in the range of an integer value.. + /// + internal static string MaxReceivedMessageSizeMustBeInIntegerRange { + get { + return ResourceManager.GetString("MaxReceivedMessageSizeMustBeInIntegerRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The maximum message size quota for outgoing messages ({0}) has been exceeded.. + /// + internal static string MaxSentMessageSizeExceeded { + get { + return ResourceManager.GetString("MaxSentMessageSizeExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ... stream .... + /// + internal static string MessageBodyIsStream { + get { + return ResourceManager.GetString("MessageBodyIsStream", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .... + /// + internal static string MessageBodyIsUnknown { + get { + return ResourceManager.GetString("MessageBodyIsUnknown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A body element was not found inside the message envelope.. + /// + internal static string MessageBodyMissing { + get { + return ResourceManager.GetString("MessageBodyMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation '{0}' is not valid in message body state '{1}'.. + /// + internal static string MessageBodyOperationNotValidInBodyState { + get { + return ResourceManager.GetString("MessageBodyOperationNotValidInBodyState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The body reader is in ReadState '{0}' and cannot be consumed.. + /// + internal static string MessageBodyReaderInvalidReadState { + get { + return ResourceManager.GetString("MessageBodyReaderInvalidReadState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ... Error reading body: {0}: {1} .... + /// + internal static string MessageBodyToStringError { + get { + return ResourceManager.GetString("MessageBodyToStringError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MessageBuffer is closed.. + /// + internal static string MessageBufferIsClosed { + get { + return ResourceManager.GetString("MessageBufferIsClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message is closed.. + /// + internal static string MessageClosed { + get { + return ResourceManager.GetString("MessageClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A problem occurred while reading a message. See inner exception for details.. + /// + internal static string MessageExceptionOccurred { + get { + return ResourceManager.GetString("MessageExceptionOccurred", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This message cannot support the operation because it has been copied.. + /// + internal static string MessageHasBeenCopied { + get { + return ResourceManager.GetString("MessageHasBeenCopied", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This message cannot support the operation because it has been read.. + /// + internal static string MessageHasBeenRead { + get { + return ResourceManager.GetString("MessageHasBeenRead", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This message cannot support the operation because it has been written.. + /// + internal static string MessageHasBeenWritten { + get { + return ResourceManager.GetString("MessageHasBeenWritten", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value of the addressHeaders argument is invalid because the collection contains null values. Null is not a valid value for the AddressHeaderCollection.. + /// + internal static string MessageHeaderIsNull0 { + get { + return ResourceManager.GetString("MessageHeaderIsNull0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The version of the header(s) ({0}) differs from the version of the message ({1}).. + /// + internal static string MessageHeaderVersionMismatch { + get { + return ResourceManager.GetString("MessageHeaderVersionMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' header cannot be added because it does not support the specified message version '{1}'.. + /// + internal static string MessageHeaderVersionNotSupported { + get { + return ResourceManager.GetString("MessageHeaderVersionNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The body of the message cannot be read because it is empty.. + /// + internal static string MessageIsEmpty { + get { + return ResourceManager.GetString("MessageIsEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to For sending a message on server side composite duplex channels, the message must have either the 'Via' property or the 'To' header set.. + /// + internal static string MessageMustHaveViaOrToSetForSendingOnServerSideCompositeDuplexChannels { + get { + return ResourceManager.GetString("MessageMustHaveViaOrToSetForSendingOnServerSideCompositeDuplexChannels", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message with id {0} was not in a locked state.. + /// + internal static string MessageNotInLockedState { + get { + return ResourceManager.GetString("MessageNotInLockedState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The maximum message number for this sequence has been exceeded. The reliable session was faulted.. + /// + internal static string MessageNumberRollover { + get { + return ResourceManager.GetString("MessageNumberRollover", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The maximum value for wsrm:MessageNumber has been exceeded.. + /// + internal static string MessageNumberRolloverFaultReason { + get { + return ResourceManager.GetString("MessageNumberRolloverFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message part specification must be made constant before being set.. + /// + internal static string MessagePartSpecificationMustBeImmutable { + get { + return ResourceManager.GetString("MessagePartSpecificationMustBeImmutable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MessagePropagationFilter threw an exception. Please refer to InnerException.. + /// + internal static string MessagePropagationException { + get { + return ResourceManager.GetString("MessagePropagationException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The array passed does not have enough space to hold all the properties contained by this collection.. + /// + internal static string MessagePropertiesArraySize0 { + get { + return ResourceManager.GetString("MessagePropertiesArraySize0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A property with the name '{0}' is not present.. + /// + internal static string MessagePropertyNotFound { + get { + return ResourceManager.GetString("MessagePropertyNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The IMessageProperty could not be copied. CreateCopy returned null.. + /// + internal static string MessagePropertyReturnedNullCopy { + get { + return ResourceManager.GetString("MessagePropertyReturnedNullCopy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The received message does not meet the required message protection order '{0}'.. + /// + internal static string MessageProtectionOrderMismatch { + get { + return ResourceManager.GetString("MessageProtectionOrderMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Manual addressing is not supported with message level security. Configure the binding ('{0}', '{1}') to use transport security or to not do manual addressing.. + /// + internal static string MessageSecurityDoesNotWorkWithManualAddressing { + get { + return ResourceManager.GetString("MessageSecurityDoesNotWorkWithManualAddressing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message security verification failed.. + /// + internal static string MessageSecurityVerificationFailed { + get { + return ResourceManager.GetString("MessageSecurityVerificationFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SecurityVersion must be WsSecurity10 or WsSecurity11.. + /// + internal static string MessageSecurityVersionOutOfRange { + get { + return ResourceManager.GetString("MessageSecurityVersionOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This Factory buffers messages, so the message sizes must be in the range of a int value.. + /// + internal static string MessageSizeMustBeInIntegerRange { + get { + return ResourceManager.GetString("MessageSizeMustBeInIntegerRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The text encoding '{0}' used in the text message format is not supported.. + /// + internal static string MessageTextEncodingNotSupported { + get { + return ResourceManager.GetString("MessageTextEncodingNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The 'To' header on the message is set to Anonymous Uri '{0}'. Please set the 'To' header to a non-anonymous address as message cannot be addressed to anonymous Uri on server side composite duplex channels.. + /// + internal static string MessageToCannotBeAddressedToAnonymousOnServerSideCompositeDuplexChannels { + get { + return ResourceManager.GetString("MessageToCannotBeAddressedToAnonymousOnServerSideCompositeDuplexChannels", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Validity of message with id {0} has expired.. + /// + internal static string MessageValidityExpired { + get { + return ResourceManager.GetString("MessageValidityExpired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to None of the binding elements in binding '{0}' define a message version. At least one binding element must define a message version and return it from the GetProperty<MessageVersion> method.. + /// + internal static string MessageVersionMissingFromBinding { + get { + return ResourceManager.GetString("MessageVersionMissingFromBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Support for {0} and {1} can not be enabled with {2} when the {3} of the {4} is '{5}'. Ensure the {4} used with the binding has a {3} of '{6}'. . + /// + internal static string MessageVersionNoneRequiredForHttpMessageSupport { + get { + return ResourceManager.GetString("MessageVersionNoneRequiredForHttpMessageSupport", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} {1}. + /// + internal static string MessageVersionToStringFormat { + get { + return ResourceManager.GetString("MessageVersionToStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unrecognized message version.. + /// + internal static string MessageVersionUnknown { + get { + return ResourceManager.GetString("MessageVersionUnknown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The 'Via' property on the message is set to Anonymous Uri '{0}'. Please set the 'Via' property to a non-anonymous address as message cannot be addressed to anonymous Uri on server side composite duplex channels.. + /// + internal static string MessageViaCannotBeAddressedToAnonymousOnServerSideCompositeDuplexChannels { + get { + return ResourceManager.GetString("MessageViaCannotBeAddressedToAnonymousOnServerSideCompositeDuplexChannels", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message is not encrypted with a key derived from the encryption token. The binding's token parameter '{0}' requires key derivation.. + /// + internal static string MessageWasNotEncryptedByDerivedEncryptionToken { + get { + return ResourceManager.GetString("MessageWasNotEncryptedByDerivedEncryptionToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message is not encrypted with a key derived from the encrypted key. The binding's token parameter '{0}' requires key derivation.. + /// + internal static string MessageWasNotEncryptedByDerivedWrappedKey { + get { + return ResourceManager.GetString("MessageWasNotEncryptedByDerivedWrappedKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message was not encrypted with the required encryption token.. + /// + internal static string MessageWasNotEncryptedWithTheRequiredEncryptingToken { + get { + return ResourceManager.GetString("MessageWasNotEncryptedWithTheRequiredEncryptingToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is a problem with the XML that was received from the network. See inner exception for more details.. + /// + internal static string MessageXmlProtocolError { + get { + return ResourceManager.GetString("MessageXmlProtocolError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Method {0} given in config was not found on interface {1}.. + /// + internal static string MethodGivenInConfigNotFoundOnInterface { + get { + return ResourceManager.GetString("MethodGivenInConfigNotFoundOnInterface", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding '{0}' was not found in config. The config file must be present and contain a binding matching the one specified in the moniker.. + /// + internal static string MexBindingNotFoundInConfig { + get { + return ResourceManager.GetString("MexBindingNotFoundInConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} assertion's Milliseconds attribute does not fall within the range this binding uses. The ReliableSessionBindingElement could not be created.. + /// + internal static string MillisecondsNotConvertibleToBindingRange { + get { + return ResourceManager.GetString("MillisecondsNotConvertibleToBindingRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The incoming message was signed with a token which was different from what used to encrypt the body. This was not expected.. + /// + internal static string MismatchInSecurityOperationToken { + get { + return ResourceManager.GetString("MismatchInSecurityOperationToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The receiver returned an error indicating that the content type was missing on the request to {0}. See the inner exception for more information.. + /// + internal static string MissingContentType { + get { + return ResourceManager.GetString("MissingContentType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to X509CertificateValidationMode.Custom requires a CustomCertificateValidator. Specify the CustomCertificateValidator property.. + /// + internal static string MissingCustomCertificateValidator { + get { + return ResourceManager.GetString("MissingCustomCertificateValidator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UserNamePasswordValidationMode.Custom requires a CustomUserNamePasswordValidator. Specify the CustomUserNamePasswordValidator property.. + /// + internal static string MissingCustomUserNamePasswordValidator { + get { + return ResourceManager.GetString("MissingCustomUserNamePasswordValidator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint did not include a final acknowledgement in the reply to the close sequence request message. This is a violation of the WS-ReliableMessaging protocol. The reliable session was faulted.. + /// + internal static string MissingFinalAckExceptionString { + get { + return ResourceManager.GetString("MissingFinalAckExceptionString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Id is missing in encrypted item in security header.. + /// + internal static string MissingIdInEncryptedElement { + get { + return ResourceManager.GetString("MissingIdInEncryptedElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The KeyInfo clause is missing or empty in EncryptedKey.. + /// + internal static string MissingKeyInfoInEncryptedKey { + get { + return ResourceManager.GetString("MissingKeyInfoInEncryptedKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UserNamePasswordValidationMode.MembershipProvider requires a MembershipProvider. Specify the MembershipProvider property.. + /// + internal static string MissingMembershipProvider { + get { + return ResourceManager.GetString("MissingMembershipProvider", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Request Message is missing a MessageID header. One is required to correlate a reply.. + /// + internal static string MissingMessageID { + get { + return ResourceManager.GetString("MissingMessageID", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The wsa:MessageId header must be present on a wsrm:{0} message.. + /// + internal static string MissingMessageIdOnWsrmRequest { + get { + return ResourceManager.GetString("MissingMessageIdOnWsrmRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Missing Quote in value {0}.. + /// + internal static string MissingQuote { + get { + return ResourceManager.GetString("MissingQuote", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The returned wsrm:{0}Response message was missing the required wsa:RelatesTo header. This is a violation of the WS-Addressing request reply protocol. The reliable session was faulted.. + /// + internal static string MissingRelatesToOnWsrmResponseReason { + get { + return ResourceManager.GetString("MissingRelatesToOnWsrmResponseReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The wsa:ReplyTo header must be present on a wsrm:{0} message.. + /// + internal static string MissingReplyToOnWsrmRequest { + get { + return ResourceManager.GetString("MissingReplyToOnWsrmRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Address not specified.. + /// + internal static string MonikerAddressNotSpecified { + get { + return ResourceManager.GetString("MonikerAddressNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding namespace not specified.. + /// + internal static string MonikerBindingNamespacetNotSpecified { + get { + return ResourceManager.GetString("MonikerBindingNamespacetNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding not specified.. + /// + internal static string MonikerBindingNotSpecified { + get { + return ResourceManager.GetString("MonikerBindingNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to None of the contract in metadata matched the contract specified.. + /// + internal static string MonikerContractNotFoundInRetreivedMex { + get { + return ResourceManager.GetString("MonikerContractNotFoundInRetreivedMex", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Contract not specified.. + /// + internal static string MonikerContractNotSpecified { + get { + return ResourceManager.GetString("MonikerContractNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to do mex retrieval:{0}.. + /// + internal static string MonikerFailedToDoMexRetrieve { + get { + return ResourceManager.GetString("MonikerFailedToDoMexRetrieve", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid serializer specified. The only valid values are 'xml' and 'datacontract'.. + /// + internal static string MonikerIncorectSerializer { + get { + return ResourceManager.GetString("MonikerIncorectSerializer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple server identity keywords were specified. Ensure that at most one identity keyword is specified.. + /// + internal static string MonikerIncorrectServerIdentity { + get { + return ResourceManager.GetString("MonikerIncorrectServerIdentity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Only one type of server identity can be specified.. + /// + internal static string MonikerIncorrectServerIdentityForMex { + get { + return ResourceManager.GetString("MonikerIncorrectServerIdentityForMex", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mex address not specified.. + /// + internal static string MonikerMexAddressNotSpecified { + get { + return ResourceManager.GetString("MonikerMexAddressNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mex binding section name attribute not specified.. + /// + internal static string MonikerMexBindingSectionNameNotSpecified { + get { + return ResourceManager.GetString("MonikerMexBindingSectionNameNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Moniker Missing Colon. + /// + internal static string MonikerMissingColon { + get { + return ResourceManager.GetString("MonikerMissingColon", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The contract does not have an endpoint supporting the binding specified.. + /// + internal static string MonikerNoneOfTheBindingMatchedTheSpecifiedBinding { + get { + return ResourceManager.GetString("MonikerNoneOfTheBindingMatchedTheSpecifiedBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OperationContract method '{0}' in type '{1}' does not properly implement the async pattern, as more than one corresponding method '{2}' was found. When using the async pattern, exactly one end method must be provided. Either remove or rename one or more of the '{2}' methods such that there is just one, or set the AsyncPattern property on method '{0}' to false.. + /// + internal static string MoreThanOneEndMethodFoundForAsyncBeginMethod3 { + get { + return ResourceManager.GetString("MoreThanOneEndMethodFoundForAsyncBeginMethod3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RequestSecurityTokenResponseCollection received has more than one RequestSecurityTokenResponse element. Only one RequestSecurityTokenResponse element was expected.. + /// + internal static string MoreThanOneRSTRInRSTRC { + get { + return ResourceManager.GetString("MoreThanOneRSTRInRSTRC", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More than one SecurityBindingElement found in the binding ('{0}', '{1}) for contract ('{2}', '{3}'). Only one SecurityBindingElement is allowed. . + /// + internal static string MoreThanOneSecurityBindingElementInTheBinding { + get { + return ResourceManager.GetString("MoreThanOneSecurityBindingElementInTheBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More than one supporting signature was encountered using the same supporting token '{0}'.. + /// + internal static string MoreThanOneSupportingSignature { + get { + return ResourceManager.GetString("MoreThanOneSupportingSignature", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed. The client cannot send messages. A conflict in the binding properties caused this failure. The UseActiveDirectory is set to true and QueueTransferProtocol is set to Native. To resolve the conflict, correct one of the properties.. + /// + internal static string MsmqActiveDirectoryRequiresNativeTransfer { + get { + return ResourceManager.GetString("MsmqActiveDirectoryRequiresNativeTransfer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed because the binding's ReceiveErrorHandlig property is set to Move or Reject while the version of MSMQ installed on this system is not 4.0 or higher. The channel listener cannot be opened. Resolve the conflict by setting the ReceiveErrorHandling property to Drop or Fault, or by upgrading to MSMQ v4.0.. + /// + internal static string MsmqAdvancedPoisonHandlingRequired { + get { + return ResourceManager.GetString("MsmqAdvancedPoisonHandlingRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Ambient transaction used to Complete the ReceiveContext Operation is not in an active state. . + /// + internal static string MsmqAmbientTransactionInactive { + get { + return ResourceManager.GetString("MsmqAmbientTransactionInactive", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed because the binding's MsmqAuthenticationMode property is set to Certificate while the MsmqProtectionLevel property is not set to Sign or EncryptAndSign. The channel factory or service host cannot be opened. Resolve the conflict by correcting one of the properties.. + /// + internal static string MsmqAuthCertificateRequiresProtectionSign { + get { + return ResourceManager.GetString("MsmqAuthCertificateRequiresProtectionSign", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed. The service or the client cannot be started. A conflict in the binding properties caused this failure. The MsmqAuthenticationMode is set to None and MsmqProtectionLevel is not set to None. To resolve to conflict, correct one of the properties.. + /// + internal static string MsmqAuthNoneRequiresProtectionNone { + get { + return ResourceManager.GetString("MsmqAuthNoneRequiresProtectionNone", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed because the binding's MsmqAuthenticationMode property is set to WindowsDomain while the MsmqProtectionLevel property is not set to Sign or EncryptAndSign. The channel factory or service host cannot be opened. Resolve the conflict by correcting one of the properties.. + /// + internal static string MsmqAuthWindowsRequiresProtectionNotNone { + get { + return ResourceManager.GetString("MsmqAuthWindowsRequiresProtectionNotNone", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creation of a message security context failed because the attached sender certificate was invalid or cannot be validated. The message cannot be received. Ensure that a valid certificate is attached to the message and that the certificate is present in the receiver's certificate store.. + /// + internal static string MsmqBadCertificate { + get { + return ResourceManager.GetString("MsmqBadCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The content type of an incoming message is unknown or not supported. The message cannot be received. Ensure that the sender was configured to use the same message encoder as the receiver.. + /// + internal static string MsmqBadContentType { + get { + return ResourceManager.GetString("MsmqBadContentType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An incoming MSMQ message contained invalid or unexpected .NET Message Framing information in its body. The message cannot be received. Ensure that the sender is using a compatible service contract with a matching SessionMode.. + /// + internal static string MsmqBadFrame { + get { + return ResourceManager.GetString("MsmqBadFrame", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An XML error was encountered while reading a WCF message. The message cannot be received. Ensure the message was sent by a WCF client which used an identical message encoder.. + /// + internal static string MsmqBadXml { + get { + return ResourceManager.GetString("MsmqBadXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TransactedBatchingBehavior validation failed because none of the service operations had the TransactionScopeRequired property set to true on their OperationBehavior attribute. The service host cannot be started. Ensure this requirement is met if you wish to use this behavior.. + /// + internal static string MsmqBatchRequiresTransactionScope { + get { + return ResourceManager.GetString("MsmqBatchRequiresTransactionScope", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A mismatch was detected between the serialization format specified in the MsmqIntegrationMessageProperty and the body of the MSMQ message. The message cannot be sent. The serialization format ByteArray requires the body of the MSMQ message to be of type byte[].. + /// + internal static string MsmqByteArrayBodyExpected { + get { + return ResourceManager.GetString("MsmqByteArrayBodyExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while deserializing an MSMQ message's ActiveX body. The message cannot be received. The specified variant type for the body does not match the actual MSMQ message body.. + /// + internal static string MsmqCannotDeserializeActiveXMessage { + get { + return ResourceManager.GetString("MsmqCannotDeserializeActiveXMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while deserializing an MSMQ message's XML body. The message cannot be received. Ensure that the service contract is decorated with appropriate [ServiceKnownType] attributes or the TargetSerializationTypes property is set on the MsmqIntegrationBindingElement.. + /// + internal static string MsmqCannotDeserializeXmlMessage { + get { + return ResourceManager.GetString("MsmqCannotDeserializeXmlMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to reacquire lock for message. . + /// + internal static string MsmqCannotReacquireLock { + get { + return ResourceManager.GetString("MsmqCannotReacquireLock", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The properties of the message are mismatched. The message cannot be sent. The BodyType message property cannot be specified if the ActiveX serialization format is used.. + /// + internal static string MsmqCannotUseBodyTypeWithActiveXSerialization { + get { + return ResourceManager.GetString("MsmqCannotUseBodyTypeWithActiveXSerialization", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The sender's X.509 certificate was not found. The message cannot be sent. Ensure the certificate is available in the sender's certificate store.. + /// + internal static string MsmqCertificateNotFound { + get { + return ResourceManager.GetString("MsmqCertificateNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed. The client cannot send the message. The DeadLetterQueue is set to Custom, but the CustomDeadLetterQueue is not specified. Specify the URI of the dead letter queue for each application in the CustomDeadLetterQueue property.. + /// + internal static string MsmqCustomRequiresPerAppDLQ { + get { + return ResourceManager.GetString("MsmqCustomRequiresPerAppDLQ", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error was encountered while deserializing the message. The message cannot be received.. + /// + internal static string MsmqDeserializationError { + get { + return ResourceManager.GetString("MsmqDeserializationError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed because the endpoint listen URI does not represent an MSMQ direct format name. The service host cannot be opened. Make sure you use a direct format name for the endpoint's listen URI.. + /// + internal static string MsmqDirectFormatNameRequiredForPoison { + get { + return ResourceManager.GetString("MsmqDirectFormatNameRequiredForPoison", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The host in the CustomDeadLetterQueue URI is not "localhost" or the local machine name. A custom DLQ must reside on the sender's machine.. + /// + internal static string MsmqDLQNotLocal { + get { + return ResourceManager.GetString("MsmqDLQNotLocal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed. The client cannot send a message. The specified dead letter queue does not exist or cannot be written. Ensure the queue exists with the proper authorization to write to it.. + /// + internal static string MsmqDLQNotWriteable { + get { + return ResourceManager.GetString("MsmqDLQNotWriteable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed because the binding's MsmqProtectionLevel property is set to EncryptAndSign while the UseActiveDirectory is not set to true. The channel factory or the service host cannot be opened. Resolve the conflict by correcting one of the properties.. + /// + internal static string MsmqEncryptRequiresUseAD { + get { + return ResourceManager.GetString("MsmqEncryptRequiresUseAD", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed. The service or the client cannot be started. The ExactlyOnce property is set to false and ReceiveContext is enabled. This is not supported. To resolve the conflict, either set ExactlyOnce to true or disable ReceiveContext.. + /// + internal static string MsmqExactlyOnceNeededForReceiveContext { + get { + return ResourceManager.GetString("MsmqExactlyOnceNeededForReceiveContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The version check failed with the error: '{0}'. The version of MSMQ cannot be detected All operations that are on the queued channel will fail. Ensure that MSMQ is installed and is available.. + /// + internal static string MsmqGetPrivateComputerInformationError { + get { + return ResourceManager.GetString("MsmqGetPrivateComputerInformationError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message ID '{0}' is not in the right format.. + /// + internal static string MsmqInvalidMessageId { + get { + return ResourceManager.GetString("MsmqInvalidMessageId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified addressing scheme is invalid for this binding. The NetMsmqBinding scheme must be net.msmq. The MsmqIntegrationBinding scheme must be msmq.formatname.. + /// + internal static string MsmqInvalidScheme { + get { + return ResourceManager.GetString("MsmqInvalidScheme", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MsmqIntegrationBinding validation failed. The service cannot be started. The {0} binding does not support the method signature for the service operation {1} in the {2} contract. Correct the service operation to use the MsmqIntegrationBinding.. + /// + internal static string MsmqInvalidServiceOperationForMsmqIntegrationBinding { + get { + return ResourceManager.GetString("MsmqInvalidServiceOperationForMsmqIntegrationBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ActiveX serialization failed because the serialization format cannot be recognized. The message cannot be received.. + /// + internal static string MsmqInvalidTypeDeserialization { + get { + return ResourceManager.GetString("MsmqInvalidTypeDeserialization", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The variant type is not recognized. The ActiveX serialization failed. The message cannot be sent. The specified variant type is not supported.. + /// + internal static string MsmqInvalidTypeSerialization { + get { + return ResourceManager.GetString("MsmqInvalidTypeSerialization", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} ({1}, 0x{2}). + /// + internal static string MsmqKnownWin32Error { + get { + return ResourceManager.GetString("MsmqKnownWin32Error", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message cannot be sent because it's missing an MsmqIntegrationMessageProperty. All messages sent over MSMQ integration channels must carry the MsmqIntegrationMessageProperty.. + /// + internal static string MsmqMessageDoesntHaveIntegrationProperty { + get { + return ResourceManager.GetString("MsmqMessageDoesntHaveIntegrationProperty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed. The service or the client cannot be started. The ExactlyOnce property is set to true and the Durable property is set to false. This is not supported. To resolve the conflict, correct one of these properties.. + /// + internal static string MsmqNoAssurancesForVolatile { + get { + return ResourceManager.GetString("MsmqNoAssurancesForVolatile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed because the URI represents a subqueue and the ReceiveErrorHandling parameter is set to Move. The service host or channel listener cannot be opened. Resolve this conflict by setting the ReceiveErrorHandling to Fault, Drop or Reject.. + /// + internal static string MsmqNoMoveForSubqueues { + get { + return ResourceManager.GetString("MsmqNoMoveForSubqueues", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Argument must be a positive number or zero.. + /// + internal static string MsmqNonNegativeArgumentExpected { + get { + return ResourceManager.GetString("MsmqNonNegativeArgumentExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A mismatch between the binding and MSMQ queue configuration was detected. The service cannot be started. The ExactlyOnce property is set to false and the queue to read messages from is a transactional queue, Correct the error by setting the ExactlyOnce property to true or create a non-transactional binding.. + /// + internal static string MsmqNonTransactionalQueueNeeded { + get { + return ResourceManager.GetString("MsmqNonTransactionalQueueNeeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creation of a message security context failed because the sender's SID was not found in the message. The message cannot be received. The WindowsDomain MsmqAuthenticationMode requires the sender's SID.. + /// + internal static string MsmqNoSid { + get { + return ResourceManager.GetString("MsmqNoSid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while opening the queue:{0}. The message cannot be sent or received from the queue. Ensure that MSMQ is installed and running. Also ensure that the queue is available to open with the required access mode and authorization.. + /// + internal static string MsmqOpenError { + get { + return ResourceManager.GetString("MsmqOpenError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred when converting the '{0}' queue path name to the format name: {1}. All operations on the queued channel failed. Ensure that the queue address is valid. MSMQ must be installed with Active Directory integration enabled and access to it is available.. + /// + internal static string MsmqPathLookupError { + get { + return ResourceManager.GetString("MsmqPathLookupError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed. The client cannot send messages. The CustomDeadLetterQueue property is set, but the DeadLetterQueue property is not set to Custom. Set the DeadLetterQueue property to Custom.. + /// + internal static string MsmqPerAppDLQRequiresCustom { + get { + return ResourceManager.GetString("MsmqPerAppDLQRequiresCustom", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed. The client cannot send messages. A conflict in the binding properties is causing the failure. To use the custom dead letter queue, ExactlyOnce must be set to true to resolve to conflict.. + /// + internal static string MsmqPerAppDLQRequiresExactlyOnce { + get { + return ResourceManager.GetString("MsmqPerAppDLQRequiresExactlyOnce", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A mismatch between the binding and MSMQ configuration was detected. The client cannot send messages. To use the custom dead letter queue, you must have MSMQ version 4.0 or higher. If you do not have MSMQ version 4.0 or higher set the DeadLetterQueue property to System or None. . + /// + internal static string MsmqPerAppDLQRequiresMsmq4 { + get { + return ResourceManager.GetString("MsmqPerAppDLQRequiresMsmq4", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transport channel detected a poison message. This occurred because the message exceeded the maximum number of delivery attempts or because the channel detected a fundamental problem with the message. The inner exception may contain additional information.. + /// + internal static string MsmqPoisonMessage { + get { + return ResourceManager.GetString("MsmqPoisonMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error opening the queue. Ensure that MSMQ is installed and running, the queue exists and has proper authorization to be read from. The inner exception may contain additional information.. + /// + internal static string MsmqQueueNotReadable { + get { + return ResourceManager.GetString("MsmqQueueNotReadable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ReceiveContext unlock operation failed because the message with Id '{0}' could not be moved from the lock subqueue to the main queue.. + /// + internal static string MsmqReceiveContextMessageNotMoved { + get { + return ResourceManager.GetString("MsmqReceiveContextMessageNotMoved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ReceiveContext delete operation failed because the message with Id '{0}' could not be received from the lock subqueue. . + /// + internal static string MsmqReceiveContextMessageNotReceived { + get { + return ResourceManager.GetString("MsmqReceiveContextMessageNotReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The queue could not be opened because the ReceiveContext feature is not supported on subqueues. Specify a different queue to receive from, or disable ReceiveContext.. + /// + internal static string MsmqReceiveContextSubqueuesNotSupported { + get { + return ResourceManager.GetString("MsmqReceiveContextSubqueuesNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while receiving a message from the queue: {0}. Ensure that MSMQ is installed and running. Make sure the queue is available to receive from.. + /// + internal static string MsmqReceiveError { + get { + return ResourceManager.GetString("MsmqReceiveError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A transaction error occurred for this session. The session channel is faulted. Messages in the session cannot be sent or received. A queued session cannot be associated with more than one transaction. Ensure that all messages in the session are sent or received using a single transaction.. + /// + internal static string MsmqSameTransactionExpected { + get { + return ResourceManager.GetString("MsmqSameTransactionExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while sending to the queue: {0}.Ensure that MSMQ is installed and running. If you are sending to a local queue, ensure the queue exists with the required access mode and authorization.. + /// + internal static string MsmqSendError { + get { + return ResourceManager.GetString("MsmqSendError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A serialization error occurred. The message cannot be sent or received. The MSMQ integration channel is able to serialize no more than {0} types.. + /// + internal static string MsmqSerializationTableFull { + get { + return ResourceManager.GetString("MsmqSerializationTableFull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction associated with this session channel has been rolled back because Abort was called on the session channel before the transaction committed. . + /// + internal static string MsmqSessionChannelAbort { + get { + return ResourceManager.GetString("MsmqSessionChannelAbort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Session channels must not have pending messages when the transactions associated with these channels are committed. Pending messages are either messages that have not been received from the session channel or messages that have been received but Complete has not been called for them. The channel has faulted and the transaction was rolled back.. + /// + internal static string MsmqSessionChannelHasPendingItems { + get { + return ResourceManager.GetString("MsmqSessionChannelHasPendingItems", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Session channels must be closed before the transaction is committed. The channel has faulted and the transaction was rolled back.. + /// + internal static string MsmqSessionChannelsMustBeClosed { + get { + return ResourceManager.GetString("MsmqSessionChannelsMustBeClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The total size of messages sent in this session exceeded the maximum value of Int32. The messages in this session cannot be sent.. + /// + internal static string MsmqSessionGramSizeMustBeInIntegerRange { + get { + return ResourceManager.GetString("MsmqSessionGramSizeMustBeInIntegerRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An attempt made to close the session channel while there are still messages pending in the session. Current transaction will be rolled back and the session channel will be faulted. Messages in a session must be consumed all at once.. + /// + internal static string MsmqSessionMessagesNotConsumed { + get { + return ResourceManager.GetString("MsmqSessionMessagesNotConsumed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An attempt was made to close the session channel while there are still messages pending in the session. The sessiongram will be rolled back to the queue and the session channel will be faulted. . + /// + internal static string MsmqSessionPrematureClose { + get { + return ResourceManager.GetString("MsmqSessionPrematureClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A serialization error occurred because of a mismatch between the value of the SerializationFormat property and the type of the body. The message cannot be sent. Ensure the type of the body is Stream or use a different SerializationFormat.. + /// + internal static string MsmqStreamBodyExpected { + get { + return ResourceManager.GetString("MsmqStreamBodyExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message time to live (TTL) is too large. The message cannot be sent. The message TTL cannot exceed the Int32 maximum value.. + /// + internal static string MsmqTimeSpanTooLarge { + get { + return ResourceManager.GetString("MsmqTimeSpanTooLarge", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A client X.509 certificate was not specified through the channel factory's Credentials property, but one is required when the binding's MsmqAuthenticationMode property is set to Certificate. The message cannot be sent.. + /// + internal static string MsmqTokenProviderNeededForCertificates { + get { + return ResourceManager.GetString("MsmqTokenProviderNeededForCertificates", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A mismatch occurred between the binding and the MSMQ configuration. Messages cannot be sent. The custom dead letter queue specified in the binding must be a transactional queue. Ensure that the custom dead letter queue address is correct and the queue is a transactional queue.. + /// + internal static string MsmqTransactedDLQExpected { + get { + return ResourceManager.GetString("MsmqTransactedDLQExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed because the binding's ExactlyOnce property is set to true while the destination queue is non-transactional. The service host cannot be opened. Resolve this conflict by setting the ExactlyOnce property to false or creating a transactional queue for this binding.. + /// + internal static string MsmqTransactionalQueueNeeded { + get { + return ResourceManager.GetString("MsmqTransactionalQueueNeeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A transaction was not found in Transaction.Current but one is required for this operation. The channel cannot be opened. Ensure this operation is being called within a transaction scope.. + /// + internal static string MsmqTransactionCurrentRequired { + get { + return ResourceManager.GetString("MsmqTransactionCurrentRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The current transaction is not active. Messages in this session cannot be sent or received and the session channel will be faulted. All messages in a session must be sent or received using a single transaction.. + /// + internal static string MsmqTransactionNotActive { + get { + return ResourceManager.GetString("MsmqTransactionNotActive", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A transaction is required but is not available. Messages cannot be sent or received. Ensure that the transaction scope is specified to send or receive messages.. + /// + internal static string MsmqTransactionRequired { + get { + return ResourceManager.GetString("MsmqTransactionRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The net.msmq scheme does not support port numbers. To correct this, remove the port number from the URI.. + /// + internal static string MsmqUnexpectedPort { + get { + return ResourceManager.GetString("MsmqUnexpectedPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unrecognized error {0} (0x{1}). + /// + internal static string MsmqUnknownWin32Error { + get { + return ResourceManager.GetString("MsmqUnknownWin32Error", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The serialization failed because the serialization format '{0}' is not supported. The message cannot be sent or received.. + /// + internal static string MsmqUnsupportedSerializationFormat { + get { + return ResourceManager.GetString("MsmqUnsupportedSerializationFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed because the binding's MsmqAuthenticationMode property is set to WindowsDomain but MSMQ is installed with Active Directory integration disabled. The channel factory or service host cannot be opened.. + /// + internal static string MsmqWindowsAuthnRequiresAD { + get { + return ResourceManager.GetString("MsmqWindowsAuthnRequiresAD", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The URL in invalid. The URL for the queue cannot contain the '$' character. Use the syntax in net.msmq://machine/private/queueName to address a private queue.. + /// + internal static string MsmqWrongPrivateQueueSyntax { + get { + return ResourceManager.GetString("MsmqWrongPrivateQueueSyntax", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The URI is invalid because it is missing a host.. + /// + internal static string MsmqWrongUri { + get { + return ResourceManager.GetString("MsmqWrongUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MessageVersion '{0}' not supported by MTOM encoder.. + /// + internal static string MtomEncoderBadMessageVersion { + get { + return ResourceManager.GetString("MtomEncoderBadMessageVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The AuthenticationManager cannot be added to the binding parameters because the binding parameters already contains a AuthenticationManager '{0}'. If you are configuring a custom AuthenticationManager for the service, please first remove any existing AuthenticationManagers from the behaviors collection before adding the custom AuthenticationManager.. + /// + internal static string MultipleAuthenticationManagersInServiceBindingParameters { + get { + return ResourceManager.GetString("MultipleAuthenticationManagersInServiceBindingParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The AuthenticationSchemes cannot be added to the binding parameters because the binding parameters already contains AuthenticationSchemes '{0}'. If you are configuring custom AuthenticationSchemes for the service, please first remove any existing AuthenticationSchemes from the behaviors collection before adding custom AuthenticationSchemes.. + /// + internal static string MultipleAuthenticationSchemesInServiceBindingParameters { + get { + return ResourceManager.GetString("MultipleAuthenticationSchemesInServiceBindingParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Calling IWsdlExportExtension.ExportContract twice with the same ContractDescription is not supported.. + /// + internal static string MultipleCallsToExportContractWithSameContract { + get { + return ResourceManager.GetString("MultipleCallsToExportContractWithSameContract", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More than one '{0}' objects were found in the BindingParameters of the BindingContext. This is usually caused by having multiple '{0}' objects in a CustomBinding. Remove all but one of these elements.. + /// + internal static string MultipleCCbesInParameters { + get { + return ResourceManager.GetString("MultipleCCbesInParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' contains multiple '{1}' objects, which is invalid. At most one '{1}' should be specified.. + /// + internal static string MultipleClientWebSocketFactoriesSpecified { + get { + return ResourceManager.GetString("MultipleClientWebSocketFactoriesSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The callback address contains multiple context headers. There can be at most one context header in a callback address.. + /// + internal static string MultipleContextHeadersFoundInCallbackAddress { + get { + return ResourceManager.GetString("MultipleContextHeadersFoundInCallbackAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple correlation tokens were found in the security correlation state.. + /// + internal static string MultipleCorrelationTokensFound { + get { + return ResourceManager.GetString("MultipleCorrelationTokensFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The extensions cannot contain an Identity if one is supplied as a constructor argument.. + /// + internal static string MultipleIdentities { + get { + return ResourceManager.GetString("MultipleIdentities", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Policy for multiple issuer endpoints was retrieved from '{0}' but the relying party's policy does not specify which issuer endpoint to use. One of the endpoints was selected as the issuer endpoint to use. If you are using svcutil, the other endpoints will be available in commented form in the configuration as <alternativeIssuedTokenParameters>. Check the configuration to ensure that the right issuer endpoint was selected.. + /// + internal static string MultipleIssuerEndpointsFound { + get { + return ResourceManager.GetString("MultipleIssuerEndpointsFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The token's crypto collection has multiple objects of type '{0}'.. + /// + internal static string MultipleMatchingCryptosFound { + get { + return ResourceManager.GetString("MultipleMatchingCryptosFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More than one MessageEncodingBindingElement was found in the BindingParameters of the BindingContext. This usually is caused by having multiple MessageEncodingBindingElements in a CustomBinding. Remove all but one of these elements.. + /// + internal static string MultipleMebesInParameters { + get { + return ResourceManager.GetString("MultipleMebesInParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple headers with name '{0}' and namespace '{1}' found.. + /// + internal static string MultipleMessageHeaders { + get { + return ResourceManager.GetString("MultipleMessageHeaders", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple headers with name '{0}' and namespace '{1}' and role '{2}' found.. + /// + internal static string MultipleMessageHeadersWithActor { + get { + return ResourceManager.GetString("MultipleMessageHeadersWithActor", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More than one PeerCustomResolverBindingElement was found in the BindingParameters of the BindingContext. This usually is caused by having multiple PeerCustomResolverBindingElement in a CustomBinding. Remove all but one of these elements.. + /// + internal static string MultiplePeerCustomResolverBindingElementsInParameters { + get { + return ResourceManager.GetString("MultiplePeerCustomResolverBindingElementsInParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More than one PeerResolverBindingElement was found in the BindingParameters of the BindingContext. This usually is caused by having multiple PeerResolverBindingElements in a CustomBinding. Remove all but one of these elements.. + /// + internal static string MultiplePeerResolverBindingElementsinParameters { + get { + return ResourceManager.GetString("MultiplePeerResolverBindingElementsinParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple RelatesTo headers with relationship '{0}' found. Only one is allowed per relationship.. + /// + internal static string MultipleRelatesToHeaders { + get { + return ResourceManager.GetString("MultipleRelatesToHeaders", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ClientCredentials cannot be added to the binding parameters because the binding parameters already contains a SecurityCredentialsManager '{0}'. If you are configuring custom credentials for the channel, please first remove any existing ClientCredentials from the behaviors collection before adding the custom credential.. + /// + internal static string MultipleSecurityCredentialsManagersInChannelBindingParameters { + get { + return ResourceManager.GetString("MultipleSecurityCredentialsManagersInChannelBindingParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ServiceCredentials cannot be added to the binding parameters because the binding parameters already contains a SecurityCredentialsManager '{0}'. If you are configuring custom credentials for the service, please first remove any existing ServiceCredentials from the behaviors collection before adding the custom credential.. + /// + internal static string MultipleSecurityCredentialsManagersInServiceBindingParameters { + get { + return ResourceManager.GetString("MultipleSecurityCredentialsManagersInServiceBindingParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More than one IStreamUpgradeProviderElement was found in the BindingParameters of the BindingContext. This usually is caused by having multiple IStreamUpgradeProviderElements in a CustomBinding. Remove all but one of these elements.. + /// + internal static string MultipleStreamUpgradeProvidersInParameters { + get { + return ResourceManager.GetString("MultipleStreamUpgradeProvidersInParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple supporting token authenticators with the token parameter type equal to '{0}' cannot be specified. If more than one Supporting Token of the same type is expected in the response, then configure the supporting token collection with just one entry for that SecurityTokenParameters. The SecurityTokenAuthenticator that gets created from the SecurityTokenParameters will be used to authenticate multiple tokens. It is not possible to add SecurityTokenParameters of the same type in the SupportingTokenParamet [rest of string was truncated]";. + /// + internal static string MultipleSupportingAuthenticatorsOfSameType { + get { + return ResourceManager.GetString("MultipleSupportingAuthenticatorsOfSameType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More than one version of the {0} assertion was found. The ReliableSessionBindingElement could not be created.. + /// + internal static string MultipleVersionsFoundInPolicy { + get { + return ResourceManager.GetString("MultipleVersionsFoundInPolicy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to concrete PeerResolver implementation must override Initialize to accept metadata about resolver service.. + /// + internal static string MustOverrideInitialize { + get { + return ResourceManager.GetString("MustOverrideInitialize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Registration with zero addresses detected. Please call Register with more than zero addresses.. + /// + internal static string MustRegisterMoreThanZeroAddresses { + get { + return ResourceManager.GetString("MustRegisterMoreThanZeroAddresses", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cNamedArgs parameter is not supported and must be 0.. + /// + internal static string NamedArgsNotSupported { + get { + return ResourceManager.GetString("NamedArgsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An attempt to load the native type library '{0}' was made. Native type libraries cannot be loaded.. + /// + internal static string NativeTypeLibraryNotAllowed { + get { + return ResourceManager.GetString("NativeTypeLibraryNotAllowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Transport security negotiation failed due to an underlying IO error: {0}.. + /// + internal static string NegotiationFailedIO { + get { + return ResourceManager.GetString("NegotiationFailedIO", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The negotiation has already completed.. + /// + internal static string NegotiationIsCompleted { + get { + return ResourceManager.GetString("NegotiationIsCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The negotiation has not yet completed.. + /// + internal static string NegotiationIsNotCompleted { + get { + return ResourceManager.GetString("NegotiationIsNotCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There are too many active security negotiations or secure conversations at the service. Please retry later.. + /// + internal static string NegotiationQuotasExceededFaultReason { + get { + return ResourceManager.GetString("NegotiationQuotasExceededFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Negotiation state already exists for context '{0}'.. + /// + internal static string NegotiationStateAlreadyPresent { + get { + return ResourceManager.GetString("NegotiationStateAlreadyPresent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint only processes messages using the WS-ReliableMessaging protocol. The message sent to the endpoint does not have an action or any headers used by the protocol and cannot be processed.. + /// + internal static string NoActionNoSequenceHeaderReason { + get { + return ResourceManager.GetString("NoActionNoSequenceHeaderReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No AppliesTo element is present in the deserialized RequestSecurityToken/RequestSecurityTokenResponse.. + /// + internal static string NoAppliesToPresent { + get { + return ResourceManager.GetString("NoAppliesToPresent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no pending asynchronous write on this stream. Ensure that there is pending write on the stream or verify that the implementation does not try to complete the same operation multiple times.. + /// + internal static string NoAsyncWritePending { + get { + return ResourceManager.GetString("NoAsyncWritePending", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No binary negotiation was received from the other party.. + /// + internal static string NoBinaryNegoToReceive { + get { + return ResourceManager.GetString("NoBinaryNegoToReceive", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no binary negotiation to send to the other party.. + /// + internal static string NoBinaryNegoToSend { + get { + return ResourceManager.GetString("NoBinaryNegoToSend", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding (Name={0}, Namespace={1}) cannot be used to create a ChannelFactory or a ChannelListener because it appears to be missing a TransportBindingElement. Every binding must have at least one binding element that derives from TransportBindingElement.. + /// + internal static string NoChannelBuilderAvailable { + get { + return ResourceManager.GetString("NoChannelBuilderAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding ('{0}', '{1}') has been configured with a MutualCertificateDuplexBindingElement that requires a client certificate. The client certificate is currently missing.. + /// + internal static string NoClientCertificate { + get { + return ResourceManager.GetString("NoClientCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RequestSecurityToken must specify a CloseTarget.. + /// + internal static string NoCloseTargetSpecified { + get { + return ResourceManager.GetString("NoCloseTargetSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find a compatible transport manager for URI '{0}'.. + /// + internal static string NoCompatibleTransportManagerForUri { + get { + return ResourceManager.GetString("NoCompatibleTransportManagerForUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SecurityContextSecurityToken does not have a cookie.. + /// + internal static string NoCookieInSct { + get { + return ResourceManager.GetString("NoCookieInSct", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No correlation token was found in the security correlation state.. + /// + internal static string NoCorrelationTokenFound { + get { + return ResourceManager.GetString("NoCorrelationTokenFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No encryption message parts were specified for messages with the '{0}' action.. + /// + internal static string NoEncryptionPartsSpecified { + get { + return ResourceManager.GetString("NoEncryptionPartsSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OperationContract method '{0}' in type '{1}' does not properly implement the async pattern, as no corresponding method '{2}' could be found. Either provide a method called '{2}' or set the AsyncPattern property on method '{0}' to false.. + /// + internal static string NoEndMethodFoundForAsyncBeginMethod3 { + get { + return ResourceManager.GetString("NoEndMethodFoundForAsyncBeginMethod3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The keyword '{0}' has no equal sign following it. Ensure that each keyword is followed by an equal sign and a value. . + /// + internal static string NoEqualSignFound { + get { + return ResourceManager.GetString("NoEqualSignFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The object does not support the interface '{0}'.. + /// + internal static string NoInterface { + get { + return ResourceManager.GetString("NoInterface", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No IPEndpoints were found for host {0}.. + /// + internal static string NoIPEndpointsFoundForHost { + get { + return ResourceManager.GetString("NoIPEndpointsFoundForHost", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The KeyInfo value was not found in the encrypted item to find the decrypting token.. + /// + internal static string NoKeyInfoInEncryptedItemToFindDecryptingToken { + get { + return ResourceManager.GetString("NoKeyInfoInEncryptedItemToFindDecryptingToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No KeyInfo in signature to find verification token.. + /// + internal static string NoKeyInfoInSignatureToFindVerificationToken { + get { + return ResourceManager.GetString("NoKeyInfoInSignatureToFindVerificationToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RequestedSecurityToken not specified in RequestSecurityTokenResponse.. + /// + internal static string NoLicenseXml { + get { + return ResourceManager.GetString("NoLicenseXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The fault reason does not contain any text translations.. + /// + internal static string NoMatchingTranslationFoundForFaultText { + get { + return ResourceManager.GetString("NoMatchingTranslationFoundForFaultText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified nonce is too short. The minimum required nonce length is 4 bytes.. + /// + internal static string NonceLengthTooShort { + get { + return ResourceManager.GetString("NonceLengthTooShort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ReplayWindow and ClockSkew cannot be the maximum possible value when replay detection is enabled.. + /// + internal static string NoncesCachedInfinitely { + get { + return ResourceManager.GetString("NoncesCachedInfinitely", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no negotiation message to send.. + /// + internal static string NoNegotiationMessageToSend { + get { + return ResourceManager.GetString("NoNegotiationMessageToSend", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A message with action {0} is an empty message. This message cannot be processed because the body of this WS-ReliableMessaging protocol message must carry information pertaining to a reliable session.. + /// + internal static string NonEmptyWsrmMessageIsEmpty { + get { + return ResourceManager.GetString("NonEmptyWsrmMessageIsEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to None of the methods were found for interface {0}.. + /// + internal static string NoneOfTheMethodsForInterfaceFoundInConfig { + get { + return ResourceManager.GetString("NoneOfTheMethodsForInterfaceFoundInConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The translation set cannot contain nulls.. + /// + internal static string NoNullTranslations { + get { + return ResourceManager.GetString("NoNullTranslations", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The action {0} is not supported by this endpoint. Only WS-ReliableMessaging February 2005 messages are processed by this endpoint.. + /// + internal static string NonWsrmFeb2005ActionNotSupported { + get { + return ResourceManager.GetString("NonWsrmFeb2005ActionNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No outgoing EndpointAddress is available to check the identity on a message to be sent.. + /// + internal static string NoOutgoingEndpointAddressAvailableForDoingIdentityCheck { + get { + return ResourceManager.GetString("NoOutgoingEndpointAddressAvailableForDoingIdentityCheck", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No outgoing EndpointAddress is available to check the identity on a received reply.. + /// + internal static string NoOutgoingEndpointAddressAvailableForDoingIdentityCheckOnReply { + get { + return ResourceManager.GetString("NoOutgoingEndpointAddressAvailableForDoingIdentityCheckOnReply", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No signature was created because not part of the message matched the supplied message part specification.. + /// + internal static string NoPartsOfMessageMatchedPartsToSign { + get { + return ResourceManager.GetString("NoPartsOfMessageMatchedPartsToSign", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No primary signature available for supporting token signature verification.. + /// + internal static string NoPrimarySignatureAvailableForSupportingTokenSignatureVerification { + get { + return ResourceManager.GetString("NoPrimarySignatureAvailableForSupportingTokenSignatureVerification", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No custom principal is specified in the authorization context.. + /// + internal static string NoPrincipalSpecifiedInAuthorizationContext { + get { + return ResourceManager.GetString("NoPrincipalSpecifiedInAuthorizationContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RequestSecurityToken must specify a RenewTarget.. + /// + internal static string NoRenewTargetSpecified { + get { + return ResourceManager.GetString("NoRenewTargetSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No RequestSecurityTokenResponse elements were found.. + /// + internal static string NoRequestSecurityTokenResponseElements { + get { + return ResourceManager.GetString("NoRequestSecurityTokenResponseElements", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to find a SecurityBindingElement.. + /// + internal static string NoSecurityBindingElementFound { + get { + return ResourceManager.GetString("NoSecurityBindingElementFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SecurityContextSecurityToken does not have a context-id.. + /// + internal static string NoSecurityContextIdentifier { + get { + return ResourceManager.GetString("NoSecurityContextIdentifier", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server's X509SecurityTokenProvider cannot be null.. + /// + internal static string NoServerX509TokenProvider { + get { + return ResourceManager.GetString("NoServerX509TokenProvider", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Final RSTR from other party does not contain a service token.. + /// + internal static string NoServiceTokenReceived { + get { + return ResourceManager.GetString("NoServiceTokenReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No session token was present in the message.. + /// + internal static string NoSessionTokenPresentInMessage { + get { + return ResourceManager.GetString("NoSessionTokenPresentInMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No signature is available in the security header to provide the nonce for replay detection.. + /// + internal static string NoSignatureAvailableInSecurityHeaderToDoReplayDetection { + get { + return ResourceManager.GetString("NoSignatureAvailableInSecurityHeaderToDoReplayDetection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No signature message parts were specified for messages with the '{0}' action.. + /// + internal static string NoSignaturePartsSpecified { + get { + return ResourceManager.GetString("NoSignaturePartsSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No signing token is available to do an incoming identity check.. + /// + internal static string NoSigningTokenAvailableToDoIncomingIdentityCheck { + get { + return ResourceManager.GetString("NoSigningTokenAvailableToDoIncomingIdentityCheck", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding ('{0}','{1}') supports streaming which cannot be configured together with message level security. Consider choosing a different transfer mode or choosing the transport level security.. + /// + internal static string NoStreamingWithSecurity { + get { + return ResourceManager.GetString("NoStreamingWithSecurity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The argument passed to SetObject is not a COM object.. + /// + internal static string NotAComObject { + get { + return ResourceManager.GetString("NotAComObject", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Some of the binding elements in this binding were not used when building the ChannelFactory / ChannelListener. This may be have been caused by the binding elements being misordered. The recommended order for binding elements is: TransactionFlow, ReliableSession, Security, CompositeDuplex, OneWay, StreamSecurity, MessageEncoding, Transport. Note that the TransportBindingElement must be last. The following binding elements were not built: {0}.. + /// + internal static string NotAllBindingElementsBuilt { + get { + return ResourceManager.GetString("NotAllBindingElementsBuilt", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CLSID {0} is not allowed.. + /// + internal static string NotAllowedPersistableCLSID { + get { + return ResourceManager.GetString("NotAllowedPersistableCLSID", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint closed the session before acknowledging all responses. All replies could not be delivered. The reliable session was faulted.. + /// + internal static string NotAllRepliesAcknowledgedExceptionString { + get { + return ResourceManager.GetString("NotAllRepliesAcknowledgedExceptionString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Not all the signatures in the request message were confirmed in the reply message.. + /// + internal static string NotAllSignaturesConfirmed { + get { + return ResourceManager.GetString("NotAllSignaturesConfirmed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An event notification threw an exception. Please refer to InnerException.. + /// + internal static string NotificationException { + get { + return ResourceManager.GetString("NotificationException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No timestamp is available in the security header to do replay detection.. + /// + internal static string NoTimestampAvailableInSecurityHeaderToDoReplayDetection { + get { + return ResourceManager.GetString("NoTimestampAvailableInSecurityHeaderToDoReplayDetection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No Infocard token was found in the ChannelParameters. Infocard requires that the security token be created during channel intialization.. + /// + internal static string NoTokenInChannelParameters { + get { + return ResourceManager.GetString("NoTokenInChannelParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no transaction in the context of the operation.. + /// + internal static string NoTransactionInContext { + get { + return ResourceManager.GetString("NoTransactionInContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find an appropriate transport manager for listen URI '{0}'.. + /// + internal static string NoTransportManagerForUri { + get { + return ResourceManager.GetString("NoTransportManagerForUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security policy expert failed. The provided transport token assertion of type '{0}' did not create a transport token assertion to include the sp:TransportBinding security policy assertion.. + /// + internal static string NoTransportTokenAssertionProvided { + get { + return ResourceManager.GetString("NoTransportTokenAssertionProvided", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation: {0} is not valid while the object is in closed state.. + /// + internal static string NotValidWhenClosed { + get { + return ResourceManager.GetString("NotValidWhenClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation: {0} is not valid while the object is in open state.. + /// + internal static string NotValidWhenOpen { + get { + return ResourceManager.GetString("NotValidWhenOpen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No type library available for interface. + /// + internal static string NoTypeLibraryFoundForInterface { + get { + return ResourceManager.GetString("NoTypeLibraryFoundForInterface", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find usable policy alternatives.. + /// + internal static string NoUsablePolicyAssertions { + get { + return ResourceManager.GetString("NoUsablePolicyAssertions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The required UserNameSecurityToken was not provided.. + /// + internal static string NoUserNameTokenProvided { + get { + return ResourceManager.GetString("NoUserNameTokenProvided", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No value.. + /// + internal static string NoValue0 { + get { + return ResourceManager.GetString("NoValue0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A transaction vote request was completed, but there was no outstanding vote request.. + /// + internal static string NoVoteIssued { + get { + return ResourceManager.GetString("NoVoteIssued", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server challenged this request and streamed requests cannot be resubmitted. To enable HTTP server challenges, set your TransferMode to Buffered or StreamedResponse.. + /// + internal static string NullReferenceOnHttpResponse { + get { + return ResourceManager.GetString("NullReferenceOnHttpResponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not formulate request message for security session operation '{0}'.. + /// + internal static string NullSessionRequestMessage { + get { + return ResourceManager.GetString("NullSessionRequestMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} object has been disposed.. + /// + internal static string ObjectDisposed { + get { + return ResourceManager.GetString("ObjectDisposed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Object is read-only.. + /// + internal static string ObjectIsReadOnly { + get { + return ResourceManager.GetString("ObjectIsReadOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot dequeue a '{0}' object while in the Created state.. + /// + internal static string ObjectMustBeOpenedToDequeue { + get { + return ResourceManager.GetString("ObjectMustBeOpenedToDequeue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified offset exceeds the upper bound of the buffer ({0}).. + /// + internal static string OffsetExceedsBufferBound { + get { + return ResourceManager.GetString("OffsetExceedsBufferBound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified offset exceeds the buffer size ({0} bytes).. + /// + internal static string OffsetExceedsBufferSize { + get { + return ResourceManager.GetString("OffsetExceedsBufferSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The OLE Transactions header was invalid or corrupt.. + /// + internal static string OleTxHeaderCorrupt { + get { + return ResourceManager.GetString("OleTxHeaderCorrupt", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The method '{1}' in type '{0}' is marked IsOneWay=true and declares one or more FaultContractAttributes. One-way methods cannot declare FaultContractAttributes. To fix it, change IsOneWay to false or remove the FaultContractAttributes.. + /// + internal static string OneWayAndFaultsIncompatible2 { + get { + return ResourceManager.GetString("OneWayAndFaultsIncompatible2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A one-way header was expected on this message and none was found. It is possible that your bindings are mismatched.. + /// + internal static string OneWayHeaderNotFound { + get { + return ResourceManager.GetString("OneWayHeaderNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding '{0}' is not configured properly. OneWayBindingElement requires an inner binding element that supports IRequestChannel/IReplyChannel or IDuplexSessionChannel. . + /// + internal static string OneWayInternalTypeNotSupported { + get { + return ResourceManager.GetString("OneWayInternalTypeNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The one-way operation returned a fault message. The reason for the fault was '{0}'.. + /// + internal static string OneWayOperationReturnedFault { + get { + return ResourceManager.GetString("OneWayOperationReturnedFault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The one-way operation returned a fault message with Action='{0}'.. + /// + internal static string OneWayOperationReturnedLargeFault { + get { + return ResourceManager.GetString("OneWayOperationReturnedLargeFault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The one-way operation returned a non-null message with Action='{0}'.. + /// + internal static string OneWayOperationReturnedMessage { + get { + return ResourceManager.GetString("OneWayOperationReturnedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to One way operation {0} cannot not specify a reply action.. + /// + internal static string OneWayOperationShouldNotSpecifyAReplyAction1 { + get { + return ResourceManager.GetString("OneWayOperationShouldNotSpecifyAReplyAction1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A response was received from a one-way send over the underlying IRequestChannel. Make sure the remote endpoint has a compatible binding at its endpoint (one that contains OneWayBindingElement).. + /// + internal static string OneWayUnexpectedResponse { + get { + return ResourceManager.GetString("OneWayUnexpectedResponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Only body return values are supported currently for protection, MessagePartDescription was specified.. + /// + internal static string OnlyBodyReturnValuesSupported { + get { + return ResourceManager.GetString("OnlyBodyReturnValuesSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided SafeArray parameter was passed by value. SafeArray parameters must be passed by reference.. + /// + internal static string OnlyByRefVariantSafeArraysAllowed { + get { + return ResourceManager.GetString("OnlyByRefVariantSafeArraysAllowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The COM+ Integration service '{0}' specified in configuration is not in a supported format and could not be started. Ensure that the configuration is correctly specified.. + /// + internal static string OnlyClsidsAllowedForServiceType { + get { + return ResourceManager.GetString("OnlyClsidsAllowedForServiceType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Only malformed Messages are supported.. + /// + internal static string OnlyMalformedMessagesAreSupported { + get { + return ResourceManager.GetString("OnlyMalformedMessagesAreSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multi-dimensional SafeArray parameters cannot be used.. + /// + internal static string OnlyOneDimensionalSafeArraysAllowed { + get { + return ResourceManager.GetString("OnlyOneDimensionalSafeArraysAllowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The symmetric security protocol can either be configured with a symmetric token provider and a symmetric token authenticator or an asymmetric token provider. It cannot be configured with both.. + /// + internal static string OnlyOneOfEncryptedKeyOrSymmetricBindingCanBeSelected { + get { + return ResourceManager.GetString("OnlyOneOfEncryptedKeyOrSymmetricBindingCanBeSelected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A VARIANT parameter was passed by value. VARIANT parameters must be passed by reference.. + /// + internal static string OnlyVariantAllowedByRef { + get { + return ResourceManager.GetString("OnlyVariantAllowedByRef", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The elements of the SafeArray must be of the type VARIANT.. + /// + internal static string OnlyVariantTypeElementsAllowed { + get { + return ResourceManager.GetString("OnlyVariantTypeElementsAllowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The lower bound of the SafeArray was not zero. SafeArrays with a lower bound other than zero cannot be used.. + /// + internal static string OnlyZeroLBoundAllowed { + get { + return ResourceManager.GetString("OnlyZeroLBoundAllowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not open the process token (error=0x{0:X}).. + /// + internal static string OpenProcessTokenFailed { + get { + return ResourceManager.GetString("OpenProcessTokenFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not open the thread token (error=0x{0:X}).. + /// + internal static string OpenThreadTokenFailed { + get { + return ResourceManager.GetString("OpenThreadTokenFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open timed out after {0} while establishing a transport session to {1}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string OpenTimedOutEstablishingTransportSession { + get { + return ResourceManager.GetString("OpenTimedOutEstablishingTransportSession", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation was aborted while establishing a connection to {0}.. + /// + internal static string OperationAbortedDuringConnectionEstablishment { + get { + return ResourceManager.GetString("OperationAbortedDuringConnectionEstablishment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This operation cannot be done after processing is started.. + /// + internal static string OperationCannotBeDoneAfterProcessingIsStarted { + get { + return ResourceManager.GetString("OperationCannotBeDoneAfterProcessingIsStarted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service operation '{0}' that belongs to the contract with the '{1}' name and the '{2}' namespace does not allow impersonation.. + /// + internal static string OperationDoesNotAllowImpersonation { + get { + return ResourceManager.GetString("OperationDoesNotAllowImpersonation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This operation is not valid until security negotiation is complete.. + /// + internal static string OperationInvalidBeforeSecurityNegotiation { + get { + return ResourceManager.GetString("OperationInvalidBeforeSecurityNegotiation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The method '{0}' could not be found. Ensure that the correct method name is specified.. + /// + internal static string OperationNotFound { + get { + return ResourceManager.GetString("OperationNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation property of OperationAttributeGenerationContext is required to generate an attribute based on settings. . + /// + internal static string OperationPropertyIsRequiredForAttributeGeneration { + get { + return ResourceManager.GetString("OperationPropertyIsRequiredForAttributeGeneration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The optional WSDL extension element '{0}' from namespace '{1}' was not handled. + ///XPath: {2}. + /// + internal static string OptionalWSDLExtensionIgnored { + get { + return ResourceManager.GetString("OptionalWSDLExtensionIgnored", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The outer element name must be specified.. + /// + internal static string OuterElementNameNotSpecified { + get { + return ResourceManager.GetString("OuterElementNameNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The outer name of the element extension cannot be empty.. + /// + internal static string OuterNameOfElementExtensionEmpty { + get { + return ResourceManager.GetString("OuterNameOfElementExtensionEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Send cannot be called when the session does not expect output.. + /// + internal static string OutputNotExpected { + get { + return ResourceManager.GetString("OutputNotExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The package full name '{0}' is invalid.. + /// + internal static string PackageFullNameInvalid { + get { + return ResourceManager.GetString("PackageFullNameInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter cannot be empty.. + /// + internal static string ParameterCannotBeEmpty { + get { + return ResourceManager.GetString("ParameterCannotBeEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to log messages. Application may be running in partial trust. Either disable message logging or configure the application to run in full trust.. + /// + internal static string PartialTrustMessageLoggingNotEnabled { + get { + return ResourceManager.GetString("PartialTrustMessageLoggingNotEnabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Access to performance counters is denied. Application may be running in partial trust. Either disable performance counters or configure the application to run in full trust.. + /// + internal static string PartialTrustPerformanceCountersNotEnabled { + get { + return ResourceManager.GetString("PartialTrustPerformanceCountersNotEnabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Service with name '{0}' could not be constructed because the application does not have permission to construct the type: both the Type and its default parameter-less constructor must be public.. + /// + internal static string PartialTrustServiceCtorNotVisible { + get { + return ResourceManager.GetString("PartialTrustServiceCtorNotVisible", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Method with name '{1}' in Type '{0}' could not be invoked because the application does not have permission to invoke the method: both the Method and its containing Type must be public.. + /// + internal static string PartialTrustServiceMethodNotVisible { + get { + return ResourceManager.GetString("PartialTrustServiceMethodNotVisible", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Access to windows management instrumentation (WMI) is denied. Application may be running in partial trust. Either disable WMI or configure the application to run in full trust.. + /// + internal static string PartialTrustWMINotEnabled { + get { + return ResourceManager.GetString("PartialTrustWMINotEnabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate generation has failed. Please see the inner exception for more information.. + /// + internal static string PeerCertGenFailure { + get { + return ResourceManager.GetString("PeerCertGenFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid message: the peer channel via ({0}) has a size of ({1}) it exceeds the maximum via size of ({2}).. + /// + internal static string PeerChannelViaTooLong { + get { + return ResourceManager.GetString("PeerChannelViaTooLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Application message contains a header that conflicts with a PeerChannel specific header. Name = {0} and Namespace = {1}.. + /// + internal static string PeerConflictingHeader { + get { + return ResourceManager.GetString("PeerConflictingHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding settings conflict with an existing instance that is using the same mesh name. Check the value of the property {0}.. + /// + internal static string PeerConflictingPeerNodeSettings { + get { + return ResourceManager.GetString("PeerConflictingPeerNodeSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Error. PeerFlooder instance is already disposed. It cannot be used to send messages.. + /// + internal static string PeerFlooderDisposed { + get { + return ResourceManager.GetString("PeerFlooderDisposed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MessageBody does not contain a valid {0} message. Please ensure that the message is well formed.. + /// + internal static string PeerInvalidMessageBody { + get { + return ResourceManager.GetString("PeerInvalidMessageBody", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The registrationId {0} is invalid.. + /// + internal static string PeerInvalidRegistrationId { + get { + return ResourceManager.GetString("PeerInvalidRegistrationId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The LinkUtility message received from a neighbor has invalid values for usefull '{0}' and total '{1}'.. + /// + internal static string PeerLinkUtilityInvalidValues { + get { + return ResourceManager.GetString("PeerLinkUtilityInvalidValues", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ListenIPAddress {0} is invalid.. + /// + internal static string PeerListenIPAddressInvalid { + get { + return ResourceManager.GetString("PeerListenIPAddressInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maintainer is attempting a connection to Peer {0} for the mesh {1}.. + /// + internal static string PeerMaintainerConnect { + get { + return ResourceManager.GetString("PeerMaintainerConnect", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maintainer encountered exception when attempting a connection to Peer {0} for the mesh {1}. Exception is {2}.. + /// + internal static string PeerMaintainerConnectFailure { + get { + return ResourceManager.GetString("PeerMaintainerConnectFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mantainer is attempting to establish additional connections for the mesh {0}.. + /// + internal static string PeerMaintainerConnectMode { + get { + return ResourceManager.GetString("PeerMaintainerConnectMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mantainer's InitialConnect is running for the mesh {0}.. + /// + internal static string PeerMaintainerInitialConnect { + get { + return ResourceManager.GetString("PeerMaintainerInitialConnect", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mantainer is attempting to prune connections for the mesh {0}.. + /// + internal static string PeerMaintainerPruneMode { + get { + return ResourceManager.GetString("PeerMaintainerPruneMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maintainer is starting for the mesh {0}.. + /// + internal static string PeerMaintainerStarting { + get { + return ResourceManager.GetString("PeerMaintainerStarting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MaxReceivedMessageSize of the associated listener ({0}) is greater than the MaxReceivedMessageSize of the PeerNode ({1}) with the meshid ({2}), ensure that all ChannelFactories and Endpoints for this mesh have the same configuration for MaxRecievedMessageSize.. + /// + internal static string PeerMaxReceivedMessageSizeConflict { + get { + return ResourceManager.GetString("PeerMaxReceivedMessageSizeConflict", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message with action {0} received from a neighbor is missing a via Header.. + /// + internal static string PeerMessageMustHaveVia { + get { + return ResourceManager.GetString("PeerMessageMustHaveVia", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Error: Peer Neighbor state change from {0} to {1} is invalid.. + /// + internal static string PeerNeighborInvalidState { + get { + return ResourceManager.GetString("PeerNeighborInvalidState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The PeerNode cannot be opened because it has been Aborted.. + /// + internal static string PeerNodeAborted { + get { + return ResourceManager.GetString("PeerNodeAborted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MeshId: {0}, Node Id: {1}, Online: {2}, Open: {3}, Port: {4}. + /// + internal static string PeerNodeToStringFormat { + get { + return ResourceManager.GetString("PeerNodeToStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Refresh info can not be null. Please ensure that the Refresh operation is invoked with a valid RefreshInfo object.. + /// + internal static string PeerNullRefreshInfo { + get { + return ResourceManager.GetString("PeerNullRefreshInfo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Registration info can not be null. Please ensure that the Register operation is invoked with a valid RegistrationInfo object.. + /// + internal static string PeerNullRegistrationInfo { + get { + return ResourceManager.GetString("PeerNullRegistrationInfo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resolve info can not be null. Please ensure that the Resolve operation is invoked with a valid ResolveInfo object.. + /// + internal static string PeerNullResolveInfo { + get { + return ResourceManager.GetString("PeerNullResolveInfo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Error. Address of the Service cannot be registered with PNRP.. + /// + internal static string PeerPnrpIllegalUri { + get { + return ResourceManager.GetString("PeerPnrpIllegalUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to PNRP is not available. Please refer to the documentation with your system for details on how to install and enable PNRP.. + /// + internal static string PeerPnrpNotAvailable { + get { + return ResourceManager.GetString("PeerPnrpNotAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The PNRP service is not installed on this machine. Please refer to the documentation with your system for details on how to install and enable PNRP.. + /// + internal static string PeerPnrpNotInstalled { + get { + return ResourceManager.GetString("PeerPnrpNotInstalled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A PeerResolverBindingElement is required in the {0} binding. The default resolver (PNRP) is not available.. + /// + internal static string PeerResolverBindingElementRequired { + get { + return ResourceManager.GetString("PeerResolverBindingElementRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified ResolverType: {0} cannot be loaded. Please ensure that the type name specified refers to a type that can be loaded.. + /// + internal static string PeerResolverInvalid { + get { + return ResourceManager.GetString("PeerResolverInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resolver must be specified. The default resolver (PNRP) is not available. Please refer to the documentation with your system for details on how to install and enable PNRP.. + /// + internal static string PeerResolverRequired { + get { + return ResourceManager.GetString("PeerResolverRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specified resolver settings are not enough to create a valid resolver. Please ensure that a ResolverType and an Address is specified for the custom resolver.. + /// + internal static string PeerResolverSettingsInvalid { + get { + return ResourceManager.GetString("PeerResolverSettingsInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Attempting to prune the slow neighbor for the mesh {0}.. + /// + internal static string PeerThrottlePruning { + get { + return ResourceManager.GetString("PeerThrottlePruning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Throttle on the mesh {0} waiting.. + /// + internal static string PeerThrottleWaiting { + get { + return ResourceManager.GetString("PeerThrottleWaiting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There are too many pending secure conversations on the server. Please retry later.. + /// + internal static string PendingSessionsExceededFaultReason { + get { + return ResourceManager.GetString("PendingSessionsExceededFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to QueryInterface succeeded but the persistable type wrapper was null.. + /// + internal static string PersistWrapperIsNull { + get { + return ResourceManager.GetString("PersistWrapperIsNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server cannot accept pipe: {0}. + /// + internal static string PipeAcceptFailed { + get { + return ResourceManager.GetString("PipeAcceptFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The pipe cannot be written to or read from because it is already in the process of being closed.. + /// + internal static string PipeAlreadyClosing { + get { + return ResourceManager.GetString("PipeAlreadyClosing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The pipe cannot be written to because it is already in the process of shutting down.. + /// + internal static string PipeAlreadyShuttingDown { + get { + return ResourceManager.GetString("PipeAlreadyShuttingDown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The pipe cannot be closed while a write to the pipe is pending.. + /// + internal static string PipeCantCloseWithPendingWrite { + get { + return ResourceManager.GetString("PipeCantCloseWithPendingWrite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation cannot be completed because the pipe was closed. This may have been caused by the application on the other end of the pipe exiting.. + /// + internal static string PipeClosed { + get { + return ResourceManager.GetString("PipeClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The pipe could not close gracefully. This may be caused by the application on the other end of the pipe exiting.. + /// + internal static string PipeCloseFailed { + get { + return ResourceManager.GetString("PipeCloseFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A pipe endpoint exists for '{0}', but the connect failed: {1}. + /// + internal static string PipeConnectAddressFailed { + get { + return ResourceManager.GetString("PipeConnectAddressFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot connect to endpoint '{0}'. . + /// + internal static string PipeConnectFailed { + get { + return ResourceManager.GetString("PipeConnectFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The pipe connection was aborted because an asynchronous read from the pipe did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string PipeConnectionAbortedReadTimedOut { + get { + return ResourceManager.GetString("PipeConnectionAbortedReadTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The pipe connection was aborted because an asynchronous write to the pipe did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string PipeConnectionAbortedWriteTimedOut { + get { + return ResourceManager.GetString("PipeConnectionAbortedWriteTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot connect to endpoint '{0}' within the allotted timeout of {1}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string PipeConnectTimedOut { + get { + return ResourceManager.GetString("PipeConnectTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot connect to endpoint '{0}' within the allotted timeout of {1}. The server has likely reached the MaxConnections quota and is too busy to accept new connections. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string PipeConnectTimedOutServerTooBusy { + get { + return ResourceManager.GetString("PipeConnectTimedOutServerTooBusy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error duplicating the.. + /// + internal static string PipeDuplicationFailed { + get { + return ResourceManager.GetString("PipeDuplicationFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The pipe endpoint '{0}' could not be found on your local machine. . + /// + internal static string PipeEndpointNotFound { + get { + return ResourceManager.GetString("PipeEndpointNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} ({1}, 0x{2}). + /// + internal static string PipeKnownWin32Error { + get { + return ResourceManager.GetString("PipeKnownWin32Error", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The pipe listener has been disposed.. + /// + internal static string PipeListenerDisposed { + get { + return ResourceManager.GetString("PipeListenerDisposed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connections cannot be created until the pipe has started listening. Call Listen() before attempting to accept a connection.. + /// + internal static string PipeListenerNotListening { + get { + return ResourceManager.GetString("PipeListenerNotListening", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot listen on pipe '{0}': {1}. + /// + internal static string PipeListenFailed { + get { + return ResourceManager.GetString("PipeListenFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The pipe was not able to be set to message mode: {0}. + /// + internal static string PipeModeChangeFailed { + get { + return ResourceManager.GetString("PipeModeChangeFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The pipe name could not be obtained for the pipe URI: {0}. + /// + internal static string PipeNameCanNotBeAccessed { + get { + return ResourceManager.GetString("PipeNameCanNotBeAccessed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The pipe name could not be obtained for {0}.. + /// + internal static string PipeNameCanNotBeAccessed2 { + get { + return ResourceManager.GetString("PipeNameCanNotBeAccessed2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot listen on pipe '{0}' because the pipe name could not be reserved: {1}. + /// + internal static string PipeNameCantBeReserved { + get { + return ResourceManager.GetString("PipeNameCantBeReserved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot listen on pipe name '{0}' because another pipe endpoint is already listening on that name.. + /// + internal static string PipeNameInUse { + get { + return ResourceManager.GetString("PipeNameInUse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error reading from the pipe: {0}.. + /// + internal static string PipeReadError { + get { + return ResourceManager.GetString("PipeReadError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is already a read in progress for the pipe. Wait for the first operation to complete before attempting to read again.. + /// + internal static string PipeReadPending { + get { + return ResourceManager.GetString("PipeReadPending", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The read from the pipe did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string PipeReadTimedOut { + get { + return ResourceManager.GetString("PipeReadTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The shutdown indicator was not received from the pipe. The application on the other end of the pipe may not have sent it. The pipe will still be closed.. + /// + internal static string PipeShutdownReadError { + get { + return ResourceManager.GetString("PipeShutdownReadError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The shutdown indicator could not be written to the pipe. The application on the other end of the pipe may not be listening for it. The pipe will still be closed.. + /// + internal static string PipeShutdownWriteError { + get { + return ResourceManager.GetString("PipeShutdownWriteError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The read from the pipe expected just a signal, but received actual data.. + /// + internal static string PipeSignalExpected { + get { + return ResourceManager.GetString("PipeSignalExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unrecognized error {0} (0x{1}). + /// + internal static string PipeUnknownWin32Error { + get { + return ResourceManager.GetString("PipeUnknownWin32Error", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to URIs used with pipes must use the scheme: 'net.pipe'.. + /// + internal static string PipeUriSchemeWrong { + get { + return ResourceManager.GetString("PipeUriSchemeWrong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error writing to the pipe: {0}.. + /// + internal static string PipeWriteError { + get { + return ResourceManager.GetString("PipeWriteError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The pipe write did not write all the bytes.. + /// + internal static string PipeWriteIncomplete { + get { + return ResourceManager.GetString("PipeWriteIncomplete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is already a write in progress for the pipe. Wait for the first operation to complete before attempting to write again.. + /// + internal static string PipeWritePending { + get { + return ResourceManager.GetString("PipeWritePending", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The write to the pipe did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string PipeWriteTimedOut { + get { + return ResourceManager.GetString("PipeWriteTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Addresses specified in the registration exceed PNRP's per registration address limit.. + /// + internal static string PnrpAddressesExceedLimit { + get { + return ResourceManager.GetString("PnrpAddressesExceedLimit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "Specified addresses can not be registered with PNRP because either PNRP is not enabled or the specified addresses do not have corresponding clouds. Please refer to the documentation with your system for details on how to install and enable PNRP.". + /// + internal static string PnrpAddressesUnsupported { + get { + return ResourceManager.GetString("PnrpAddressesUnsupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specified cloud {0} could not be used for the specified operation because it is disabled.. + /// + internal static string PnrpCloudDisabled { + get { + return ResourceManager.GetString("PnrpCloudDisabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to One of the addresses specified doesn't match any PNRP cloud for registration.{0}. + /// + internal static string PnrpCloudNotFound { + get { + return ResourceManager.GetString("PnrpCloudNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specified cloud {0} is configured for Resolve operations only.. + /// + internal static string PnrpCloudResolveOnly { + get { + return ResourceManager.GetString("PnrpCloudResolveOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specified mesh name {0} cannot be used because a name can only be registered once per process.. + /// + internal static string PnrpDuplicatePeerName { + get { + return ResourceManager.GetString("PnrpDuplicatePeerName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to PNRP could not find any clouds that match the current operation.. + /// + internal static string PnrpNoClouds { + get { + return ResourceManager.GetString("PnrpNoClouds", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Requested PNRP operation {0} could not be performed because the port is blocked possibly by a firewall.. + /// + internal static string PnrpPortBlocked { + get { + return ResourceManager.GetString("PnrpPortBlocked", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A metadata section containing policy did not have an identifier so it cannot be referenced. . + /// + internal static string PolicyDocumentMustHaveIdentifier { + get { + return ResourceManager.GetString("PolicyDocumentMustHaveIdentifier", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An exception was thrown in a call to a policy export extension. + ///Extension: {0} + ///Error: {1}. + /// + internal static string PolicyExtensionExportError { + get { + return ResourceManager.GetString("PolicyExtensionExportError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An exception was thrown in a call to a policy import extension. + ///Extension: {0} + ///Error: {1}. + /// + internal static string PolicyExtensionImportError { + get { + return ResourceManager.GetString("PolicyExtensionImportError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type {0} registered as a policy extension does not have a public default constructor. Policy extensions must have a public default constructor. + /// + internal static string PolicyExtensionTypeRequiresDefaultConstructor { + get { + return ResourceManager.GetString("PolicyExtensionTypeRequiresDefaultConstructor", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ContextBindingElementImporter cannot import policy because PolicyImportContext.BindingElements collection is null.. + /// + internal static string PolicyImportContextBindingElementCollectionIsNull { + get { + return ResourceManager.GetString("PolicyImportContextBindingElementCollectionIsNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unreachable policy detected. + ///A WS-Policy element embedded in WSDL is missing a fragment identifier. This policy cannot be referenced by any WS-PolicyAttachment mechanisms. + ///XPath:{0}. + /// + internal static string PolicyInWsdlMustHaveFragmentId { + get { + return ResourceManager.GetString("PolicyInWsdlMustHaveFragmentId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A policy reference was ignored because the URI of the reference was empty.. + /// + internal static string PolicyReferenceInvalidId { + get { + return ResourceManager.GetString("PolicyReferenceInvalidId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A policy reference was ignored because the required {0} attribute was missing.. + /// + internal static string PolicyReferenceMissingURI { + get { + return ResourceManager.GetString("PolicyReferenceMissingURI", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message security policy for the '{0}' action requires confidentiality without integrity. Confidentiality without integrity is not supported.. + /// + internal static string PolicyRequiresConfidentialityWithoutIntegrity { + get { + return ResourceManager.GetString("PolicyRequiresConfidentialityWithoutIntegrity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Application {0} is marked Pooled. Pooled applications are not supported under COM+ hosting.. + /// + internal static string PooledApplicationNotSupportedForComplusHostedScenarios { + get { + return ResourceManager.GetString("PooledApplicationNotSupportedForComplusHostedScenarios", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You have tried to create a channel to a service that does not support .Net Framing. . + /// + internal static string PreambleAckIncorrect { + get { + return ResourceManager.GetString("PreambleAckIncorrect", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You have tried to create a channel to a service that does not support .Net Framing. It is possible that you are encountering an HTTP endpoint.. + /// + internal static string PreambleAckIncorrectMaybeHttp { + get { + return ResourceManager.GetString("PreambleAckIncorrectMaybeHttp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The channel demuxer Open failed previously with exception '{0}'.. + /// + internal static string PreviousChannelDemuxerOpenFailed { + get { + return ResourceManager.GetString("PreviousChannelDemuxerOpenFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The primary signature must be encrypted.. + /// + internal static string PrimarySignatureIsRequiredToBeEncrypted { + get { + return ResourceManager.GetString("PrimarySignatureIsRequiredToBeEncrypted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Primary signature must be computed before supporting token signatures.. + /// + internal static string PrimarySignatureMustBeComputedBeforeSupportingTokenSignatures { + get { + return ResourceManager.GetString("PrimarySignatureMustBeComputedBeforeSupportingTokenSignatures", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The primary signature is not signed with a derived key. The binding's primary token parameter '{0}' requires key derivation.. + /// + internal static string PrimarySignatureWasNotSignedByDerivedKey { + get { + return ResourceManager.GetString("PrimarySignatureWasNotSignedByDerivedKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The primary signature is not signed with a key derived from the encrypted key. The binding's token parameter '{0}' requires key derivation.. + /// + internal static string PrimarySignatureWasNotSignedByDerivedWrappedKey { + get { + return ResourceManager.GetString("PrimarySignatureWasNotSignedByDerivedWrappedKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to PrivacyNotice element Version attribute must have an integer value.. + /// + internal static string PrivacyNoticeElementVersionAttributeInvalid { + get { + return ResourceManager.GetString("PrivacyNoticeElementVersionAttributeInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The proof token was not wrapped correctly in the RequestSecurityTokenResponse.. + /// + internal static string ProofTokenWasNotWrappedCorrectly { + get { + return ResourceManager.GetString("ProofTokenWasNotWrappedCorrectly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The proof token XML element is not expected in the response.. + /// + internal static string ProofTokenXmlUnexpectedInRstr { + get { + return ResourceManager.GetString("ProofTokenXmlUnexpectedInRstr", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The required '{0}' property on the '{1}' security protocol factory is not set or has an invalid value.. + /// + internal static string PropertySettingErrorOnProtocolFactory { + get { + return ResourceManager.GetString("PropertySettingErrorOnProtocolFactory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The protocol factory cannot create a protocol.. + /// + internal static string ProtocolFactoryCouldNotCreateProtocol { + get { + return ResourceManager.GetString("ProtocolFactoryCouldNotCreateProtocol", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security protocol must be '{0}', type is: '{1}'.;. + /// + internal static string ProtocolMisMatch { + get { + return ResourceManager.GetString("ProtocolMisMatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' protocol can only be used by the Initiator.. + /// + internal static string ProtocolMustBeInitiator { + get { + return ResourceManager.GetString("ProtocolMustBeInitiator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' protocol can only be used at the Recipient.. + /// + internal static string ProtocolMustBeRecipient { + get { + return ResourceManager.GetString("ProtocolMustBeRecipient", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The 'provider' argument to the InstanceKey constructor must be a non-empty string which identifies the source of the key data. The 'provider' argument can be null, in which case the default correlation provider name is used.. + /// + internal static string ProviderCannotBeEmptyString { + get { + return ResourceManager.GetString("ProviderCannotBeEmptyString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP proxy authentication credential specified an mutual authentication requirement ({0}) that is stricter than the requirement for target server authentication ({1}).. + /// + internal static string ProxyAuthenticationLevelMismatch { + get { + return ResourceManager.GetString("ProxyAuthenticationLevelMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP proxy authentication credential specified an impersonation level restriction ({0}) that is stricter than the restriction for target server authentication ({1}).. + /// + internal static string ProxyImpersonationLevelMismatch { + get { + return ResourceManager.GetString("ProxyImpersonationLevelMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The PSHA1 key length '{0}' is invalid.. + /// + internal static string Psha1KeyLengthInvalid { + get { + return ResourceManager.GetString("Psha1KeyLengthInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The public key is not an RSA key.. + /// + internal static string PublicKeyNotRSA { + get { + return ResourceManager.GetString("PublicKeyNotRSA", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Positioned after last element.. + /// + internal static string QueryAfterNodes { + get { + return ResourceManager.GetString("QueryAfterNodes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Positioned before first element.. + /// + internal static string QueryBeforeNodes { + get { + return ResourceManager.GetString("QueryBeforeNodes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The string value can't be determined because the XPathNodeIterator has been moved past the first node.. + /// + internal static string QueryCantGetStringForMovedIterator { + get { + return ResourceManager.GetString("QueryCantGetStringForMovedIterator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Context node is not supported in node sequences.. + /// + internal static string QueryContextNotSupportedInSequences { + get { + return ResourceManager.GetString("QueryContextNotSupportedInSequences", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The argument to an IXsltContextFunction could not be converted to a string.. + /// + internal static string QueryFunctionStringArg { + get { + return ResourceManager.GetString("QueryFunctionStringArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to IXsltContextFunction return type '{0}' not supported.. + /// + internal static string QueryFunctionTypeNotSupported { + get { + return ResourceManager.GetString("QueryFunctionTypeNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An internal error has occurred. Item already exists.. + /// + internal static string QueryItemAlreadyExists { + get { + return ResourceManager.GetString("QueryItemAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The XPathNodeIterator has been invalidated. XPathNodeIterators passed as arguments to IXsltContextFunctions are only valid within the function. They cannot be cached for later use or returned as the result of the function.. + /// + internal static string QueryIteratorOutOfScope { + get { + return ResourceManager.GetString("QueryIteratorOutOfScope", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XPathNavigator must be a SeekableXPathNavigator.. + /// + internal static string QueryMustBeSeekable { + get { + return ResourceManager.GetString("QueryMustBeSeekable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The function '{0}' is not implemented.. + /// + internal static string QueryNotImplemented { + get { + return ResourceManager.GetString("QueryNotImplemented", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XPathNavigator positions cannot be compared.. + /// + internal static string QueryNotSortable { + get { + return ResourceManager.GetString("QueryNotSortable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to IXsltContextVariables cannot return null.. + /// + internal static string QueryVariableNull { + get { + return ResourceManager.GetString("QueryVariableNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to IXsltContextVariable type '{0}' not supported.. + /// + internal static string QueryVariableTypeNotSupported { + get { + return ResourceManager.GetString("QueryVariableTypeNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Read is not supported on this stream.. + /// + internal static string ReadNotSupported { + get { + return ResourceManager.GetString("ReadNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The receive context, {0}, is in the {1} state. Receive contexts cannot be used for sending delayed acks unless they are in the Received state.. + /// + internal static string ReceiveContextCannotBeUsed { + get { + return ResourceManager.GetString("ReceiveContextCannotBeUsed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The receive context, {0}, cannot be used for sending delayed acks because it is in the Faulted state.. + /// + internal static string ReceiveContextFaulted { + get { + return ResourceManager.GetString("ReceiveContextFaulted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The receive context, {0}, is in an unsupported state '{1}'. This indicates an internal error in the implementation of that receive context.. + /// + internal static string ReceiveContextInInvalidState { + get { + return ResourceManager.GetString("ReceiveContextInInvalidState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request message in the request context received from channel '{0}' is null.. + /// + internal static string ReceivedMessageInRequestContextNull { + get { + return ResourceManager.GetString("ReceivedMessageInRequestContextNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint returned a {0}Response when the {0} request had not been sent. This is a WS-ReliableMessaging protocol violation. The reliable session was faulted.. + /// + internal static string ReceivedResponseBeforeRequestExceptionString { + get { + return ResourceManager.GetString("ReceivedResponseBeforeRequestExceptionString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0}Response was received when the {0} request had not been sent. This is a WS-ReliableMessaging protocol violation. The reliable session cannot continue.. + /// + internal static string ReceivedResponseBeforeRequestFaultString { + get { + return ResourceManager.GetString("ReceivedResponseBeforeRequestFaultString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Receive request on local address {0} timed out after {1}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string ReceiveRequestTimedOut { + get { + return ResourceManager.GetString("ReceiveRequestTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Receive request timed out after {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string ReceiveRequestTimedOutNoLocalAddress { + get { + return ResourceManager.GetString("ReceiveRequestTimedOutNoLocalAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The channel received an unexpected fault input message while closing. The fault reason given is: '{0}'. + /// + internal static string ReceiveShutdownReturnedFault { + get { + return ResourceManager.GetString("ReceiveShutdownReturnedFault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The channel received an unexpected fault input message with Action = '{0}' while closing. You should only close your channel when you are not expecting any more input messages.. + /// + internal static string ReceiveShutdownReturnedLargeFault { + get { + return ResourceManager.GetString("ReceiveShutdownReturnedLargeFault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The channel received an unexpected input message with Action '{0}' while closing. You should only close your channel when you are not expecting any more input messages.. + /// + internal static string ReceiveShutdownReturnedMessage { + get { + return ResourceManager.GetString("ReceiveShutdownReturnedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Receive on local address {0} timed out after {1}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string ReceiveTimedOut { + get { + return ResourceManager.GetString("ReceiveTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Receive timed out after {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string ReceiveTimedOut2 { + get { + return ResourceManager.GetString("ReceiveTimedOut2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Receive timed out after {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string ReceiveTimedOutNoLocalAddress { + get { + return ResourceManager.GetString("ReceiveTimedOutNoLocalAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Application {0} has recycling enabled. Recycling of applications is not supported under COM+ hosting.. + /// + internal static string RecycledApplicationNotSupportedForComplusHostedScenarios { + get { + return ResourceManager.GetString("RecycledApplicationNotSupportedForComplusHostedScenarios", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The requested resouce has not changed and should be taken from cache.. + /// + internal static string RedirectCache { + get { + return ResourceManager.GetString("RedirectCache", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RedirectionType 'Cache' does not allow any RedirectionLocation objects be passed into the constructor.. + /// + internal static string RedirectCacheNoLocationAllowed { + get { + return ResourceManager.GetString("RedirectCacheNoLocationAllowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The requested resource has been moved.. + /// + internal static string RedirectGenericMessage { + get { + return ResourceManager.GetString("RedirectGenericMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}. + /// + internal static string RedirectionInfoStringFormatNoNamespace { + get { + return ResourceManager.GetString("RedirectionInfoStringFormatNoNamespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} ({1}). + /// + internal static string RedirectionInfoStringFormatWithNamespace { + get { + return ResourceManager.GetString("RedirectionInfoStringFormatWithNamespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to At least one RedirectionLocation must be provided for this RedirectionType.. + /// + internal static string RedirectMustProvideLocation { + get { + return ResourceManager.GetString("RedirectMustProvideLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The requested resource has moved to one of the following locations: + ///{0}. + /// + internal static string RedirectResource { + get { + return ResourceManager.GetString("RedirectResource", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The requested resource must be accessed through one of the following intermediary service locations: + ///{0}. + /// + internal static string RedirectUseIntermediary { + get { + return ResourceManager.GetString("RedirectUseIntermediary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid RefreshInterval value of {0}; it must be greater than zero. + /// + internal static string RefreshIntervalMustBeGreaterThanZero { + get { + return ResourceManager.GetString("RefreshIntervalMustBeGreaterThanZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Due to a request context abort call, the reliable reply session channel potentially has a gap in its reply sequence. The ExactlyOnce assurance can no longer be satisfied. The reliable session was faulted.. + /// + internal static string ReliableRequestContextAborted { + get { + return ResourceManager.GetString("ReliableRequestContextAborted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The following remote identity failed verification: '{0}'.. + /// + internal static string RemoteIdentityFailedVerification { + get { + return ResourceManager.GetString("RemoteIdentityFailedVerification", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stream Security is required at {0}, but no security context was negotiated. This is likely caused by the remote endpoint missing a StreamSecurityBindingElement from its binding.. + /// + internal static string RemoteSecurityNotNegotiatedOnStreamUpgrade { + get { + return ResourceManager.GetString("RemoteSecurityNotNegotiatedOnStreamUpgrade", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The renew security session message does not have the session token as a supporting token.. + /// + internal static string RenewSessionMissingSupportingToken { + get { + return ResourceManager.GetString("RenewSessionMissingSupportingToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no handler registered for session token renew event.. + /// + internal static string RenewSessionTokenHandlerNotSet { + get { + return ResourceManager.GetString("RenewSessionTokenHandlerNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Repeated moniker keyword.. + /// + internal static string RepeatedKeyword { + get { + return ResourceManager.GetString("RepeatedKeyword", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A reply has already been sent from this RequestContext.. + /// + internal static string ReplyAlreadySent { + get { + return ResourceManager.GetString("ReplyAlreadySent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint failed to include a required SequenceAcknowledgement header on a reliable reply message. The reliable session was faulted.. + /// + internal static string ReplyMissingAcknowledgement { + get { + return ResourceManager.GetString("ReplyMissingAcknowledgement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The reply was not signed with the required signing token.. + /// + internal static string ReplyWasNotSignedWithRequiredSigningToken { + get { + return ResourceManager.GetString("ReplyWasNotSignedWithRequiredSigningToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request channel timed out attempting to send after {0}. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string RequestChannelSendTimedOut { + get { + return ResourceManager.GetString("RequestChannelSendTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request channel timed out while waiting for a reply after {0}. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string RequestChannelWaitForReplyTimedOut { + get { + return ResourceManager.GetString("RequestChannelWaitForReplyTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The requestContext has been aborted.. + /// + internal static string RequestContextAborted { + get { + return ResourceManager.GetString("RequestContextAborted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This collection holds response headers and cannot contain the specified request header '{0}'.. + /// + internal static string RequestHeaderWithResponseHeadersCollection { + get { + return ResourceManager.GetString("RequestHeaderWithResponseHeadersCollection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The initialization process of the request message timed out after {0}. To increase this quota, use the '{1}' property on the '{2}'.. + /// + internal static string RequestInitializationTimeoutReached { + get { + return ResourceManager.GetString("RequestInitializationTimeoutReached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A reply message cannot be created because the request message does not have a MessageID.. + /// + internal static string RequestMessageDoesNotHaveAMessageID { + get { + return ResourceManager.GetString("RequestMessageDoesNotHaveAMessageID", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RequestSecurityToken message does not match the endpoint filters the service '{0}' is expecting incoming messages to match. This may be because the RequestSecurityToken was intended to be sent to a different service.. + /// + internal static string RequestSecurityTokenDoesNotMatchEndpointFilters { + get { + return ResourceManager.GetString("RequestSecurityTokenDoesNotMatchEndpointFilters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Request timed out after {0} while establishing a transport connection to {1}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string RequestTimedOutEstablishingTransportSession { + get { + return ResourceManager.GetString("RequestTimedOutEstablishingTransportSession", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The interface with IID {0} is not configured in the COM+ catalog and cannot be exposed as a web service.. + /// + internal static string RequireConfiguredInterfaces { + get { + return ResourceManager.GetString("RequireConfiguredInterfaces", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The interface with IID {0} has no methods configured in the COM+ catalog and cannot be exposed as a web service.. + /// + internal static string RequireConfiguredMethods { + get { + return ResourceManager.GetString("RequireConfiguredMethods", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The required {0} attribute is missing from the {1} element in the {2} assertion. The ReliableSessionBindingElement could not be created.. + /// + internal static string RequiredAttributeIsMissing { + get { + return ResourceManager.GetString("RequiredAttributeIsMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Attribute '{0}' is required on element '{1}'.. + /// + internal static string RequiredAttributeMissing { + get { + return ResourceManager.GetString("RequiredAttributeMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' required message part was not encrypted.. + /// + internal static string RequiredMessagePartNotEncrypted { + get { + return ResourceManager.GetString("RequiredMessagePartNotEncrypted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}', '{1}' required message part was not encrypted.. + /// + internal static string RequiredMessagePartNotEncryptedNs { + get { + return ResourceManager.GetString("RequiredMessagePartNotEncryptedNs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' required message part was not signed.. + /// + internal static string RequiredMessagePartNotSigned { + get { + return ResourceManager.GetString("RequiredMessagePartNotSigned", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}', '{1}' required message part was not signed.. + /// + internal static string RequiredMessagePartNotSignedNs { + get { + return ResourceManager.GetString("RequiredMessagePartNotSignedNs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} assertion's required Milliseconds attribute is not schema compliant. Milliseconds must be convertible to an unsigned long. The ReliableSessionBindingElement could not be created.. + /// + internal static string RequiredMillisecondsAttributeIncorrect { + get { + return ResourceManager.GetString("RequiredMillisecondsAttributeIncorrect", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security header element '{0}' with the '{1}' id must be signed.. + /// + internal static string RequiredSecurityHeaderElementNotSigned { + get { + return ResourceManager.GetString("RequiredSecurityHeaderElementNotSigned", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' security token with the '{1}' attachment mode must be encrypted.. + /// + internal static string RequiredSecurityTokenNotEncrypted { + get { + return ResourceManager.GetString("RequiredSecurityTokenNotEncrypted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' security token with the '{1}' attachment mode must be signed.. + /// + internal static string RequiredSecurityTokenNotSigned { + get { + return ResourceManager.GetString("RequiredSecurityTokenNotSigned", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The signature must be in the security header.. + /// + internal static string RequiredSignatureMissing { + get { + return ResourceManager.GetString("RequiredSignatureMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Required timestamp missing in security header.. + /// + internal static string RequiredTimestampMissingInSecurityHeader { + get { + return ResourceManager.GetString("RequiredTimestampMissingInSecurityHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The required WSDL extension element '{0}' from namespace '{1}' was not handled.. + /// + internal static string RequiredWSDLExtensionIgnored { + get { + return ResourceManager.GetString("RequiredWSDLExtensionIgnored", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' binding with the '{1}' namespace is configured to issue cookie security context tokens. COM+ Integration services does not support cookie security context tokens.. + /// + internal static string RequireNonCookieMode { + get { + return ResourceManager.GetString("RequireNonCookieMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Peer resolver threw an exception. Please refer to InnerException.. + /// + internal static string ResolverException { + get { + return ResourceManager.GetString("ResolverException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resolving an External reference token requires appropriate SecurityTokenParameters to be specified.. + /// + internal static string ResolvingExternalTokensRequireSecurityTokenParameters { + get { + return ResourceManager.GetString("ResolvingExternalTokensRequireSecurityTokenParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The content type {0} of the response message does not match the content type of the binding ({1}). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first {2} bytes of the response were: '{3}'.. + /// + internal static string ResponseContentTypeMismatch { + get { + return ResourceManager.GetString("ResponseContentTypeMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The content type {0} of the message is not supported by the encoder.. + /// + internal static string ResponseContentTypeNotSupported { + get { + return ResourceManager.GetString("ResponseContentTypeNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This collection holds request headers and cannot contain the specified response header '{0}'.. + /// + internal static string ResponseHeaderWithRequestHeadersCollection { + get { + return ResourceManager.GetString("ResponseHeaderWithRequestHeadersCollection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The requested resource is available.. + /// + internal static string RetryGenericMessage { + get { + return ResourceManager.GetString("RetryGenericMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to revert impersonation. {0}. + /// + internal static string RevertImpersonationFailure { + get { + return ResourceManager.GetString("RevertImpersonationFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The reverting operation failed with the exception '{0}'.. + /// + internal static string RevertingPrivilegeFailed { + get { + return ResourceManager.GetString("RevertingPrivilegeFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint at {0} has stopped accepting wsrm sessions.. + /// + internal static string RMEndpointNotFoundReason { + get { + return ResourceManager.GetString("RMEndpointNotFoundReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AcceleratedTokenAuthenticator does not expect RequestSecurityTokenResponse from the client.. + /// + internal static string RstDirectDoesNotExpectRstr { + get { + return ResourceManager.GetString("RstDirectDoesNotExpectRstr", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The negotiation RequestSecurityTokenResponse has a different context from the authenticator RequestSecurityTokenResponse.. + /// + internal static string RSTRAuthenticatorHasBadContext { + get { + return ResourceManager.GetString("RSTRAuthenticatorHasBadContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RequestSecurityTokenResponse CombinedHash is incorrect.. + /// + internal static string RSTRAuthenticatorIncorrect { + get { + return ResourceManager.GetString("RSTRAuthenticatorIncorrect", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The authenticator was not included in the final leg of negotiation.. + /// + internal static string RSTRAuthenticatorNotPresent { + get { + return ResourceManager.GetString("RSTRAuthenticatorNotPresent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RequestSecurityTokenResponse has multiple RequestedSecurityToken elements.. + /// + internal static string RstrHasMultipleIssuedTokens { + get { + return ResourceManager.GetString("RstrHasMultipleIssuedTokens", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RequestSecurityTokenResponse has multiple RequestedProofToken elements.. + /// + internal static string RstrHasMultipleProofTokens { + get { + return ResourceManager.GetString("RstrHasMultipleProofTokens", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to KeySize element not present in RequestSecurityTokenResponse.. + /// + internal static string RstrKeySizeNotProvided { + get { + return ResourceManager.GetString("RstrKeySizeNotProvided", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DispatchOperation requires Invoker.. + /// + internal static string RuntimeRequiresInvoker0 { + get { + return ResourceManager.GetString("RuntimeRequiresInvoker0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to On DuplexSecurityProtocolFactory, the same protocol factory cannot be set for the forward and reverse directions.. + /// + internal static string SameProtocolFactoryCannotBeSetForBothDuplexDirections { + get { + return ResourceManager.GetString("SameProtocolFactoryCannotBeSetForBothDuplexDirections", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was a validation error on a schema generated during export: + /// Source: {0} + /// Line: {1} Column: {2} + /// Validation Error: {3}. + /// + internal static string SchemaValidationError { + get { + return ResourceManager.GetString("SchemaValidationError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Context protocol was unable to parse the context header. Nodes disallowed by the context header schema were found inside the context header.. + /// + internal static string SchemaViolationInsideContextHeader { + get { + return ResourceManager.GetString("SchemaViolationInsideContextHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The 'scopeName' argument to the InstanceKey constructor must be a non-empty string which indicates the scope of uniqueness for the key. Durable services use the service namespace and name as the scope of uniqueness.. + /// + internal static string ScopeNameMustBeSpecified { + get { + return ResourceManager.GetString("ScopeNameMustBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error decoding the Cookie element of SecurityContextSecurityToken.. + /// + internal static string SctCookieBlobDecodeFailure { + get { + return ResourceManager.GetString("SctCookieBlobDecodeFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Issuing cookie SecurityContextSecurityToken is not supported.. + /// + internal static string SctCookieNotSupported { + get { + return ResourceManager.GetString("SctCookieNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SecurityContextSecurityToken's Cookie element either does not contain '{0}' or has a wrong value for it.. + /// + internal static string SctCookieValueMissingOrIncorrect { + get { + return ResourceManager.GetString("SctCookieValueMissingOrIncorrect", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error parsing SecurityContextSecurityToken Cookie XML.. + /// + internal static string SctCookieXmlParseError { + get { + return ResourceManager.GetString("SctCookieXmlParseError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not establish secure channel for SSL/TLS with authority '{0}'.. + /// + internal static string SecureChannelFailure { + get { + return ResourceManager.GetString("SecureChannelFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot create security binding element based on configuration data. The secure conversation bootstrap requires another secure conversation which is not supported. . + /// + internal static string SecureConversationBootstrapCannotUseSecureConversation { + get { + return ResourceManager.GetString("SecureConversationBootstrapCannotUseSecureConversation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A secure conversation cancellation is not allowed by the binding.. + /// + internal static string SecureConversationCancelNotAllowedFaultReason { + get { + return ResourceManager.GetString("SecureConversationCancelNotAllowedFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configured SecureConversation version does not support sessions. Use WSSecureConversationFeb2005 or above.. + /// + internal static string SecureConversationDriverVersionDoesNotSupportSession { + get { + return ResourceManager.GetString("SecureConversationDriverVersionDoesNotSupportSession", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot create security binding element based on the configuration data. When secure conversation authentication mode is selected, the secure conversation bootstrap binding element must also be specified. . + /// + internal static string SecureConversationNeedsBootstrapSecurity { + get { + return ResourceManager.GetString("SecureConversationNeedsBootstrapSecurity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot establish a reliable session without secure conversation. Enable secure conversation.. + /// + internal static string SecureConversationRequiredByReliableSession { + get { + return ResourceManager.GetString("SecureConversationRequiredByReliableSession", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security channel or listener factory creation failed. Secure conversation security token parameters do not specify the bootstrap security binding element.. + /// + internal static string SecureConversationSecurityTokenParametersRequireBootstrapBinding { + get { + return ResourceManager.GetString("SecureConversationSecurityTokenParametersRequireBootstrapBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security algorithm suite was not specified on '{0}'.. + /// + internal static string SecurityAlgorithmSuiteNotSet { + get { + return ResourceManager.GetString("SecurityAlgorithmSuiteNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' dynamic link library (dll) failed to load.. + /// + internal static string SecurityAuditFailToLoadDll { + get { + return ResourceManager.GetString("SecurityAuditFailToLoadDll", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SecurityAuditBehavior is not supported on the channel factory.. + /// + internal static string SecurityAuditNotSupportedOnChannelFactory { + get { + return ResourceManager.GetString("SecurityAuditNotSupportedOnChannelFactory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writing audit messages to the Security log is not supported by the current platform. You must write audit messages to the Application log.. + /// + internal static string SecurityAuditPlatformNotSupported { + get { + return ResourceManager.GetString("SecurityAuditPlatformNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A security policy was imported for the endpoint. The security policy contains requirements that cannot be represented in a Windows Communication Foundation configuration. Look for a comment about the SecurityBindingElement parameters that are required in the configuration file that was generated. Create the correct binding element with code. The binding configuration that is in the configuration file is not secure.. + /// + internal static string SecurityBindingElementCannotBeExpressedInConfig { + get { + return ResourceManager.GetString("SecurityBindingElementCannotBeExpressedInConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This SecurityProtocol instance was not set up to process incoming messages.. + /// + internal static string SecurityBindingNotSetUpToProcessIncomingMessages { + get { + return ResourceManager.GetString("SecurityBindingNotSetUpToProcessIncomingMessages", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This SecurityProtocol instance was not set up to process outgoing messages.. + /// + internal static string SecurityBindingNotSetUpToProcessOutgoingMessages { + get { + return ResourceManager.GetString("SecurityBindingNotSetUpToProcessOutgoingMessages", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SecurityBinding for the ('{0}','{1}') binding for the ('{2}','{3}') contract only supports the OneWay operation.. + /// + internal static string SecurityBindingSupportsOneWayOnly { + get { + return ResourceManager.GetString("SecurityBindingSupportsOneWayOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security capabilities of binding '{0}' do not match those of the generated runtime object. Most likely this means the binding contains a StreamSecurityBindingElement, but lacks a TransportBindingElement that supports Stream Security (such as TCP or Named Pipes). Either remove the unused StreamSecurityBindingElement or use a transport that supports this element.. + /// + internal static string SecurityCapabilitiesMismatched { + get { + return ResourceManager.GetString("SecurityCapabilitiesMismatched", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ExtendedProtectionPolicy specified a PolicyEnforcement of 'Always' and a ChannelBinding was not found. This prevents the ExtendedProtectionPolicy from being enforced. Change the binding to make a ChannelBinding available, for StandardBindings use a SecurityMode of TransportWithMessageCredential and a ClientCredential type of Windows. For CustomBindings use SspiNegotiationOverTransport or KerberosOverTransport. Alternatively, specify a PolicyEnforcement of 'Never'.. + /// + internal static string SecurityChannelBindingMissing { + get { + return ResourceManager.GetString("SecurityChannelBindingMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ExtendedProtectionPolicy specified a PolicyEnforcement of 'Always' which is not supported for the authentication mode requested. This prevents the ExtendedProtectionPolicy from being enforced. For StandardBindings use a SecurityMode of TransportWithMessageCredential and a ClientCredential type of Windows. For CustomBindings use SspiNegotiationOverTransport or KerberosOverTransport. Alternatively, specify a PolicyEnforcement of 'Never'.. + /// + internal static string SecurityChannelListenerChannelExtendedProtectionNotSupported { + get { + return ResourceManager.GetString("SecurityChannelListenerChannelExtendedProtectionNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security channel listener was not specified on '{0}'.. + /// + internal static string SecurityChannelListenerNotSet { + get { + return ResourceManager.GetString("SecurityChannelListenerNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot start impersonation because the SecurityContext for the UltimateReceiver role from the request message with the '{0}' action is not mapped to a Windows identity.. + /// + internal static string SecurityContextDoesNotAllowImpersonation { + get { + return ResourceManager.GetString("SecurityContextDoesNotAllowImpersonation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SecurityContextSecurityToken with context-id={0} (key generation-id={1}) has expired.. + /// + internal static string SecurityContextExpired { + get { + return ResourceManager.GetString("SecurityContextExpired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SecurityContextSecurityToken with context-id={0} (no key generation-id) has expired.. + /// + internal static string SecurityContextExpiredNoKeyGeneration { + get { + return ResourceManager.GetString("SecurityContextExpiredNoKeyGeneration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SecurityContextSecurityToken with Context-id={0} (generation-id={1}) has expired.. + /// + internal static string SecurityContextKeyExpired { + get { + return ResourceManager.GetString("SecurityContextKeyExpired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SecurityContextSecurityToken with Context-id={0} (no key generation-id) has expired.. + /// + internal static string SecurityContextKeyExpiredNoKeyGeneration { + get { + return ResourceManager.GetString("SecurityContextKeyExpiredNoKeyGeneration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SecurityContext for the UltimateReceiver role is missing from the SecurityContextProperty of the request message with action '{0}'.. + /// + internal static string SecurityContextMissing { + get { + return ResourceManager.GetString("SecurityContextMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SecurityContextSecurityToken with context-id={0} (key generation-id={1}) is not registered.. + /// + internal static string SecurityContextNotRegistered { + get { + return ResourceManager.GetString("SecurityContextNotRegistered", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server '{0}' sent back a fault indicating it is in the process of shutting down. Please see the inner exception for fault details.. + /// + internal static string SecurityEndpointNotFound { + get { + return ResourceManager.GetString("SecurityEndpointNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security header is empty.. + /// + internal static string SecurityHeaderIsEmpty { + get { + return ResourceManager.GetString("SecurityHeaderIsEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The listener is not accepting new secure conversations because it is closing.. + /// + internal static string SecurityListenerClosing { + get { + return ResourceManager.GetString("SecurityListenerClosing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server is not accepting new secure conversations currently because it is closing. Please retry later.. + /// + internal static string SecurityListenerClosingFaultReason { + get { + return ResourceManager.GetString("SecurityListenerClosingFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security negotiation with '{0}' cannot be initiated because the confidential endpoint address header ('{1}', '{2}') cannot be encrypted during the course of the negotiation.. + /// + internal static string SecurityNegotiationCannotProtectConfidentialEndpointHeader { + get { + return ResourceManager.GetString("SecurityNegotiationCannotProtectConfidentialEndpointHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security negotiation message with action '{0}' is larger than the maximum allowed buffer size '{1}'. If you are using a streamed transport consider increasing the maximum buffer size on the transport.. + /// + internal static string SecurityNegotiationMessageTooLarge { + get { + return ResourceManager.GetString("SecurityNegotiationMessageTooLarge", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security protocol '{0}' cannot do replay detection.. + /// + internal static string SecurityProtocolCannotDoReplayDetection { + get { + return ResourceManager.GetString("SecurityProtocolCannotDoReplayDetection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Duplex security is not supported by the security protocol factory '{0}'.. + /// + internal static string SecurityProtocolFactoryDoesNotSupportDuplex { + get { + return ResourceManager.GetString("SecurityProtocolFactoryDoesNotSupportDuplex", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Request-reply security is not supported by the security protocol factory '{0}'.. + /// + internal static string SecurityProtocolFactoryDoesNotSupportRequestReply { + get { + return ResourceManager.GetString("SecurityProtocolFactoryDoesNotSupportRequestReply", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security protocol factory must be set before this operation is performed.. + /// + internal static string SecurityProtocolFactoryShouldBeSetBeforeThisOperation { + get { + return ResourceManager.GetString("SecurityProtocolFactoryShouldBeSetBeforeThisOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SecurityContextSecurityToken's key needs to be renewed.. + /// + internal static string SecurityRenewFaultReason { + get { + return ResourceManager.GetString("SecurityRenewFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server '{0}' sent back a fault indicating it is too busy to process the request. Please retry later. Please see the inner exception for fault details.. + /// + internal static string SecurityServerTooBusy { + get { + return ResourceManager.GetString("SecurityServerTooBusy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security session was terminated This may be because no messages were received on the session for too long.. + /// + internal static string SecuritySessionAbortedFaultReason { + get { + return ResourceManager.GetString("SecuritySessionAbortedFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security session with id '{0}' is already pending.. + /// + internal static string SecuritySessionAlreadyPending { + get { + return ResourceManager.GetString("SecuritySessionAlreadyPending", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The receiver sent back a security session fault message. Retry the request.. + /// + internal static string SecuritySessionFaultReplyWasSent { + get { + return ResourceManager.GetString("SecuritySessionFaultReplyWasSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security session id '{0}' is already present in the filter table.. + /// + internal static string SecuritySessionIdAlreadyPresentInFilterTable { + get { + return ResourceManager.GetString("SecuritySessionIdAlreadyPresentInFilterTable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The session key must be renewed before it can secure application messages.. + /// + internal static string SecuritySessionKeyIsStale { + get { + return ResourceManager.GetString("SecuritySessionKeyIsStale", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot create a security session. Retry later.. + /// + internal static string SecuritySessionLimitReached { + get { + return ResourceManager.GetString("SecuritySessionLimitReached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No security session listener was found for message with action '{0}'.. + /// + internal static string SecuritySessionListenerNotFound { + get { + return ResourceManager.GetString("SecuritySessionListenerNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No security session with id '{0}' is pending.. + /// + internal static string SecuritySessionNotPending { + get { + return ResourceManager.GetString("SecuritySessionNotPending", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security session protocol factory must be set before this operation is performed.. + /// + internal static string SecuritySessionProtocolFactoryShouldBeSetBeforeThisOperation { + get { + return ResourceManager.GetString("SecuritySessionProtocolFactoryShouldBeSetBeforeThisOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security session requires a security token authenticator that implements '{0}'. '{1}' does not implement '{0}'.. + /// + internal static string SecuritySessionRequiresIssuanceAuthenticator { + get { + return ResourceManager.GetString("SecuritySessionRequiresIssuanceAuthenticator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security sessions require all messages to be signed.. + /// + internal static string SecuritySessionRequiresMessageIntegrity { + get { + return ResourceManager.GetString("SecuritySessionRequiresMessageIntegrity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security session requires a security token resolver that implements '{1}'. The security token resolver '{0}' does not implement '{1}'.. + /// + internal static string SecuritySessionRequiresSecurityContextTokenCache { + get { + return ResourceManager.GetString("SecuritySessionRequiresSecurityContextTokenCache", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security settings lifetime manager was not specified on '{0}'.. + /// + internal static string SecuritySettingsLifetimeManagerNotSet { + get { + return ResourceManager.GetString("SecuritySettingsLifetimeManagerNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security standards manager was not specified on '{0}'.. + /// + internal static string SecurityStandardsManagerNotSet { + get { + return ResourceManager.GetString("SecurityStandardsManagerNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The DataProtectionSecurityStateEncoder is unable to decode the byte array. Ensure that a 'UserProfile' is loaded, if this is a 'web farm scenario' ensure all servers are running as the same user with the roaming profiles or provide a custom SecurityStateEncoder'.. + /// + internal static string SecurityStateEncoderDecodingFailure { + get { + return ResourceManager.GetString("SecurityStateEncoderDecodingFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The DataProtectionSecurityStateEncoder is unable to encode the byte array. Ensure that a 'UserProfile' is loaded, if this is a 'web farm scenario' ensure all servers are running as the same user with the roaming profiles or provide a custom SecurityStateEncoder'.. + /// + internal static string SecurityStateEncoderEncodingFailure { + get { + return ResourceManager.GetString("SecurityStateEncoderEncodingFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A security token ('{0}', '{1}') was found outside the security header. The message may have been altered in transit.. + /// + internal static string SecurityTokenFoundOutsideSecurityHeader { + get { + return ResourceManager.GetString("SecurityTokenFoundOutsideSecurityHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security token manager cannot create a token authenticator for requirement '{0}'.. + /// + internal static string SecurityTokenManagerCannotCreateAuthenticatorForRequirement { + get { + return ResourceManager.GetString("SecurityTokenManagerCannotCreateAuthenticatorForRequirement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security token manager cannot create a token provider for requirement '{0}'.. + /// + internal static string SecurityTokenManagerCannotCreateProviderForRequirement { + get { + return ResourceManager.GetString("SecurityTokenManagerCannotCreateProviderForRequirement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security token manager cannot create a token serializer for security token version '{0}'.. + /// + internal static string SecurityTokenManagerCannotCreateSerializerForVersion { + get { + return ResourceManager.GetString("SecurityTokenManagerCannotCreateSerializerForVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SecurityTokenProvider '{0}' could not resolve the token.. + /// + internal static string SecurityTokenNotResolved { + get { + return ResourceManager.GetString("SecurityTokenNotResolved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The CloneCore method of {0} type returned an invalid result. . + /// + internal static string SecurityTokenParametersCloneInvalidResult { + get { + return ResourceManager.GetString("SecurityTokenParametersCloneInvalidResult", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding ('{0}', '{1}') is configured with a security token parameter '{2}' that has an incompatible security token inclusion mode '{3}'. Specify an alternate security token inclusion mode (for example, '{4}').. + /// + internal static string SecurityTokenParametersHasIncompatibleInclusionMode { + get { + return ResourceManager.GetString("SecurityTokenParametersHasIncompatibleInclusionMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When authentication schemes 'Basic' and also '{0}' are enabled, the value of IncludeWindowsGroups for Windows ('{1}') and UserName authentication ('{2}') must match. Please consider using the same value in both places.. + /// + internal static string SecurityTokenProviderIncludeWindowsGroupsInconsistent { + get { + return ResourceManager.GetString("SecurityTokenProviderIncludeWindowsGroupsInconsistent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding ('{0}','{1}') for contract ('{2}','{3}') has been configured with an incompatible security version that does not support unattached references to EncryptedKeys. Use '{4}' or higher as the security version for the binding.. + /// + internal static string SecurityVersionDoesNotSupportEncryptedKeyBinding { + get { + return ResourceManager.GetString("SecurityVersionDoesNotSupportEncryptedKeyBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SecurityVersion '{0}' does not support signature confirmation. Use a later SecurityVersion.. + /// + internal static string SecurityVersionDoesNotSupportSignatureConfirmation { + get { + return ResourceManager.GetString("SecurityVersionDoesNotSupportSignatureConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}','{1}' binding for the '{2}','{3}' contract is configured with a security version that does not support external references to X.509 tokens using the certificate's thumbprint value. Use '{4}' or higher as the security version for the binding.. + /// + internal static string SecurityVersionDoesNotSupportThumbprintX509KeyIdentifierClause { + get { + return ResourceManager.GetString("SecurityVersionDoesNotSupportThumbprintX509KeyIdentifierClause", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A filter has attempted to access the body of a Message. Use a MessageBuffer instead if body filtering is required.. + /// + internal static string SeekableMessageNavBodyForbidden { + get { + return ResourceManager.GetString("SeekableMessageNavBodyForbidden", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XML unique ID not supported.. + /// + internal static string SeekableMessageNavIDNotSupported { + get { + return ResourceManager.GetString("SeekableMessageNavIDNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The position is not valid for this navigator.. + /// + internal static string SeekableMessageNavInvalidPosition { + get { + return ResourceManager.GetString("SeekableMessageNavInvalidPosition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot call '{0}' on a non-atomized navigator.. + /// + internal static string SeekableMessageNavNonAtomized { + get { + return ResourceManager.GetString("SeekableMessageNavNonAtomized", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Not allowed to override prefix '{0}'.. + /// + internal static string SeekableMessageNavOverrideForbidden { + get { + return ResourceManager.GetString("SeekableMessageNavOverrideForbidden", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Seek is not supported on this stream.. + /// + internal static string SeekNotSupported { + get { + return ResourceManager.GetString("SeekNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You cannot Send messages on a channel after CloseOutputSession has been called.. + /// + internal static string SendCannotBeCalledAfterCloseOutputSession { + get { + return ResourceManager.GetString("SendCannotBeCalledAfterCloseOutputSession", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security token parameters must be specified with supporting tokens for each message.. + /// + internal static string SenderSideSupportingTokensMustSpecifySecurityTokenParameters { + get { + return ResourceManager.GetString("SenderSideSupportingTokensMustSpecifySecurityTokenParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected code path for server security application, sending outgoing message on Recipient.. + /// + internal static string SendingOutgoingmessageOnRecipient { + get { + return ResourceManager.GetString("SendingOutgoingmessageOnRecipient", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sending to via {0} timed out after {1}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string SendToViaTimedOut { + get { + return ResourceManager.GetString("SendToViaTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Sequence is closed and cannot accept new messages.. + /// + internal static string SequenceClosedFaultString { + get { + return ResourceManager.GetString("SequenceClosedFaultString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RM Source could not transfer the last message within the timeout the user specified.. + /// + internal static string SequenceTerminatedAddLastToWindowTimedOut { + get { + return ResourceManager.GetString("SequenceTerminatedAddLastToWindowTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server received a TerminateSequence message before all reply sequence messages were acknowledged. This is a violation of the reply sequence acknowledgement protocol.. + /// + internal static string SequenceTerminatedBeforeReplySequenceAcked { + get { + return ResourceManager.GetString("SequenceTerminatedBeforeReplySequenceAcked", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The wsrm:TerminateSequence protocol message was transmitted before the sequence was successfully completed.. + /// + internal static string SequenceTerminatedEarlyTerminateSequence { + get { + return ResourceManager.GetString("SequenceTerminatedEarlyTerminateSequence", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The inactivity timeout of ({0}) has been exceeded.. + /// + internal static string SequenceTerminatedInactivityTimeoutExceeded { + get { + return ResourceManager.GetString("SequenceTerminatedInactivityTimeoutExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Two different wsrm:LastMsgNumber values were specified. Because of this the reliable session cannot complete.. + /// + internal static string SequenceTerminatedInconsistentLastMsgNumber { + get { + return ResourceManager.GetString("SequenceTerminatedInconsistentLastMsgNumber", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The user specified maximum retry count for a particular message has been exceeded. Because of this the reliable session cannot continue.. + /// + internal static string SequenceTerminatedMaximumRetryCountExceeded { + get { + return ResourceManager.GetString("SequenceTerminatedMaximumRetryCountExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The CloseSequence request's reply message must carry a final acknowledgement. This is a violation of the WS-ReliableMessaging protocol. The reliable session cannot continue.. + /// + internal static string SequenceTerminatedMissingFinalAck { + get { + return ResourceManager.GetString("SequenceTerminatedMissingFinalAck", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to All of the reply sequence's messages must be acknowledged prior to closing the request sequence. This is a violation of the reply sequence's delivery guarantee. The session cannot continue.. + /// + internal static string SequenceTerminatedNotAllRepliesAcknowledged { + get { + return ResourceManager.GetString("SequenceTerminatedNotAllRepliesAcknowledged", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Due to a user abort the reliable session cannot continue.. + /// + internal static string SequenceTerminatedOnAbort { + get { + return ResourceManager.GetString("SequenceTerminatedOnAbort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The necessary size to buffer a sequence message has exceeded the configured buffer quota. Because of this the reliable session cannot continue.. + /// + internal static string SequenceTerminatedQuotaExceededException { + get { + return ResourceManager.GetString("SequenceTerminatedQuotaExceededException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The session has stopped waiting for a particular reply. Because of this the reliable session cannot continue.. + /// + internal static string SequenceTerminatedReliableRequestThrew { + get { + return ResourceManager.GetString("SequenceTerminatedReliableRequestThrew", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A reply message was received with no acknowledgement.. + /// + internal static string SequenceTerminatedReplyMissingAcknowledgement { + get { + return ResourceManager.GetString("SequenceTerminatedReplyMissingAcknowledgement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The user of the remote endpoint's reliable session expects no more messages and a new message arrived. Due to this the reliable session cannot continue.. + /// + internal static string SequenceTerminatedSessionClosedBeforeDone { + get { + return ResourceManager.GetString("SequenceTerminatedSessionClosedBeforeDone", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The wsrm:LastMsgNumber value is too small. A message with a larger sequence number has already been received.. + /// + internal static string SequenceTerminatedSmallLastMsgNumber { + get { + return ResourceManager.GetString("SequenceTerminatedSmallLastMsgNumber", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RM destination received an acknowledgement message. The RM destination does not process acknowledgement messages.. + /// + internal static string SequenceTerminatedUnexpectedAcknowledgement { + get { + return ResourceManager.GetString("SequenceTerminatedUnexpectedAcknowledgement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RM source received an AckRequested message. The RM source does not process AckRequested messages.. + /// + internal static string SequenceTerminatedUnexpectedAckRequested { + get { + return ResourceManager.GetString("SequenceTerminatedUnexpectedAckRequested", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RM source received an CloseSequence message. The RM source does not process CloseSequence messages.. + /// + internal static string SequenceTerminatedUnexpectedCloseSequence { + get { + return ResourceManager.GetString("SequenceTerminatedUnexpectedCloseSequence", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RM destination received an CloseSequenceResponse message. The RM destination does not process CloseSequenceResponse messages.. + /// + internal static string SequenceTerminatedUnexpectedCloseSequenceResponse { + get { + return ResourceManager.GetString("SequenceTerminatedUnexpectedCloseSequenceResponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RM source received a CreateSequence request. The RM source does not process CreateSequence requests.. + /// + internal static string SequenceTerminatedUnexpectedCS { + get { + return ResourceManager.GetString("SequenceTerminatedUnexpectedCS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RM destination received multiple CreateSequence requests with different OfferId values over the same session.. + /// + internal static string SequenceTerminatedUnexpectedCSOfferId { + get { + return ResourceManager.GetString("SequenceTerminatedUnexpectedCSOfferId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RM destination received a CreateSequenceResponse message. The RM destination does not process CreateSequenceResponse messages.. + /// + internal static string SequenceTerminatedUnexpectedCSR { + get { + return ResourceManager.GetString("SequenceTerminatedUnexpectedCSR", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RM source received multiple CreateSequenceResponse messages with different sequence identifiers over the same session.. + /// + internal static string SequenceTerminatedUnexpectedCSROfferId { + get { + return ResourceManager.GetString("SequenceTerminatedUnexpectedCSROfferId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RM source received a TerminateSequence message. The RM source does not process TerminateSequence messages.. + /// + internal static string SequenceTerminatedUnexpectedTerminateSequence { + get { + return ResourceManager.GetString("SequenceTerminatedUnexpectedTerminateSequence", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RM destination received a TerminateSequenceResponse message. The RM destination does not process TerminateSequenceResponse messages.. + /// + internal static string SequenceTerminatedUnexpectedTerminateSequenceResponse { + get { + return ResourceManager.GetString("SequenceTerminatedUnexpectedTerminateSequenceResponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An unknown error occurred while trying to add a sequence message to the window.. + /// + internal static string SequenceTerminatedUnknownAddToWindowError { + get { + return ResourceManager.GetString("SequenceTerminatedUnknownAddToWindowError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RM source does not support an RM destination initiated close since messages can be lost. The reliable session cannot continue.. + /// + internal static string SequenceTerminatedUnsupportedClose { + get { + return ResourceManager.GetString("SequenceTerminatedUnsupportedClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RM source does not support an RM destination initiated termination since messages can be lost. The reliable session cannot continue.. + /// + internal static string SequenceTerminatedUnsupportedTerminateSequence { + get { + return ResourceManager.GetString("SequenceTerminatedUnsupportedTerminateSequence", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The serialized token version {0} is unsupported.. + /// + internal static string SerializedTokenVersionUnsupported { + get { + return ResourceManager.GetString("SerializedTokenVersionUnsupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The recipient did not provide its certificate. This certificate is required by the TLS protocol. Both parties must have access to their certificates.. + /// + internal static string ServerCertificateNotProvided { + get { + return ResourceManager.GetString("ServerCertificateNotProvided", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}.OnCloseMessageReceived when state == Created.. + /// + internal static string ServerReceivedCloseMessageStateIsCreated { + get { + return ResourceManager.GetString("ServerReceivedCloseMessageStateIsCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server at {0} rejected the session-establishment request.. + /// + internal static string ServerRejectedSessionPreamble { + get { + return ResourceManager.GetString("ServerRejectedSessionPreamble", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server rejected the upgrade request.. + /// + internal static string ServerRejectedUpgradeRequest { + get { + return ResourceManager.GetString("ServerRejectedUpgradeRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server '{0}' is too busy to process this request. Try again later.. + /// + internal static string ServerTooBusy { + get { + return ResourceManager.GetString("ServerTooBusy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation Action={0}. + /// + internal static string ServiceBusyCountTrace { + get { + return ResourceManager.GetString("ServiceBusyCountTrace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service certificate is not provided for target '{0}'. Specify a service certificate in ClientCredentials. . + /// + internal static string ServiceCertificateNotProvidedOnClientCredentials { + get { + return ResourceManager.GetString("ServiceCertificateNotProvidedOnClientCredentials", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service certificate is not provided. Specify a service certificate in ServiceCredentials. . + /// + internal static string ServiceCertificateNotProvidedOnServiceCredentials { + get { + return ResourceManager.GetString("ServiceCertificateNotProvidedOnServiceCredentials", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to At least one operation on the '{0}' contract is configured with the TransactionFlowAttribute attribute set to Mandatory but the channel's binding '{1}' is not configured with a TransactionFlowBindingElement. The TransactionFlowAttribute attribute set to Mandatory cannot be used without a TransactionFlowBindingElement.. + /// + internal static string ServiceHasAtLeastOneOperationWithTransactionFlowEnabled { + get { + return ResourceManager.GetString("ServiceHasAtLeastOneOperationWithTransactionFlowEnabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service '{0}' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.. + /// + internal static string ServiceHasZeroAppEndpoints { + get { + return ResourceManager.GetString("ServiceHasZeroAppEndpoints", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operations marked with IsOneWay=true must not declare output parameters, by-reference parameters or return values.. + /// + internal static string ServiceOperationsMarkedWithIsOneWayTrueMust0 { + get { + return ResourceManager.GetString("ServiceOperationsMarkedWithIsOneWayTrueMust0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service's security session was not able to close its output session within the configured timeout ({0}).. + /// + internal static string ServiceSecurityCloseOutputSessionTimeout { + get { + return ResourceManager.GetString("ServiceSecurityCloseOutputSessionTimeout", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service's security session did not receive a 'close' message from the client within the configured timeout ({0}).. + /// + internal static string ServiceSecurityCloseTimeout { + get { + return ResourceManager.GetString("ServiceSecurityCloseTimeout", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The COM+ string in the .svc file was formatted incorrectly. (The string is "{0}".). + /// + internal static string ServiceStringFormatError { + get { + return ResourceManager.GetString("ServiceStringFormatError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} declared on method '{1}' in type '{2}' is invalid. {0}s are only valid on methods that are declared in a type that has ServiceContractAttribute. Either add ServiceContractAttribute to type '{2}' or remove {0} from method '{1}'.. + /// + internal static string ServicesWithoutAServiceContractAttributeCan2 { + get { + return ResourceManager.GetString("ServicesWithoutAServiceContractAttributeCan2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The session was closed before message transfer was complete.. + /// + internal static string SessionClosedBeforeDone { + get { + return ResourceManager.GetString("SessionClosedBeforeDone", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot renew the security session key. Session Key Renewal is not supported.. + /// + internal static string SessionKeyRenewalNotSupported { + get { + return ResourceManager.GetString("SessionKeyRenewalNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The session security token provider returned a token of type '{0}'. The token type expected is '{1}'.. + /// + internal static string SessionTokenIsNotGenericXmlToken { + get { + return ResourceManager.GetString("SessionTokenIsNotGenericXmlToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The session security token authenticator returned a token of type '{0}'. The token type expected is '{1}'.. + /// + internal static string SessionTokenIsNotSecurityContextToken { + get { + return ResourceManager.GetString("SessionTokenIsNotSecurityContextToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The session token was not closed by the server.. + /// + internal static string SessionTokenWasNotClosed { + get { + return ResourceManager.GetString("SessionTokenWasNotClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Session value '{0}' is invalid. Please specify 'CurrentSession','ServiceSession' or a valid non-negative Windows Session Id.. + /// + internal static string SessionValueInvalid { + get { + return ResourceManager.GetString("SessionValueInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operations {0} and {1} have the same action ({2}). Every operation must have a unique action value.. + /// + internal static string SFxActionDemuxerDuplicate { + get { + return ResourceManager.GetString("SFxActionDemuxerDuplicate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot create a typed message due to action mismatch, expecting {0} encountered {1}. + /// + internal static string SFxActionMismatch { + get { + return ResourceManager.GetString("SFxActionMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Part {1} in message {0} cannot be exported with RPC or encoded since its type is anonymous.. + /// + internal static string SFxAnonymousTypeNotSupported { + get { + return ResourceManager.GetString("SFxAnonymousTypeNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The IAsyncResult returned from Begin and the IAsyncResult supplied to the Callback are on different objects. These are required to be the same object.. + /// + internal static string SFxAsyncResultsDontMatch0 { + get { + return ResourceManager.GetString("SFxAsyncResultsDontMatch0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Method '{0}' in class '{1}' has bad parameter metadata: a pass-by-reference parameter is marked with the 'in' but not the 'out' parameter mode.. + /// + internal static string SFxBadByReferenceParameterMetadata { + get { + return ResourceManager.GetString("SFxBadByReferenceParameterMetadata", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Method '{0}' in class '{1}' has bad parameter metadata: a pass-by-value parameter is marked with the 'out' parameter mode.. + /// + internal static string SFxBadByValueParameterMetadata { + get { + return ResourceManager.GetString("SFxBadByValueParameterMetadata", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was a problem reading the MetadataSet argument: a MetadataSection instance with identifier '{0}' and dialect '{1}' has a Metadata property whose type does not match the dialect. The expected Metadata type for this dialect is '{2}' but was found to be '{3}'.. + /// + internal static string SFxBadMetadataDialect { + get { + return ResourceManager.GetString("SFxBadMetadataDialect", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The URL supplied to ServiceMetadataBehavior via the ExternalMetadataLocation property or the externalMetadataLocation attribute in the serviceMetadata section in config was a relative URL and there is no base address with which to resolve it. '{0}' was specified.. + /// + internal static string SFxBadMetadataLocationNoAppropriateBaseAddress { + get { + return ResourceManager.GetString("SFxBadMetadataLocationNoAppropriateBaseAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The URI supplied to ServiceMetadataBehavior via the ExternalMetadataLocation property or the externalMetadataLocation attribute in the serviceMetadata section in config must be a relative URI or an absolute URI with an http or https scheme. '{0}' was specified, which is a absolute URI with {1} scheme.. + /// + internal static string SFxBadMetadataLocationUri { + get { + return ResourceManager.GetString("SFxBadMetadataLocationUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When calling the CreateFromPolicy method, the policy argument must be an XmlElement instance with LocalName '{1}' and NamespaceUri '{0}'. This XmlElement has LocalName '{3}' and NamespaceUri '{2}'. . + /// + internal static string SFxBadMetadataMustBePolicy { + get { + return ResourceManager.GetString("SFxBadMetadataMustBePolicy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Metadata contains a reference that cannot be resolved: '{0}'.. + /// + internal static string SFxBadMetadataReference { + get { + return ResourceManager.GetString("SFxBadMetadataReference", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The TransactionProtocol setting was not understood. A supported protocol must be specified.. + /// + internal static string SFxBadTransactionProtocols { + get { + return ResourceManager.GetString("SFxBadTransactionProtocols", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding specified to do metadata exchange does not contain a TransportBindingElement.. + /// + internal static string SFxBindingDoesNotHaveATransportBindingElement { + get { + return ResourceManager.GetString("SFxBindingDoesNotHaveATransportBindingElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding (Name={0}, Namespace={1}) does not contain a TransportBindingElement.. + /// + internal static string SFxBindingMustContainTransport2 { + get { + return ResourceManager.GetString("SFxBindingMustContainTransport2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding name cannot be null or empty.. + /// + internal static string SFXBindingNameCannotBeNullOrEmpty { + get { + return ResourceManager.GetString("SFXBindingNameCannotBeNullOrEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding associated with ServiceMetadataBehavior or ServiceDebugBehavior is not supported. The inner binding elements used by this binding must support IReplyChannel. Verify that HttpGetBinding/HttpsGetBinding (on ServiceMetadataBehavior) and HttpHelpPageBinding/HttpsHelpPageBinding (on ServiceDebugBehavior) are supported.. + /// + internal static string SFxBindingNotSupportedForMetadataHttpGet { + get { + return ResourceManager.GetString("SFxBindingNotSupportedForMetadataHttpGet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The scheme '{0}' used by binding {1} does not match the required scheme '{2}'.. + /// + internal static string SFxBindingSchemeDoesNotMatch { + get { + return ResourceManager.GetString("SFxBindingSchemeDoesNotMatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Body object cannot be null in message {0}. + /// + internal static string SFxBodyCannotBeNull { + get { + return ResourceManager.GetString("SFxBodyCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type {0} cannot inherit from any class other than object to be used as body object in RPC style.. + /// + internal static string SFxBodyObjectTypeCannotBeInherited { + get { + return ResourceManager.GetString("SFxBodyObjectTypeCannotBeInherited", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type {0} implements interface {1} which is not supported for body object in RPC style.. + /// + internal static string SFxBodyObjectTypeCannotBeInterface { + get { + return ResourceManager.GetString("SFxBodyObjectTypeCannotBeInterface", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CallbackBehaviorAttribute can only be run as a behavior on an endpoint with a duplex contract. Contract '{0}' is not duplex, as it contains no callback operations.. + /// + internal static string SFxCallbackBehaviorAttributeOnlyOnDuplex { + get { + return ResourceManager.GetString("SFxCallbackBehaviorAttributeOnlyOnDuplex", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This operation would deadlock because the reply cannot be received until the current Message completes processing. If you want to allow out-of-order message processing, specify ConcurrencyMode of Reentrant or Multiple on {0}.. + /// + internal static string SFxCallbackRequestReplyInOrder1 { + get { + return ResourceManager.GetString("SFxCallbackRequestReplyInOrder1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In order to use the contract '{0}' with DuplexChannelFactory, the contract must specify a valid callback contract. If your contract does not have a callback contract, consider using ChannelFactory instead of DuplexChannelFactory.. + /// + internal static string SfxCallbackTypeCannotBeNull { + get { + return ResourceManager.GetString("SfxCallbackTypeCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The dispatch instance for duplex callbacks cannot be activated - you must provide an instance.. + /// + internal static string SFxCannotActivateCallbackInstace { + get { + return ResourceManager.GetString("SFxCannotActivateCallbackInstace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceHostBase's AddBaseAddress method cannot be called after the InitializeDescription method has completed.. + /// + internal static string SFxCannotCallAddBaseAddress { + get { + return ResourceManager.GetString("SFxCannotCallAddBaseAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot make a call on this channel because a call to Open() is in progress.. + /// + internal static string SFxCannotCallAutoOpenWhenExplicitOpenCalled { + get { + return ResourceManager.GetString("SFxCannotCallAutoOpenWhenExplicitOpenCalled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MetadataExchangeClient can only get metadata from http and https MetadataLocations. It cannot get metadata from '{0}'.. + /// + internal static string SFxCannotGetMetadataFromLocation { + get { + return ResourceManager.GetString("SFxCannotGetMetadataFromLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MetadataExchangeClient can only get metadata from absolute addresses. It cannot get metadata from '{0}'.. + /// + internal static string SFxCannotGetMetadataFromRelativeAddress { + get { + return ResourceManager.GetString("SFxCannotGetMetadataFromRelativeAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configured policy specifies more than one TransactionProtocol across the operations. A single TransactionProtocol for each endpoint must be specified.. + /// + internal static string SFxCannotHaveDifferentTransactionProtocolsInOneBinding { + get { + return ResourceManager.GetString("SFxCannotHaveDifferentTransactionProtocolsInOneBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MetadataExchangeClient can only get metadata from http or https addresses when using MetadataExchangeClientMode HttpGet. It cannot get metadata from '{0}'.. + /// + internal static string SFxCannotHttpGetMetadataFromAddress { + get { + return ResourceManager.GetString("SFxCannotHttpGetMetadataFromAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generating message contract since the operation {0} is neither RPC nor document wrapped.. + /// + internal static string SFxCannotImportAsParameters_Bare { + get { + return ResourceManager.GetString("SFxCannotImportAsParameters_Bare", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generating message contract since the wrapper name ({1}) of message {0} does not match the default value ({2}). + /// + internal static string SFxCannotImportAsParameters_DifferentWrapperName { + get { + return ResourceManager.GetString("SFxCannotImportAsParameters_DifferentWrapperName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generating message contract since the wrapper namespace ({1}) of message {0} does not match the default value ({2}). + /// + internal static string SFxCannotImportAsParameters_DifferentWrapperNs { + get { + return ResourceManager.GetString("SFxCannotImportAsParameters_DifferentWrapperNs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generating message contract since element name {0} from namespace {1} is not marked nillable. + /// + internal static string SFxCannotImportAsParameters_ElementIsNotNillable { + get { + return ResourceManager.GetString("SFxCannotImportAsParameters_ElementIsNotNillable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Headers are not supported in RPC encoded format. Headers are ignored in message {0}.. + /// + internal static string SFxCannotImportAsParameters_HeadersAreIgnoredInEncoded { + get { + return ResourceManager.GetString("SFxCannotImportAsParameters_HeadersAreIgnoredInEncoded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generating message contract since message {0} has headers. + /// + internal static string SFxCannotImportAsParameters_HeadersAreUnsupported { + get { + return ResourceManager.GetString("SFxCannotImportAsParameters_HeadersAreUnsupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generating message contract since the operation {0} has untyped Message as argument or return type. + /// + internal static string SFxCannotImportAsParameters_Message { + get { + return ResourceManager.GetString("SFxCannotImportAsParameters_Message", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generating message contract since message {0} requires protection.. + /// + internal static string SFxCannotImportAsParameters_MessageHasProtectionLevel { + get { + return ResourceManager.GetString("SFxCannotImportAsParameters_MessageHasProtectionLevel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generating message contract since message part namespace ({0}) does not match the default value ({1}). + /// + internal static string SFxCannotImportAsParameters_NamespaceMismatch { + get { + return ResourceManager.GetString("SFxCannotImportAsParameters_NamespaceMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generating message contract since the operation has multiple return values.. + /// + internal static string SFxCannotImportAsParameters_OutputParameterAndTask { + get { + return ResourceManager.GetString("SFxCannotImportAsParameters_OutputParameterAndTask", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There are two contracts listening on the same binding ({2}) and address with conflicting settings. Specifically, the contract '{0}' specifies SessionMode.NotAllowed while the contract '{1}' specifies SessionMode.Required. You should either change one of the SessionMode values or specify a different address (or ListenUri) for each endpoint.. + /// + internal static string SFxCannotRequireBothSessionAndDatagram3 { + get { + return ResourceManager.GetString("SFxCannotRequireBothSessionAndDatagram3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This collection does not support setting extensions by index. Please consider using the InsertItem or RemoveItem methods.. + /// + internal static string SFxCannotSetExtensionsByIndex { + get { + return ResourceManager.GetString("SFxCannotSetExtensionsByIndex", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This ChannelDispatcher is not currently attached to the provided ServiceHost.. + /// + internal static string SFxChannelDispatcherDifferentHost0 { + get { + return ResourceManager.GetString("SFxChannelDispatcherDifferentHost0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot add a ChannelDispatcher to more than one ServiceHost.. + /// + internal static string SFxChannelDispatcherMultipleHost0 { + get { + return ResourceManager.GetString("SFxChannelDispatcherMultipleHost0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot open ChannelDispatcher because it is not attached to a ServiceHost.. + /// + internal static string SFxChannelDispatcherNoHost0 { + get { + return ResourceManager.GetString("SFxChannelDispatcherNoHost0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot open ChannelDispatcher because it is does not have a MessageVersion set.. + /// + internal static string SFxChannelDispatcherNoMessageVersion { + get { + return ResourceManager.GetString("SFxChannelDispatcherNoMessageVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ChannelDispatcher at '{0}' is unable to open its IChannelListener as there are no endpoints for the ChannelDispatcher.. + /// + internal static string SFxChannelDispatcherUnableToOpen1 { + get { + return ResourceManager.GetString("SFxChannelDispatcherUnableToOpen1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ChannelDispatcher at '{0}' with contract(s) '{1}' is unable to open its IChannelListener.. + /// + internal static string SFxChannelDispatcherUnableToOpen2 { + get { + return ResourceManager.GetString("SFxChannelDispatcherUnableToOpen2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ApplyConfiguration requires that the Endpoint property be initialized. Either provide a valid ServiceEndpoint in the CreateDescription method or override the ApplyConfiguration method to provide an alternative implementation.. + /// + internal static string SFxChannelFactoryCannotApplyConfigurationWithoutEndpoint { + get { + return ResourceManager.GetString("SFxChannelFactoryCannotApplyConfigurationWithoutEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CreateFactory requires that the Endpoint property be initialized. Either provide a valid ServiceEndpoint in the CreateDescription method or override the CreateFactory method to provide an alternative implementation.. + /// + internal static string SFxChannelFactoryCannotCreateFactoryWithoutDescription { + get { + return ResourceManager.GetString("SFxChannelFactoryCannotCreateFactoryWithoutDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Address property on ChannelFactory.Endpoint was null. The ChannelFactory's Endpoint must have a valid Address specified.. + /// + internal static string SFxChannelFactoryEndpointAddressUri { + get { + return ResourceManager.GetString("SFxChannelFactoryEndpointAddressUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The underlying channel factory could not be created because no binding information was found in the configuration file for endpoint with name '{0}'. Please check the endpoint configuration section with name '{0}' to ensure that binding information is present and correct.. + /// + internal static string SFxChannelFactoryNoBindingFoundInConfig1 { + get { + return ResourceManager.GetString("SFxChannelFactoryNoBindingFoundInConfig1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The underlying channel factory could not be created because no Binding was passed to the ChannelFactory. Please supply a valid Binding instance via the ChannelFactory constructor.. + /// + internal static string SFxChannelFactoryNoBindingFoundInConfigOrCode { + get { + return ResourceManager.GetString("SFxChannelFactoryNoBindingFoundInConfigOrCode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type argument passed to the generic ChannelFactory class must be an interface type.. + /// + internal static string SFxChannelFactoryTypeMustBeInterface { + get { + return ResourceManager.GetString("SFxChannelFactoryTypeMustBeInterface", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An operation marked as IsTerminating has already been invoked on this channel, causing the channel's connection to terminate. No more operations may be invoked on this channel. Please re-create the channel to continue communication.. + /// + internal static string SFxChannelTerminated0 { + get { + return ResourceManager.GetString("SFxChannelTerminated0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This channel can no longer be used to send messages as the output session was auto-closed due to a server-initiated shutdown. Either disable auto-close by setting the DispatchRuntime.AutomaticInputSessionShutdown to false, or consider modifying the shutdown protocol with the remote server.. + /// + internal static string SFxClientOutputSessionAutoClosed { + get { + return ResourceManager.GetString("SFxClientOutputSessionAutoClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ServiceHost close operation timed out after {0}. This could be because a client failed to close a sessionful channel within the required time. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string SFxCloseTimedOut1 { + get { + return ResourceManager.GetString("SFxCloseTimedOut1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close process timed out waiting for service dispatch to complete.. + /// + internal static string SfxCloseTimedOutWaitingForDispatchToComplete { + get { + return ResourceManager.GetString("SfxCloseTimedOutWaitingForDispatchToComplete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Array of type {0} is not supported.. + /// + internal static string SFxCodeGenArrayTypeIsNotSupported { + get { + return ResourceManager.GetString("SFxCodeGenArrayTypeIsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can only store into ArgBuilder or LocalBuilder. Got: {0}.. + /// + internal static string SFxCodeGenCanOnlyStoreIntoArgOrLocGot0 { + get { + return ResourceManager.GetString("SFxCodeGenCanOnlyStoreIntoArgOrLocGot0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expecting End {0}.. + /// + internal static string SFxCodeGenExpectingEnd { + get { + return ResourceManager.GetString("SFxCodeGenExpectingEnd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is not assignable from {1}.. + /// + internal static string SFxCodeGenIsNotAssignableFrom { + get { + return ResourceManager.GetString("SFxCodeGenIsNotAssignableFrom", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No conversion possible to {0}.. + /// + internal static string SFxCodeGenNoConversionPossibleTo { + get { + return ResourceManager.GetString("SFxCodeGenNoConversionPossibleTo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Error: Unrecognized constant type {0}.. + /// + internal static string SFxCodeGenUnknownConstantType { + get { + return ResourceManager.GetString("SFxCodeGenUnknownConstantType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CODEGEN: {0}. + /// + internal static string SFxCodeGenWarning { + get { + return ResourceManager.GetString("SFxCodeGenWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This collection does not support setting items by index.. + /// + internal static string SFxCollectionDoesNotSupportSet0 { + get { + return ResourceManager.GetString("SFxCollectionDoesNotSupportSet0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This operation is not supported because the collection is read-only.. + /// + internal static string SFxCollectionReadOnly { + get { + return ResourceManager.GetString("SFxCollectionReadOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The collection of type {0} does not support values of type {1}.. + /// + internal static string SFxCollectionWrongType2 { + get { + return ResourceManager.GetString("SFxCollectionWrongType2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find endpoint element with name '{0}' and contract '{1}' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element.. + /// + internal static string SFxConfigChannelConfigurationNotFound { + get { + return ResourceManager.GetString("SFxConfigChannelConfigurationNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find default endpoint element that references contract '{0}' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.. + /// + internal static string SFxConfigContractNotFound { + get { + return ResourceManager.GetString("SFxConfigContractNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint configuration section for contract '{0}' with name '{1}' could not be loaded because more than one endpoint configuration with the same name and contract were found. Please check your config and try again.. + /// + internal static string SFxConfigLoaderMultipleEndpointMatchesSpecified2 { + get { + return ResourceManager.GetString("SFxConfigLoaderMultipleEndpointMatchesSpecified2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An endpoint configuration section for contract '{0}' could not be loaded because more than one endpoint configuration for that contract was found. Please indicate the preferred endpoint configuration section by name.. + /// + internal static string SFxConfigLoaderMultipleEndpointMatchesWildcard1 { + get { + return ResourceManager.GetString("SFxConfigLoaderMultipleEndpointMatchesWildcard1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ConfigurationName property must be a non-empty string.. + /// + internal static string SFxConfigurationNameCannotBeEmpty { + get { + return ResourceManager.GetString("SFxConfigurationNameCannotBeEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Top level XML element with name {0} in namespace {1} cannot reference {2} type because it already references a different type ({3}). Use a different operation name or MessageBodyMemberAttribute to specify a different name for the Message or Message parts.. + /// + internal static string SFxConflictingGlobalElement { + get { + return ResourceManager.GetString("SFxConflictingGlobalElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Duplicate top level XML Schema type with name {0} in namespace {1}.. + /// + internal static string SFxConflictingGlobalType { + get { + return ResourceManager.GetString("SFxConflictingGlobalType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value of OperationContext.Current is not the OperationContext value installed by this OperationContextScope.. + /// + internal static string SFxContextModifiedInsideScope0 { + get { + return ResourceManager.GetString("SFxContextModifiedInsideScope0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ContractDescription's Name must be a non-empty string.. + /// + internal static string SFxContractDescriptionNameCannotBeEmpty { + get { + return ResourceManager.GetString("SFxContractDescriptionNameCannotBeEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ContractDescription '{0}' has zero IsInitiating=true operations; a contract must have at least one IsInitiating=true operation.. + /// + internal static string SFxContractHasZeroInitiatingOperations { + get { + return ResourceManager.GetString("SFxContractHasZeroInitiatingOperations", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ContractDescription '{0}' has zero operations; a contract must have at least one operation.. + /// + internal static string SFxContractHasZeroOperations { + get { + return ResourceManager.GetString("SFxContractHasZeroOperations", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service class of type {0} both defines a ServiceContract and inherits a ServiceContract from type {1}. Contract inheritance can only be used among interface types. If a class is marked with ServiceContractAttribute, it must be the only type in the hierarchy with ServiceContractAttribute. Consider moving the ServiceContractAttribute on type {1} to a separate interface that type {1} implements.. + /// + internal static string SFxContractInheritanceRequiresInterfaces { + get { + return ResourceManager.GetString("SFxContractInheritanceRequiresInterfaces", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service class of type {0} both defines a ServiceContract and inherits a ServiceContract from type {1}. Contract inheritance can only be used among interface types. If a class is marked with ServiceContractAttribute, then another service class cannot derive from it.. + /// + internal static string SFxContractInheritanceRequiresInterfaces2 { + get { + return ResourceManager.GetString("SFxContractInheritanceRequiresInterfaces2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SynchronizedReadOnlyCollection's CopyTo only works if the underlying list implements ICollection.. + /// + internal static string SFxCopyToRequiresICollection { + get { + return ResourceManager.GetString("SFxCopyToRequiresICollection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The callback contract of contract {0} either does not exist or does not define any operations. If this is not a duplex contract, consider using ChannelFactory instead of DuplexChannelFactory.. + /// + internal static string SFxCreateDuplexChannel1 { + get { + return ResourceManager.GetString("SFxCreateDuplexChannel1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The InstanceContext provided to the ChannelFactory contains a UserObject that does not implement the CallbackContractType '{0}'.. + /// + internal static string SFxCreateDuplexChannelBadCallbackUserObject { + get { + return ResourceManager.GetString("SFxCreateDuplexChannelBadCallbackUserObject", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This CreateChannel overload cannot be called on this instance of DuplexChannelFactory, as the DuplexChannelFactory was not initialized with an InstanceContext. Please call the CreateChannel overload that takes an InstanceContext.. + /// + internal static string SFxCreateDuplexChannelNoCallback { + get { + return ResourceManager.GetString("SFxCreateDuplexChannelNoCallback", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This CreateChannel overload cannot be called on this instance of DuplexChannelFactory, as the DuplexChannelFactory was initialized with a Type and no valid InstanceContext was provided. Please call the CreateChannel overload that takes an InstanceContext.. + /// + internal static string SFxCreateDuplexChannelNoCallback1 { + get { + return ResourceManager.GetString("SFxCreateDuplexChannelNoCallback1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This CreateChannel overload cannot be called on this instance of DuplexChannelFactory, as the InstanceContext provided to the DuplexChannelFactory does not contain a valid UserObject.. + /// + internal static string SFxCreateDuplexChannelNoCallbackUserObject { + get { + return ResourceManager.GetString("SFxCreateDuplexChannelNoCallbackUserObject", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ChannelFactory does not support the contract {0} as it defines a callback contract with one or more operations. Please consider using DuplexChannelFactory instead of ChannelFactory.. + /// + internal static string SFxCreateNonDuplexChannel1 { + get { + return ResourceManager.GetString("SFxCreateNonDuplexChannel1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The CustomBinding on the ServiceEndpoint with contract '{0}' lacks a TransportBindingElement. Every binding must have at least one binding element that derives from TransportBindingElement.. + /// + internal static string SFxCustomBindingNeedsTransport1 { + get { + return ResourceManager.GetString("SFxCustomBindingNeedsTransport1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Scheme cannot be computed for this binding because this CustomBinding lacks a TransportBindingElement. Every binding must have at least one binding element that derives from TransportBindingElement.. + /// + internal static string SFxCustomBindingWithoutTransport { + get { + return ResourceManager.GetString("SFxCustomBindingWithoutTransport", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DataContractSerializer does not support collection specified on element '{0}' . + /// + internal static string SFxDataContractSerializerDoesNotSupportBareArray { + get { + return ResourceManager.GetString("SFxDataContractSerializerDoesNotSupportBareArray", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid OperationFormatUse specified in the OperationFormatStyle of operation {0}, DataContractSerializer supports only Literal.. + /// + internal static string SFxDataContractSerializerDoesNotSupportEncoded { + get { + return ResourceManager.GetString("SFxDataContractSerializerDoesNotSupportEncoded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The formatter threw an exception while trying to deserialize the message: {0}. + /// + internal static string SFxDeserializationFailed1 { + get { + return ResourceManager.GetString("SFxDeserializationFailed1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This operation is not possible since the dictionary is empty.. + /// + internal static string SFxDictionaryIsEmpty { + get { + return ResourceManager.GetString("SFxDictionaryIsEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type or member named '{0}' could not be loaded because it has two incompatible attributes: '{1}' and '{2}'. To fix the problem, remove one of the attributes from the type or member.. + /// + internal static string SFxDisallowedAttributeCombination { + get { + return ResourceManager.GetString("SFxDisallowedAttributeCombination", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In operation '{0}', cannot return null from methods that return Message.. + /// + internal static string SFxDispatchRuntimeMessageCannotBeNull { + get { + return ResourceManager.GetString("SFxDispatchRuntimeMessageCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The DispatchRuntime.EnsureOrderedDispatch property is set to true, but the DispatchRuntime.ConcurrencyMode is not set to Single. EnsureOrderedDispatch requires the use of ConcurrencyMode.Single.. + /// + internal static string SfxDispatchRuntimeNonConcurrentOrEnsureOrderedDispatch { + get { + return ResourceManager.GetString("SfxDispatchRuntimeNonConcurrentOrEnsureOrderedDispatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fault could not be loaded as the Use setting is Encoded and it references a schema definition using Element attribute. To fix the problem, change the Use setting to Literal.. + /// + internal static string SFxDocEncodedFaultNotSupported { + get { + return ResourceManager.GetString("SFxDocEncodedFaultNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation '{0}' could not be loaded as it uses an unsupported combination of Use and Style settings: Document with Encoded. To fix the problem, change the Use setting to Literal or change the Style setting to Rpc.. + /// + internal static string SFxDocEncodedNotSupported { + get { + return ResourceManager.GetString("SFxDocEncodedNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <P class='intro'><B>C#</B></P>. + /// + internal static string SFxDocExt_CS { + get { + return ResourceManager.GetString("SFxDocExt_CS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service encountered an error.. + /// + internal static string SFxDocExt_Error { + get { + return ResourceManager.GetString("SFxDocExt_Error", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use the 'client' variable to call operations on the service.. + /// + internal static string SFxDocExt_MainPageComment { + get { + return ResourceManager.GetString("SFxDocExt_MainPageComment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Always close the client.. + /// + internal static string SFxDocExt_MainPageComment2 { + get { + return ResourceManager.GetString("SFxDocExt_MainPageComment2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You have created a service.<P class='intro'>To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:</P> . + /// + internal static string SFxDocExt_MainPageIntro1a { + get { + return ResourceManager.GetString("SFxDocExt_MainPageIntro1a", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You have created a service.<P class='intro'>To test this service, you will need to create a client and use it to call the service; however, metadata publishing via ?WSDL is currently disabled. This can be enabled via the service's configuration file. </P>. + /// + internal static string SFxDocExt_MainPageIntro1b { + get { + return ResourceManager.GetString("SFxDocExt_MainPageIntro1b", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This will generate a configuration file and a code file that contains the client class. Add the two files to your client application and use the generated client class to call the Service. For example:<BR/>. + /// + internal static string SFxDocExt_MainPageIntro2 { + get { + return ResourceManager.GetString("SFxDocExt_MainPageIntro2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You can also access the service description as a single file:. + /// + internal static string SFxDocExt_MainPageIntroSingleWsdl { + get { + return ResourceManager.GetString("SFxDocExt_MainPageIntroSingleWsdl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} Service. + /// + internal static string SFxDocExt_MainPageTitle { + get { + return ResourceManager.GetString("SFxDocExt_MainPageTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service. + /// + internal static string SFxDocExt_MainPageTitleNoServiceName { + get { + return ResourceManager.GetString("SFxDocExt_MainPageTitleNoServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note: the service name must match the configuration name for the service implementation.. + /// + internal static string SFxDocExt_NoMetadataConfigComment1 { + get { + return ResourceManager.GetString("SFxDocExt_NoMetadataConfigComment1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add the following endpoint. . + /// + internal static string SFxDocExt_NoMetadataConfigComment2 { + get { + return ResourceManager.GetString("SFxDocExt_NoMetadataConfigComment2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note: your service must have an http base address to add this endpoint.. + /// + internal static string SFxDocExt_NoMetadataConfigComment3 { + get { + return ResourceManager.GetString("SFxDocExt_NoMetadataConfigComment3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add the following element to your service behavior configuration.. + /// + internal static string SFxDocExt_NoMetadataConfigComment4 { + get { + return ResourceManager.GetString("SFxDocExt_NoMetadataConfigComment4", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This is a Windows&#169; Communication Foundation service.<BR/><BR/><B>Metadata publishing for this service is currently disabled.</B><BR/><BR/>If you have access to the service, you can enable metadata publishing by completing the following steps to modify your web or application configuration file:<BR/><BR/>1. Create the following service behavior configuration, or add the &lt;serviceMetadata&gt; element to an existing service behavior configuration:. + /// + internal static string SFxDocExt_NoMetadataSection1 { + get { + return ResourceManager.GetString("SFxDocExt_NoMetadataSection1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 2. Add the behavior configuration to the service:. + /// + internal static string SFxDocExt_NoMetadataSection2 { + get { + return ResourceManager.GetString("SFxDocExt_NoMetadataSection2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note: the service name must match the configuration name for the service implementation.<BR/><BR/>3. Add the following endpoint to your service configuration:. + /// + internal static string SFxDocExt_NoMetadataSection3 { + get { + return ResourceManager.GetString("SFxDocExt_NoMetadataSection3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note: your service must have an http base address to add this endpoint.<BR/><BR/>The following is an example service configuration file with metadata publishing enabled:. + /// + internal static string SFxDocExt_NoMetadataSection4 { + get { + return ResourceManager.GetString("SFxDocExt_NoMetadataSection4", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to For more information on publishing metadata please see the following documentation: <a href="http://go.microsoft.com/fwlink/?LinkId=65455">http://go.microsoft.com/fwlink/?LinkId=65455</a>.. + /// + internal static string SFxDocExt_NoMetadataSection5 { + get { + return ResourceManager.GetString("SFxDocExt_NoMetadataSection5", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <P class='intro'><B>Visual Basic</B></P>. + /// + internal static string SFxDocExt_VB { + get { + return ResourceManager.GetString("SFxDocExt_VB", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This service has multiple endpoints listening at '{0}' which share the same initiating action '{1}'. As a result, messages with this action would be dropped since the dispatcher would not be able to determine the correct endpoint for handling the message. Please consider hosting these Endpoints at separate ListenUris.. + /// + internal static string SFxDuplicateInitiatingActionAtSameVia { + get { + return ResourceManager.GetString("SFxDuplicateInitiatingActionAtSameVia", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message part {0} in namespace {1} appears more than once in Message.. + /// + internal static string SFxDuplicateMessageParts { + get { + return ResourceManager.GetString("SFxDuplicateMessageParts", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint's address is not specified. . + /// + internal static string SFxEndpointAddressNotSpecified { + get { + return ResourceManager.GetString("SFxEndpointAddressNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The IEndpointBehavior '{0}' cannot be used on the server side; this behavior can only be applied to clients.. + /// + internal static string SFXEndpointBehaviorUsedOnWrongSide { + get { + return ResourceManager.GetString("SFXEndpointBehaviorUsedOnWrongSide", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint's binding is not specified.. + /// + internal static string SFxEndpointBindingNotSpecified { + get { + return ResourceManager.GetString("SFxEndpointBindingNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint's contract is not specified.. + /// + internal static string SFxEndpointContractNotSpecified { + get { + return ResourceManager.GetString("SFxEndpointContractNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This EndpointDispatcher is not currently attached to the provided ChannelDispatcher.. + /// + internal static string SFxEndpointDispatcherDifferentChannelDispatcher0 { + get { + return ResourceManager.GetString("SFxEndpointDispatcherDifferentChannelDispatcher0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot add EndpointDispatcher to more than one ChannelDispatcher.. + /// + internal static string SFxEndpointDispatcherMultipleChannelDispatcher0 { + get { + return ResourceManager.GetString("SFxEndpointDispatcherMultipleChannelDispatcher0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find a base address that matches scheme {0} for the endpoint with binding {1}. Registered base address schemes are [{2}].. + /// + internal static string SFxEndpointNoMatchingScheme { + get { + return ResourceManager.GetString("SFxEndpointNoMatchingScheme", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error creating a reader for the MTOM message. + /// + internal static string SFxErrorCreatingMtomReader { + get { + return ResourceManager.GetString("SFxErrorCreatingMtomReader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server returned an invalid SOAP Fault. Please see InnerException for more details.. + /// + internal static string SFxErrorDeserializingFault { + get { + return ResourceManager.GetString("SFxErrorDeserializingFault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error in deserializing one of the headers in message {0}. Please see InnerException for more details.. + /// + internal static string SFxErrorDeserializingHeader { + get { + return ResourceManager.GetString("SFxErrorDeserializingHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error in deserializing body of reply message for operation '{0}'.. + /// + internal static string SFxErrorDeserializingReplyBody { + get { + return ResourceManager.GetString("SFxErrorDeserializingReplyBody", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error in deserializing body of reply message for operation '{0}'. {1}. + /// + internal static string SFxErrorDeserializingReplyBodyMore { + get { + return ResourceManager.GetString("SFxErrorDeserializingReplyBodyMore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error in deserializing body of request message for operation '{0}'.. + /// + internal static string SFxErrorDeserializingRequestBody { + get { + return ResourceManager.GetString("SFxErrorDeserializingRequestBody", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error in deserializing body of request message for operation '{0}'. {1}. + /// + internal static string SFxErrorDeserializingRequestBodyMore { + get { + return ResourceManager.GetString("SFxErrorDeserializingRequestBodyMore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while loading attribute '{0}' on method '{1}' in type '{2}'. Please see InnerException for more details.. + /// + internal static string SFxErrorReflectingOnMethod3 { + get { + return ResourceManager.GetString("SFxErrorReflectingOnMethod3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while loading attribute '{0}' on parameter {1} of method '{2}' in type '{3}'. Please see InnerException for more details.. + /// + internal static string SFxErrorReflectingOnParameter4 { + get { + return ResourceManager.GetString("SFxErrorReflectingOnParameter4", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while loading attribute '{0}' on type '{1}'. Please see InnerException for more details.. + /// + internal static string SFxErrorReflectingOnType2 { + get { + return ResourceManager.GetString("SFxErrorReflectingOnType2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while loading attribute '{0}'. Please see InnerException for more details.. + /// + internal static string SFxErrorReflectionOnUnknown1 { + get { + return ResourceManager.GetString("SFxErrorReflectionOnUnknown1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error in serializing body of message {0}: '{1}'. Please see InnerException for more details.. + /// + internal static string SFxErrorSerializingBody { + get { + return ResourceManager.GetString("SFxErrorSerializingBody", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error in serializing one of the headers in message {0}: '{1}'. Please see InnerException for more details.. + /// + internal static string SFxErrorSerializingHeader { + get { + return ResourceManager.GetString("SFxErrorSerializingHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to --- End of inner ExceptionDetail stack trace ---. + /// + internal static string SFxExceptionDetailEndOfInner { + get { + return ResourceManager.GetString("SFxExceptionDetailEndOfInner", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:. + /// + internal static string SFxExceptionDetailFormat { + get { + return ResourceManager.GetString("SFxExceptionDetailFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Error: Message must be a valid IMethodCallMessage.. + /// + internal static string SFxExpectedIMethodCallMessage { + get { + return ResourceManager.GetString("SFxExpectedIMethodCallMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified ContractDescription could not be exported to WSDL because the Type property of the MessagePartDescription with name '{1}' in the OperationDescription with name '{0}' is not set. The Type property must be set in order to create WSDL.. + /// + internal static string SFxExportMustHaveType { + get { + return ResourceManager.GetString("SFxExportMustHaveType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fault named {0} in operation {1} cannot be imported. {2}. + /// + internal static string SFxFaultCannotBeImported { + get { + return ResourceManager.GetString("SFxFaultCannotBeImported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In operation {0}, more than one fault is declared with detail type {1}. + /// + internal static string SFxFaultContractDuplicateDetailType { + get { + return ResourceManager.GetString("SFxFaultContractDuplicateDetailType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In operation {0}, more than one fault is declared with element name {1} in namespace {2}. + /// + internal static string SFxFaultContractDuplicateElement { + get { + return ResourceManager.GetString("SFxFaultContractDuplicateElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}: {1} (Fault Detail is equal to {2}).. + /// + internal static string SFxFaultExceptionToString3 { + get { + return ResourceManager.GetString("SFxFaultExceptionToString3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The creator of this fault did not specify a Reason.. + /// + internal static string SFxFaultReason { + get { + return ResourceManager.GetString("SFxFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In operation {0}, the schema type corresponding to the fault detail type {1} is anonymous. Please set Fault name explicitly to export anonymous types.. + /// + internal static string SFxFaultTypeAnonymous { + get { + return ResourceManager.GetString("SFxFaultTypeAnonymous", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Only a '{0}' using '{1}' or '{2}' is supported in this scenario.. + /// + internal static string SFxGetChannelDispatcherDoesNotSupportScheme { + get { + return ResourceManager.GetString("SFxGetChannelDispatcherDoesNotSupportScheme", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Header name cannot be null or empty.. + /// + internal static string SFXHeaderNameCannotBeNullOrEmpty { + get { + return ResourceManager.GetString("SFXHeaderNameCannotBeNullOrEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Header name mismatch in member {1} of type {0}. The header name found in the description is {2}. The element name deduced by the formatter is {3}. This mismatch can happen if the ElementName specified in XmlElementAttribute or XmlArrayAttribute does not match the name specified in the MessageHeaderAttribute or MessageHeaderArrayAttribute or the member name.. + /// + internal static string SFxHeaderNameMismatchInMessageContract { + get { + return ResourceManager.GetString("SFxHeaderNameMismatchInMessageContract", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Header name mismatch in operation {0} from contract {1}:{2}. The header name found in the description is {3}. The element name deduced by the formatter is {4}. This mismatch can happen if the ElementName specified in XmlElementAttribute or XmlArrayAttribute does not match the name specified in the MessageHeaderAttribute or MessageHeaderArrayAttribute or the member name.. + /// + internal static string SFxHeaderNameMismatchInOperation { + get { + return ResourceManager.GetString("SFxHeaderNameMismatchInOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Header namespace mismatch in member {1} of type {0}. The header namespace found in the description is {2}. The element namespace deduced by the formatter is {3}. This mismatch can happen if the Namespace specified in XmlElementAttribute or XmlArrayAttribute does not match the namespace specified in the MessageHeaderAttribute or MessageHeaderArrayAttribute or the contract namespace.. + /// + internal static string SFxHeaderNamespaceMismatchInMessageContract { + get { + return ResourceManager.GetString("SFxHeaderNamespaceMismatchInMessageContract", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Header namespace mismatch in operation {0} from contract {1}:{2}. The header namespace found in the description is {3}. The element namespace deduced by the formatter is {4}. This mismatch can happen if the Namespace specified in XmlElementAttribute or XmlArrayAttribute does not match the namespace specified in the MessageHeaderAttribute or MessageHeaderArrayAttribute or the contract namespace.. + /// + internal static string SFxHeaderNamespaceMismatchInOperation { + get { + return ResourceManager.GetString("SFxHeaderNamespaceMismatchInOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The header '{0}' from the namespace '{1}' was not understood by the recipient of this message, causing the message to not be processed. This error typically indicates that the sender of this message has enabled a communication protocol that the receiver cannot process. Please ensure that the configuration of the client's binding is consistent with the service's binding. . + /// + internal static string SFxHeaderNotUnderstood { + get { + return ResourceManager.GetString("SFxHeaderNotUnderstood", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message {0} must not have headers to be used in RPC encoded style.. + /// + internal static string SFxHeadersAreNotSupportedInEncoded { + get { + return ResourceManager.GetString("SFxHeadersAreNotSupportedInEncoded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This value cannot be changed after the ChannelFactory has opened.. + /// + internal static string SFxImmutableChannelFactoryBehavior0 { + get { + return ResourceManager.GetString("SFxImmutableChannelFactoryBehavior0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This value cannot be changed after the first ClientBase of type '{0}' has been created.. + /// + internal static string SFxImmutableClientBaseCacheSetting { + get { + return ResourceManager.GetString("SFxImmutableClientBaseCacheSetting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This value cannot be changed after the ServiceHost has opened.. + /// + internal static string SFxImmutableServiceHostBehavior0 { + get { + return ResourceManager.GetString("SFxImmutableServiceHostBehavior0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} cannot be changed after the ServiceHost has opened.. + /// + internal static string SFxImmutableThrottle1 { + get { + return ResourceManager.GetString("SFxImmutableThrottle1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation {0} binding {1} has extra part {2} that is not present in other bindings. + /// + internal static string SFxInconsistentBindingBodyParts { + get { + return ResourceManager.GetString("SFxInconsistentBindingBodyParts", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Style {1} on header {0} does not match expected style {2}.. + /// + internal static string SFxInconsistentWsdlOperationStyleInHeader { + get { + return ResourceManager.GetString("SFxInconsistentWsdlOperationStyleInHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to All parts of message in operation {0} must either contain type or element. . + /// + internal static string SFxInconsistentWsdlOperationStyleInMessageParts { + get { + return ResourceManager.GetString("SFxInconsistentWsdlOperationStyleInMessageParts", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Style {1} inferred from messages in operation {0} does not match expected style {2} specified via bindings.. + /// + internal static string SFxInconsistentWsdlOperationStyleInOperationMessages { + get { + return ResourceManager.GetString("SFxInconsistentWsdlOperationStyleInOperationMessages", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Bindings for operation {0} cannot specify different use and style values. Binding {1} specifies use {2} and style {3} while binding {4} specifies use {5} and style {6}.. + /// + internal static string SFxInconsistentWsdlOperationUseAndStyleInBinding { + get { + return ResourceManager.GetString("SFxInconsistentWsdlOperationUseAndStyleInBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Extensions for operation {0} in binding {1} cannot specify different use values.. + /// + internal static string SFxInconsistentWsdlOperationUseInBindingExtensions { + get { + return ResourceManager.GetString("SFxInconsistentWsdlOperationUseInBindingExtensions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fault bindings for operation {0} in binding {1} cannot specify different use values.. + /// + internal static string SFxInconsistentWsdlOperationUseInBindingFaults { + get { + return ResourceManager.GetString("SFxInconsistentWsdlOperationUseInBindingFaults", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message bindings for operation {0} in binding {1} cannot specify different use values.. + /// + internal static string SFxInconsistentWsdlOperationUseInBindingMessages { + get { + return ResourceManager.GetString("SFxInconsistentWsdlOperationUseInBindingMessages", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MessageVersion '{0}' is not supported in this scenario. Only MessageVersion '{1}' is supported.. + /// + internal static string SFxIncorrectMessageVersion { + get { + return ResourceManager.GetString("SFxIncorrectMessageVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AllowInitializationUI was set to false for this channel, but the channel is configured to use the '{0}' as an interactive initializer.. + /// + internal static string SFxInitializationUIDisallowed { + get { + return ResourceManager.GetString("SFxInitializationUIDisallowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The channel is configured to use interactive initializer '{0}', but the channel was Opened without calling DisplayInitializationUI. Call DisplayInitializationUI before calling Open or other methods on this channel.. + /// + internal static string SFxInitializationUINotCalled { + get { + return ResourceManager.GetString("SFxInitializationUINotCalled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service implementation object invoked with wrong number of input parameters, operation expects {0} parameters but was called with {1} parameters.. + /// + internal static string SFxInputParametersToServiceInvalid { + get { + return ResourceManager.GetString("SFxInputParametersToServiceInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service implementation object invoked with null input parameters, but operation expects {0} parameters.. + /// + internal static string SFxInputParametersToServiceNull { + get { + return ResourceManager.GetString("SFxInputParametersToServiceNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The InstanceContext has no provider for creating Service implementation objects.. + /// + internal static string SFxInstanceNotInitialized { + get { + return ResourceManager.GetString("SFxInstanceNotInitialized", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This OperationContextScope is being disposed out of order.. + /// + internal static string SFxInterleavedContextScopes0 { + get { + return ResourceManager.GetString("SFxInterleavedContextScopes0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client was unable to process the callback request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from CallbackBehaviorAttribute or from the <clientDebug> configuration behavior) on the client in order to send the exception information back to the server, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the client trace logs.. + /// + internal static string SFxInternalCallbackError { + get { + return ResourceManager.GetString("SFxInternalCallbackError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.. + /// + internal static string SFxInternalServerError { + get { + return ResourceManager.GetString("SFxInternalServerError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to IAsyncResult's State must be the state argument passed to your Begin call.. + /// + internal static string SFxInvalidAsyncResultState0 { + get { + return ResourceManager.GetString("SFxInvalidAsyncResultState0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The CallbackContract {0} is invalid because it is not an interface type.. + /// + internal static string SFxInvalidCallbackContractType { + get { + return ResourceManager.GetString("SFxInvalidCallbackContractType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to IAsyncResult not provided or of wrong type.. + /// + internal static string SFxInvalidCallbackIAsyncResult { + get { + return ResourceManager.GetString("SFxInvalidCallbackIAsyncResult", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid IContextChannel passed to OperationContext. Must be either a server dispatching channel or a client proxy channel.. + /// + internal static string SFxInvalidChannelToOperationContext { + get { + return ResourceManager.GetString("SFxInvalidChannelToOperationContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This OperationContextScope is being disposed on a different thread than it was created.. + /// + internal static string SFxInvalidContextScopeThread0 { + get { + return ResourceManager.GetString("SFxInvalidContextScopeThread0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name '{0}' and namespace '{1}'. Found node type '{2}' with name '{3}' and namespace '{4}'. + /// + internal static string SFxInvalidMessageBody { + get { + return ResourceManager.GetString("SFxInvalidMessageBody", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The OperationFormatter could not deserialize any information from the Message because the Message is empty (IsEmpty = true).. + /// + internal static string SFxInvalidMessageBodyEmptyMessage { + get { + return ResourceManager.GetString("SFxInvalidMessageBodyEmptyMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error while trying to deserialize parameter {0}:{1}. Please see InnerException for more details.. + /// + internal static string SFxInvalidMessageBodyErrorDeserializingParameter { + get { + return ResourceManager.GetString("SFxInvalidMessageBodyErrorDeserializingParameter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error while trying to deserialize parameter {0}:{1}. The InnerException message was '{2}'. Please see InnerException for more details.. + /// + internal static string SFxInvalidMessageBodyErrorDeserializingParameterMore { + get { + return ResourceManager.GetString("SFxInvalidMessageBodyErrorDeserializingParameterMore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error while trying to serialize parameter {0}:{1}. The InnerException message was '{2}'. Please see InnerException for more details.. + /// + internal static string SFxInvalidMessageBodyErrorSerializingParameter { + get { + return ResourceManager.GetString("SFxInvalidMessageBodyErrorSerializingParameter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation {0} either has a parameter or a return type that is attributed with MessageContractAttribute. In order to represent the request message using a Message Contract, the operation must have a single parameter attributed with MessageContractAttribute. In order to represent the response message using a Message Contract, the operation's return value must be a type that is attributed with MessageContractAttribute and the operation may not have any out or ref parameters.. + /// + internal static string SFxInvalidMessageContractSignature { + get { + return ResourceManager.GetString("SFxInvalidMessageContractSignature", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MessageHeaderArrayAttribute found on member {0} is not a single dimensional array.. + /// + internal static string SFxInvalidMessageHeaderArrayType { + get { + return ResourceManager.GetString("SFxInvalidMessageHeaderArrayType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Outgoing reply message for operation '{0}' specified Action='{1}', but contract for that operation specifies ReplyAction='{2}'. The Action specified in the Message must match the ReplyAction in the contract, or the operation contract must specify ReplyAction='*'.. + /// + internal static string SFxInvalidReplyAction { + get { + return ResourceManager.GetString("SFxInvalidReplyAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Outgoing request message for operation '{0}' specified Action='{1}', but contract for that operation specifies Action='{2}'. The Action specified in the Message must match the Action in the contract, or the operation contract must specify Action='*'.. + /// + internal static string SFxInvalidRequestAction { + get { + return ResourceManager.GetString("SFxInvalidRequestAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XmlSerializer attribute {0} is not valid in {1}. Only SoapElement attribute is supported.. + /// + internal static string SFxInvalidSoapAttribute { + get { + return ResourceManager.GetString("SFxInvalidSoapAttribute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The static CreateChannel method cannot be used with the contract {0} because that contract defines a callback contract. Please try using one of the static CreateChannel overloads on DuplexChannelFactory<TChannel>.. + /// + internal static string SFxInvalidStaticOverloadCalledForDuplexChannelFactory1 { + get { + return ResourceManager.GetString("SFxInvalidStaticOverloadCalledForDuplexChannelFactory1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to For request in operation {0} to be a stream the operation must have a single parameter whose type is Stream.. + /// + internal static string SFxInvalidStreamInRequest { + get { + return ResourceManager.GetString("SFxInvalidStreamInRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to For response in operation {0} to be a stream the operation must have a single out parameter or return value whose type is Stream.. + /// + internal static string SFxInvalidStreamInResponse { + get { + return ResourceManager.GetString("SFxInvalidStreamInResponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In order to use Streams with the MessageContract programming model, the type {0} must have a single member with MessageBodyMember attribute and the member type must be Stream.. + /// + internal static string SFxInvalidStreamInTypedMessage { + get { + return ResourceManager.GetString("SFxInvalidStreamInTypedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Buffer size must be at least {0} bytes.. + /// + internal static string SFxInvalidStreamOffsetLength { + get { + return ResourceManager.GetString("SFxInvalidStreamOffsetLength", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The PrimitiveOperationFormatter was given a parameter or return type which it does not support.. + /// + internal static string SFxInvalidUseOfPrimitiveOperationFormatter { + get { + return ResourceManager.GetString("SFxInvalidUseOfPrimitiveOperationFormatter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The WSDL binding named {0} is not valid because no match for operation {1} was found in the corresponding portType definition.. + /// + internal static string SFxInvalidWsdlBindingOpMismatch2 { + get { + return ResourceManager.GetString("SFxInvalidWsdlBindingOpMismatch2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The WSDL binding named {0} is not valid because an operation binding doesn't have a name specified.. + /// + internal static string SFxInvalidWsdlBindingOpNoName { + get { + return ResourceManager.GetString("SFxInvalidWsdlBindingOpNoName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XmlSerializer attribute {0} is not valid in {1}. Only XmlElement, XmlArray, XmlArrayItem and XmlAnyElement attributes are supported in MessageContract when IsWrapped is false.. + /// + internal static string SFxInvalidXmlAttributeInBare { + get { + return ResourceManager.GetString("SFxInvalidXmlAttributeInBare", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XmlSerializer attribute {0} is not valid in {1}. Only XmlElement, XmlArray, XmlArrayItem, XmlAnyAttribute and XmlAnyElement attributes are supported when IsWrapped is true.. + /// + internal static string SFxInvalidXmlAttributeInWrapped { + get { + return ResourceManager.GetString("SFxInvalidXmlAttributeInWrapped", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} must contain either a single ServiceKnownTypeAttribute that refers to a method or a set of ServiceKnownTypeAttributes, each specifying a valid type. + /// + internal static string SFxKnownTypeAttributeInvalid1 { + get { + return ResourceManager.GetString("SFxKnownTypeAttributeInvalid1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The return type of method {1} in type {2} must be IEnumerable<Type> to be used by ServiceKnownTypeAttribute in {0}. + /// + internal static string SFxKnownTypeAttributeReturnType3 { + get { + return ResourceManager.GetString("SFxKnownTypeAttributeReturnType3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceKnownTypeAttribute in {0} refers to a method {1} that does not exist in type {2}. + /// + internal static string SFxKnownTypeAttributeUnknownMethod3 { + get { + return ResourceManager.GetString("SFxKnownTypeAttributeUnknownMethod3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to KnownType cannot be null in operation {0}. + /// + internal static string SFxKnownTypeNull { + get { + return ResourceManager.GetString("SFxKnownTypeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MaximumResolvedReferences property of MetadataExchangeClient must be greater than or equal to one. '{0}' was specified.. + /// + internal static string SFxMaximumResolvedReferencesOutOfRange { + get { + return ResourceManager.GetString("SFxMaximumResolvedReferencesOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot create a typed message from type '{0}'. The functionality only valid for types decorated with MessageContractAttribute.. + /// + internal static string SFxMessageContractAttributeRequired { + get { + return ResourceManager.GetString("SFxMessageContractAttributeRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type {1} defines a MessageContract but also derives from a type {0} that does not define a MessageContract. All of the objects in the inheritance hierarchy of {1} must defines a MessageContract.. + /// + internal static string SFxMessageContractBaseTypeNotValid { + get { + return ResourceManager.GetString("SFxMessageContractBaseTypeNotValid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message cannot be deserialized into MessageContract type {0} since it does not have a default (parameterless) constructor.. + /// + internal static string SFxMessageContractRequiresDefaultConstructor { + get { + return ResourceManager.GetString("SFxMessageContractRequiresDefaultConstructor", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MessageOperationFormatter cannot serialize faults.. + /// + internal static string SFxMessageOperationFormatterCannotSerializeFault { + get { + return ResourceManager.GetString("SFxMessageOperationFormatterCannotSerializeFault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Instance of MessagePartDescription Name='{0}' Namespace='{1}' cannot be used in this context: required 'Type' property was not set.. + /// + internal static string SFxMessagePartDescriptionMissingType { + get { + return ResourceManager.GetString("SFxMessagePartDescriptionMissingType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MetadataExchangeClient could not create an IChannelFactory for: address='{0}', dialect='{1}', and identifier='{2}'. . + /// + internal static string SFxMetadataExchangeClientCouldNotCreateChannelFactory { + get { + return ResourceManager.GetString("SFxMetadataExchangeClientCouldNotCreateChannelFactory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MetadataExchangeClient instance could not be initialized because no Binding is available for scheme '{0}'. You can supply a Binding in the constructor, or specify a configurationName.. + /// + internal static string SFxMetadataExchangeClientCouldNotCreateChannelFactoryBadScheme { + get { + return ResourceManager.GetString("SFxMetadataExchangeClientCouldNotCreateChannelFactoryBadScheme", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MetadataExchangeClient could not create an HttpWebRequest for: address='{0}', dialect='{1}', and identifier='{2}'. . + /// + internal static string SFxMetadataExchangeClientCouldNotCreateWebRequest { + get { + return ResourceManager.GetString("SFxMetadataExchangeClientCouldNotCreateWebRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MetadataExchangeClient was not supplied with a MetadataReference or MetadataLocation from which to get metadata. You must supply one to the constructor, to the GetMetadata method, or to the BeginGetMetadata method.. + /// + internal static string SFxMetadataExchangeClientNoMetadataAddress { + get { + return ResourceManager.GetString("SFxMetadataExchangeClientNoMetadataAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value '{0}' is not valid for the Location property. The Location property must be a valid absolute or relative URI.. + /// + internal static string SFxMetadataReferenceInvalidLocation { + get { + return ResourceManager.GetString("SFxMetadataReferenceInvalidLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MetadataResolver cannot recieve an empty contracts argument to the Resolve or BeginResolve methods. You must supply at least one ContractDescription.. + /// + internal static string SFxMetadataResolverKnownContractsArgumentCannotBeEmpty { + get { + return ResourceManager.GetString("SFxMetadataResolverKnownContractsArgumentCannotBeEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The contracts argument to the Resolve or BeginResolve methods cannot contain a null ContractDescription.. + /// + internal static string SFxMetadataResolverKnownContractsCannotContainNull { + get { + return ResourceManager.GetString("SFxMetadataResolverKnownContractsCannotContainNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ContractDescriptions in contracts must all have unique Name and Namespace pairs. More than one ContractDescription had the pair Name='{0}' and Namespace='{1}'. . + /// + internal static string SFxMetadataResolverKnownContractsUniqueQNames { + get { + return ResourceManager.GetString("SFxMetadataResolverKnownContractsUniqueQNames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Method {0} is not supported on this proxy, this can happen if the method is not marked with OperationContractAttribute or if the interface type is not marked with ServiceContractAttribute.. + /// + internal static string SFxMethodNotSupported1 { + get { + return ResourceManager.GetString("SFxMethodNotSupported1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceHost implementation type {0} does not implement ServiceContract {1}.. + /// + internal static string SFxMethodNotSupportedByType2 { + get { + return ResourceManager.GetString("SFxMethodNotSupportedByType2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Callback method {0} is not supported, this can happen if the method is not marked with OperationContractAttribute or if its interface type is not the target of the ServiceContractAttribute's CallbackContract.. + /// + internal static string SFxMethodNotSupportedOnCallback1 { + get { + return ResourceManager.GetString("SFxMethodNotSupportedOnCallback1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A DispatchOperation (or ClientOperation) can only be added to its parent DispatchRuntime (or ClientRuntime).. + /// + internal static string SFxMismatchedOperationParent { + get { + return ResourceManager.GetString("SFxMismatchedOperationParent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No Action header was found with namespace '{0}' for the given message.. + /// + internal static string SFxMissingActionHeader { + get { + return ResourceManager.GetString("SFxMissingActionHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The callback passed to operation '{0}' was called more than once. This indicates an internal error in the implementation of that operation.. + /// + internal static string SFxMultipleCallbackFromAsyncOperation { + get { + return ResourceManager.GetString("SFxMultipleCallbackFromAsyncOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Calling Post() on '{0}' resulted in multiple callbacks. This indicates a problem in '{0}'.. + /// + internal static string SFxMultipleCallbackFromSynchronizationContext { + get { + return ResourceManager.GetString("SFxMultipleCallbackFromSynchronizationContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A ServiceContract has more the one operation with an Action of "*". A ServiceContract can have at most one operation an Action = "*".. + /// + internal static string SFxMultipleContractStarOperations0 { + get { + return ResourceManager.GetString("SFxMultipleContractStarOperations0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Service contains multiple ServiceEndpoints with different ContractDescriptions which each have Name='{0}' and Namespace='{1}'. Either provide ContractDescriptions with unique Name and Namespaces, or ensure the ServiceEndpoints have the same ContractDescription instance.. + /// + internal static string SFxMultipleContractsWithSameName { + get { + return ResourceManager.GetString("SFxMultipleContractsWithSameName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Part {1}:{0} is repeating and is not supported in Soap Encoding.. + /// + internal static string SFxMultiplePartsNotAllowedInEncoded { + get { + return ResourceManager.GetString("SFxMultiplePartsNotAllowedInEncoded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Method {0} in type {1} has more than one header part of type array of XmlElement.. + /// + internal static string SFxMultipleUnknownHeaders { + get { + return ResourceManager.GetString("SFxMultipleUnknownHeaders", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SetTransactionComplete method was wrongly called more than once in the operation '{0}' on contract '{1}'. The SetTransactionComplete method can only be called once. This is an invalid scenario and the current transaction was aborted.. + /// + internal static string SFxMultiSetTransactionComplete { + get { + return ResourceManager.GetString("SFxMultiSetTransactionComplete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Name property must be a non-empty string.. + /// + internal static string SFxNameCannotBeEmpty { + get { + return ResourceManager.GetString("SFxNameCannotBeEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot handle invocation of {0} on interface {1} because the OperationSelector on ClientRuntime is null.. + /// + internal static string SFxNeedProxyBehaviorOperationSelector2 { + get { + return ResourceManager.GetString("SFxNeedProxyBehaviorOperationSelector2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TransactedBatchingBehavior validation failed. Service cannot be started. Transacted batching requires ServiceBehavior.ReleaseServiceInstanceOnTransactionComplete to be false.. + /// + internal static string SFxNoBatchingForReleaseOnComplete { + get { + return ResourceManager.GetString("SFxNoBatchingForReleaseOnComplete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TransactedBatchingBehavior validation failed. Service or client cannot be started. Transacted batching is not supported for session contracts. Remove transacted batching behavior from the endpoint or define a non-sessionful contract.. + /// + internal static string SFxNoBatchingForSession { + get { + return ResourceManager.GetString("SFxNoBatchingForSession", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service type provided could not be loaded as a service because it does not have a default (parameter-less) constructor. To fix the problem, add a default constructor to the type, or pass an instance of the type to the host.. + /// + internal static string SFxNoDefaultConstructor { + get { + return ResourceManager.GetString("SFxNoDefaultConstructor", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message with To '{0}' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree.. + /// + internal static string SFxNoEndpointMatchingAddress { + get { + return ResourceManager.GetString("SFxNoEndpointMatchingAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message with Action '{0}' cannot be processed at the receiver because this Action is reserved for the connection opening messages only and cannot be sent from client to server. To invoke this operation on the server, call the '{1}' method on the client proxy instead.. + /// + internal static string SFxNoEndpointMatchingAddressForConnectionOpeningMessage { + get { + return ResourceManager.GetString("SFxNoEndpointMatchingAddressForConnectionOpeningMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message with Action '{0}' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).. + /// + internal static string SFxNoEndpointMatchingContract { + get { + return ResourceManager.GetString("SFxNoEndpointMatchingContract", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The contract specified by type '{0}' is ambiguous. The type derives from at least two different types that each define its own service contract. For this type to be used as a contract type, exactly one of its inherited contracts must be more derived than any of the others.. + /// + internal static string SFxNoMostDerivedContract { + get { + return ResourceManager.GetString("SFxNoMostDerivedContract", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' service is configured with EnsureOrderedDispatch set to true, but the ConcurrencyMode is not set to Single. EnsureOrderedDispatch requires the use of ConcurrencyMode.Single.. + /// + internal static string SFxNonConcurrentOrEnsureOrderedDispatch { + get { + return ResourceManager.GetString("SFxNonConcurrentOrEnsureOrderedDispatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The WS-Addressing "none" value is not valid for the August 2004 version of WS-Addressing.. + /// + internal static string SFxNone2004 { + get { + return ResourceManager.GetString("SFxNone2004", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An object that is not an exception was thrown.. + /// + internal static string SFxNonExceptionThrown { + get { + return ResourceManager.GetString("SFxNonExceptionThrown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation '{0}' cannot be the first operation to be called because IsInitiating is false.. + /// + internal static string SFxNonInitiatingOperation1 { + get { + return ResourceManager.GetString("SFxNonInitiatingOperation1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service implementation object was not initialized or is not available.. + /// + internal static string SFxNoServiceObject { + get { + return ResourceManager.GetString("SFxNoServiceObject", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was no CLR type specified for parameter {0}, preventing the operation from being generated.. + /// + internal static string SfxNoTypeSpecifiedForParameter { + get { + return ResourceManager.GetString("SfxNoTypeSpecifiedForParameter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Extension {0} prevented call to operation '{1}' from replying by setting the reply to null.. + /// + internal static string SFxNullReplyFromExtension2 { + get { + return ResourceManager.GetString("SFxNullReplyFromExtension2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Formatter {0} returned a null reply message for call to operation '{1}'.. + /// + internal static string SFxNullReplyFromFormatter2 { + get { + return ResourceManager.GetString("SFxNullReplyFromFormatter2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The one-way operation '{1}' on ServiceContract '{0}' is configured for transaction flow. Transactions cannot be flowed over one-way operations.. + /// + internal static string SFxOneWayAndTransactionsIncompatible { + get { + return ResourceManager.GetString("SFxOneWayAndTransactionsIncompatible", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The incoming message with action could not be processed because it is targeted at a request-reply operation, but cannot be replied to as the MessageId property is not set.. + /// + internal static string SFxOneWayMessageToTwoWayMethod0 { + get { + return ResourceManager.GetString("SFxOneWayMessageToTwoWayMethod0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OperationBehaviorAttribute can only go on the service class, it cannot be put on the ServiceContract interface. Method '{0}' on type '{1}' violates this.. + /// + internal static string SFxOperationBehaviorAttributeOnlyOnServiceClass { + get { + return ResourceManager.GetString("SFxOperationBehaviorAttributeOnlyOnServiceClass", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ReleaseInstanceMode property on OperationBehaviorAttribute can only be set on non-callback operations. Method '{0}' violates this.. + /// + internal static string SFxOperationBehaviorAttributeReleaseInstanceModeDoesNotApplyToCallback { + get { + return ResourceManager.GetString("SFxOperationBehaviorAttributeReleaseInstanceModeDoesNotApplyToCallback", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Method '{0}' has OperationContractAttribute, but enclosing type '{1}' does not have ServiceContractAttribute. OperationContractAttribute can only be used on methods in ServiceContractAttribute types or on their CallbackContract types.. + /// + internal static string SFxOperationContractOnNonServiceContract { + get { + return ResourceManager.GetString("SFxOperationContractOnNonServiceContract", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Method '{1}' has {0}, but enclosing type '{2}' does not have ServiceContractAttribute. {0} can only be used on methods in ServiceContractAttribute types.. + /// + internal static string SFxOperationContractProviderOnNonServiceContract { + get { + return ResourceManager.GetString("SFxOperationContractProviderOnNonServiceContract", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OperationDescription's Name must be a non-empty string.. + /// + internal static string SFxOperationDescriptionNameCannotBeEmpty { + get { + return ResourceManager.GetString("SFxOperationDescriptionNameCannotBeEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OperationDescription '{0}' is invalid because its Messages property contains an invalid number of MessageDescription instances. Each OperationDescription must have one or two messages.. + /// + internal static string SFxOperationMustHaveOneOrTwoMessages { + get { + return ResourceManager.GetString("SFxOperationMustHaveOneOrTwoMessages", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was a mismatch between the number of supplied arguments and the number of expected arguments. Specifically, the argument '{0}' has '{1}' elements while the argument '{2}' has '{3}' elements.. + /// + internal static string SFxParameterCountMismatch { + get { + return ResourceManager.GetString("SFxParameterCountMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The 'parameters' argument must be an array of one element.. + /// + internal static string SFxParameterMustBeArrayOfOneElement { + get { + return ResourceManager.GetString("SFxParameterMustBeArrayOfOneElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The 'parameters' argument must be an array that contains a single Message object.. + /// + internal static string SFxParameterMustBeMessage { + get { + return ResourceManager.GetString("SFxParameterMustBeMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to All parameter names used in operations that make up a service contract must not be null.. + /// + internal static string SFxParameterNameCannotBeNull { + get { + return ResourceManager.GetString("SFxParameterNameCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The 'parameters' argument must be either null or an empty array.. + /// + internal static string SFxParametersMustBeEmpty { + get { + return ResourceManager.GetString("SFxParametersMustBeEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message part name {0} is not unique in an RPC Message.. + /// + internal static string SFxPartNameMustBeUniqueInRpc { + get { + return ResourceManager.GetString("SFxPartNameMustBeUniqueInRpc", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In operation '{0}', cannot pass null to methods that take Message as input parameter.. + /// + internal static string SFxProxyRuntimeMessageCannotBeNull { + get { + return ResourceManager.GetString("SFxProxyRuntimeMessageCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Required message property '{0}' is missing from the IncomingProperties collections of the received message. Ensure that when the receive context is enabled on the binding, the created channel ensures that '{0}' is present on all received messages.. + /// + internal static string SFxReceiveContextPropertyMissing { + get { + return ResourceManager.GetString("SFxReceiveContextPropertyMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The contract '{0}' has at least one operation annotated with '{1}', but the binding used for the contract endpoint at address '{2}' does not support required binding property '{3}'. Please ensure that the binding used for the contract supports the ReceiveContext capability.. + /// + internal static string SFxReceiveContextSettingsPropertyMissing { + get { + return ResourceManager.GetString("SFxReceiveContextSettingsPropertyMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The contract name '{0}' could not be found in the list of contracts implemented by the service '{1}'.. + /// + internal static string SfxReflectedContractKeyNotFound2 { + get { + return ResourceManager.GetString("SfxReflectedContractKeyNotFound2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In order to add an endpoint to the service '{0}', a non-empty contract name must be specified.. + /// + internal static string SfxReflectedContractKeyNotFoundEmpty { + get { + return ResourceManager.GetString("SfxReflectedContractKeyNotFoundEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The contract name 'IMetadataExchange' could not be found in the list of contracts implemented by the service {0}. Add a ServiceMetadataBehavior to the configuration file or to the ServiceHost directly to enable support for this contract.. + /// + internal static string SfxReflectedContractKeyNotFoundIMetadataExchange { + get { + return ResourceManager.GetString("SfxReflectedContractKeyNotFoundIMetadataExchange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An endpoint for type '{0}' could not be added because the ServiceHost instance was not initialized properly. In order to add endpoints by Type, the CreateDescription method must be called. If you are using a class derived from ServiceHost, ensure that the class is properly calling base.CreateDescription.. + /// + internal static string SfxReflectedContractsNotInitialized1 { + get { + return ResourceManager.GetString("SfxReflectedContractsNotInitialized1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A reply message was received for operation '{0}' with action '{1}'. However, your client code requires action '{2}'.. + /// + internal static string SFxReplyActionMismatch3 { + get { + return ResourceManager.GetString("SFxReplyActionMismatch3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request message has FaultTo='{0}' but IContextChannel.LocalAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress. Enable ManualAddressing or avoid setting FaultTo on the message.. + /// + internal static string SFxRequestHasInvalidFaultToOnClient { + get { + return ResourceManager.GetString("SFxRequestHasInvalidFaultToOnClient", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request message has FaultTo='{0}' but IContextChannel.RemoteAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress because sending a reply to a different address than the original sender can create a security risk. If you want to process such messages, enable ManualAddressing.. + /// + internal static string SFxRequestHasInvalidFaultToOnServer { + get { + return ResourceManager.GetString("SFxRequestHasInvalidFaultToOnServer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request message has From='{0}' but IContextChannel.LocalAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress. Enable ManualAddressing or avoid setting From on the message.. + /// + internal static string SFxRequestHasInvalidFromOnClient { + get { + return ResourceManager.GetString("SFxRequestHasInvalidFromOnClient", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request message has From='{0}' but IContextChannel.RemoteAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress because sending a reply to a different address than the original sender can create a security risk. If you want to process such messages, enable ManualAddressing.. + /// + internal static string SFxRequestHasInvalidFromOnServer { + get { + return ResourceManager.GetString("SFxRequestHasInvalidFromOnServer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request message has ReplyTo='{0}' but IContextChannel.LocalAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress. Enable ManualAddressing or avoid setting ReplyTo on the message.. + /// + internal static string SFxRequestHasInvalidReplyToOnClient { + get { + return ResourceManager.GetString("SFxRequestHasInvalidReplyToOnClient", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request message has ReplyTo='{0}' but IContextChannel.RemoteAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress because sending a reply to a different address than the original sender can create a security risk. If you want to process such messages, enable ManualAddressing.. + /// + internal static string SFxRequestHasInvalidReplyToOnServer { + get { + return ResourceManager.GetString("SFxRequestHasInvalidReplyToOnServer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A message was received with a WS-Addressing ReplyTo or FaultTo header targeted at the "None" address. These values are not valid for request-reply operations. Please consider using a one-way operation or enabling ManualAddressing if you need to support ReplyTo or FaultTo values of "None.". + /// + internal static string SFxRequestReplyNone { + get { + return ResourceManager.GetString("SFxRequestReplyNone", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This request operation did not receive a reply within the configured timeout ({0}). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client.. + /// + internal static string SFxRequestTimedOut1 { + get { + return ResourceManager.GetString("SFxRequestTimedOut1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This request operation sent to {0} did not receive a reply within the configured timeout ({1}). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client.. + /// + internal static string SFxRequestTimedOut2 { + get { + return ResourceManager.GetString("SFxRequestTimedOut2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Required runtime property '{0}' is not initialized on DispatchRuntime. Do not remove ServiceBehaviorAttribute from ServiceDescription.Behaviors or ensure that you include a third-party service behavior that supplies this value.. + /// + internal static string SFxRequiredRuntimePropertyMissing { + get { + return ResourceManager.GetString("SFxRequiredRuntimePropertyMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MetadataExchangeClient has resolved more than MaximumResolvedReferences.. + /// + internal static string SFxResolvedMaxResolvedReferences { + get { + return ResourceManager.GetString("SFxResolvedMaxResolvedReferences", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The 'result' argument must be of type Message.. + /// + internal static string SFxResultMustBeMessage { + get { + return ResourceManager.GetString("SFxResultMustBeMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not revert impersonation on current thread. Continuing would compromise system security. Terminating process.. + /// + internal static string SFxRevertImpersonationFailed0 { + get { + return ResourceManager.GetString("SFxRevertImpersonationFailed0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RPC Message {1} in operation {0} has an invalid body name {2}. It must be {3}. + /// + internal static string SFxRpcMessageBodyPartNameInvalid { + get { + return ResourceManager.GetString("SFxRpcMessageBodyPartNameInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RPC Message {1} in operation {0} must have a single MessageBodyMember.. + /// + internal static string SFxRpcMessageMustHaveASingleBody { + get { + return ResourceManager.GetString("SFxRpcMessageMustHaveASingleBody", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was a problem loading the XSD documents provided: a reference to a schema element with name '{0}' and namespace '{1}' could not be resolved because the element definition could not be found in the schema for targetNamespace '{1}'. Please check the XSD documents provided and try again.. + /// + internal static string SFxSchemaDoesNotContainElement { + get { + return ResourceManager.GetString("SFxSchemaDoesNotContainElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was a problem loading the XSD documents provided: a reference to a schema type with name '{0}' and namespace '{1}' could not be resolved because the type definition could not be found in the schema for targetNamespace '{1}'. Please check the XSD documents provided and try again.. + /// + internal static string SFxSchemaDoesNotContainType { + get { + return ResourceManager.GetString("SFxSchemaDoesNotContainType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Schema with target namespace '{0}' could not be found.. + /// + internal static string SFxSchemaNotFound { + get { + return ResourceManager.GetString("SFxSchemaNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SecurityContextProperty is missing from the request Message, this may indicate security is configured incorrectly.. + /// + internal static string SFxSecurityContextPropertyMissingFromRequestMessage { + get { + return ResourceManager.GetString("SFxSecurityContextPropertyMissingFromRequestMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.. + /// + internal static string SFxServerDidNotReply { + get { + return ResourceManager.GetString("SFxServerDidNotReply", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation '{0}' could not be invoked because the property '{1}' on the OperationContract is set to '{2}'. To invoke this operation on the server, call the '{3}' method on the client proxy instead.. + /// + internal static string SFxServiceChannelCannotBeCalledBecauseIsSessionOpenNotificationEnabled { + get { + return ResourceManager.GetString("SFxServiceChannelCannotBeCalledBecauseIsSessionOpenNotificationEnabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation '{0}' could not be completed because the sessionful channel timed out waiting to receive a message. To increase the timeout, either set the receiveTimeout property on the binding in your configuration file, or set the ReceiveTimeout property on the Binding directly.. + /// + internal static string SFxServiceChannelIdleAborted { + get { + return ResourceManager.GetString("SFxServiceChannelIdleAborted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The contract type {0} is not attributed with ServiceContractAttribute. In order to define a valid contract, the specified type (either contract interface or service class) must be attributed with ServiceContractAttribute.. + /// + internal static string SfxServiceContractAttributeNotFound { + get { + return ResourceManager.GetString("SfxServiceContractAttributeNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In order to generate configuration information using the GenerateServiceEndpoint method, the ServiceContractGenerator instance must have been initialized with a valid Configuration object.. + /// + internal static string SFxServiceContractGeneratorConfigRequired { + get { + return ResourceManager.GetString("SFxServiceContractGeneratorConfigRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Endpoints cannot be added after the ServiceHost has been opened/faulted/aborted/closed.. + /// + internal static string SFxServiceHostBaseCannotAddEndpointAfterOpen { + get { + return ResourceManager.GetString("SFxServiceHostBaseCannotAddEndpointAfterOpen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Endpoints cannot be added before the Description property has been initialized.. + /// + internal static string SFxServiceHostBaseCannotAddEndpointWithoutDescription { + get { + return ResourceManager.GetString("SFxServiceHostBaseCannotAddEndpointWithoutDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ApplyConfiguration requires that the Description property be initialized. Either provide a valid ServiceDescription in the CreateDescription method or override the ApplyConfiguration method to provide an alternative implementation.. + /// + internal static string SFxServiceHostBaseCannotApplyConfigurationWithoutDescription { + get { + return ResourceManager.GetString("SFxServiceHostBaseCannotApplyConfigurationWithoutDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to InitializeRuntime requires that the Description property be initialized. Either provide a valid ServiceDescription in the CreateDescription method or override the InitializeRuntime method to provide an alternative implementation.. + /// + internal static string SFxServiceHostBaseCannotInitializeRuntimeWithoutDescription { + get { + return ResourceManager.GetString("SFxServiceHostBaseCannotInitializeRuntimeWithoutDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to LoadConfigurationSection requires that the Description property be initialized. Provide a valid ServiceDescription in the CreateDescription method.. + /// + internal static string SFxServiceHostBaseCannotLoadConfigurationSectionWithoutDescription { + get { + return ResourceManager.GetString("SFxServiceHostBaseCannotLoadConfigurationSectionWithoutDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to InitializeDescription must be called with a serviceType or singletonInstance parameter.. + /// + internal static string SFxServiceHostCannotCreateDescriptionWithoutServiceType { + get { + return ResourceManager.GetString("SFxServiceHostCannotCreateDescriptionWithoutServiceType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceHost only supports class service types.. + /// + internal static string SFxServiceHostNeedsClass { + get { + return ResourceManager.GetString("SFxServiceHostNeedsClass", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ChannelDispatcher with ListenUri '{0}' has endpoints with the following contracts: {1}. Metadata endpoints cannot share ListenUris. The conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config.. + /// + internal static string SFxServiceMetadataBehaviorInstancingError { + get { + return ResourceManager.GetString("SFxServiceMetadataBehaviorInstancingError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http base address. Either supply an http base address or set HttpGetUrl to an absolute address.. + /// + internal static string SFxServiceMetadataBehaviorNoHttpBaseAddress { + get { + return ResourceManager.GetString("SFxServiceMetadataBehaviorNoHttpBaseAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HttpsGetEnabled property of ServiceMetadataBehavior is set to true and the HttpsGetUrl property is a relative address, but there is no https base address. Either supply an https base address or set HttpsGetUrl to an absolute address.. + /// + internal static string SFxServiceMetadataBehaviorNoHttpsBaseAddress { + get { + return ResourceManager.GetString("SFxServiceMetadataBehaviorNoHttpsBaseAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} must be a relative URI or an absolute URI with scheme '{1}'. '{2}' is an absolute URI with scheme '{3}'. . + /// + internal static string SFxServiceMetadataBehaviorUrlMustBeHttpOrRelative { + get { + return ResourceManager.GetString("SFxServiceMetadataBehaviorUrlMustBeHttpOrRelative", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service implementation type is an interface or abstract class and no implementation object was provided.. + /// + internal static string SFxServiceTypeNotCreatable { + get { + return ResourceManager.GetString("SFxServiceTypeNotCreatable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This property sets EnableFaults on the client. To set EnableFaults on the server, use ChannelDispatcher's EnableFaults.. + /// + internal static string SFxSetEnableFaultsOnChannelDispatcher0 { + get { + return ResourceManager.GetString("SFxSetEnableFaultsOnChannelDispatcher0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This property sets ManualAddressing on the client. To set ManualAddressing on the server, use ChannelDispatcher's ManualAddressing.. + /// + internal static string SFxSetManualAddresssingOnChannelDispatcher0 { + get { + return ResourceManager.GetString("SFxSetManualAddresssingOnChannelDispatcher0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Header properties cannot be set in MessageHeaderAttribute of {0} as its type is MessageHeader<T>.. + /// + internal static string SFxStaticMessageHeaderPropertiesNotAllowed { + get { + return ResourceManager.GetString("SFxStaticMessageHeaderPropertiesNotAllowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An exception has been thrown when reading the stream.. + /// + internal static string SFxStreamIOException { + get { + return ResourceManager.GetString("SFxStreamIOException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message containing this stream has been closed. Note that request streams cannot be accessed after the service operation returns.. + /// + internal static string SFxStreamRequestMessageClosed { + get { + return ResourceManager.GetString("SFxStreamRequestMessageClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message containing this stream has been closed. . + /// + internal static string SFxStreamResponseMessageClosed { + get { + return ResourceManager.GetString("SFxStreamResponseMessageClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This channel cannot send any more messages because IsTerminating operation '{0}' has already been called.. + /// + internal static string SFxTerminatingOperationAlreadyCalled1 { + get { + return ResourceManager.GetString("SFxTerminatingOperationAlreadyCalled1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Throttle limit must be greater than zero. To disable, set to Int32.MaxValue.. + /// + internal static string SFxThrottleLimitMustBeGreaterThanZero0 { + get { + return ResourceManager.GetString("SFxThrottleLimitMustBeGreaterThanZero0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The timeout value provided was not of a recognized format. Please see InnerException for more details.. + /// + internal static string SFxTimeoutInvalidStringFormat { + get { + return ResourceManager.GetString("SFxTimeoutInvalidStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Timeout must be greater than or equal to TimeSpan.Zero. To disable timeout, specify TimeSpan.MaxValue.. + /// + internal static string SFxTimeoutOutOfRange0 { + get { + return ResourceManager.GetString("SFxTimeoutOutOfRange0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Timeouts larger than Int32.MaxValue TotalMilliseconds (approximately 24 days) cannot be honored. To disable timeout, specify TimeSpan.MaxValue.. + /// + internal static string SFxTimeoutOutOfRangeTooBig { + get { + return ResourceManager.GetString("SFxTimeoutOutOfRangeTooBig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot create a unique part name for {0}.. + /// + internal static string SFxTooManyPartsWithSameName { + get { + return ResourceManager.GetString("SFxTooManyPartsWithSameName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An unrecognized element was encountered in the XML during deserialization which was ignored.. + /// + internal static string SFxTraceCodeElementIgnored { + get { + return ResourceManager.GetString("SFxTraceCodeElementIgnored", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TransactedBatchingBehavior validation failed. The service endpoint cannot be started. TransactedBatchingBehavior requires a binding that contains a binding element ITransactedBindingElement that returns true for ITransactedBindingElement.TransactedReceiveEnabled. If you are using NetMsmqBinding or MsmqIntegrationBinding make sure that ExactlyOnce is set to true.. + /// + internal static string SfxTransactedBindingNeeded { + get { + return ResourceManager.GetString("SfxTransactedBindingNeeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction under which this method call was executing was asynchronously aborted.. + /// + internal static string SFxTransactionAsyncAborted { + get { + return ResourceManager.GetString("SFxTransactionAsyncAborted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation '{1}' on contract '{0}' is configured with TransactionAutoComplete set to false and the InstanceContextMode is not set to PerSession. TransactionAutoComplete set to false requires the use of InstanceContextMode.PerSession.. + /// + internal static string SFxTransactionAutoCompleteFalseAndInstanceContextMode { + get { + return ResourceManager.GetString("SFxTransactionAutoCompleteFalseAndInstanceContextMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation '{1}' on contract '{0}' is configured with TransactionAutoComplete set to false but SessionMode is not set to Required. TransactionAutoComplete set to false requires SessionMode.Required.. + /// + internal static string SFxTransactionAutoCompleteFalseAndSupportsSession { + get { + return ResourceManager.GetString("SFxTransactionAutoCompleteFalseAndSupportsSession", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation '{0}' on callback contract '{1}' is configured with TransactionAutoComplete set to false. TransactionAutoComplete set to false cannot be used with operations on callback contracts.. + /// + internal static string SFxTransactionAutoCompleteFalseOnCallbackContract { + get { + return ResourceManager.GetString("SFxTransactionAutoCompleteFalseOnCallbackContract", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service '{0}' is configured with TransactionAutoCompleteOnSessionClose set to true and with an InstanceContextMode not set to PerSession. TransactionAutoCompleteOnSessionClose set to true requires an instancing mode that uses sessions.. + /// + internal static string SFxTransactionAutoCompleteOnSessionCloseNoSession { + get { + return ResourceManager.GetString("SFxTransactionAutoCompleteOnSessionCloseNoSession", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The incoming transaction cannot be deserialized. The transaction header in the message was either malformed or in an unrecognized format. The client and the service must be configured to use the same protocol and protocol version. The following exception occurred: {0}. + /// + internal static string SFxTransactionDeserializationFailed { + get { + return ResourceManager.GetString("SFxTransactionDeserializationFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding for the endpoint at address '{0}' is configured with both the MsmqTransportBindingElement and the TransactionFlowBindingElement. These two elements cannot be used together.. + /// + internal static string SFxTransactionFlowAndMSMQ { + get { + return ResourceManager.GetString("SFxTransactionFlowAndMSMQ", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service operation requires a transaction to be flowed.. + /// + internal static string SFxTransactionFlowRequired { + get { + return ResourceManager.GetString("SFxTransactionFlowRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction header '{0}' within the namespace '{1}' was not understood by the service. The client and the service must be configured to use the same protocol and protocol version ('{2}').. + /// + internal static string SFxTransactionHeaderNotUnderstood { + get { + return ResourceManager.GetString("SFxTransactionHeaderNotUnderstood", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SetTransactionComplete method was called in the operation '{0}' on contract '{1}' when TransactionAutoComplete was set to true. The SetTransactionComplete method can only be called when TransactionAutoComplete is set to false. This is an invalid scenario and the current transaction was aborted.. + /// + internal static string SFxTransactionInvalidSetTransactionComplete { + get { + return ResourceManager.GetString("SFxTransactionInvalidSetTransactionComplete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service '{0}' is configured with a TransactionIsolationLevel but no operations are configured with TransactionScopeRequired set to true. TransactionIsolationLevel requires at least one operation with TransactionScopeRequired set to true.. + /// + internal static string SFxTransactionIsolationLevelNeedsScope { + get { + return ResourceManager.GetString("SFxTransactionIsolationLevelNeedsScope", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TThe operation '{1}' on contract '{0}' is configured with TransactionAutoComplete set to false and with ConcurrencyMode not set to Single. TransactionAutoComplete set to false requires ConcurrencyMode.Single.. + /// + internal static string SFxTransactionNonConcurrentOrAutoComplete2 { + get { + return ResourceManager.GetString("SFxTransactionNonConcurrentOrAutoComplete2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' service is configured with ReleaseServiceInstanceOnTransactionComplete set to true, but the ConcurrencyMode is not set to Single. The ReleaseServiceInstanceOnTransactionComplete requires the use of ConcurrencyMode.Single.. + /// + internal static string SFxTransactionNonConcurrentOrReleaseServiceInstanceOnTxComplete { + get { + return ResourceManager.GetString("SFxTransactionNonConcurrentOrReleaseServiceInstanceOnTxComplete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service '{0}' is configured with ReleaseServiceInstanceOnTransactionComplete but no operations are configured with TransactionScopeRequired set to true. The ReleaseServiceInstanceOnTransactionComplete property requires at least one operation with TransactionScopeRequired set to true. Remove the ReleaseServiceInstanceOnTransactionComplete property from the service if this is the case.. + /// + internal static string SFxTransactionReleaseServiceInstanceOnTransactionCompleteNeedsScope { + get { + return ResourceManager.GetString("SFxTransactionReleaseServiceInstanceOnTransactionCompleteNeedsScope", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service does not support concurrent transactions.. + /// + internal static string SFxTransactionsNotSupported { + get { + return ResourceManager.GetString("SFxTransactionsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service '{0}' is configured with TransactionAutoCompleteOnSessionClose, but no operations are configured with TransactionScopeRequired set to true. The TransactionAutoCompleteOnSessionClose property requires at least one operation with TransactionScopeRequired set to true. Remove the TransactionAutoCompleteOnSessionClose property from the service if this is the case.. + /// + internal static string SFxTransactionTransactionAutoCompleteOnSessionCloseNeedsScope { + get { + return ResourceManager.GetString("SFxTransactionTransactionAutoCompleteOnSessionCloseNeedsScope", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service '{0}' is configured with a TransactionTimeout but no operations are configured with TransactionScopeRequired set to true. TransactionTimeout requires at least one operation with TransactionScopeRequired set to true.. + /// + internal static string SFxTransactionTransactionTimeoutNeedsScope { + get { + return ResourceManager.GetString("SFxTransactionTransactionTimeoutNeedsScope", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The flowed transaction could not be unmarshaled. The following exception occurred: {0}. + /// + internal static string SFxTransactionUnmarshalFailed { + get { + return ResourceManager.GetString("SFxTransactionUnmarshalFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An attempt was made to add more than one transaction to a message. At most one transaction can be added.. + /// + internal static string SFxTryAddMultipleTransactionsOnMessage { + get { + return ResourceManager.GetString("SFxTryAddMultipleTransactionsOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Error: The instance of the MessageContract cannot be null in {0}.. + /// + internal static string SFxTypedMessageCannotBeNull { + get { + return ResourceManager.GetString("SFxTypedMessageCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation '{0}' could not be loaded because it specifies "rpc-style" in "literal" mode, but uses message contract types or the System.ServiceModel.Channels.Message. This combination is disallowed -- specify a different value for style or use parameters other than message contract types or System.ServiceModel.Channels.Message.. + /// + internal static string SFxTypedMessageCannotBeRpcLiteral { + get { + return ResourceManager.GetString("SFxTypedMessageCannotBeRpcLiteral", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation '{0}' could not be loaded because it has a parameter or return type of type System.ServiceModel.Channels.Message or a type that has MessageContractAttribute and other parameters of different types. When using System.ServiceModel.Channels.Message or types with MessageContractAttribute, the method must not use any other types of parameters.. + /// + internal static string SFxTypedOrUntypedMessageCannotBeMixedWithParameters { + get { + return ResourceManager.GetString("SFxTypedOrUntypedMessageCannotBeMixedWithParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When using the rpc-encoded style, message contract types or the System.ServiceModel.Channels.Message type cannot be used if the operation has no parameters or has a void return value. Add a blank message contract type as a parameter or return type to operation '{0}'.. + /// + internal static string SFxTypedOrUntypedMessageCannotBeMixedWithVoidInRpc { + get { + return ResourceManager.GetString("SFxTypedOrUntypedMessageCannotBeMixedWithVoidInRpc", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This fault did not provide a matching translation: {0}. + /// + internal static string SFxUnknownFaultNoMatchingTranslation1 { + get { + return ResourceManager.GetString("SFxUnknownFaultNoMatchingTranslation1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This fault did not provide a reason (MessageFault.Reason was null).. + /// + internal static string SFxUnknownFaultNullReason0 { + get { + return ResourceManager.GetString("SFxUnknownFaultNullReason0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This fault did not provide a reason (MessageFault.Reason.Translations.Count was 0).. + /// + internal static string SFxUnknownFaultZeroReasons0 { + get { + return ResourceManager.GetString("SFxUnknownFaultZeroReasons0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parameter value '{0}' is an invalid URI.. + /// + internal static string SFXUnvalidNamespaceParam { + get { + return ResourceManager.GetString("SFXUnvalidNamespaceParam", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Value '{0}' provided for {1} property is an invalid URI.. + /// + internal static string SFXUnvalidNamespaceValue { + get { + return ResourceManager.GetString("SFXUnvalidNamespaceValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User operation '{0}.{1}' threw an exception that is unhandled in user code. This exception will be rethrown. If this is a recurring problem, it may indicate an error in the implementation of the '{0}.{1}' method.. + /// + internal static string SFxUserCodeThrewException { + get { + return ResourceManager.GetString("SFxUserCodeThrewException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parameter '{0}' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is '{1}'.. + /// + internal static string SfxUseTypedMessageForCustomAttributes { + get { + return ResourceManager.GetString("SfxUseTypedMessageForCustomAttributes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot add outgoing headers to message as MessageVersion in OperationContext.Current '{0}' does not match with the header version of message being processed '{1}'.. + /// + internal static string SFxVersionMismatchInOperationContextAndMessage2 { + get { + return ResourceManager.GetString("SFxVersionMismatchInOperationContextAndMessage2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In order to use one of the ServiceHost constructors that takes a service instance, the InstanceContextMode of the service must be set to InstanceContextMode.Single. This can be configured via the ServiceBehaviorAttribute. Otherwise, please consider using the ServiceHost constructors that take a Type argument.. + /// + internal static string SFxWellKnownNonSingleton0 { + get { + return ResourceManager.GetString("SFxWellKnownNonSingleton0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When multiple endpoints on a service share the same ListenUri, those endpoints must all have the same Identity in their EndpointAddress. The endpoints at ListenUri '{0}' do not meet this criteria.. + /// + internal static string SFxWhenMultipleEndpointsShareAListenUriTheyMustHaveSameIdentity { + get { + return ResourceManager.GetString("SFxWhenMultipleEndpointsShareAListenUriTheyMustHaveSameIdentity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Wrapper element name cannot be empty.. + /// + internal static string SFxWrapperNameCannotBeEmpty { + get { + return ResourceManager.GetString("SFxWrapperNameCannotBeEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Wrapper type for message {0} cannot be projected as a data contract type since it has multiple namespaces. Consider using the XmlSerializer. + /// + internal static string SFxWrapperTypeHasMultipleNamespaces { + get { + return ResourceManager.GetString("SFxWrapperTypeHasMultipleNamespaces", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service description message '{1}' from target namespace '{2}' does not contain part named '{0}'.. + /// + internal static string SFxWsdlMessageDoesNotContainPart3 { + get { + return ResourceManager.GetString("SFxWsdlMessageDoesNotContainPart3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The wsdl operation {0} in portType {1} contains a fault that does not reference a message. This is either because the message attribute is missing or empty.. + /// + internal static string SFxWsdlOperationFaultNeedsMessageAttribute2 { + get { + return ResourceManager.GetString("SFxWsdlOperationFaultNeedsMessageAttribute2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The wsdl operation input {0} in portType {1} does not reference a message. This is either because the message attribute is missing or empty.. + /// + internal static string SFxWsdlOperationInputNeedsMessageAttribute2 { + get { + return ResourceManager.GetString("SFxWsdlOperationInputNeedsMessageAttribute2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The wsdl operation output {0} in portType {1} does not reference a message. This is either because the message attribute is missing or empty.. + /// + internal static string SFxWsdlOperationOutputNeedsMessageAttribute2 { + get { + return ResourceManager.GetString("SFxWsdlOperationOutputNeedsMessageAttribute2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WSDL part {0} in message {1} from namespace {2} must have either an element or a type name. + /// + internal static string SFxWsdlPartMustHaveElementOrType { + get { + return ResourceManager.GetString("SFxWsdlPartMustHaveElementOrType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XmlArrayAttribute cannot be used in repeating part {1}:{0}.. + /// + internal static string SFxXmlArrayNotAllowedForMultiple { + get { + return ResourceManager.GetString("SFxXmlArrayNotAllowedForMultiple", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service endpoint failed to listen on the URI '{0}' because access was denied. Verify that the current user is granted access in the appropriate allowAccounts section of SMSvcHost.exe.config.. + /// + internal static string SharedEndpointReadDenied { + get { + return ResourceManager.GetString("SharedEndpointReadDenied", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service endpoint failed to listen on the URI '{0}' because the shared memory section was not found. Verify that the '{1}' service is running.. + /// + internal static string SharedEndpointReadNotFound { + get { + return ResourceManager.GetString("SharedEndpointReadNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to failed to grant the PROCESS_DUP_HANDLE access right to the target service's account SID '{0}'.. + /// + internal static string SharedManagerAllowDupHandleFailed { + get { + return ResourceManager.GetString("SharedManagerAllowDupHandleFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The TransportManager failed to listen on the supplied URI using the {0} service: {1}.. + /// + internal static string SharedManagerBase { + get { + return ResourceManager.GetString("SharedManagerBase", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to the URI is already registered with the service. + /// + internal static string SharedManagerConflictingRegistration { + get { + return ResourceManager.GetString("SharedManagerConflictingRegistration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to failed to retrieve the UserSid of the current process. + /// + internal static string SharedManagerCurrentUserSidLookupFailure { + get { + return ResourceManager.GetString("SharedManagerCurrentUserSidLookupFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to failed to create a data connection to the service. + /// + internal static string SharedManagerDataConnectionCreateFailure { + get { + return ResourceManager.GetString("SharedManagerDataConnectionCreateFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to failed to establish a data connection to the service. + /// + internal static string SharedManagerDataConnectionFailure { + get { + return ResourceManager.GetString("SharedManagerDataConnectionFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to failed to establish the data connection because of an I/O error. + /// + internal static string SharedManagerDataConnectionPipeFailed { + get { + return ResourceManager.GetString("SharedManagerDataConnectionPipeFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to the service failed to listen. + /// + internal static string SharedManagerFailedToListen { + get { + return ResourceManager.GetString("SharedManagerFailedToListen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to failed to retrieve the LogonSid of the service process ({0}). + /// + internal static string SharedManagerLogonSidLookupFailure { + get { + return ResourceManager.GetString("SharedManagerLogonSidLookupFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to the URI is too long. + /// + internal static string SharedManagerPathTooLong { + get { + return ResourceManager.GetString("SharedManagerPathTooLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to the protocol is not supported. + /// + internal static string SharedManagerProtocolUnsupported { + get { + return ResourceManager.GetString("SharedManagerProtocolUnsupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to the quota was exceeded. + /// + internal static string SharedManagerRegistrationQuotaExceeded { + get { + return ResourceManager.GetString("SharedManagerRegistrationQuotaExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to failed to read the service's endpoint with native error code {0}. See inner exception for details. + /// + internal static string SharedManagerServiceEndpointReadFailure { + get { + return ResourceManager.GetString("SharedManagerServiceEndpointReadFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to failed to look up the service process in the SCM ({0}). + /// + internal static string SharedManagerServiceLookupFailure { + get { + return ResourceManager.GetString("SharedManagerServiceLookupFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to the service failed the security checks. + /// + internal static string SharedManagerServiceSecurityFailed { + get { + return ResourceManager.GetString("SharedManagerServiceSecurityFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to failed to look up the service SID in the SCM ({0}). + /// + internal static string SharedManagerServiceSidLookupFailure { + get { + return ResourceManager.GetString("SharedManagerServiceSidLookupFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to failed to start the service ({0}). Refer to the Event Log for more details. + /// + internal static string SharedManagerServiceStartFailure { + get { + return ResourceManager.GetString("SharedManagerServiceStartFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to failed to start the service because it is disabled. An administrator can enable it by running 'sc.exe config {0} start= demand'.. + /// + internal static string SharedManagerServiceStartFailureDisabled { + get { + return ResourceManager.GetString("SharedManagerServiceStartFailureDisabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to failed to start the service. Refer to the Event Log for more details. + /// + internal static string SharedManagerServiceStartFailureNoError { + get { + return ResourceManager.GetString("SharedManagerServiceStartFailureNoError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to failed to retrieve the UserSid of the service process ({0}). + /// + internal static string SharedManagerUserSidLookupFailure { + get { + return ResourceManager.GetString("SharedManagerUserSidLookupFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to the version is not supported by the service. + /// + internal static string SharedManagerVersionUnsupported { + get { + return ResourceManager.GetString("SharedManagerVersionUnsupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message could not be dispatched to the service at address '{0}'. Refer to the server Event Log for more details. + /// + internal static string Sharing_ConnectionDispatchFailed { + get { + return ResourceManager.GetString("Sharing_ConnectionDispatchFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint address for the NT service '{0}' read from shared memory is empty.. + /// + internal static string Sharing_EmptyListenerEndpoint { + get { + return ResourceManager.GetString("Sharing_EmptyListenerEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message could not be dispatched because the service at the endpoint address '{0}' is unavailable for the protocol of the address.. + /// + internal static string Sharing_EndpointUnavailable { + get { + return ResourceManager.GetString("Sharing_EndpointUnavailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message could not be dispatched because the transport manager has been stopped. This can happen if the application is being recycled or disabled.. + /// + internal static string Sharing_ListenerProxyStopped { + get { + return ResourceManager.GetString("Sharing_ListenerProxyStopped", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shutdown request was not received.. + /// + internal static string ShutdownRequestWasNotReceived { + get { + return ResourceManager.GetString("ShutdownRequestWasNotReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The signature token '{0}' is not the same token as the encryption token '{1}'.. + /// + internal static string SignatureAndEncryptionTokenMismatch { + get { + return ResourceManager.GetString("SignatureAndEncryptionTokenMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configured SecurityVersion does not support signature confirmation. Use WsSecurity11 or above.. + /// + internal static string SignatureConfirmationNotSupported { + get { + return ResourceManager.GetString("SignatureConfirmationNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The protocol factory must support Request/Reply security in order to offer signature confirmation.. + /// + internal static string SignatureConfirmationRequiresRequestReply { + get { + return ResourceManager.GetString("SignatureConfirmationRequiresRequestReply", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Signature confirmation is not expected in the security header.. + /// + internal static string SignatureConfirmationsNotExpected { + get { + return ResourceManager.GetString("SignatureConfirmationsNotExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The signature confirmation elements cannot occur after the primary signature.. + /// + internal static string SignatureConfirmationsOccursAfterPrimarySignature { + get { + return ResourceManager.GetString("SignatureConfirmationsOccursAfterPrimarySignature", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Signature confirmation was expected to be present in the security header.. + /// + internal static string SignatureConfirmationWasExpected { + get { + return ResourceManager.GetString("SignatureConfirmationWasExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A signature is not expected for this message.. + /// + internal static string SignatureNotExpected { + get { + return ResourceManager.GetString("SignatureNotExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Signature verification failed.. + /// + internal static string SignatureVerificationFailed { + get { + return ResourceManager.GetString("SignatureVerificationFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A signed supporting token is not expected in the security header in this context.. + /// + internal static string SignedSupportingTokenNotExpected { + get { + return ResourceManager.GetString("SignedSupportingTokenNotExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The signing token {0} has no keys. The security token is used in a context that requires it to perform cryptographic operations, but the token contains no cryptographic keys. Either the token type does not support cryptographic operations, or the particular token instance does not contain cryptographic keys. Check your configuration to ensure that cryptographically disabled token types (for example, UserNameSecurityToken) are not specified in a context that requires cryptographic operations (for example, an [rest of string was truncated]";. + /// + internal static string SigningTokenHasNoKeys { + get { + return ResourceManager.GetString("SigningTokenHasNoKeys", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The signing token {0} has no key that supports the algorithm suite {1}.. + /// + internal static string SigningTokenHasNoKeysSupportingTheAlgorithmSuite { + get { + return ResourceManager.GetString("SigningTokenHasNoKeysSupportingTheAlgorithmSuite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Signing without primary signature requires timestamp.. + /// + internal static string SigningWithoutPrimarySignatureRequiresTimestamp { + get { + return ResourceManager.GetString("SigningWithoutPrimarySignatureRequiresTimestamp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The DeliveryRequirementsAttribute on contract '{0}' specifies that the binding must support ordered delivery (RequireOrderedDelivery). This condition could not be verified because the configured binding does not implement IBindingDeliveryCapabilities. The DeliveryRequirementsAttribute may only be used with bindings that implement the IBindingDeliveryCapabilities interface.. + /// + internal static string SinceTheBindingForDoesnTSupportIBindingCapabilities1_1 { + get { + return ResourceManager.GetString("SinceTheBindingForDoesnTSupportIBindingCapabilities1_1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The DeliveryRequirementsAttribute on contract '{0}' specifies a QueuedDeliveryRequirements constraint. This condition could not be verified because the configured binding does not implement IBindingDeliveryCapabilities. The DeliveryRequirementsAttribute may only be used with bindings that implement the IBindingDeliveryCapabilities interface.. + /// + internal static string SinceTheBindingForDoesnTSupportIBindingCapabilities2_1 { + get { + return ResourceManager.GetString("SinceTheBindingForDoesnTSupportIBindingCapabilities2_1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A single WSDL document could not be generated for this service. Multiple service contract namespaces were found ({0}). Ensure that all your service contracts have the same namespace.. + /// + internal static string SingleWsdlNotGenerated { + get { + return ResourceManager.GetString("SingleWsdlNotGenerated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified size exceeds the remaining buffer space ({0} bytes).. + /// + internal static string SizeExceedsRemainingBufferSpace { + get { + return ResourceManager.GetString("SizeExceedsRemainingBufferSpace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint specified a last message number that is smaller than a sequence number that has already been seen. The reliable session is in an inconsistent state since it cannot determine the actual last message. The reliable session was faulted.. + /// + internal static string SmallLastMsgNumberExceptionString { + get { + return ResourceManager.GetString("SmallLastMsgNumberExceptionString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Soap11 ({0}). + /// + internal static string Soap11ToStringFormat { + get { + return ResourceManager.GetString("Soap11ToStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Soap12 ({0}). + /// + internal static string Soap12ToStringFormat { + get { + return ResourceManager.GetString("Soap12ToStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SOAP security negotiation failed. See inner exception for more details.. + /// + internal static string SoapSecurityNegotiationFailed { + get { + return ResourceManager.GetString("SoapSecurityNegotiationFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SOAP security negotiation with '{0}' for target '{1}' failed. See inner exception for more details.. + /// + internal static string SoapSecurityNegotiationFailedForIssuerAndTarget { + get { + return ResourceManager.GetString("SoapSecurityNegotiationFailedForIssuerAndTarget", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The socket was aborted because an asynchronous receive from the socket did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string SocketAbortedReceiveTimedOut { + get { + return ResourceManager.GetString("SocketAbortedReceiveTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The socket connection was aborted because an asynchronous send to the socket did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string SocketAbortedSendTimedOut { + get { + return ResourceManager.GetString("SocketAbortedSendTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A graceful close was attempted on the socket, but the other side ({0}) is still sending data.. + /// + internal static string SocketCloseReadReceivedData { + get { + return ResourceManager.GetString("SocketCloseReadReceivedData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint of the socket ({0}) did not respond to a close request within the allotted timeout ({1}). It is likely that the remote endpoint is not calling Close after receiving the EOF signal (null) from Receive. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string SocketCloseReadTimeout { + get { + return ResourceManager.GetString("SocketCloseReadTimeout", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The socket connection has been disposed.. + /// + internal static string SocketConnectionDisposed { + get { + return ResourceManager.GetString("SocketConnectionDisposed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The socket listener has been disposed.. + /// + internal static string SocketListenerDisposed { + get { + return ResourceManager.GetString("SocketListenerDisposed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The socket listener is not listening.. + /// + internal static string SocketListenerNotListening { + get { + return ResourceManager.GetString("SocketListenerNotListening", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The incoming transaction cannot be unmarshaled because the source MSDTC transaction manager has either disabled outbound transactions or disabled its WS-AtomicTransaction protocol service.. + /// + internal static string SourceTransactionsDisabled { + get { + return ResourceManager.GetString("SourceTransactionsDisabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The space needed for encoding ({0} bytes) exceeds the message frame offset.. + /// + internal static string SpaceNeededExceedsMessageFrameOffset { + get { + return ResourceManager.GetString("SpaceNeededExceedsMessageFrameOffset", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Security Support Provider Interface does not support Impersonation level 'None'. Specify Identification, Impersonation or Delegation level.. + /// + internal static string SpnegoImpersonationLevelCannotBeSetToNone { + get { + return ResourceManager.GetString("SpnegoImpersonationLevelCannotBeSetToNone", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to It is likely that certificate '{0}' may not have a private key that is capable of key exchange or the process may not have access rights for the private key. Please see inner exception for detail.. + /// + internal static string SslCertMayNotDoKeyExchange { + get { + return ResourceManager.GetString("SslCertMayNotDoKeyExchange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The certificate '{0}' must have a private key. The process must have access rights for the private key.. + /// + internal static string SslCertMustHavePrivateKey { + get { + return ResourceManager.GetString("SslCertMustHavePrivateKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cipher key negotiated by SSL is too small ('{0}' bits). Keys of such lengths are not allowed as they may result in information disclosure. Please configure the initiator machine to negotiate SSL cipher keys that are '{1}' bits or longer.. + /// + internal static string SslCipherKeyTooSmall { + get { + return ResourceManager.GetString("SslCipherKeyTooSmall", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Either the client credential was invalid or there was an error collecting the client credentials by the SSPI.. + /// + internal static string SspiErrorOrInvalidClientCredentials { + get { + return ResourceManager.GetString("SspiErrorOrInvalidClientCredentials", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SecuritySessionServerSettings.CreateAcceptor, channelAcceptor must be null, can not create twice.. + /// + internal static string SSSSCreateAcceptor { + get { + return ResourceManager.GetString("SSSSCreateAcceptor", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The token Serializer cannot serialize '{0}'. If this is a custom type you must supply a custom serializer.. + /// + internal static string StandardsManagerCannotWriteObject { + get { + return ResourceManager.GetString("StandardsManagerCannotWriteObject", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Standards manager of filter does not match that of filter table. Can not have two different filters.. + /// + internal static string StandardsManagerDoesNotMatch { + get { + return ResourceManager.GetString("StandardsManagerDoesNotMatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation cannot be completed because the stream is closed.. + /// + internal static string StreamClosed { + get { + return ResourceManager.GetString("StreamClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TimeoutStream requires an inner Stream that supports timeouts; its CanTimeout property must be true.. + /// + internal static string StreamDoesNotSupportTimeout { + get { + return ResourceManager.GetString("StreamDoesNotSupportTimeout", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while transmitting data.. + /// + internal static string StreamError { + get { + return ResourceManager.GetString("StreamError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote server did not satisfy the mutual authentication requirement.. + /// + internal static string StreamMutualAuthNotSatisfied { + get { + return ResourceManager.GetString("StreamMutualAuthNotSatisfied", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The StreamUpgradeProvider {0} does not support the specified ChannelBindingKind ({1}). . + /// + internal static string StreamUpgradeUnsupportedChannelBindingKind { + get { + return ResourceManager.GetString("StreamUpgradeUnsupportedChannelBindingKind", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The address of the security token issuer is not specified. An explicit issuer address must be specified in the binding for target '{0}' or the local issuer address must be configured in the credentials.. + /// + internal static string StsAddressNotSet { + get { + return ResourceManager.GetString("StsAddressNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding to use to communicate to the federation service at '{0}' is not specified.. + /// + internal static string StsBindingNotSet { + get { + return ResourceManager.GetString("StsBindingNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The algorithm '{0}' is not accepted for operation '{1}' by algorithm suite {2}.. + /// + internal static string SuiteDoesNotAcceptAlgorithm { + get { + return ResourceManager.GetString("SuiteDoesNotAcceptAlgorithm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A reply message was received without a valid RelatesTo header. This may have been caused by a missing RelatesTo header or a RelatesTo header with an invalid WS-Addressing Relationship type.. + /// + internal static string SuppliedMessageIsNotAReplyItHasNoRelatesTo0 { + get { + return ResourceManager.GetString("SuppliedMessageIsNotAReplyItHasNoRelatesTo0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' addressing mode is not supported.. + /// + internal static string SupportedAddressingModeNotSupported { + get { + return ResourceManager.GetString("SupportedAddressingModeNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The supporting signature is not signed with a derived key. The binding's supporting token parameter '{0}' requires key derivation.. + /// + internal static string SupportingSignatureIsNotDerivedFrom { + get { + return ResourceManager.GetString("SupportingSignatureIsNotDerivedFrom", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The supporting token provided for parameters '{0}' was not encrypted.. + /// + internal static string SupportingTokenIsNotEncrypted { + get { + return ResourceManager.GetString("SupportingTokenIsNotEncrypted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The supporting token provided for parameters '{0}' did not endorse the primary signature.. + /// + internal static string SupportingTokenIsNotEndorsing { + get { + return ResourceManager.GetString("SupportingTokenIsNotEndorsing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The supporting token provided for parameters '{0}' was not signed as part of the primary signature.. + /// + internal static string SupportingTokenIsNotSigned { + get { + return ResourceManager.GetString("SupportingTokenIsNotSigned", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A supporting token that satisfies parameters '{0}' and attachment mode '{1}' was not provided.. + /// + internal static string SupportingTokenNotProvided { + get { + return ResourceManager.GetString("SupportingTokenNotProvided", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Supporting token signatures not expected.. + /// + internal static string SupportingTokenSignaturesNotExpected { + get { + return ResourceManager.GetString("SupportingTokenSignaturesNotExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SymmetricSecurityBindingElement cannot build a channel or listener factory. The ProtectionTokenParameters property is required but not set. Binding element configuration: {0}. + /// + internal static string SymmetricSecurityBindingElementNeedsProtectionTokenParameters { + get { + return ResourceManager.GetString("SymmetricSecurityBindingElementNeedsProtectionTokenParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The synchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, any additional attributes must be declared on the synchronous OperationContract method. In this case, the asynchronous OperationContract method '{2}' has one or more attributes of type '{5}'. To fix it, remove the '{5} [rest of string was truncated]";. + /// + internal static string SyncAsyncMatchConsistency_Attributes6 { + get { + return ResourceManager.GetString("SyncAsyncMatchConsistency_Attributes6", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The synchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must define the same number and types of parameters. In this case, some of the arguments are different. To fix it, ensure that the OperationContracts define the same number and types of argum [rest of string was truncated]";. + /// + internal static string SyncAsyncMatchConsistency_Parameters5 { + get { + return ResourceManager.GetString("SyncAsyncMatchConsistency_Parameters5", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The synchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must have the same value for the '{5}' property. In this case, the values are different. To fix it, change the '{5} property of one of the OperationContracts to match the other. Alternativel [rest of string was truncated]";. + /// + internal static string SyncAsyncMatchConsistency_Property6 { + get { + return ResourceManager.GetString("SyncAsyncMatchConsistency_Property6", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The synchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must define the same return type. In this case, the return types are different. To fix it, ensure that method '{0}' and method '{3}' have the same return type. Alternatively, changing the nam [rest of string was truncated]";. + /// + internal static string SyncAsyncMatchConsistency_ReturnType5 { + get { + return ResourceManager.GetString("SyncAsyncMatchConsistency_ReturnType5", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value of type '{0}' cannot be added to the generic collection, because the collection has been parameterized with a different type.. + /// + internal static string SynchronizedCollectionWrongType1 { + get { + return ResourceManager.GetString("SynchronizedCollectionWrongType1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A null value cannot be added to the generic collection, because the collection has been parameterized with a value type.. + /// + internal static string SynchronizedCollectionWrongTypeNull { + get { + return ResourceManager.GetString("SynchronizedCollectionWrongTypeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The synchronous OperationContract method '{0}' in type '{1}' was matched with the task-based asynchronous OperationContract method '{2}' because they have the same operation name '{3}'. When a synchronous OperationContract method is matched to a task-based asynchronous OperationContract method, any additional attributes must be declared on the synchronous OperationContract method. In this case, the task-based asynchronous OperationContract method '{2}' has one or more attributes of type '{4}'. To fix it, re [rest of string was truncated]";. + /// + internal static string SyncTaskMatchConsistency_Attributes6 { + get { + return ResourceManager.GetString("SyncTaskMatchConsistency_Attributes6", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The synchronous OperationContract method '{0}' in type '{1}' was matched with the task-based asynchronous OperationContract method '{2}' because they have the same operation name '{3}'. When a synchronous OperationContract method is matched to a task-based asynchronous OperationContract method, the two OperationContracts must define the same number and types of parameters. In this case, some of the arguments are different. To fix it, ensure that the OperationContracts define the same number and types of arg [rest of string was truncated]";. + /// + internal static string SyncTaskMatchConsistency_Parameters5 { + get { + return ResourceManager.GetString("SyncTaskMatchConsistency_Parameters5", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The synchronous OperationContract method '{0}' in type '{1}' was matched with the task-based asynchronous OperationContract method '{2}' because they have the same operation name '{3}'. When a synchronous OperationContract method is matched to a task-based asynchronous OperationContract method, the two OperationContracts must have the same value for the '{4}' property. In this case, the values are different. To fix it, change the '{4} property of one of the OperationContracts to match the other. Alternativ [rest of string was truncated]";. + /// + internal static string SyncTaskMatchConsistency_Property6 { + get { + return ResourceManager.GetString("SyncTaskMatchConsistency_Property6", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The synchronous OperationContract method '{0}' in type '{1}' was matched with the task-based asynchronous OperationContract method '{2}' because they have the same operation name '{3}'. When a synchronous OperationContract method is matched to a task-based asynchronous OperationContract method, the two OperationContracts must define the same return type. In this case, the return types are different. To fix it, ensure that method '{0}' and method '{2}' have the same return type. Alternatively, changing the n [rest of string was truncated]";. + /// + internal static string SyncTaskMatchConsistency_ReturnType5 { + get { + return ResourceManager.GetString("SyncTaskMatchConsistency_ReturnType5", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The target service address was not specified on '{0}'.. + /// + internal static string TargetAddressIsNotSet { + get { + return ResourceManager.GetString("TargetAddressIsNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Target object does not support IPersistStream.. + /// + internal static string TargetObjectDoesNotSupportIPersistStream { + get { + return ResourceManager.GetString("TargetObjectDoesNotSupportIPersistStream", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Target type is an interface but corresponding type is not PersistStreamTypeWrapper.. + /// + internal static string TargetTypeIsAnIntefaceButCorrespoindingTypeIsNotPersistStreamTypeWrapper { + get { + return ResourceManager.GetString("TargetTypeIsAnIntefaceButCorrespoindingTypeIsNotPersistStreamTypeWrapper", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The task-based asynchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a task-based asynchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, any additional attributes must be declared on the task-based asynchronous OperationContract method. In this case, the asynchronous OperationContract method '{2}' has one or more attributes of ty [rest of string was truncated]";. + /// + internal static string TaskAsyncMatchConsistency_Attributes6 { + get { + return ResourceManager.GetString("TaskAsyncMatchConsistency_Attributes6", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The task-based asynchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a task-based asynchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must define the same number and types of parameters. In this case, some of the arguments are different. To fix it, ensure that the OperationContracts define the same n [rest of string was truncated]";. + /// + internal static string TaskAsyncMatchConsistency_Parameters5 { + get { + return ResourceManager.GetString("TaskAsyncMatchConsistency_Parameters5", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The task-based asynchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a task-based asynchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must have the same value for the '{5}' property. In this case, the values are different. To fix it, change the '{5} property of one of the OperationContracts to match [rest of string was truncated]";. + /// + internal static string TaskAsyncMatchConsistency_Property6 { + get { + return ResourceManager.GetString("TaskAsyncMatchConsistency_Property6", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The task-based asynchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must define the same return type. In this case, the return types are different. To fix it, ensure that method '{0}' and method '{3}' have the same return type. Alternatively, chan [rest of string was truncated]";. + /// + internal static string TaskAsyncMatchConsistency_ReturnType5 { + get { + return ResourceManager.GetString("TaskAsyncMatchConsistency_ReturnType5", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The task was cancelled.. + /// + internal static string TaskCancelledError { + get { + return ResourceManager.GetString("TaskCancelledError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Client side task-based asynchronous method must not have any out or ref parameters. Any data that would have been returned through an out or ref parameter should instead be returned as part of the TResult in the resulting task.. + /// + internal static string TaskMethodMustNotHaveOutParameter { + get { + return ResourceManager.GetString("TaskMethodMustNotHaveOutParameter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The use of '{0}' on the task-based asynchronous method is not supported.. + /// + internal static string TaskMethodParameterNotSupported { + get { + return ResourceManager.GetString("TaskMethodParameterNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is already a listener on IP endpoint {0}. This could happen if there is another application already listening on this endpoint or if you have multiple service endpoints in your service host with the same IP endpoint but with incompatible binding configurations.. + /// + internal static string TcpAddressInUse { + get { + return ResourceManager.GetString("TcpAddressInUse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not connect to {0}. TCP error code {1}: {2}. . + /// + internal static string TcpConnectError { + get { + return ResourceManager.GetString("TcpConnectError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not connect to {0}. The connection attempt lasted for a time span of {3}. TCP error code {1}: {2}. . + /// + internal static string TcpConnectErrorWithTimeSpan { + get { + return ResourceManager.GetString("TcpConnectErrorWithTimeSpan", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connecting to via {0} timed out after {1}. Connection attempts were made to {2} of {3} available addresses ({4}). Check the RemoteAddress of your channel and verify that the DNS records for this endpoint correspond to valid IP Addresses. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string TcpConnectingToViaTimedOut { + get { + return ResourceManager.GetString("TcpConnectingToViaTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '{0}'.. + /// + internal static string TcpConnectionResetError { + get { + return ResourceManager.GetString("TcpConnectionResetError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '{0}'. The local IP address and port is {1}. The remote IP address and port is {2}.. + /// + internal static string TcpConnectionResetErrorWithIP { + get { + return ResourceManager.GetString("TcpConnectionResetErrorWithIP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The socket transfer timed out after {0}. You have exceeded the timeout set on your binding. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string TcpConnectionTimedOut { + get { + return ResourceManager.GetString("TcpConnectionTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The socket transfer timed out after {0}. You have exceeded the timeout set on your binding. The time allotted to this operation may have been a portion of a longer timeout. The local IP address and port is {1}. The remote IP address and port is {2}.. + /// + internal static string TcpConnectionTimedOutWithIP { + get { + return ResourceManager.GetString("TcpConnectionTimedOutWithIP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Insufficient winsock resources available to complete socket connection initiation.. + /// + internal static string TcpConnectNoBufs { + get { + return ResourceManager.GetString("TcpConnectNoBufs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A TCP error ({0}: {1}) occurred while listening on IP Endpoint={2}.. + /// + internal static string TcpListenError { + get { + return ResourceManager.GetString("TcpListenError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The socket connection was aborted by your local machine. This could be caused by a channel Abort(), or a transmission error from another thread using this socket.. + /// + internal static string TcpLocalConnectionAborted { + get { + return ResourceManager.GetString("TcpLocalConnectionAborted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A TCP error ({0}: {1}) occurred while transmitting data.. + /// + internal static string TcpTransferError { + get { + return ResourceManager.GetString("TcpTransferError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A TCP error ({0}: {1}) occurred while transmitting data. The local IP address and port is {2}. The remote IP address and port is {3}.. + /// + internal static string TcpTransferErrorWithIP { + get { + return ResourceManager.GetString("TcpTransferErrorWithIP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An IPv4 address was specified ({0}), but IPv4 is not enabled on this machine. . + /// + internal static string TcpV4AddressInvalid { + get { + return ResourceManager.GetString("TcpV4AddressInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An IPv6 address was specified ({0}), but IPv6 is not enabled on this machine. . + /// + internal static string TcpV6AddressInvalid { + get { + return ResourceManager.GetString("TcpV6AddressInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Directory {0} not found.. + /// + internal static string TempDirectoryNotFound { + get { + return ResourceManager.GetString("TempDirectoryNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The DeliveryRequirementsAttribute on contract '{0}' specifies a QueuedDeliveryRequirements value of NotAllowed. However, the configured binding for this contract specifies that it does support queued delivery. A queued binding may not be used with this contract.. + /// + internal static string TheBindingForDoesnTSupportOrderedDelivery1 { + get { + return ResourceManager.GetString("TheBindingForDoesnTSupportOrderedDelivery1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ServiceMetadataExtension instance could not be added to the ServiceHost instance because it has already been added to another ServiceHost instance.. + /// + internal static string TheServiceMetadataExtensionInstanceCouldNot2_0 { + get { + return ResourceManager.GetString("TheServiceMetadataExtensionInstanceCouldNot2_0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ServiceMetadataExtension instance could not be removed from the ServiceHost instance because it has not been added to any ServiceHost instance.. + /// + internal static string TheServiceMetadataExtensionInstanceCouldNot3_0 { + get { + return ResourceManager.GetString("TheServiceMetadataExtensionInstanceCouldNot3_0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ServiceMetadataExtension instance could not be removed from the ServiceHost instance because it has already been added to a different ServiceHost instance.. + /// + internal static string TheServiceMetadataExtensionInstanceCouldNot4_0 { + get { + return ResourceManager.GetString("TheServiceMetadataExtensionInstanceCouldNot4_0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message could not be transferred within the allotted timeout of {0}. There was no space available in the reliable channel's transfer window. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string TimeoutOnAddToWindow { + get { + return ResourceManager.GetString("TimeoutOnAddToWindow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The close operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string TimeoutOnClose { + get { + return ResourceManager.GetString("TimeoutOnClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The open operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string TimeoutOnOpen { + get { + return ResourceManager.GetString("TimeoutOnOpen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string TimeoutOnOperation { + get { + return ResourceManager.GetString("TimeoutOnOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string TimeoutOnRequest { + get { + return ResourceManager.GetString("TimeoutOnRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The send operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string TimeoutOnSend { + get { + return ResourceManager.GetString("TimeoutOnSend", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Opening the channel timed out after {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string TimeoutServiceChannelConcurrentOpen1 { + get { + return ResourceManager.GetString("TimeoutServiceChannelConcurrentOpen1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Opening the {0} channel timed out after {1}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string TimeoutServiceChannelConcurrentOpen2 { + get { + return ResourceManager.GetString("TimeoutServiceChannelConcurrentOpen2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TimeSpan cannot be less than TimeSpan.Zero.. + /// + internal static string TimeSpanCannotBeLessThanTimeSpanZero { + get { + return ResourceManager.GetString("TimeSpanCannotBeLessThanTimeSpanZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TimeSpan must be greater than TimeSpan.Zero.. + /// + internal static string TimeSpanMustbeGreaterThanTimeSpanZero { + get { + return ResourceManager.GetString("TimeSpanMustbeGreaterThanTimeSpanZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A timestamp element has already been set for this security header.. + /// + internal static string TimestampAlreadySetForSecurityHeader { + get { + return ResourceManager.GetString("TimestampAlreadySetForSecurityHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security timestamp is invalid because its creation time ('{0}') is greater than or equal to its expiration time ('{1}').. + /// + internal static string TimeStampHasCreationAheadOfExpiry { + get { + return ResourceManager.GetString("TimeStampHasCreationAheadOfExpiry", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security timestamp is invalid because its creation time ('{0}') is in the future. Current time is '{1}' and allowed clock skew is '{2}'.. + /// + internal static string TimeStampHasCreationTimeInFuture { + get { + return ResourceManager.GetString("TimeStampHasCreationTimeInFuture", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security timestamp is stale because its expiration time ('{0}') is in the past. Current time is '{1}' and allowed clock skew is '{2}'.. + /// + internal static string TimeStampHasExpiryTimeInPast { + get { + return ResourceManager.GetString("TimeStampHasExpiryTimeInPast", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The timestamp must occur first in this security header layout.. + /// + internal static string TimestampMustOccurFirstInSecurityHeaderLayout { + get { + return ResourceManager.GetString("TimestampMustOccurFirstInSecurityHeaderLayout", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The timestamp must occur last in this security header layout.. + /// + internal static string TimestampMustOccurLastInSecurityHeaderLayout { + get { + return ResourceManager.GetString("TimestampMustOccurLastInSecurityHeaderLayout", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The timestamp element added to security header to sign has no id.. + /// + internal static string TimestampToSignHasNoId { + get { + return ResourceManager.GetString("TimestampToSignHasNoId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security timestamp is stale because its creation time ('{0}') is too far back in the past. Current time is '{1}', maximum timestamp lifetime is '{2}' and allowed clock skew is '{3}'.. + /// + internal static string TimeStampWasCreatedTooLongAgo { + get { + return ResourceManager.GetString("TimeStampWasCreatedTooLongAgo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred communicating with the distributed transaction manager.. + /// + internal static string TMCommunicationError { + get { + return ResourceManager.GetString("TMCommunicationError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security token manager requires the security binding element to be specified in order to create a token authenticator for requirement '{0}'.. + /// + internal static string TokenAuthenticatorRequiresSecurityBindingElement { + get { + return ResourceManager.GetString("TokenAuthenticatorRequiresSecurityBindingElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A symmetric crypto could not be created from token '{0}'.. + /// + internal static string TokenCannotCreateSymmetricCrypto { + get { + return ResourceManager.GetString("TokenCannotCreateSymmetricCrypto", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The key size requirements for the '{0}' algorithm suite are not met by the '{1}' token which has key size of '{2}'.. + /// + internal static string TokenDoesNotMeetKeySizeRequirements { + get { + return ResourceManager.GetString("TokenDoesNotMeetKeySizeRequirements", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' does not support '{1}' creation.. + /// + internal static string TokenDoesNotSupportKeyIdentifierClauseCreation { + get { + return ResourceManager.GetString("TokenDoesNotSupportKeyIdentifierClauseCreation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The supplied token manager cannot create a token reference.. + /// + internal static string TokenManagerCannotCreateTokenReference { + get { + return ResourceManager.GetString("TokenManagerCannotCreateTokenReference", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security token manager could not parse token with name '{0}', namespace '{1}', valueType '{2}'.. + /// + internal static string TokenManagerCouldNotReadToken { + get { + return ResourceManager.GetString("TokenManagerCouldNotReadToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SecurityTokenParameters and SecurityToken tuple specified for use in the security header must both be null or must both be non-null.. + /// + internal static string TokenMustBeNullWhenTokenParametersAre { + get { + return ResourceManager.GetString("TokenMustBeNullWhenTokenParametersAre", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Received security header contains unexpected token '{0}'.. + /// + internal static string TokenNotExpectedInSecurityHeader { + get { + return ResourceManager.GetString("TokenNotExpectedInSecurityHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The token provider cannot get tokens for target '{0}'.. + /// + internal static string TokenProviderCannotGetTokensForTarget { + get { + return ResourceManager.GetString("TokenProviderCannotGetTokensForTarget", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security token manager requires the security binding element to be specified in order to create a token provider for requirement '{0}'.. + /// + internal static string TokenProviderRequiresSecurityBindingElement { + get { + return ResourceManager.GetString("TokenProviderRequiresSecurityBindingElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TokenProvider returned token of incorrect type '{0}'.. + /// + internal static string TokenProviderReturnedBadToken { + get { + return ResourceManager.GetString("TokenProviderReturnedBadToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The token requirement '{0}' does not specify the target address. This is required by the token manager for creating the corresponding security token provider.. + /// + internal static string TokenRequirementDoesNotSpecifyTargetAddress { + get { + return ResourceManager.GetString("TokenRequirementDoesNotSpecifyTargetAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security token serializer must be specified on the security token provider.. + /// + internal static string TokenSerializerNotSetonFederationProvider { + get { + return ResourceManager.GetString("TokenSerializerNotSetonFederationProvider", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operation cannot be performed after the communications channel has been created.. + /// + internal static string TooLate { + get { + return ResourceManager.GetString("TooLate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Too many attributes of type {0} on {1}.. + /// + internal static string tooManyAttributesOfTypeOn2 { + get { + return ResourceManager.GetString("tooManyAttributesOfTypeOn2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A leg of the federated security chain contains multiple IssuedSecurityTokenParameters. The InfoCard system only supports one IssuedSecurityTokenParameters for each leg.. + /// + internal static string TooManyIssuedSecurityTokenParameters { + get { + return ResourceManager.GetString("TooManyIssuedSecurityTokenParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There are too many renewed session keys that have not been used.. + /// + internal static string TooManyPendingSessionKeys { + get { + return ResourceManager.GetString("TooManyPendingSessionKeys", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Authorize. + /// + internal static string TraceAuthorize { + get { + return ResourceManager.GetString("TraceAuthorize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Activating message received.. + /// + internal static string TraceCodeActivatingMessageReceived { + get { + return ResourceManager.GetString("TraceCodeActivatingMessageReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An async callback threw an exception!. + /// + internal static string TraceCodeAsyncCallbackThrewException { + get { + return ResourceManager.GetString("TraceCodeAsyncCallbackThrewException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin method execution.. + /// + internal static string TraceCodeBeginExecuteMethod { + get { + return ResourceManager.GetString("TraceCodeBeginExecuteMethod", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The given schema cannot be imported in this format.. + /// + internal static string TraceCodeCannotBeImportedInCurrentFormat { + get { + return ResourceManager.GetString("TraceCodeCannotBeImportedInCurrentFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Channel connection was dropped. + /// + internal static string TraceCodeChannelConnectionDropped { + get { + return ResourceManager.GetString("TraceCodeChannelConnectionDropped", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created: {0}. + /// + internal static string TraceCodeChannelCreated { + get { + return ResourceManager.GetString("TraceCodeChannelCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Disposed: {0}. + /// + internal static string TraceCodeChannelDisposed { + get { + return ResourceManager.GetString("TraceCodeChannelDisposed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sent a message over a channel. + /// + internal static string TraceCodeChannelMessageSent { + get { + return ResourceManager.GetString("TraceCodeChannelMessageSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Prepared message for sending over a channel. + /// + internal static string TraceCodeChannelPreparedMessage { + get { + return ResourceManager.GetString("TraceCodeChannelPreparedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:channel created.. + /// + internal static string TraceCodeComIntegrationChannelCreated { + get { + return ResourceManager.GetString("TraceCodeComIntegrationChannelCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Dispatch method details.. + /// + internal static string TraceCodeComIntegrationDispatchMethod { + get { + return ResourceManager.GetString("TraceCodeComIntegrationDispatchMethod", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:DllHost initializer:Adding host.. + /// + internal static string TraceCodeComIntegrationDllHostInitializerAddingHost { + get { + return ResourceManager.GetString("TraceCodeComIntegrationDllHostInitializerAddingHost", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Started DllHost initializer.. + /// + internal static string TraceCodeComIntegrationDllHostInitializerStarted { + get { + return ResourceManager.GetString("TraceCodeComIntegrationDllHostInitializerStarted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Starting DllHost initializer.. + /// + internal static string TraceCodeComIntegrationDllHostInitializerStarting { + get { + return ResourceManager.GetString("TraceCodeComIntegrationDllHostInitializerStarting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Stopped DllHost initializer.. + /// + internal static string TraceCodeComIntegrationDllHostInitializerStopped { + get { + return ResourceManager.GetString("TraceCodeComIntegrationDllHostInitializerStopped", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Stopping DllHost initializer.. + /// + internal static string TraceCodeComIntegrationDllHostInitializerStopping { + get { + return ResourceManager.GetString("TraceCodeComIntegrationDllHostInitializerStopping", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Entering COM+ activity.. + /// + internal static string TraceCodeComIntegrationEnteringActivity { + get { + return ResourceManager.GetString("TraceCodeComIntegrationEnteringActivity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Executing COM call.. + /// + internal static string TraceCodeComIntegrationExecutingCall { + get { + return ResourceManager.GetString("TraceCodeComIntegrationExecutingCall", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Received instance creation request.. + /// + internal static string TraceCodeComIntegrationInstanceCreationRequest { + get { + return ResourceManager.GetString("TraceCodeComIntegrationInstanceCreationRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Created instance.. + /// + internal static string TraceCodeComIntegrationInstanceCreationSuccess { + get { + return ResourceManager.GetString("TraceCodeComIntegrationInstanceCreationSuccess", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Released instance.. + /// + internal static string TraceCodeComIntegrationInstanceReleased { + get { + return ResourceManager.GetString("TraceCodeComIntegrationInstanceReleased", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Invoked method.. + /// + internal static string TraceCodeComIntegrationInvokedMethod { + get { + return ResourceManager.GetString("TraceCodeComIntegrationInvokedMethod", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Invoking method.. + /// + internal static string TraceCodeComIntegrationInvokingMethod { + get { + return ResourceManager.GetString("TraceCodeComIntegrationInvokingMethod", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complus:Invoking method with transaction in COM+ context.. + /// + internal static string TraceCodeComIntegrationInvokingMethodContextTransaction { + get { + return ResourceManager.GetString("TraceCodeComIntegrationInvokingMethodContextTransaction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complus:Invoking method with new incoming transaction.. + /// + internal static string TraceCodeComIntegrationInvokingMethodNewTransaction { + get { + return ResourceManager.GetString("TraceCodeComIntegrationInvokingMethodNewTransaction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Left COM+ activity.. + /// + internal static string TraceCodeComIntegrationLeftActivity { + get { + return ResourceManager.GetString("TraceCodeComIntegrationLeftActivity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complus:Mex channel loader loaded.. + /// + internal static string TraceCodeComIntegrationMexChannelBuilderLoaded { + get { + return ResourceManager.GetString("TraceCodeComIntegrationMexChannelBuilderLoaded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complus:Metadata exchange completed successfully.. + /// + internal static string TraceCodeComIntegrationMexMonikerMetadataExchangeComplete { + get { + return ResourceManager.GetString("TraceCodeComIntegrationMexMonikerMetadataExchangeComplete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Created service contract.. + /// + internal static string TraceCodeComIntegrationServiceHostCreatedServiceContract { + get { + return ResourceManager.GetString("TraceCodeComIntegrationServiceHostCreatedServiceContract", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Created service endpoint.. + /// + internal static string TraceCodeComIntegrationServiceHostCreatedServiceEndpoint { + get { + return ResourceManager.GetString("TraceCodeComIntegrationServiceHostCreatedServiceEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Started service.. + /// + internal static string TraceCodeComIntegrationServiceHostStartedService { + get { + return ResourceManager.GetString("TraceCodeComIntegrationServiceHostStartedService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Started service:details.. + /// + internal static string TraceCodeComIntegrationServiceHostStartedServiceDetails { + get { + return ResourceManager.GetString("TraceCodeComIntegrationServiceHostStartedServiceDetails", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Starting service.. + /// + internal static string TraceCodeComIntegrationServiceHostStartingService { + get { + return ResourceManager.GetString("TraceCodeComIntegrationServiceHostStartingService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Stopped service.. + /// + internal static string TraceCodeComIntegrationServiceHostStoppedService { + get { + return ResourceManager.GetString("TraceCodeComIntegrationServiceHostStoppedService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Stopping service.. + /// + internal static string TraceCodeComIntegrationServiceHostStoppingService { + get { + return ResourceManager.GetString("TraceCodeComIntegrationServiceHostStoppingService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Service moniker parsed.. + /// + internal static string TraceCodeComIntegrationServiceMonikerParsed { + get { + return ResourceManager.GetString("TraceCodeComIntegrationServiceMonikerParsed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Type library converter event.. + /// + internal static string TraceCodeComIntegrationTLBImportConverterEvent { + get { + return ResourceManager.GetString("TraceCodeComIntegrationTLBImportConverterEvent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Finished type library import.. + /// + internal static string TraceCodeComIntegrationTLBImportFinished { + get { + return ResourceManager.GetString("TraceCodeComIntegrationTLBImportFinished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Type library import: using assembly.. + /// + internal static string TraceCodeComIntegrationTLBImportFromAssembly { + get { + return ResourceManager.GetString("TraceCodeComIntegrationTLBImportFromAssembly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Type library import: using type library.. + /// + internal static string TraceCodeComIntegrationTLBImportFromTypelib { + get { + return ResourceManager.GetString("TraceCodeComIntegrationTLBImportFromTypelib", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Starting type library import.. + /// + internal static string TraceCodeComIntegrationTLBImportStarting { + get { + return ResourceManager.GetString("TraceCodeComIntegrationTLBImportStarting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Transaction aborted by COM+ context.. + /// + internal static string TraceCodeComIntegrationTxProxyTxAbortedByContext { + get { + return ResourceManager.GetString("TraceCodeComIntegrationTxProxyTxAbortedByContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Transaction aborted by Transaction Manager.. + /// + internal static string TraceCodeComIntegrationTxProxyTxAbortedByTM { + get { + return ResourceManager.GetString("TraceCodeComIntegrationTxProxyTxAbortedByTM", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Transaction committed.. + /// + internal static string TraceCodeComIntegrationTxProxyTxCommitted { + get { + return ResourceManager.GetString("TraceCodeComIntegrationTxProxyTxCommitted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:Typed channel builder loaded.. + /// + internal static string TraceCodeComIntegrationTypedChannelBuilderLoaded { + get { + return ResourceManager.GetString("TraceCodeComIntegrationTypedChannelBuilderLoaded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ComPlus:WSDL channel builder loaded.. + /// + internal static string TraceCodeComIntegrationWsdlChannelBuilderLoaded { + get { + return ResourceManager.GetString("TraceCodeComIntegrationWsdlChannelBuilderLoaded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Aborted '{0}'.. + /// + internal static string TraceCodeCommunicationObjectAborted { + get { + return ResourceManager.GetString("TraceCodeCommunicationObjectAborted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to abort {0}. + /// + internal static string TraceCodeCommunicationObjectAbortFailed { + get { + return ResourceManager.GetString("TraceCodeCommunicationObjectAbortFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Closed {0}. + /// + internal static string TraceCodeCommunicationObjectClosed { + get { + return ResourceManager.GetString("TraceCodeCommunicationObjectClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to close {0}. + /// + internal static string TraceCodeCommunicationObjectCloseFailed { + get { + return ResourceManager.GetString("TraceCodeCommunicationObjectCloseFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Closing {0}. + /// + internal static string TraceCodeCommunicationObjectClosing { + get { + return ResourceManager.GetString("TraceCodeCommunicationObjectClosing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created {0}. + /// + internal static string TraceCodeCommunicationObjectCreated { + get { + return ResourceManager.GetString("TraceCodeCommunicationObjectCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Disposing {0}. + /// + internal static string TraceCodeCommunicationObjectDisposing { + get { + return ResourceManager.GetString("TraceCodeCommunicationObjectDisposing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Faulted {0}. + /// + internal static string TraceCodeCommunicationObjectFaulted { + get { + return ResourceManager.GetString("TraceCodeCommunicationObjectFaulted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CommunicationObject faulted due to exception.. + /// + internal static string TraceCodeCommunicationObjectFaultReason { + get { + return ResourceManager.GetString("TraceCodeCommunicationObjectFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Opened {0}. + /// + internal static string TraceCodeCommunicationObjectOpened { + get { + return ResourceManager.GetString("TraceCodeCommunicationObjectOpened", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to open {0}. + /// + internal static string TraceCodeCommunicationObjectOpenFailed { + get { + return ResourceManager.GetString("TraceCodeCommunicationObjectOpenFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Opening {0}. + /// + internal static string TraceCodeCommunicationObjectOpening { + get { + return ResourceManager.GetString("TraceCodeCommunicationObjectOpening", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configuration is read-only.. + /// + internal static string TraceCodeConfigurationIsReadOnly { + get { + return ResourceManager.GetString("TraceCodeConfigurationIsReadOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Extension type is not configured.. + /// + internal static string TraceCodeConfiguredExtensionTypeNotFound { + get { + return ResourceManager.GetString("TraceCodeConfiguredExtensionTypeNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The connection has been abandoned.. + /// + internal static string TraceCodeConnectionAbandoned { + get { + return ResourceManager.GetString("TraceCodeConnectionAbandoned", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An exception occurred while closing the connections in this connection pool.. + /// + internal static string TraceCodeConnectionPoolCloseException { + get { + return ResourceManager.GetString("TraceCodeConnectionPoolCloseException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A connection has exceeded the idle timeout of this connection pool ({0}) and been closed.. + /// + internal static string TraceCodeConnectionPoolIdleTimeoutReached { + get { + return ResourceManager.GetString("TraceCodeConnectionPoolIdleTimeoutReached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A connection has exceeded the connection lease timeout of this connection pool ({0}) and been closed.. + /// + internal static string TraceCodeConnectionPoolLeaseTimeoutReached { + get { + return ResourceManager.GetString("TraceCodeConnectionPoolLeaseTimeoutReached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MaxOutboundConnectionsPerEndpoint quota ({0}) has been reached, so connection was closed and not stored in this connection pool.. + /// + internal static string TraceCodeConnectionPoolMaxOutboundConnectionsPerEndpointQuotaReached { + get { + return ResourceManager.GetString("TraceCodeConnectionPoolMaxOutboundConnectionsPerEndpointQuotaReached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connection information.. + /// + internal static string TraceCodeConnectToIPEndpoint { + get { + return ResourceManager.GetString("TraceCodeConnectToIPEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ContextChannel created.. + /// + internal static string TraceCodeContextChannelFactoryChannelCreated { + get { + return ResourceManager.GetString("TraceCodeContextChannelFactoryChannelCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A new ContextChannel was accepted.. + /// + internal static string TraceCodeContextChannelListenerChannelAccepted { + get { + return ResourceManager.GetString("TraceCodeContextChannelListenerChannelAccepted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Context added to Message.. + /// + internal static string TraceCodeContextProtocolContextAddedToMessage { + get { + return ResourceManager.GetString("TraceCodeContextProtocolContextAddedToMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Context retrieved from Message.. + /// + internal static string TraceCodeContextProtocolContextRetrievedFromMessage { + get { + return ResourceManager.GetString("TraceCodeContextProtocolContextRetrievedFromMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No matching <service> tag was found. Default endpoints added.. + /// + internal static string TraceCodeDefaultEndpointsAdded { + get { + return ResourceManager.GetString("TraceCodeDefaultEndpointsAdded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to trace a message. + /// + internal static string TraceCodeDiagnosticsFailedMessageTrace { + get { + return ResourceManager.GetString("TraceCodeDiagnosticsFailedMessageTrace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to InstanceContext cached for InstanceId {0}.. + /// + internal static string TraceCodeDICPInstanceContextCached { + get { + return ResourceManager.GetString("TraceCodeDICPInstanceContextCached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to InstanceContext for InstanceId {0} removed from cache.. + /// + internal static string TraceCodeDICPInstanceContextRemovedFromCache { + get { + return ResourceManager.GetString("TraceCodeDICPInstanceContextRemovedFromCache", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Did not understand message header.. + /// + internal static string TraceCodeDidNotUnderstandMessageHeader { + get { + return ResourceManager.GetString("TraceCodeDidNotUnderstandMessageHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A response message was received, but there are no outstanding requests waiting for this message. The message is being dropped.. + /// + internal static string TraceCodeDroppedAMessage { + get { + return ResourceManager.GetString("TraceCodeDroppedAMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type of the element does not match the configuration type.. + /// + internal static string TraceCodeElementTypeDoesntMatchConfiguredType { + get { + return ResourceManager.GetString("TraceCodeElementTypeDoesntMatchConfiguredType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to End method execution.. + /// + internal static string TraceCodeEndExecuteMethod { + get { + return ResourceManager.GetString("TraceCodeEndExecuteMethod", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Endpoint listener closed.. + /// + internal static string TraceCodeEndpointListenerClose { + get { + return ResourceManager.GetString("TraceCodeEndpointListenerClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Endpoint listener opened.. + /// + internal static string TraceCodeEndpointListenerOpen { + get { + return ResourceManager.GetString("TraceCodeEndpointListenerOpen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error invoking user code. + /// + internal static string TraceCodeErrorInvokingUserCode { + get { + return ResourceManager.GetString("TraceCodeErrorInvokingUserCode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration evaluation context not found.. + /// + internal static string TraceCodeEvaluationContextNotFound { + get { + return ResourceManager.GetString("TraceCodeEvaluationContextNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting Security ExportChannelBinding. + /// + internal static string TraceCodeExportSecurityChannelBindingEntry { + get { + return ResourceManager.GetString("TraceCodeExportSecurityChannelBindingEntry", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Finished Security ExportChannelBinding. + /// + internal static string TraceCodeExportSecurityChannelBindingExit { + get { + return ResourceManager.GetString("TraceCodeExportSecurityChannelBindingExit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The extension collection does not exist.. + /// + internal static string TraceCodeExtensionCollectionDoesNotExist { + get { + return ResourceManager.GetString("TraceCodeExtensionCollectionDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The extension collection is empty.. + /// + internal static string TraceCodeExtensionCollectionIsEmpty { + get { + return ResourceManager.GetString("TraceCodeExtensionCollectionIsEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Extension element not associated with an extension collection.. + /// + internal static string TraceCodeExtensionCollectionNameNotFound { + get { + return ResourceManager.GetString("TraceCodeExtensionCollectionNameNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The extension element already exists in the collection.. + /// + internal static string TraceCodeExtensionElementAlreadyExistsInCollection { + get { + return ResourceManager.GetString("TraceCodeExtensionElementAlreadyExistsInCollection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Extension type not found.. + /// + internal static string TraceCodeExtensionTypeNotFound { + get { + return ResourceManager.GetString("TraceCodeExtensionTypeNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An attempt to reuse a pooled connection failed. Another attempt will be made with {0} remaining in the overall timeout.. + /// + internal static string TraceCodeFailedAcceptFromPool { + get { + return ResourceManager.GetString("TraceCodeFailedAcceptFromPool", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An attempt to connect to the named pipe endpoint at '{1}' failed. Another attempt will be made with {0} remaining in the overall timeout.. + /// + internal static string TraceCodeFailedPipeConnect { + get { + return ResourceManager.GetString("TraceCodeFailedPipeConnect", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to set an activity id header on an outgoing message. + /// + internal static string TraceCodeFailedToAddAnActivityIdHeader { + get { + return ResourceManager.GetString("TraceCodeFailedToAddAnActivityIdHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An incoming channel was disposed because there was an error while attempting to open it.. + /// + internal static string TraceCodeFailedToOpenIncomingChannel { + get { + return ResourceManager.GetString("TraceCodeFailedToOpenIncomingChannel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to read an activity id header on a message. + /// + internal static string TraceCodeFailedToReadAnActivityIdHeader { + get { + return ResourceManager.GetString("TraceCodeFailedToReadAnActivityIdHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Evaluating message logging filter against the message exceeded the node quota set on the filter.. + /// + internal static string TraceCodeFilterNotMatchedNodeQuotaExceeded { + get { + return ResourceManager.GetString("TraceCodeFilterNotMatchedNodeQuotaExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get BehaviorElement.. + /// + internal static string TraceCodeGetBehaviorElement { + get { + return ResourceManager.GetString("TraceCodeGetBehaviorElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get ChannelEndpointElement.. + /// + internal static string TraceCodeGetChannelEndpointElement { + get { + return ResourceManager.GetString("TraceCodeGetChannelEndpointElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get machine.config common behaviors.. + /// + internal static string TraceCodeGetCommonBehaviors { + get { + return ResourceManager.GetString("TraceCodeGetCommonBehaviors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get configuration section.. + /// + internal static string TraceCodeGetConfigurationSection { + get { + return ResourceManager.GetString("TraceCodeGetConfigurationSection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get configured binding.. + /// + internal static string TraceCodeGetConfiguredBinding { + get { + return ResourceManager.GetString("TraceCodeGetConfiguredBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get configured endpoint.. + /// + internal static string TraceCodeGetConfiguredEndpoint { + get { + return ResourceManager.GetString("TraceCodeGetConfiguredEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get default configured binding.. + /// + internal static string TraceCodeGetDefaultConfiguredBinding { + get { + return ResourceManager.GetString("TraceCodeGetDefaultConfiguredBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get default configured endpoint.. + /// + internal static string TraceCodeGetDefaultConfiguredEndpoint { + get { + return ResourceManager.GetString("TraceCodeGetDefaultConfiguredEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get ServiceElement.. + /// + internal static string TraceCodeGetServiceElement { + get { + return ResourceManager.GetString("TraceCodeGetServiceElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP SOAPAction header and the wsa:Action SOAP header did not match. . + /// + internal static string TraceCodeHttpActionMismatch { + get { + return ResourceManager.GetString("TraceCodeHttpActionMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Authentication failed for HTTP(S) connection. + /// + internal static string TraceCodeHttpAuthFailed { + get { + return ResourceManager.GetString("TraceCodeHttpAuthFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP concurrent receive quota was reached.. + /// + internal static string TraceCodeHttpChannelConcurrentReceiveQuotaReached { + get { + return ResourceManager.GetString("TraceCodeHttpChannelConcurrentReceiveQuotaReached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to lookup a channel to receive an incoming message. Either the endpoint or the SOAP action was not found.. + /// + internal static string TraceCodeHttpChannelMessageReceiveFailed { + get { + return ResourceManager.GetString("TraceCodeHttpChannelMessageReceiveFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to send request message over HTTP. + /// + internal static string TraceCodeHttpChannelRequestAborted { + get { + return ResourceManager.GetString("TraceCodeHttpChannelRequestAborted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to send response message over HTTP. + /// + internal static string TraceCodeHttpChannelResponseAborted { + get { + return ResourceManager.GetString("TraceCodeHttpChannelResponseAborted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Received bad HTTP response. + /// + internal static string TraceCodeHttpChannelUnexpectedResponse { + get { + return ResourceManager.GetString("TraceCodeHttpChannelUnexpectedResponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to HTTP response was received. + /// + internal static string TraceCodeHttpResponseReceived { + get { + return ResourceManager.GetString("TraceCodeHttpResponseReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Client certificate is invalid.. + /// + internal static string TraceCodeHttpsClientCertificateInvalid { + get { + return ResourceManager.GetString("TraceCodeHttpsClientCertificateInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Client certificate is invalid with native error code {0} (see http://go.microsoft.com/fwlink/?LinkId=187517 for details).. + /// + internal static string TraceCodeHttpsClientCertificateInvalid1 { + get { + return ResourceManager.GetString("TraceCodeHttpsClientCertificateInvalid1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Client certificate is required. No certificate was found in the request. This might be because the client certificate could not be successfully validated by the operating system or IIS. For information on how to bypass those validations and use a custom X509CertificateValidator in WCF please see http://go.microsoft.com/fwlink/?LinkId=208540.. + /// + internal static string TraceCodeHttpsClientCertificateNotPresent { + get { + return ResourceManager.GetString("TraceCodeHttpsClientCertificateNotPresent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting Security ImportChannelBinding. + /// + internal static string TraceCodeImportSecurityChannelBindingEntry { + get { + return ResourceManager.GetString("TraceCodeImportSecurityChannelBindingEntry", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Finished Security ImportChannelBinding. + /// + internal static string TraceCodeImportSecurityChannelBindingExit { + get { + return ResourceManager.GetString("TraceCodeImportSecurityChannelBindingExit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An existing incompatible transport manager was found for the specified URI.. + /// + internal static string TraceCodeIncompatibleExistingTransportManager { + get { + return ResourceManager.GetString("TraceCodeIncompatibleExistingTransportManager", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Initiating Named Pipe connection.. + /// + internal static string TraceCodeInitiatingNamedPipeConnection { + get { + return ResourceManager.GetString("TraceCodeInitiatingNamedPipeConnection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Initiating TCP connection.. + /// + internal static string TraceCodeInitiatingTcpConnection { + get { + return ResourceManager.GetString("TraceCodeInitiatingTcpConnection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DurableInstance's InstanceContext refcount incremented.. + /// + internal static string TraceCodeInstanceContextBoundToDurableInstance { + get { + return ResourceManager.GetString("TraceCodeInstanceContextBoundToDurableInstance", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DurableInstance's InstanceContext refcount decremented.. + /// + internal static string TraceCodeInstanceContextDetachedFromDurableInstance { + get { + return ResourceManager.GetString("TraceCodeInstanceContextDetachedFromDurableInstance", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The IssuanceTokenProvider has started a new security negotiation.. + /// + internal static string TraceCodeIssuanceTokenProviderBeginSecurityNegotiation { + get { + return ResourceManager.GetString("TraceCodeIssuanceTokenProviderBeginSecurityNegotiation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The IssuanceTokenProvider has completed the security negotiation.. + /// + internal static string TraceCodeIssuanceTokenProviderEndSecurityNegotiation { + get { + return ResourceManager.GetString("TraceCodeIssuanceTokenProviderEndSecurityNegotiation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The IssuanceTokenProvider applied a redirection header.. + /// + internal static string TraceCodeIssuanceTokenProviderRedirectApplied { + get { + return ResourceManager.GetString("TraceCodeIssuanceTokenProviderRedirectApplied", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The IssuanceTokenProvider removed the expired service token.. + /// + internal static string TraceCodeIssuanceTokenProviderRemovedCachedToken { + get { + return ResourceManager.GetString("TraceCodeIssuanceTokenProviderRemovedCachedToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to IssuanceTokenProvider pruned service token cache.. + /// + internal static string TraceCodeIssuanceTokenProviderServiceTokenCacheFull { + get { + return ResourceManager.GetString("TraceCodeIssuanceTokenProviderServiceTokenCacheFull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The IssuanceTokenProvider used the cached service token.. + /// + internal static string TraceCodeIssuanceTokenProviderUsingCachedToken { + get { + return ResourceManager.GetString("TraceCodeIssuanceTokenProviderUsingCachedToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Listener created. + /// + internal static string TraceCodeListenerCreated { + get { + return ResourceManager.GetString("TraceCodeListenerCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Listener disposed. + /// + internal static string TraceCodeListenerDisposed { + get { + return ResourceManager.GetString("TraceCodeListenerDisposed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The system hit the limit set for the '{0}' throttle. Throttle value can be changed by modifying {0} property on {1}.. + /// + internal static string TraceCodeManualFlowThrottleLimitReached { + get { + return ResourceManager.GetString("TraceCodeManualFlowThrottleLimitReached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maximum number of inbound session channel has been reached. . + /// + internal static string TraceCodeMaxAcceptedChannelsReached { + get { + return ResourceManager.GetString("TraceCodeMaxAcceptedChannelsReached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maximum number of pending connections has been reached. . + /// + internal static string TraceCodeMaxPendingConnectionsReached { + get { + return ResourceManager.GetString("TraceCodeMaxPendingConnectionsReached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A message was closed. + /// + internal static string TraceCodeMessageClosed { + get { + return ResourceManager.GetString("TraceCodeMessageClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A message was closed again. + /// + internal static string TraceCodeMessageClosedAgain { + get { + return ResourceManager.GetString("TraceCodeMessageClosedAgain", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A message was copied. + /// + internal static string TraceCodeMessageCopied { + get { + return ResourceManager.GetString("TraceCodeMessageCopied", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reached the limit of messages to log. Message logging is stopping. . + /// + internal static string TraceCodeMessageCountLimitExceeded { + get { + return ResourceManager.GetString("TraceCodeMessageCountLimitExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message not logged because its size exceeds configured quota. + /// + internal static string TraceCodeMessageNotLoggedQuotaExceeded { + get { + return ResourceManager.GetString("TraceCodeMessageNotLoggedQuotaExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Switched threads while processing a message.. + /// + internal static string TraceCodeMessageProcessingPaused { + get { + return ResourceManager.GetString("TraceCodeMessageProcessingPaused", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A message was read. + /// + internal static string TraceCodeMessageRead { + get { + return ResourceManager.GetString("TraceCodeMessageRead", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Received a message over a channel.. + /// + internal static string TraceCodeMessageReceived { + get { + return ResourceManager.GetString("TraceCodeMessageReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sent a message over a channel.. + /// + internal static string TraceCodeMessageSent { + get { + return ResourceManager.GetString("TraceCodeMessageSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A message was written. + /// + internal static string TraceCodeMessageWritten { + get { + return ResourceManager.GetString("TraceCodeMessageWritten", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MetadataExchangeClient received a reply.. + /// + internal static string TraceCodeMetadataExchangeClientReceiveReply { + get { + return ResourceManager.GetString("TraceCodeMetadataExchangeClientReceiveReply", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MetadataExchangeClient is sending a request for metadata.. + /// + internal static string TraceCodeMetadataExchangeClientSendRequest { + get { + return ResourceManager.GetString("TraceCodeMetadataExchangeClientSendRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MsmqActivation service cannot peek on the queue.. + /// + internal static string TraceCodeMsmqCannotPeekOnQueue { + get { + return ResourceManager.GetString("TraceCodeMsmqCannotPeekOnQueue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MsmqActivation service cannot discover queues.. + /// + internal static string TraceCodeMsmqCannotReadQueues { + get { + return ResourceManager.GetString("TraceCodeMsmqCannotReadQueues", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSMQ datagram message received.. + /// + internal static string TraceCodeMsmqDatagramReceived { + get { + return ResourceManager.GetString("TraceCodeMsmqDatagramReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSMQ datagram message sent.. + /// + internal static string TraceCodeMsmqDatagramSent { + get { + return ResourceManager.GetString("TraceCodeMsmqDatagramSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSMQ detected successfully.. + /// + internal static string TraceCodeMsmqDetected { + get { + return ResourceManager.GetString("TraceCodeMsmqDetected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Entered batching mode.. + /// + internal static string TraceCodeMsmqEnteredBatch { + get { + return ResourceManager.GetString("TraceCodeMsmqEnteredBatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expected exception caught.. + /// + internal static string TraceCodeMsmqExpectedException { + get { + return ResourceManager.GetString("TraceCodeMsmqExpectedException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hosting environment found the base address for the service.. + /// + internal static string TraceCodeMsmqFoundBaseAddress { + get { + return ResourceManager.GetString("TraceCodeMsmqFoundBaseAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Left batching mode.. + /// + internal static string TraceCodeMsmqLeftBatch { + get { + return ResourceManager.GetString("TraceCodeMsmqLeftBatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MsmqActivation service found application matching queue.. + /// + internal static string TraceCodeMsmqMatchedApplicationFound { + get { + return ResourceManager.GetString("TraceCodeMsmqMatchedApplicationFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message was dropped.. + /// + internal static string TraceCodeMsmqMessageDropped { + get { + return ResourceManager.GetString("TraceCodeMsmqMessageDropped", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot move or delete message because it is still locked under the transaction.. + /// + internal static string TraceCodeMsmqMessageLockedUnderTheTransaction { + get { + return ResourceManager.GetString("TraceCodeMsmqMessageLockedUnderTheTransaction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message was rejected.. + /// + internal static string TraceCodeMsmqMessageRejected { + get { + return ResourceManager.GetString("TraceCodeMsmqMessageRejected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot move or delete message.. + /// + internal static string TraceCodeMsmqMoveOrDeleteAttemptFailed { + get { + return ResourceManager.GetString("TraceCodeMsmqMoveOrDeleteAttemptFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Poison message moved to the poison subqueue.. + /// + internal static string TraceCodeMsmqPoisonMessageMovedPoison { + get { + return ResourceManager.GetString("TraceCodeMsmqPoisonMessageMovedPoison", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Poison message moved to the retry subqueue.. + /// + internal static string TraceCodeMsmqPoisonMessageMovedRetry { + get { + return ResourceManager.GetString("TraceCodeMsmqPoisonMessageMovedRetry", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Poison message rejected.. + /// + internal static string TraceCodeMsmqPoisonMessageRejected { + get { + return ResourceManager.GetString("TraceCodeMsmqPoisonMessageRejected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Pool of the native MSMQ messages is full. This may affect performance.. + /// + internal static string TraceCodeMsmqPoolFull { + get { + return ResourceManager.GetString("TraceCodeMsmqPoolFull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Transaction which received this message was aborted at least once.. + /// + internal static string TraceCodeMsmqPotentiallyPoisonMessageDetected { + get { + return ResourceManager.GetString("TraceCodeMsmqPotentiallyPoisonMessageDetected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSMQ queue closed.. + /// + internal static string TraceCodeMsmqQueueClosed { + get { + return ResourceManager.GetString("TraceCodeMsmqQueueClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSMQ queue opened.. + /// + internal static string TraceCodeMsmqQueueOpened { + get { + return ResourceManager.GetString("TraceCodeMsmqQueueOpened", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot detect if the queue is transactional.. + /// + internal static string TraceCodeMsmqQueueTransactionalStatusUnknown { + get { + return ResourceManager.GetString("TraceCodeMsmqQueueTransactionalStatusUnknown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MsmqActivation service started scan for queues.. + /// + internal static string TraceCodeMsmqScanStarted { + get { + return ResourceManager.GetString("TraceCodeMsmqScanStarted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSMQ transport session received.. + /// + internal static string TraceCodeMsmqSessiongramReceived { + get { + return ResourceManager.GetString("TraceCodeMsmqSessiongramReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSMQ transport session sent.. + /// + internal static string TraceCodeMsmqSessiongramSent { + get { + return ResourceManager.GetString("TraceCodeMsmqSessiongramSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSMQ Activation service started application.. + /// + internal static string TraceCodeMsmqStartingApplication { + get { + return ResourceManager.GetString("TraceCodeMsmqStartingApplication", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hosting environment started service.. + /// + internal static string TraceCodeMsmqStartingService { + get { + return ResourceManager.GetString("TraceCodeMsmqStartingService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected acknowledgment value.. + /// + internal static string TraceCodeMsmqUnexpectedAcknowledgment { + get { + return ResourceManager.GetString("TraceCodeMsmqUnexpectedAcknowledgment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Received a message over a named pipe channel.. + /// + internal static string TraceCodeNamedPipeChannelMessageReceived { + get { + return ResourceManager.GetString("TraceCodeNamedPipeChannelMessageReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to receive a message over a named pipe channel.. + /// + internal static string TraceCodeNamedPipeChannelMessageReceiveFailed { + get { + return ResourceManager.GetString("TraceCodeNamedPipeChannelMessageReceiveFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to NegotiationTokenAuthenticator was attached.. + /// + internal static string TraceCodeNegotiationAuthenticatorAttached { + get { + return ResourceManager.GetString("TraceCodeNegotiationAuthenticatorAttached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to NegotiationTokenProvider was attached.. + /// + internal static string TraceCodeNegotiationTokenProviderAttached { + get { + return ResourceManager.GetString("TraceCodeNegotiationTokenProviderAttached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No existing transport manager was found for the specified URI.. + /// + internal static string TraceCodeNoExistingTransportManager { + get { + return ResourceManager.GetString("TraceCodeNoExistingTransportManager", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Transport is listening at base URI.. + /// + internal static string TraceCodeOpenedListener { + get { + return ResourceManager.GetString("TraceCodeOpenedListener", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configuration system has detected a duplicate key in a different configuration scope and is overriding with the more recent value.. + /// + internal static string TraceCodeOverridingDuplicateConfigurationKey { + get { + return ResourceManager.GetString("TraceCodeOverridingDuplicateConfigurationKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A message was received by a peer channel.. + /// + internal static string TraceCodePeerChannelMessageReceived { + get { + return ResourceManager.GetString("TraceCodePeerChannelMessageReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A message was sent on a peer channel.. + /// + internal static string TraceCodePeerChannelMessageSent { + get { + return ResourceManager.GetString("TraceCodePeerChannelMessageSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A PeerNode received a message that did not match any local channels.. + /// + internal static string TraceCodePeerFloodedMessageNotMatched { + get { + return ResourceManager.GetString("TraceCodePeerFloodedMessageNotMatched", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A PeerNode received a flooded message that was not propagated further.. + /// + internal static string TraceCodePeerFloodedMessageNotPropagated { + get { + return ResourceManager.GetString("TraceCodePeerFloodedMessageNotPropagated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A PeerNode received a flooded message.. + /// + internal static string TraceCodePeerFloodedMessageReceived { + get { + return ResourceManager.GetString("TraceCodePeerFloodedMessageReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Received message could not be forwarded to other neighbors since it exceeded the quota set for the peer node.. + /// + internal static string TraceCodePeerFlooderReceiveMessageQuotaExceeded { + get { + return ResourceManager.GetString("TraceCodePeerFlooderReceiveMessageQuotaExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to PeerMaintainer Activity.. + /// + internal static string TraceCodePeerMaintainerActivity { + get { + return ResourceManager.GetString("TraceCodePeerMaintainerActivity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Peer Neighbor close has failed.. + /// + internal static string TraceCodePeerNeighborCloseFailed { + get { + return ResourceManager.GetString("TraceCodePeerNeighborCloseFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Peer Neighbor closing has failed.. + /// + internal static string TraceCodePeerNeighborClosingFailed { + get { + return ResourceManager.GetString("TraceCodePeerNeighborClosingFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Peer Neighbor Manager is offline.. + /// + internal static string TraceCodePeerNeighborManagerOffline { + get { + return ResourceManager.GetString("TraceCodePeerNeighborManagerOffline", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Peer Neighbor Manager is online.. + /// + internal static string TraceCodePeerNeighborManagerOnline { + get { + return ResourceManager.GetString("TraceCodePeerNeighborManagerOnline", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A message was received by a Peer Neighbor.. + /// + internal static string TraceCodePeerNeighborMessageReceived { + get { + return ResourceManager.GetString("TraceCodePeerNeighborMessageReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Peer Neighbor was not accepted.. + /// + internal static string TraceCodePeerNeighborNotAccepted { + get { + return ResourceManager.GetString("TraceCodePeerNeighborNotAccepted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Peer Neighbor was not found.. + /// + internal static string TraceCodePeerNeighborNotFound { + get { + return ResourceManager.GetString("TraceCodePeerNeighborNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Peer Neighbor open has failed.. + /// + internal static string TraceCodePeerNeighborOpenFailed { + get { + return ResourceManager.GetString("TraceCodePeerNeighborOpenFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Peer Neighbor state has changed.. + /// + internal static string TraceCodePeerNeighborStateChanged { + get { + return ResourceManager.GetString("TraceCodePeerNeighborStateChanged", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Peer Neighbor state change has failed.. + /// + internal static string TraceCodePeerNeighborStateChangeFailed { + get { + return ResourceManager.GetString("TraceCodePeerNeighborStateChangeFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A PeerNode address has changed.. + /// + internal static string TraceCodePeerNodeAddressChanged { + get { + return ResourceManager.GetString("TraceCodePeerNodeAddressChanged", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A neighbor connection could not be established due to insufficient or wrong credentials.. + /// + internal static string TraceCodePeerNodeAuthenticationFailure { + get { + return ResourceManager.GetString("TraceCodePeerNodeAuthenticationFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A neighbor security handshake as timed out.. + /// + internal static string TraceCodePeerNodeAuthenticationTimeout { + get { + return ResourceManager.GetString("TraceCodePeerNodeAuthenticationTimeout", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A PeerNode was closed.. + /// + internal static string TraceCodePeerNodeClosed { + get { + return ResourceManager.GetString("TraceCodePeerNodeClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A PeerNode is closing.. + /// + internal static string TraceCodePeerNodeClosing { + get { + return ResourceManager.GetString("TraceCodePeerNodeClosing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A PeerNode was opened.. + /// + internal static string TraceCodePeerNodeOpened { + get { + return ResourceManager.GetString("TraceCodePeerNodeOpened", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Peer node open failed.. + /// + internal static string TraceCodePeerNodeOpenFailed { + get { + return ResourceManager.GetString("TraceCodePeerNodeOpenFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A PeerNode is opening.. + /// + internal static string TraceCodePeerNodeOpening { + get { + return ResourceManager.GetString("TraceCodePeerNodeOpening", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Message source could not be authenticated.. + /// + internal static string TraceCodePeerReceiveMessageAuthenticationFailure { + get { + return ResourceManager.GetString("TraceCodePeerReceiveMessageAuthenticationFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to PeerService Opened and listening at '{0}'.. + /// + internal static string TraceCodePeerServiceOpened { + get { + return ResourceManager.GetString("TraceCodePeerServiceOpened", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A performance counter failed to load. Some performance counters will not be available.. + /// + internal static string TraceCodePerformanceCounterFailedToLoad { + get { + return ResourceManager.GetString("TraceCodePerformanceCounterFailedToLoad", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to load the performance counter '{0}'. Some performance counters will not be available. + /// + internal static string TraceCodePerformanceCountersFailed { + get { + return ResourceManager.GetString("TraceCodePerformanceCountersFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error while updating the performance counter '{0}'. This performance counter will be disabled.. + /// + internal static string TraceCodePerformanceCountersFailedDuringUpdate { + get { + return ResourceManager.GetString("TraceCodePerformanceCountersFailedDuringUpdate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Loading performance counters for the service failed. Performance counters will not be available for this service.. + /// + internal static string TraceCodePerformanceCountersFailedForService { + get { + return ResourceManager.GetString("TraceCodePerformanceCountersFailedForService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unloading the performance counters failed.. + /// + internal static string TraceCodePerformanceCountersFailedOnRelease { + get { + return ResourceManager.GetString("TraceCodePerformanceCountersFailedOnRelease", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to PipeConnection aborted. + /// + internal static string TraceCodePipeConnectionAbort { + get { + return ResourceManager.GetString("TraceCodePipeConnectionAbort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Registered addresses in PNRP.. + /// + internal static string TraceCodePnrpRegisteredAddresses { + get { + return ResourceManager.GetString("TraceCodePnrpRegisteredAddresses", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resolved addresses in PNRP.. + /// + internal static string TraceCodePnrpResolvedAddresses { + get { + return ResourceManager.GetString("TraceCodePnrpResolvedAddresses", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected Exception during PNRP resolve operation.. + /// + internal static string TraceCodePnrpResolveException { + get { + return ResourceManager.GetString("TraceCodePnrpResolveException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unregistered addresses in PNRP.. + /// + internal static string TraceCodePnrpUnregisteredAddresses { + get { + return ResourceManager.GetString("TraceCodePnrpUnregisteredAddresses", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The TransportManager was successfully closed.. + /// + internal static string TraceCodePortSharingClosed { + get { + return ResourceManager.GetString("TraceCodePortSharingClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The PROCESS_DUP_HANDLE access right has been granted to the {0} service's account with SID '{1}'.. + /// + internal static string TraceCodePortSharingDupHandleGranted { + get { + return ResourceManager.GetString("TraceCodePortSharingDupHandleGranted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A named pipe was successfully duplicated.. + /// + internal static string TraceCodePortSharingDuplicatedPipe { + get { + return ResourceManager.GetString("TraceCodePortSharingDuplicatedPipe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A socket was successfully duplicated.. + /// + internal static string TraceCodePortSharingDuplicatedSocket { + get { + return ResourceManager.GetString("TraceCodePortSharingDuplicatedSocket", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The TransportManager is now successfully listening.. + /// + internal static string TraceCodePortSharingListening { + get { + return ResourceManager.GetString("TraceCodePortSharingListening", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A null Message (signalling end of channel) was received from a datagram channel, but the channel is still in the Opened state. This indicates a bug in the datagram channel, and the demuxer receive loop has been prematurely stalled. . + /// + internal static string TraceCodePrematureDatagramEof { + get { + return ResourceManager.GetString("TraceCodePrematureDatagramEof", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Switched threads while processing a message for Contract '{0}' at Address '{1}'. ConcurrencyMode for service is set to Single/Reentrant and the service is currently processing another message.. + /// + internal static string TraceCodeProcessMessage2Paused { + get { + return ResourceManager.GetString("TraceCodeProcessMessage2Paused", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Switched threads while processing a message for Contract '{0}' at Address '{1}'. Waiting for the completion of ReceiveContext acknowledgement. If your service seems to be not processing the message ensure that the channel implementation of receive context completes the operation.. + /// + internal static string TraceCodeProcessMessage31Paused { + get { + return ResourceManager.GetString("TraceCodeProcessMessage31Paused", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Switched threads while processing a message for Contract '{0}' at Address '{1}'. Cannot process more than one transaction at a time and the transaction associated with the previous message is not yet complete. Ensure that the caller has committed the transaction.. + /// + internal static string TraceCodeProcessMessage3Paused { + get { + return ResourceManager.GetString("TraceCodeProcessMessage3Paused", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Switched threads while processing a message for Contract '{0}' at Address '{1}'. UseSynchronizationContext property on ServiceBehaviorAttribute is set to true, and SynchronizationContext.Current was non-null when opening ServiceHost. If your service seems to be not processing messages, consider setting UseSynchronizationContext to false.. + /// + internal static string TraceCodeProcessMessage4Paused { + get { + return ResourceManager.GetString("TraceCodeProcessMessage4Paused", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A reliable channel has been opened.. + /// + internal static string TraceCodeReliableChannelOpened { + get { + return ResourceManager.GetString("TraceCodeReliableChannelOpened", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Behavior type already exists in the collection. + /// + internal static string TraceCodeRemoveBehavior { + get { + return ResourceManager.GetString("TraceCodeRemoveBehavior", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Received reply over request channel. + /// + internal static string TraceCodeRequestChannelReplyReceived { + get { + return ResourceManager.GetString("TraceCodeRequestChannelReplyReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RequestContext aborted. + /// + internal static string TraceCodeRequestContextAbort { + get { + return ResourceManager.GetString("TraceCodeRequestContextAbort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A failure occured while performing a security related operation.. + /// + internal static string TraceCodeSecurity { + get { + return ResourceManager.GetString("TraceCodeSecurity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An active security session was removed by the server.. + /// + internal static string TraceCodeSecurityActiveServerSessionRemoved { + get { + return ResourceManager.GetString("TraceCodeSecurityActiveServerSessionRemoved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A failure occurred while writing to the security audit log.. + /// + internal static string TraceCodeSecurityAuditWrittenFailure { + get { + return ResourceManager.GetString("TraceCodeSecurityAuditWrittenFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security audit log is written successfully.. + /// + internal static string TraceCodeSecurityAuditWrittenSuccess { + get { + return ResourceManager.GetString("TraceCodeSecurityAuditWrittenSuccess", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security protocol verified the incoming message.. + /// + internal static string TraceCodeSecurityBindingIncomingMessageVerified { + get { + return ResourceManager.GetString("TraceCodeSecurityBindingIncomingMessageVerified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security protocol secured the outgoing message.. + /// + internal static string TraceCodeSecurityBindingOutgoingMessageSecured { + get { + return ResourceManager.GetString("TraceCodeSecurityBindingOutgoingMessageSecured", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security protocol cannot secure the outgoing message.. + /// + internal static string TraceCodeSecurityBindingSecureOutgoingMessageFailure { + get { + return ResourceManager.GetString("TraceCodeSecurityBindingSecureOutgoingMessageFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security protocol cannot verify the incoming message.. + /// + internal static string TraceCodeSecurityBindingVerifyIncomingMessageFailure { + get { + return ResourceManager.GetString("TraceCodeSecurityBindingVerifyIncomingMessageFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close message was received by client security session.TraceCodeSecurityClientSessionKeyRenewed=Client security session renewed session key.. + /// + internal static string TraceCodeSecurityClientSessionCloseMessageReceived { + get { + return ResourceManager.GetString("TraceCodeSecurityClientSessionCloseMessageReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close response message was sent by client security session.. + /// + internal static string TraceCodeSecurityClientSessionCloseResponseSent { + get { + return ResourceManager.GetString("TraceCodeSecurityClientSessionCloseResponseSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Close message was sent by the client security session.. + /// + internal static string TraceCodeSecurityClientSessionCloseSent { + get { + return ResourceManager.GetString("TraceCodeSecurityClientSessionCloseSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client security session renewed the session key.. + /// + internal static string TraceCodeSecurityClientSessionKeyRenewed { + get { + return ResourceManager.GetString("TraceCodeSecurityClientSessionKeyRenewed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client security session discarded the previous session key.. + /// + internal static string TraceCodeSecurityClientSessionPreviousKeyDiscarded { + get { + return ResourceManager.GetString("TraceCodeSecurityClientSessionPreviousKeyDiscarded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SecurityContextSecurityToken cache is full.. + /// + internal static string TraceCodeSecurityContextTokenCacheFull { + get { + return ResourceManager.GetString("TraceCodeSecurityContextTokenCacheFull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Identity cannot be determined for an EndpointReference.. + /// + internal static string TraceCodeSecurityIdentityDeterminationFailure { + get { + return ResourceManager.GetString("TraceCodeSecurityIdentityDeterminationFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Identity was determined for an EndpointReference.. + /// + internal static string TraceCodeSecurityIdentityDeterminationSuccess { + get { + return ResourceManager.GetString("TraceCodeSecurityIdentityDeterminationSuccess", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HostName portion of an endpoint address cannot be normalized.. + /// + internal static string TraceCodeSecurityIdentityHostNameNormalizationFailure { + get { + return ResourceManager.GetString("TraceCodeSecurityIdentityHostNameNormalizationFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Identity verification failed.. + /// + internal static string TraceCodeSecurityIdentityVerificationFailure { + get { + return ResourceManager.GetString("TraceCodeSecurityIdentityVerificationFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Identity verification succeeded.. + /// + internal static string TraceCodeSecurityIdentityVerificationSuccess { + get { + return ResourceManager.GetString("TraceCodeSecurityIdentityVerificationSuccess", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security impersonation failed at the server.. + /// + internal static string TraceCodeSecurityImpersonationFailure { + get { + return ResourceManager.GetString("TraceCodeSecurityImpersonationFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security Impersonation succeeded at the server.. + /// + internal static string TraceCodeSecurityImpersonationSuccess { + get { + return ResourceManager.GetString("TraceCodeSecurityImpersonationSuccess", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An inactive security session was faulted by the server.. + /// + internal static string TraceCodeSecurityInactiveSessionFaulted { + get { + return ResourceManager.GetString("TraceCodeSecurityInactiveSessionFaulted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service security negotiation processing failure.. + /// + internal static string TraceCodeSecurityNegotiationProcessingFailure { + get { + return ResourceManager.GetString("TraceCodeSecurityNegotiationProcessingFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A new security session key was issued by the server.. + /// + internal static string TraceCodeSecurityNewServerSessionKeyIssued { + get { + return ResourceManager.GetString("TraceCodeSecurityNewServerSessionKeyIssued", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A pending security session was activated by the server.. + /// + internal static string TraceCodeSecurityPendingServerSessionActivated { + get { + return ResourceManager.GetString("TraceCodeSecurityPendingServerSessionActivated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A pending security session was added to the server.. + /// + internal static string TraceCodeSecurityPendingServerSessionAdded { + get { + return ResourceManager.GetString("TraceCodeSecurityPendingServerSessionAdded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The pending security session was closed by the server.. + /// + internal static string TraceCodeSecurityPendingServerSessionClosed { + get { + return ResourceManager.GetString("TraceCodeSecurityPendingServerSessionClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server security session sent session aborted fault to client.. + /// + internal static string TraceCodeSecurityServerSessionAbortedFaultSent { + get { + return ResourceManager.GetString("TraceCodeSecurityServerSessionAbortedFaultSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server security session received a close message from the client.. + /// + internal static string TraceCodeSecurityServerSessionCloseReceived { + get { + return ResourceManager.GetString("TraceCodeSecurityServerSessionCloseReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server security session received Close response message from client.. + /// + internal static string TraceCodeSecurityServerSessionCloseResponseReceived { + get { + return ResourceManager.GetString("TraceCodeSecurityServerSessionCloseResponseReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security session key was updated by the server.. + /// + internal static string TraceCodeSecurityServerSessionKeyUpdated { + get { + return ResourceManager.GetString("TraceCodeSecurityServerSessionKeyUpdated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server security session sent a key renewal fault to the client.. + /// + internal static string TraceCodeSecurityServerSessionRenewalFaultSent { + get { + return ResourceManager.GetString("TraceCodeSecurityServerSessionRenewalFaultSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Client security session received session aborted fault from server.. + /// + internal static string TraceCodeSecuritySessionAbortedFaultReceived { + get { + return ResourceManager.GetString("TraceCodeSecuritySessionAbortedFaultReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failure sending security session aborted fault to client.. + /// + internal static string TraceCodeSecuritySessionAbortedFaultSendFailure { + get { + return ResourceManager.GetString("TraceCodeSecuritySessionAbortedFaultSendFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client security session received a closed reponse from the server.. + /// + internal static string TraceCodeSecuritySessionClosedResponseReceived { + get { + return ResourceManager.GetString("TraceCodeSecuritySessionClosedResponseReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A failure occurred when sending a security session Close response to the client.. + /// + internal static string TraceCodeSecuritySessionClosedResponseSendFailure { + get { + return ResourceManager.GetString("TraceCodeSecuritySessionClosedResponseSendFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server security session sent a close response to the client.. + /// + internal static string TraceCodeSecuritySessionCloseResponseSent { + get { + return ResourceManager.GetString("TraceCodeSecuritySessionCloseResponseSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The incoming message is not part of an existing security session.. + /// + internal static string TraceCodeSecuritySessionDemuxFailure { + get { + return ResourceManager.GetString("TraceCodeSecuritySessionDemuxFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client security session received a key renewal fault from the server.. + /// + internal static string TraceCodeSecuritySessionKeyRenewalFaultReceived { + get { + return ResourceManager.GetString("TraceCodeSecuritySessionKeyRenewalFaultReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client security session was redirected.. + /// + internal static string TraceCodeSecuritySessionRedirectApplied { + get { + return ResourceManager.GetString("TraceCodeSecuritySessionRedirectApplied", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A failure occurred when sending a renewal fault on the security session key to the client.. + /// + internal static string TraceCodeSecuritySessionRenewFaultSendFailure { + get { + return ResourceManager.GetString("TraceCodeSecuritySessionRenewFaultSendFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client security session operation failed.. + /// + internal static string TraceCodeSecuritySessionRequestorOperationFailure { + get { + return ResourceManager.GetString("TraceCodeSecuritySessionRequestorOperationFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security session operation completed successfully at the client.. + /// + internal static string TraceCodeSecuritySessionRequestorOperationSuccess { + get { + return ResourceManager.GetString("TraceCodeSecuritySessionRequestorOperationSuccess", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A security session operation was started at the client.. + /// + internal static string TraceCodeSecuritySessionRequestorStartOperation { + get { + return ResourceManager.GetString("TraceCodeSecuritySessionRequestorStartOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security session operation failed at the server.. + /// + internal static string TraceCodeSecuritySessionResponderOperationFailure { + get { + return ResourceManager.GetString("TraceCodeSecuritySessionResponderOperationFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failure sending security session Close to client.. + /// + internal static string TraceCodeSecuritySessionServerCloseSendFailure { + get { + return ResourceManager.GetString("TraceCodeSecuritySessionServerCloseSendFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server security session sent Close to client.. + /// + internal static string TraceCodeSecuritySessionServerCloseSent { + get { + return ResourceManager.GetString("TraceCodeSecuritySessionServerCloseSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ServicePrincipalName could not be mapped to a SecurityIdentifier.. + /// + internal static string TraceCodeSecuritySpnToSidMappingFailure { + get { + return ResourceManager.GetString("TraceCodeSecuritySpnToSidMappingFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security Token Authenticator was closed.. + /// + internal static string TraceCodeSecurityTokenAuthenticatorClosed { + get { + return ResourceManager.GetString("TraceCodeSecurityTokenAuthenticatorClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security Token Authenticator was opened.. + /// + internal static string TraceCodeSecurityTokenAuthenticatorOpened { + get { + return ResourceManager.GetString("TraceCodeSecurityTokenAuthenticatorOpened", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security Token Provider was closed.. + /// + internal static string TraceCodeSecurityTokenProviderClosed { + get { + return ResourceManager.GetString("TraceCodeSecurityTokenProviderClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security Token Provider was opened.. + /// + internal static string TraceCodeSecurityTokenProviderOpened { + get { + return ResourceManager.GetString("TraceCodeSecurityTokenProviderOpened", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MaxOutboundConnectionsPerEndpoint quota ({0}) has been reached, so the connection was closed and not reused by the listener.. + /// + internal static string TraceCodeServerMaxPooledConnectionsQuotaReached { + get { + return ResourceManager.GetString("TraceCodeServerMaxPooledConnectionsQuotaReached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceChannel information.. + /// + internal static string TraceCodeServiceChannelLifetime { + get { + return ResourceManager.GetString("TraceCodeServiceChannelLifetime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceDurableInstance '{0}' deleted from persistence store.. + /// + internal static string TraceCodeServiceDurableInstanceDeleted { + get { + return ResourceManager.GetString("TraceCodeServiceDurableInstanceDeleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceDurableInstance '{0}' disposed.. + /// + internal static string TraceCodeServiceDurableInstanceDisposed { + get { + return ResourceManager.GetString("TraceCodeServiceDurableInstanceDisposed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceDurableInstance loaded from persistence store.. + /// + internal static string TraceCodeServiceDurableInstanceLoaded { + get { + return ResourceManager.GetString("TraceCodeServiceDurableInstanceLoaded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceDurableInstance saved to persistence store.. + /// + internal static string TraceCodeServiceDurableInstanceSaved { + get { + return ResourceManager.GetString("TraceCodeServiceDurableInstanceSaved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceHost base addresses.. + /// + internal static string TraceCodeServiceHostBaseAddresses { + get { + return ResourceManager.GetString("TraceCodeServiceHostBaseAddresses", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create ServiceHost.. + /// + internal static string TraceCodeServiceHostCreation { + get { + return ResourceManager.GetString("TraceCodeServiceHostCreation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceHost error on calling ReleasePerformanceCounters.. + /// + internal static string TraceCodeServiceHostErrorOnReleasePerformanceCounter { + get { + return ResourceManager.GetString("TraceCodeServiceHostErrorOnReleasePerformanceCounter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceHost faulted.. + /// + internal static string TraceCodeServiceHostFaulted { + get { + return ResourceManager.GetString("TraceCodeServiceHostFaulted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceHost close operation timedout.. + /// + internal static string TraceCodeServiceHostTimeoutOnClose { + get { + return ResourceManager.GetString("TraceCodeServiceHostTimeoutOnClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Replying to an operation threw a exception.. + /// + internal static string TraceCodeServiceOperationExceptionOnReply { + get { + return ResourceManager.GetString("TraceCodeServiceOperationExceptionOnReply", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Request/Reply operation {0} has no Reply Message.. + /// + internal static string TraceCodeServiceOperationMissingReply { + get { + return ResourceManager.GetString("TraceCodeServiceOperationMissingReply", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Request/Reply operation {0} has no IRequestContext to use for the reply.. + /// + internal static string TraceCodeServiceOperationMissingReplyContext { + get { + return ResourceManager.GetString("TraceCodeServiceOperationMissingReplyContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service security negotiation completed.. + /// + internal static string TraceCodeServiceSecurityNegotiationCompleted { + get { + return ResourceManager.GetString("TraceCodeServiceSecurityNegotiationCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The system hit the limit set for throttle '{0}'. Limit for this throttle was set to {1}. Throttle value can be changed by modifying attribute '{2}' in serviceThrottle element or by modifying '{0}' property on behavior ServiceThrottlingBehavior.. + /// + internal static string TraceCodeServiceThrottleLimitReached { + get { + return ResourceManager.GetString("TraceCodeServiceThrottleLimitReached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The system hit an internal throttle limit. Limit for this throttle was set to {0}. This throttle cannot be configured.. + /// + internal static string TraceCodeServiceThrottleLimitReachedInternal { + get { + return ResourceManager.GetString("TraceCodeServiceThrottleLimitReachedInternal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The shared memory for the endpoint of the service '{0}' does not exist. The service may not be started.. + /// + internal static string TraceCodeSharedManagerServiceEndpointNotExist { + get { + return ResourceManager.GetString("TraceCodeSharedManagerServiceEndpointNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Behavior type is not of expected type. + /// + internal static string TraceCodeSkipBehavior { + get { + return ResourceManager.GetString("TraceCodeSkipBehavior", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SocketConnection aborted. + /// + internal static string TraceCodeSocketConnectionAbort { + get { + return ResourceManager.GetString("TraceCodeSocketConnectionAbort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SocketConnection aborted under Close. + /// + internal static string TraceCodeSocketConnectionAbortClose { + get { + return ResourceManager.GetString("TraceCodeSocketConnectionAbortClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SocketConnection close. + /// + internal static string TraceCodeSocketConnectionClose { + get { + return ResourceManager.GetString("TraceCodeSocketConnectionClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SocketConnection create. + /// + internal static string TraceCodeSocketConnectionCreate { + get { + return ResourceManager.GetString("TraceCodeSocketConnectionCreate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Client's outgoing SSPI negotiation.. + /// + internal static string TraceCodeSpnegoClientNegotiation { + get { + return ResourceManager.GetString("TraceCodeSpnegoClientNegotiation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SpnegoTokenProvider completed SSPI negotiation.. + /// + internal static string TraceCodeSpnegoClientNegotiationCompleted { + get { + return ResourceManager.GetString("TraceCodeSpnegoClientNegotiationCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service's outgoing SSPI negotiation.. + /// + internal static string TraceCodeSpnegoServiceNegotiation { + get { + return ResourceManager.GetString("TraceCodeSpnegoServiceNegotiation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SpnegoTokenAuthenticator completed SSPI negotiation.. + /// + internal static string TraceCodeSpnegoServiceNegotiationCompleted { + get { + return ResourceManager.GetString("TraceCodeSpnegoServiceNegotiationCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SqlPersistenceProvider.Open() parameters.. + /// + internal static string TraceCodeSqlPersistenceProviderOpenParameters { + get { + return ResourceManager.GetString("TraceCodeSqlPersistenceProviderOpenParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sql execution complete.. + /// + internal static string TraceCodeSqlPersistenceProviderSQLCallEnd { + get { + return ResourceManager.GetString("TraceCodeSqlPersistenceProviderSQLCallEnd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sql execution started.. + /// + internal static string TraceCodeSqlPersistenceProviderSQLCallStart { + get { + return ResourceManager.GetString("TraceCodeSqlPersistenceProviderSQLCallStart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote SSL client failed to provide a required certificate.. + /// + internal static string TraceCodeSslClientCertMissing { + get { + return ResourceManager.GetString("TraceCodeSslClientCertMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The stream security upgrade was accepted successfully.. + /// + internal static string TraceCodeStreamSecurityUpgradeAccepted { + get { + return ResourceManager.GetString("TraceCodeStreamSecurityUpgradeAccepted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SynchronizationContextWorkflowSchedulerService - Timer {0} cancelled.. + /// + internal static string TraceCodeSyncContextSchedulerServiceTimerCancelled { + get { + return ResourceManager.GetString("TraceCodeSyncContextSchedulerServiceTimerCancelled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SynchronizationContextWorkflowSchedulerService - Timer {0} created for InstanceId {1}.. + /// + internal static string TraceCodeSyncContextSchedulerServiceTimerCreated { + get { + return ResourceManager.GetString("TraceCodeSyncContextSchedulerServiceTimerCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reading of a syndication feed started.. + /// + internal static string TraceCodeSyndicationFeedReadBegin { + get { + return ResourceManager.GetString("TraceCodeSyndicationFeedReadBegin", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reading of a syndication feed completed.. + /// + internal static string TraceCodeSyndicationFeedReadEnd { + get { + return ResourceManager.GetString("TraceCodeSyndicationFeedReadEnd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writing of a syndication feed started.. + /// + internal static string TraceCodeSyndicationFeedWriteBegin { + get { + return ResourceManager.GetString("TraceCodeSyndicationFeedWriteBegin", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writing of a syndication feed completed.. + /// + internal static string TraceCodeSyndicationFeedWriteEnd { + get { + return ResourceManager.GetString("TraceCodeSyndicationFeedWriteEnd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reading of a syndication item started.. + /// + internal static string TraceCodeSyndicationItemReadBegin { + get { + return ResourceManager.GetString("TraceCodeSyndicationItemReadBegin", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reading of a syndication item completed.. + /// + internal static string TraceCodeSyndicationItemReadEnd { + get { + return ResourceManager.GetString("TraceCodeSyndicationItemReadEnd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writing of a syndication item started.. + /// + internal static string TraceCodeSyndicationItemWriteBegin { + get { + return ResourceManager.GetString("TraceCodeSyndicationItemWriteBegin", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writing of a syndication item completed.. + /// + internal static string TraceCodeSyndicationItemWriteEnd { + get { + return ResourceManager.GetString("TraceCodeSyndicationItemWriteEnd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Syndication XML node of type '{0}' with name '{1}' and namespace '{2}' ignored on read.. + /// + internal static string TraceCodeSyndicationProtocolElementIgnoredOnRead { + get { + return ResourceManager.GetString("TraceCodeSyndicationProtocolElementIgnoredOnRead", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Syndication element with name '{0}' and namespace '{1}' was not written.. + /// + internal static string TraceCodeSyndicationProtocolElementIgnoredOnWrite { + get { + return ResourceManager.GetString("TraceCodeSyndicationProtocolElementIgnoredOnWrite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Syndication element with name '{0}' and namespace '{1}' is invalid.. + /// + internal static string TraceCodeSyndicationProtocolElementInvalid { + get { + return ResourceManager.GetString("TraceCodeSyndicationProtocolElementInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reading of a categories document started.. + /// + internal static string TraceCodeSyndicationReadCategoriesDocumentBegin { + get { + return ResourceManager.GetString("TraceCodeSyndicationReadCategoriesDocumentBegin", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reading of a categories document completed.. + /// + internal static string TraceCodeSyndicationReadCategoriesDocumentEnd { + get { + return ResourceManager.GetString("TraceCodeSyndicationReadCategoriesDocumentEnd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reading of a syndication feed started.. + /// + internal static string TraceCodeSyndicationReadFeedBegin { + get { + return ResourceManager.GetString("TraceCodeSyndicationReadFeedBegin", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reading of a syndication feed completed.. + /// + internal static string TraceCodeSyndicationReadFeedEnd { + get { + return ResourceManager.GetString("TraceCodeSyndicationReadFeedEnd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reading of a syndication item started.. + /// + internal static string TraceCodeSyndicationReadItemBegin { + get { + return ResourceManager.GetString("TraceCodeSyndicationReadItemBegin", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reading of a syndication item completed.. + /// + internal static string TraceCodeSyndicationReadItemEnd { + get { + return ResourceManager.GetString("TraceCodeSyndicationReadItemEnd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reading of a service document started.. + /// + internal static string TraceCodeSyndicationReadServiceDocumentBegin { + get { + return ResourceManager.GetString("TraceCodeSyndicationReadServiceDocumentBegin", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reading of a service document completed.. + /// + internal static string TraceCodeSyndicationReadServiceDocumentEnd { + get { + return ResourceManager.GetString("TraceCodeSyndicationReadServiceDocumentEnd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writing of a categories document started.. + /// + internal static string TraceCodeSyndicationWriteCategoriesDocumentBegin { + get { + return ResourceManager.GetString("TraceCodeSyndicationWriteCategoriesDocumentBegin", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writing of a categories document completed.. + /// + internal static string TraceCodeSyndicationWriteCategoriesDocumentEnd { + get { + return ResourceManager.GetString("TraceCodeSyndicationWriteCategoriesDocumentEnd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writing of a syndication feed started.. + /// + internal static string TraceCodeSyndicationWriteFeedBegin { + get { + return ResourceManager.GetString("TraceCodeSyndicationWriteFeedBegin", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writing of a syndication feed completed.. + /// + internal static string TraceCodeSyndicationWriteFeedEnd { + get { + return ResourceManager.GetString("TraceCodeSyndicationWriteFeedEnd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writing of a syndication item started.. + /// + internal static string TraceCodeSyndicationWriteItemBegin { + get { + return ResourceManager.GetString("TraceCodeSyndicationWriteItemBegin", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writing of a syndication item completed.. + /// + internal static string TraceCodeSyndicationWriteItemEnd { + get { + return ResourceManager.GetString("TraceCodeSyndicationWriteItemEnd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writing of a service document started.. + /// + internal static string TraceCodeSyndicationWriteServiceDocumentBegin { + get { + return ResourceManager.GetString("TraceCodeSyndicationWriteServiceDocumentBegin", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writing of a service document completed.. + /// + internal static string TraceCodeSyndicationWriteServiceDocumentEnd { + get { + return ResourceManager.GetString("TraceCodeSyndicationWriteServiceDocumentEnd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The operating system's timer resolution was detected as {0} ticks, which is about {1} milliseconds.. + /// + internal static string TraceCodeSystemTimeResolution { + get { + return ResourceManager.GetString("TraceCodeSystemTimeResolution", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Received a message over TCP channel. + /// + internal static string TraceCodeTcpChannelMessageReceived { + get { + return ResourceManager.GetString("TraceCodeTcpChannelMessageReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to receive a message over TCP channel. + /// + internal static string TraceCodeTcpChannelMessageReceiveFailed { + get { + return ResourceManager.GetString("TraceCodeTcpChannelMessageReceiveFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The TCP connect operation failed.. + /// + internal static string TraceCodeTcpConnectError { + get { + return ResourceManager.GetString("TraceCodeTcpConnectError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Listen at '{0}'.. + /// + internal static string TraceCodeTransportListen { + get { + return ResourceManager.GetString("TraceCodeTransportListen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction '{0}' was asynchronously aborted.. + /// + internal static string TraceCodeTxAsyncAbort { + get { + return ResourceManager.GetString("TraceCodeTxAsyncAbort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction '{0}' was aborted because it was uncompleted when the session was closed and the TransactionAutoCompleteOnSessionClose OperationBehaviorAttribute was set to false.. + /// + internal static string TraceCodeTxCompletionStatusAbortedOnSessionClose { + get { + return ResourceManager.GetString("TraceCodeTxCompletionStatusAbortedOnSessionClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction '{0}' for operation '{1}' was completed due to asynchronous abort.. + /// + internal static string TraceCodeTxCompletionStatusCompletedForAsyncAbort { + get { + return ResourceManager.GetString("TraceCodeTxCompletionStatusCompletedForAsyncAbort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction '{0}' for operation '{1}' was completed due to the TransactionAutoComplete OperationBehaviorAttribute member being set to true.. + /// + internal static string TraceCodeTxCompletionStatusCompletedForAutocomplete { + get { + return ResourceManager.GetString("TraceCodeTxCompletionStatusCompletedForAutocomplete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction '{0}' for operation '{1}' was completed due to an unhandled execution exception.. + /// + internal static string TraceCodeTxCompletionStatusCompletedForError { + get { + return ResourceManager.GetString("TraceCodeTxCompletionStatusCompletedForError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction '{0}' for operation '{1}' was completed due to a call to SetTransactionComplete.. + /// + internal static string TraceCodeTxCompletionStatusCompletedForSetComplete { + get { + return ResourceManager.GetString("TraceCodeTxCompletionStatusCompletedForSetComplete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction '{0}' was completed when the session was closed due to the TransactionAutoCompleteOnSessionClose ServiceBehaviorAttribute member.. + /// + internal static string TraceCodeTxCompletionStatusCompletedForTACOSC { + get { + return ResourceManager.GetString("TraceCodeTxCompletionStatusCompletedForTACOSC", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction '{0}' for operation '{1}' remains attached to the InstanceContext.. + /// + internal static string TraceCodeTxCompletionStatusRemainsAttached { + get { + return ResourceManager.GetString("TraceCodeTxCompletionStatusRemainsAttached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The OleTransactions protocol negotiation failed for coordination context '{0}'.. + /// + internal static string TraceCodeTxFailedToNegotiateOleTx { + get { + return ResourceManager.GetString("TraceCodeTxFailedToNegotiateOleTx", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service instance was released on the completion of the transaction '{0}' because the ReleaseServiceInstanceOnTransactionComplete ServiceBehaviorAttribute was set to true.. + /// + internal static string TraceCodeTxReleaseServiceInstanceOnCompletion { + get { + return ResourceManager.GetString("TraceCodeTxReleaseServiceInstanceOnCompletion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction '{0}' was received for operation '{1}' from an InstanceContext transaction.. + /// + internal static string TraceCodeTxSourceTxScopeRequiredIsAttachedTransaction { + get { + return ResourceManager.GetString("TraceCodeTxSourceTxScopeRequiredIsAttachedTransaction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction '{0}' for operation '{1}' was newly created.. + /// + internal static string TraceCodeTxSourceTxScopeRequiredIsCreateNewTransaction { + get { + return ResourceManager.GetString("TraceCodeTxSourceTxScopeRequiredIsCreateNewTransaction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction '{0}' was received for operation '{1}' from a transacted transport, such as MSMQ.. + /// + internal static string TraceCodeTxSourceTxScopeRequiredIsTransactedTransport { + get { + return ResourceManager.GetString("TraceCodeTxSourceTxScopeRequiredIsTransactedTransport", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transaction '{0}' was flowed to operation '{1}'.. + /// + internal static string TraceCodeTxSourceTxScopeRequiredIsTransactionFlow { + get { + return ResourceManager.GetString("TraceCodeTxSourceTxScopeRequiredIsTransactionFlow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Existing transaction '{0}' being used for operation '{1}'.. + /// + internal static string TraceCodeTxSourceTxScopeRequiredUsingExistingTransaction { + get { + return ResourceManager.GetString("TraceCodeTxSourceTxScopeRequiredUsingExistingTransaction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Understood message header.. + /// + internal static string TraceCodeUnderstoodMessageHeader { + get { + return ResourceManager.GetString("TraceCodeUnderstoodMessageHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No service available to handle this action. + /// + internal static string TraceCodeUnhandledAction { + get { + return ResourceManager.GetString("TraceCodeUnhandledAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unhandled exception in user operation '{0}.{1}'.. + /// + internal static string TraceCodeUnhandledExceptionInUserOperation { + get { + return ResourceManager.GetString("TraceCodeUnhandledExceptionInUserOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ServiceDebugBehavior Help Page is enabled at a relative address and cannot be created because there is no base address.. + /// + internal static string TraceCodeWarnHelpPageEnabledNoBaseAddress { + get { + return ResourceManager.GetString("TraceCodeWarnHelpPageEnabledNoBaseAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Webhost could not activate service. + /// + internal static string TraceCodeWebHostFailedToActivateService { + get { + return ResourceManager.GetString("TraceCodeWebHostFailedToActivateService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Webhost couldn't compile service. + /// + internal static string TraceCodeWebHostFailedToCompile { + get { + return ResourceManager.GetString("TraceCodeWebHostFailedToCompile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Incoming HTTP request with URI '{0}' does not match any operation.. + /// + internal static string TraceCodeWebRequestDoesNotMatchOperations { + get { + return ResourceManager.GetString("TraceCodeWebRequestDoesNotMatchOperations", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Incoming HTTP request with URI '{0}' matched operation '{1}'.. + /// + internal static string TraceCodeWebRequestMatchesOperation { + get { + return ResourceManager.GetString("TraceCodeWebRequestMatchesOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to HTTP query string parameter with name '{0}' was ignored.. + /// + internal static string TraceCodeWebUnknownQueryParameterIgnored { + get { + return ResourceManager.GetString("TraceCodeWebUnknownQueryParameterIgnored", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Setting a value via WMI.. + /// + internal static string TraceCodeWmiPut { + get { + return ResourceManager.GetString("TraceCodeWmiPut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkflowDurableInstance aborted.. + /// + internal static string TraceCodeWorkflowDurableInstanceAborted { + get { + return ResourceManager.GetString("TraceCodeWorkflowDurableInstanceAborted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkflowDurableInstance '{0}' activated.. + /// + internal static string TraceCodeWorkflowDurableInstanceActivated { + get { + return ResourceManager.GetString("TraceCodeWorkflowDurableInstanceActivated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkflowDurableInstance '{0}' loaded.. + /// + internal static string TraceCodeWorkflowDurableInstanceLoaded { + get { + return ResourceManager.GetString("TraceCodeWorkflowDurableInstanceLoaded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Work item enqueued.. + /// + internal static string TraceCodeWorkflowOperationInvokerItemQueued { + get { + return ResourceManager.GetString("TraceCodeWorkflowOperationInvokerItemQueued", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fault Sent for InstanceId {0}.. + /// + internal static string TraceCodeWorkflowRequestContextFaultSent { + get { + return ResourceManager.GetString("TraceCodeWorkflowRequestContextFaultSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reply sent for InstanceId {0}.. + /// + internal static string TraceCodeWorkflowRequestContextReplySent { + get { + return ResourceManager.GetString("TraceCodeWorkflowRequestContextReplySent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkflowServiceHost created.. + /// + internal static string TraceCodeWorkflowServiceHostCreated { + get { + return ResourceManager.GetString("TraceCodeWorkflowServiceHostCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A non-critical error or warning occurred during WSDL Export. + /// + internal static string TraceCodeWsmexNonCriticalWsdlExportError { + get { + return ResourceManager.GetString("TraceCodeWsmexNonCriticalWsdlExportError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A non-critical error or warning occurred in the MetadataExchangeClient during WSDL Import This could result in some endpoints not being imported.. + /// + internal static string TraceCodeWsmexNonCriticalWsdlImportError { + get { + return ResourceManager.GetString("TraceCodeWsmexNonCriticalWsdlImportError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An invalid create sequence message was received.. + /// + internal static string TraceCodeWsrmInvalidCreateSequence { + get { + return ResourceManager.GetString("TraceCodeWsrmInvalidCreateSequence", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An invalid WS-RM message was received.. + /// + internal static string TraceCodeWsrmInvalidMessage { + get { + return ResourceManager.GetString("TraceCodeWsrmInvalidMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An incoming create sequence request was rejected because the maximum pending channel count was reached.. + /// + internal static string TraceCodeWsrmMaxPendingChannelsReached { + get { + return ResourceManager.GetString("TraceCodeWsrmMaxPendingChannelsReached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A message in a WS-RM sequence has been dropped because it could not be buffered.. + /// + internal static string TraceCodeWsrmMessageDropped { + get { + return ResourceManager.GetString("TraceCodeWsrmMessageDropped", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The reliable session infrastructure detected a system clock change. This will temporarily result in a less optimal message retry strategy.. + /// + internal static string TraceCodeWsrmNegativeElapsedTimeDetected { + get { + return ResourceManager.GetString("TraceCodeWsrmNegativeElapsedTimeDetected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WS-RM SequenceAcknowledgement received.. + /// + internal static string TraceCodeWsrmReceiveAcknowledgement { + get { + return ResourceManager.GetString("TraceCodeWsrmReceiveAcknowledgement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WS-RM Last Sequence message received.. + /// + internal static string TraceCodeWsrmReceiveLastSequenceMessage { + get { + return ResourceManager.GetString("TraceCodeWsrmReceiveLastSequenceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WS-RM Sequence message received.. + /// + internal static string TraceCodeWsrmReceiveSequenceMessage { + get { + return ResourceManager.GetString("TraceCodeWsrmReceiveSequenceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WS-RM SequenceAcknowledgement sent.. + /// + internal static string TraceCodeWsrmSendAcknowledgement { + get { + return ResourceManager.GetString("TraceCodeWsrmSendAcknowledgement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WS-RM Last Sequence message sent.. + /// + internal static string TraceCodeWsrmSendLastSequenceMessage { + get { + return ResourceManager.GetString("TraceCodeWsrmSendLastSequenceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WS-RM Sequence message sent.. + /// + internal static string TraceCodeWsrmSendSequenceMessage { + get { + return ResourceManager.GetString("TraceCodeWsrmSendSequenceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A WS-RM sequence has faulted.. + /// + internal static string TraceCodeWsrmSequenceFaulted { + get { + return ResourceManager.GetString("TraceCodeWsrmSequenceFaulted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OnAuthorizeRequest Failed.. + /// + internal static string TraceOnAuthorizeRequestFailed { + get { + return ResourceManager.GetString("TraceOnAuthorizeRequestFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OnAuthorizeRequest Succeeded.. + /// + internal static string TraceOnAuthorizeRequestSucceed { + get { + return ResourceManager.GetString("TraceOnAuthorizeRequestSucceed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid TransactionFlowOption value.. + /// + internal static string TransactionFlowBadOption { + get { + return ResourceManager.GetString("TransactionFlowBadOption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In order to flow a transaction, flowing issued tokens must also be supported.. + /// + internal static string TransactionFlowRequiredIssuedTokens { + get { + return ResourceManager.GetString("TransactionFlowRequiredIssuedTokens", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Transfer mode {0} is not supported by {1}.. + /// + internal static string TransferModeNotSupported { + get { + return ResourceManager.GetString("TransferModeNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Transferring to ComPlus logical thread {0}.. + /// + internal static string TransferringToComplus { + get { + return ResourceManager.GetString("TransferringToComplus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In Binding '{0}', TransportBindingElement '{1}' does not appear last in the BindingElementCollection. Please change the order of elements such that the TransportBindingElement is last.. + /// + internal static string TransportBindingElementMustBeLast { + get { + return ResourceManager.GetString("TransportBindingElementMustBeLast", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The binding does not contain a TransportBindingElement.. + /// + internal static string TransportBindingElementNotFound { + get { + return ResourceManager.GetString("TransportBindingElementNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}'.'{1}' binding for the '{2}'.'{3}' contract is configured with an authentication mode that requires transport level integrity and confidentiality. However the transport cannot provide integrity and confidentiality.. + /// + internal static string TransportDoesNotProtectMessage { + get { + return ResourceManager.GetString("TransportDoesNotProtectMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transport configured on this binding does not appear to support the CompressionFormat specified ({0}) on the message encoder. To resolve this issue, set the CompressionFormat on the {1} to '{2}' or use a different transport.. + /// + internal static string TransportDoesNotSupportCompression { + get { + return ResourceManager.GetString("TransportDoesNotSupportCompression", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This operation is only valid after the transport manager has been opened.. + /// + internal static string TransportManagerNotOpen { + get { + return ResourceManager.GetString("TransportManagerNotOpen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This property cannot be changed after the transport manager has been opened.. + /// + internal static string TransportManagerOpen { + get { + return ResourceManager.GetString("TransportManagerOpen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More than one 'To' header specified in a message secured by Transport Security.. + /// + internal static string TransportSecuredMessageHasMoreThanOneToHeader { + get { + return ResourceManager.GetString("TransportSecuredMessageHasMoreThanOneToHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message received over Transport security was missing the 'To' header.. + /// + internal static string TransportSecuredMessageMissingToHeader { + get { + return ResourceManager.GetString("TransportSecuredMessageMissingToHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Transport secured messages should have the 'To' header specified.. + /// + internal static string TransportSecurityRequireToHeader { + get { + return ResourceManager.GetString("TransportSecurityRequireToHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to create Attached or Unattached reference for '{0}'.. + /// + internal static string TrustDriverIsUnableToCreatedNecessaryAttachedOrUnattachedReferences { + get { + return ResourceManager.GetString("TrustDriverIsUnableToCreatedNecessaryAttachedOrUnattachedReferences", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configured WS-Trust version does not support issued tokens. WS-Trust February 2005 or later is required.. + /// + internal static string TrustDriverVersionDoesNotSupportIssuedTokens { + get { + return ResourceManager.GetString("TrustDriverVersionDoesNotSupportIssuedTokens", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configured Trust version does not support sessions. Use WSTrustFeb2005 or above.. + /// + internal static string TrustDriverVersionDoesNotSupportSession { + get { + return ResourceManager.GetString("TrustDriverVersionDoesNotSupportSession", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not establish trust relationship for the SSL/TLS secure channel with authority '{0}'.. + /// + internal static string TrustFailure { + get { + return ResourceManager.GetString("TrustFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type load for contract interface ID {0} failed with Error:{1}.. + /// + internal static string TypeLoadForContractTypeIIDFailedWith { + get { + return ResourceManager.GetString("TypeLoadForContractTypeIIDFailedWith", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' user-defined type could not be found. Ensure that the correct type and type library are registered and specified.. + /// + internal static string UdtNotFoundInAssembly { + get { + return ResourceManager.GetString("UdtNotFoundInAssembly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot create an ICrypto interface from the '{0}' token for signature verification.. + /// + internal static string UnableToCreateICryptoFromTokenForSignatureVerification { + get { + return ResourceManager.GetString("UnableToCreateICryptoFromTokenForSignatureVerification", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to create Key Type element for the Key Type '{0}'. This might be due to a wrong version of MessageSecurityVersion set on the SecurityBindingElement.. + /// + internal static string UnableToCreateKeyTypeElementForUnknownKeyType { + get { + return ResourceManager.GetString("UnableToCreateKeyTypeElementForUnknownKeyType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot create the '{0}' symmetric algorithm from the token.. + /// + internal static string UnableToCreateSymmetricAlgorithmFromToken { + get { + return ResourceManager.GetString("UnableToCreateSymmetricAlgorithmFromToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to create token reference.. + /// + internal static string UnableToCreateTokenReference { + get { + return ResourceManager.GetString("UnableToCreateTokenReference", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was no channel that could accept the message with action '{0}'.. + /// + internal static string UnableToDemuxChannel { + get { + return ResourceManager.GetString("UnableToDemuxChannel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to KeyInfo clause '{0}' resolved to token '{1}', which does not contain a Symmetric key that can be used for derivation.. + /// + internal static string UnableToDeriveKeyFromKeyInfoClause { + get { + return ResourceManager.GetString("UnableToDeriveKeyFromKeyInfoClause", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A policy reference was ignored because the policy with ID '{0}' could not be found.. + /// + internal static string UnableToFindPolicyWithId { + get { + return ResourceManager.GetString("UnableToFindPolicyWithId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security processor was unable to find a security header with actor '{0}' in the message. This might be because the message is an unsecured fault or because there is a binding mismatch between the communicating parties. This can occur if the service is configured for security and the client is not using security.. + /// + internal static string UnableToFindSecurityHeaderInMessage { + get { + return ResourceManager.GetString("UnableToFindSecurityHeaderInMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Security processor was unable to find a security header in the message. This might be because the message is an unsecured fault or because there is a binding mismatch between the communicating parties. This can occur if the service is configured for security and the client is not using security.. + /// + internal static string UnableToFindSecurityHeaderInMessageNoActor { + get { + return ResourceManager.GetString("UnableToFindSecurityHeaderInMessageNoActor", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find a token authenticator for the '{0}' token type. Tokens of that type cannot be accepted according to current security settings.. + /// + internal static string UnableToFindTokenAuthenticator { + get { + return ResourceManager.GetString("UnableToFindTokenAuthenticator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to impersonate client identity during serialization of the response message.. + /// + internal static string UnableToImpersonateWhileSerializingReponse { + get { + return ResourceManager.GetString("UnableToImpersonateWhileSerializingReponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The following Policy Assertions were not Imported: + ///. + /// + internal static string UnabletoImportPolicy { + get { + return ResourceManager.GetString("UnabletoImportPolicy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot load the X.509 certificate identity specified in the configuration.. + /// + internal static string UnableToLoadCertificateIdentity { + get { + return ResourceManager.GetString("UnableToLoadCertificateIdentity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot load library {0}. Ensure that WCF is properly installed.. + /// + internal static string UnableToLoadDll { + get { + return ResourceManager.GetString("UnableToLoadDll", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot locate operation {0} in Contract {1}.. + /// + internal static string UnableToLocateOperation2 { + get { + return ResourceManager.GetString("UnableToLocateOperation2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Obtaining metadata from issuer '{0}' failed with error '{1}'.. + /// + internal static string UnableToObtainIssuerMetadata { + get { + return ResourceManager.GetString("UnableToObtainIssuerMetadata", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot renew the security session key.. + /// + internal static string UnableToRenewSessionKey { + get { + return ResourceManager.GetString("UnableToRenewSessionKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The data reference '{0}' could not be resolved in the received message.. + /// + internal static string UnableToResolveDataReference { + get { + return ResourceManager.GetString("UnableToResolveDataReference", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot resolve the host name of URI "{0}" using DNS.. + /// + internal static string UnableToResolveHost { + get { + return ResourceManager.GetString("UnableToResolveHost", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot resolve KeyInfo in derived key token for resolving source token: KeyInfoClause '{0}'.. + /// + internal static string UnableToResolveKeyInfoClauseInDerivedKeyToken { + get { + return ResourceManager.GetString("UnableToResolveKeyInfoClauseInDerivedKeyToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot resolve KeyInfo for decryption: KeyInfo '{0}', available tokens '{1}'.. + /// + internal static string UnableToResolveKeyInfoForDecryption { + get { + return ResourceManager.GetString("UnableToResolveKeyInfoForDecryption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot resolve KeyInfo for unwrapping key: KeyInfo '{0}', available tokens '{1}'.. + /// + internal static string UnableToResolveKeyInfoForUnwrappingToken { + get { + return ResourceManager.GetString("UnableToResolveKeyInfoForUnwrappingToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot resolve KeyInfo for verifying signature: KeyInfo '{0}', available tokens '{1}'.. + /// + internal static string UnableToResolveKeyInfoForVerifyingSignature { + get { + return ResourceManager.GetString("UnableToResolveKeyInfoForVerifyingSignature", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot resolve reference URI '{0}' in signature to compute digest.. + /// + internal static string UnableToResolveReferenceUriForSignature { + get { + return ResourceManager.GetString("UnableToResolveReferenceUriForSignature", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to retrieve IUnknown for object.. + /// + internal static string UnableToRetrievepUnk { + get { + return ResourceManager.GetString("UnableToRetrievepUnk", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unbound prefix used in qualified name '{0}'.. + /// + internal static string UnboundPrefixInQName { + get { + return ResourceManager.GetString("UnboundPrefixInQName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A feed containing items that are not buffered (i.e. the items are not stored in an IList) cannot clone its items. Buffer the items in the feed before calling Clone on it or pass false to the Clone method.. + /// + internal static string UnbufferedItemsCannotBeCloned { + get { + return ResourceManager.GetString("UnbufferedItemsCannotBeCloned", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint sent an unexpected ack. Simplex servers do not process acks.. + /// + internal static string UnexpectedAcknowledgement { + get { + return ResourceManager.GetString("UnexpectedAcknowledgement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint sent an unexpected request for an ack. Simplex clients do not send acks and do not process requests for acks.. + /// + internal static string UnexpectedAckRequested { + get { + return ResourceManager.GetString("UnexpectedAckRequested", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expected binary secret of type {0} but got secret of type {1}.. + /// + internal static string UnexpectedBinarySecretType { + get { + return ResourceManager.GetString("UnexpectedBinarySecretType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint sent an unexpected close sequence message. Simplex clients do not process this message.. + /// + internal static string UnexpectedCloseSequence { + get { + return ResourceManager.GetString("UnexpectedCloseSequence", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint sent an unexpected close sequence response message. Simplex servers do not process this message.. + /// + internal static string UnexpectedCloseSequenceResponse { + get { + return ResourceManager.GetString("UnexpectedCloseSequenceResponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint sent an unexpected request to create a sequence. Clients do not process requests for a sequence.. + /// + internal static string UnexpectedCS { + get { + return ResourceManager.GetString("UnexpectedCS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint sent inconsistent requests to create the same sequence. The OfferId values are not identical.. + /// + internal static string UnexpectedCSOfferId { + get { + return ResourceManager.GetString("UnexpectedCSOfferId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint sent an unexpected create sequence response. Servers do not process this message.. + /// + internal static string UnexpectedCSR { + get { + return ResourceManager.GetString("UnexpectedCSR", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint sent inconsistent responses to the same create sequence request. The sequence identifiers are not identical.. + /// + internal static string UnexpectedCSROfferId { + get { + return ResourceManager.GetString("UnexpectedCSROfferId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' from namespace '{1}' is not expected to appear more than once. + /// + internal static string UnexpectedDuplicateElement { + get { + return ResourceManager.GetString("UnexpectedDuplicateElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' from namespace '{1}' is not expected. Expecting element '{2}' from namespace '{3}'. + /// + internal static string UnexpectedElementExpectingElement { + get { + return ResourceManager.GetString("UnexpectedElementExpectingElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' from the '{1}' namespace is empty and does not specify a valid identity claim. . + /// + internal static string UnexpectedEmptyElementExpectingClaim { + get { + return ResourceManager.GetString("UnexpectedEmptyElementExpectingClaim", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected encrypted element in security header.. + /// + internal static string UnexpectedEncryptedElementInSecurityHeader { + get { + return ResourceManager.GetString("UnexpectedEncryptedElementInSecurityHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected end of file.. + /// + internal static string UnexpectedEndOfFile { + get { + return ResourceManager.GetString("UnexpectedEndOfFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote server returned an unexpected response: ({0}) {1}.. + /// + internal static string UnexpectedHttpResponseCode { + get { + return ResourceManager.GetString("UnexpectedHttpResponseCode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security session received an unexpected close from the other party.. + /// + internal static string UnexpectedSecuritySessionClose { + get { + return ResourceManager.GetString("UnexpectedSecuritySessionClose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The security session received an unexpected close response from the other party.. + /// + internal static string UnexpectedSecuritySessionCloseResponse { + get { + return ResourceManager.GetString("UnexpectedSecuritySessionCloseResponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connection was not accepted because the SecurityContext contained tokens that do not match the current security settings.. + /// + internal static string UnexpectedSecurityTokensDuringHandshake { + get { + return ResourceManager.GetString("UnexpectedSecurityTokensDuringHandshake", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint sent an unexpected terminate sequence message. Simplex clients do not process this message.. + /// + internal static string UnexpectedTerminateSequence { + get { + return ResourceManager.GetString("UnexpectedTerminateSequence", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint sent an unexpected terminate sequence response message. Simplex servers do not process this message.. + /// + internal static string UnexpectedTerminateSequenceResponse { + get { + return ResourceManager.GetString("UnexpectedTerminateSequenceResponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected threading model. WCF/COM+ integration only supports STA and MTA threading models.. + /// + internal static string UnexpectedThreadingModel { + get { + return ResourceManager.GetString("UnexpectedThreadingModel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XML child node {0} of type {1} is unexpected for element {2}.. + /// + internal static string UnexpectedXmlChildNode { + get { + return ResourceManager.GetString("UnexpectedXmlChildNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XPath:{0} + /// Assertions:. + /// + internal static string UnImportedAssertionList { + get { + return ResourceManager.GetString("UnImportedAssertionList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find a unique port number that is available for both IPv4 and IPv6.. + /// + internal static string UniquePortNotAvailable { + get { + return ResourceManager.GetString("UniquePortNotAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The computed key algorithm '{0}' is not supported.. + /// + internal static string UnknownComputedKeyAlgorithm { + get { + return ResourceManager.GetString("UnknownComputedKeyAlgorithm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The element with name '{0}' and namespace '{1}' is not an allowed document format.. + /// + internal static string UnknownDocumentXml { + get { + return ResourceManager.GetString("UnknownDocumentXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unrecognized encoding occurred while reading the binary security token.. + /// + internal static string UnknownEncodingInBinarySecurityToken { + get { + return ResourceManager.GetString("UnknownEncodingInBinarySecurityToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The element with name '{0}' and namespace '{1}' is not an allowed feed format.. + /// + internal static string UnknownFeedXml { + get { + return ResourceManager.GetString("UnknownFeedXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unknown filter type: '{0}'.. + /// + internal static string UnknownFilterType { + get { + return ResourceManager.GetString("UnknownFilterType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The contract ('{0}','{1}') contains some unknown header ('{2}','{3}') which cannot be secured. Please choose ProtectionLevel.None for this header. . + /// + internal static string UnknownHeaderCannotProtected { + get { + return ResourceManager.GetString("UnknownHeaderCannotProtected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ICrypto implementation '{0}' is not supported.. + /// + internal static string UnknownICryptoType { + get { + return ResourceManager.GetString("UnknownICryptoType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The element with name '{0}' and namespace '{1}' is not an allowed item format.. + /// + internal static string UnknownItemXml { + get { + return ResourceManager.GetString("UnknownItemXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The listener at Uri '{0}' could not be initialized because it was created for an unrecognized channel type.. + /// + internal static string UnknownListenerType1 { + get { + return ResourceManager.GetString("UnknownListenerType1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find keyword {0}.. + /// + internal static string UnknownMonikerKeyword { + get { + return ResourceManager.GetString("UnknownMonikerKeyword", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value of wsrm:Identifier is not a known Sequence identifier.. + /// + internal static string UnknownSequenceFaultReason { + get { + return ResourceManager.GetString("UnknownSequenceFaultReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint no longer recognizes this sequence. This is most likely due to an abort on the remote endpoint. {0} The reliable session was faulted.. + /// + internal static string UnknownSequenceFaultReceived { + get { + return ResourceManager.GetString("UnknownSequenceFaultReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint has sent a message containing an unrecognized sequence identifier. The reliable session was faulted.. + /// + internal static string UnknownSequenceMessageReceived { + get { + return ResourceManager.GetString("UnknownSequenceMessageReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unrecognized supporting token '{0}' was encountered.. + /// + internal static string UnknownSupportingToken { + get { + return ResourceManager.GetString("UnknownSupportingToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unknown token attachment mode: {0}.. + /// + internal static string UnknownTokenAttachmentMode { + get { + return ResourceManager.GetString("UnknownTokenAttachmentMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An unrecognized token authenticator '{0}' was used for token processing.. + /// + internal static string UnknownTokenAuthenticatorUsedInTokenProcessing { + get { + return ResourceManager.GetString("UnknownTokenAuthenticatorUsedInTokenProcessing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An unrecognized WSDL extension of Type '{0}' was not handled.. + /// + internal static string UnknownWSDLExtensionIgnored { + get { + return ResourceManager.GetString("UnknownWSDLExtensionIgnored", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The WS-AtomicTransaction protocol service could not unmarshal the flowed transaction. The following exception occured: {0}. + /// + internal static string UnmarshalTransactionFaulted { + get { + return ResourceManager.GetString("UnmarshalTransactionFaulted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint replied to the request for a sequence with a response that could not be parsed. See inner exception for details. The channel could not be opened.. + /// + internal static string UnparsableCSResponse { + get { + return ResourceManager.GetString("UnparsableCSResponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WsdlImporter encountered unrecognized policy assertions in ServiceDescription '{0}':. + /// + internal static string UnrecognizedBindingAssertions1 { + get { + return ResourceManager.GetString("UnrecognizedBindingAssertions1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ClaimType '{0}' is not recognized. Expected ClaimType '{1}'.. + /// + internal static string UnrecognizedClaimTypeForIdentity { + get { + return ResourceManager.GetString("UnrecognizedClaimTypeForIdentity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint has sent an unrecognized fault with namespace, {0}, name {1}, and reason {2}. The reliable session was faulted.. + /// + internal static string UnrecognizedFaultReceived { + get { + return ResourceManager.GetString("UnrecognizedFaultReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint has sent an unrecognized fault with namespace, {0}, name {1}, and reason {2}. The channel could not be opened.. + /// + internal static string UnrecognizedFaultReceivedOnOpen { + get { + return ResourceManager.GetString("UnrecognizedFaultReceivedOnOpen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid HostNameComparisonMode value: {0}.. + /// + internal static string UnrecognizedHostNameComparisonMode { + get { + return ResourceManager.GetString("UnrecognizedHostNameComparisonMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unrecognized identity property type: '{0}'.. + /// + internal static string UnrecognizedIdentityPropertyType { + get { + return ResourceManager.GetString("UnrecognizedIdentityPropertyType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unrecognized identity type Name='{0}', Namespace='{1}'.. + /// + internal static string UnrecognizedIdentityType { + get { + return ResourceManager.GetString("UnrecognizedIdentityType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The "{0}" namespace is not a recognized WS-Policy namespace.. + /// + internal static string UnrecognizedPolicyDocumentNamespace { + get { + return ResourceManager.GetString("UnrecognizedPolicyDocumentNamespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unrecognized policy element {0} in namespace {1}.. + /// + internal static string UnrecognizedPolicyElementInNamespace { + get { + return ResourceManager.GetString("UnrecognizedPolicyElementInNamespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.. + /// + internal static string UnsecuredMessageFaultReceived { + get { + return ResourceManager.GetString("UnsecuredMessageFaultReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The message received over Transport security has unsigned 'To' header.. + /// + internal static string UnsignedToHeaderInTransportSecuredMessage { + get { + return ResourceManager.GetString("UnsignedToHeaderInTransportSecuredMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binary encoding {0} is not supported.. + /// + internal static string UnsupportedBinaryEncoding { + get { + return ResourceManager.GetString("UnsupportedBinaryEncoding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' binding element does not support cloning.. + /// + internal static string UnsupportedBindingElementClone { + get { + return ResourceManager.GetString("UnsupportedBindingElementClone", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value '{1}' is not supported in this context for the binding property '{0}'.. + /// + internal static string UnsupportedBindingProperty { + get { + return ResourceManager.GetString("UnsupportedBindingProperty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot import the policy. The value of the attribute '{0}' must be either 'true', 'false', '1' or '0'. The following error occurred: '{1}'.. + /// + internal static string UnsupportedBooleanAttribute { + get { + return ResourceManager.GetString("UnsupportedBooleanAttribute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Canonicalization algorithm '{0}' is not supported.. + /// + internal static string UnsupportedCanonicalizationAlgorithm { + get { + return ResourceManager.GetString("UnsupportedCanonicalizationAlgorithm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Channel interface type '{0}' is not supported.. + /// + internal static string UnsupportedChannelInterfaceType { + get { + return ResourceManager.GetString("UnsupportedChannelInterfaceType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint closed the sequence before message transfer was complete. This is not supported since all messages could not be transferred. The reliable session was faulted.. + /// + internal static string UnsupportedCloseExceptionString { + get { + return ResourceManager.GetString("UnsupportedCloseExceptionString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The conversion between the client parameter type '{0}' to the required server parameter type '{1}' cannot be performed.. + /// + internal static string UnsupportedConversion { + get { + return ResourceManager.GetString("UnsupportedConversion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Crypto algorithm {0} not supported in this context.. + /// + internal static string UnsupportedCryptoAlgorithm { + get { + return ResourceManager.GetString("UnsupportedCryptoAlgorithm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} binding element requires envelope version '{1}' It doesn't support '{2}'.. + /// + internal static string UnsupportedEnvelopeVersion { + get { + return ResourceManager.GetString("UnsupportedEnvelopeVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Issuer entropy is not BinarySecretSecurityToken or WrappedKeySecurityToken.. + /// + internal static string UnsupportedIssuerEntropyType { + get { + return ResourceManager.GetString("UnsupportedIssuerEntropyType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Key derivation algorithm '{0}' is not supported.. + /// + internal static string UnsupportedKeyDerivationAlgorithm { + get { + return ResourceManager.GetString("UnsupportedKeyDerivationAlgorithm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Symmetric Key length {0} is not supported by the algorithm suite '{1}'.. + /// + internal static string UnsupportedKeyLength { + get { + return ResourceManager.GetString("UnsupportedKeyLength", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type {0} is not a supported result type.. + /// + internal static string UnsupportedMessageQueryResultType { + get { + return ResourceManager.GetString("UnsupportedMessageQueryResultType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' username token has an unsupported password type.. + /// + internal static string UnsupportedPasswordType { + get { + return ResourceManager.GetString("UnsupportedPasswordType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "{0}" is not a supported WS-Policy document root element.. + /// + internal static string UnsupportedPolicyDocumentRoot { + get { + return ResourceManager.GetString("UnsupportedPolicyDocumentRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Rss20Serializer does not support RSS version '{0}'.. + /// + internal static string UnsupportedRssVersion { + get { + return ResourceManager.GetString("UnsupportedRssVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot import the security policy. The protection requirements for the secure conversation bootstrap binding are not supported. Protection requirements for the secure conversation bootstrap must require both the request and the response to be signed and encrypted.. + /// + internal static string UnsupportedSecureConversationBootstrapProtectionRequirements { + get { + return ResourceManager.GetString("UnsupportedSecureConversationBootstrapProtectionRequirements", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An unsupported security policy assertion was detected during the security policy import: {0}. + /// + internal static string UnsupportedSecurityPolicyAssertion { + get { + return ResourceManager.GetString("UnsupportedSecurityPolicyAssertion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value '{1}' is not supported in this context for the binding security property '{0}'.. + /// + internal static string UnsupportedSecuritySetting { + get { + return ResourceManager.GetString("UnsupportedSecuritySetting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The protection level '{0}' was specified, yet SSL transport security only supports EncryptAndSign.. + /// + internal static string UnsupportedSslProtectionLevel { + get { + return ResourceManager.GetString("UnsupportedSslProtectionLevel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint terminated the sequence before message transfer was complete. This is not supported since all messages could not be transferred. The reliable session was faulted.. + /// + internal static string UnsupportedTerminateSequenceExceptionString { + get { + return ResourceManager.GetString("UnsupportedTerminateSequenceExceptionString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value '{1}' for the '{0}' property is not supported in Windows Store apps.. + /// + internal static string UnsupportedTokenImpersonationLevel { + get { + return ResourceManager.GetString("UnsupportedTokenImpersonationLevel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Token inclusion mode '{0}' is not supported.. + /// + internal static string UnsupportedTokenInclusionMode { + get { + return ResourceManager.GetString("UnsupportedTokenInclusionMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The TrustVersion '{0}', is not supported, only 'TrustVersion.WSTrust13' and 'TrustVersion.WSTrustFeb2005' is supported.. + /// + internal static string UnsupportedTrustVersion { + get { + return ResourceManager.GetString("UnsupportedTrustVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The StreamUpgradeAcceptor specified ({0}) is not supported by this IStreamUpgradeChannelBindingProvider implementation. The most likely cause of this is passing a StreamUpgradeAcceptor that was not created by the StreamUpgradeProvider associated with this IStreamUpgradeChannelBindingProvider implementation.. + /// + internal static string UnsupportedUpgradeAcceptor { + get { + return ResourceManager.GetString("UnsupportedUpgradeAcceptor", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The StreamUpgradeInitiator specified ({0}) is not supported by this IStreamUpgradeChannelBindingProvider implementation. The most likely cause of this is passing a StreamUpgradeInitiator that was not created by the StreamUpgradeProvider associated with the current IStreamUpgradeChannelBindingProvider implementation.. + /// + internal static string UnsupportedUpgradeInitiator { + get { + return ResourceManager.GetString("UnsupportedUpgradeInitiator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unsupported WSDL, only one message part is supported for fault messages. This fault message references zero or more than one message part. If you have edit access to the WSDL file, you can fix the problem by removing the extra message parts such that fault message references just one part.. + /// + internal static string UnsupportedWSDLOnlyOneMessage { + get { + return ResourceManager.GetString("UnsupportedWSDLOnlyOneMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unsupported WSDL, the fault message part must reference an element. This fault message does not reference an element. If you have edit access to the WSDL document, you can fix the problem by referencing a schema element using the 'element' attribute.. + /// + internal static string UnsupportedWSDLTheFault { + get { + return ResourceManager.GetString("UnsupportedWSDLTheFault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Protocol Type {0} was sent to a service that does not support that type of upgrade.. + /// + internal static string UpgradeProtocolNotSupported { + get { + return ResourceManager.GetString("UpgradeProtocolNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .Net Framing upgrade request for {0} was sent to a service that is not setup to receive upgrades.. + /// + internal static string UpgradeRequestToNonupgradableService { + get { + return ResourceManager.GetString("UpgradeRequestToNonupgradableService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The scheme parameter must not be empty.. + /// + internal static string UriGeneratorSchemeMustNotBeEmpty { + get { + return ResourceManager.GetString("UriGeneratorSchemeMustNotBeEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to URI {0} could not be set because its size ({1}) exceeds the max supported size ({2}).. + /// + internal static string UriLengthExceedsMaxSupportedSize { + get { + return ResourceManager.GetString("UriLengthExceedsMaxSupportedSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The given URI must be absolute.. + /// + internal static string UriMustBeAbsolute { + get { + return ResourceManager.GetString("UriMustBeAbsolute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You cannot specify an explicit Proxy Address as well as UseDefaultWebProxy=true in your HTTP Transport Binding Element.. + /// + internal static string UseDefaultWebProxyCantBeUsedWithExplicitProxyAddress { + get { + return ResourceManager.GetString("UseDefaultWebProxyCantBeUsedWithExplicitProxyAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username is not provided. Specify username in ClientCredentials.. + /// + internal static string UserNamePasswordNotProvidedOnClientCredentials { + get { + return ResourceManager.GetString("UserNamePasswordNotProvidedOnClientCredentials", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Changing an inline default value with information from the additional default values is not supported; the default value to the variable '{0}' was already provided as part of the UriTemplate '{1}'. See the documentation for UriTemplate for more details.. + /// + internal static string UTAdditionalDefaultIsInvalid { + get { + return ResourceManager.GetString("UTAdditionalDefaultIsInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to baseAddress must an absolute Uri.. + /// + internal static string UTBadBaseAddress { + get { + return ResourceManager.GetString("UTBadBaseAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The BindByName method of UriTemplate was called with an empty name in the collection of arguments for the bind. Note that the NameValueCollection or the Dictionary passed to BindByName cannot contain an empty (or null) name as a key. See the documentation of UriTemplate for more details.. + /// + internal static string UTBindByNameCalledWithEmptyKey { + get { + return ResourceManager.GetString("UTBindByNameCalledWithEmptyKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UriTemplate '{0}' contains no variables; yet the BindByPosition method was called with {1} values.. + /// + internal static string UTBindByPositionNoVariables { + get { + return ResourceManager.GetString("UTBindByPositionNoVariables", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UriTemplate '{0}' contains {1} path variables and {2} query variables but {3} values were passed to the BindByPosition method. The number of values passed to BindByPosition should be greater than or equal to the number of path variables in the template and cannot be greater than the total number of variables in the template.. + /// + internal static string UTBindByPositionWrongCount { + get { + return ResourceManager.GetString("UTBindByPositionWrongCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate contains a literal value for query key '{0}', but that key also is present in the NameValueCollection. Either remove that key from the NameValueCollection, or else change the UriTemplate to not have a query literal for that key.. + /// + internal static string UTBothLiteralAndNameValueCollectionKey { + get { + return ResourceManager.GetString("UTBothLiteralAndNameValueCollectionKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UTCSR - Lookup was called before match. + /// + internal static string UTCSRLookupBeforeMatch { + get { + return ResourceManager.GetString("UTCSRLookupBeforeMatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The default values of UriTemplate are immutable; they cannot be modified after the construction of the UriTemplate instance. See the documentation of UriTemplate for more details.. + /// + internal static string UTDefaultValuesAreImmutable { + get { + return ResourceManager.GetString("UTDefaultValuesAreImmutable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; the UriTemplate compound path segment '{1}' provides a default value to variable '{2}'. Note that UriTemplate doesn't support default values to variables in compound segments. See the documentation for UriTemplate for more details.. + /// + internal static string UTDefaultValueToCompoundSegmentVar { + get { + return ResourceManager.GetString("UTDefaultValueToCompoundSegmentVar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; the path variable '{1}', defined as part of a compound path segment has been provided with a default value as part of the additional defaults. Note that UriTemplate doesn't support default values to variables in compound segments. See the documentation for UriTemplate for more details.. + /// + internal static string UTDefaultValueToCompoundSegmentVarFromAdditionalDefaults { + get { + return ResourceManager.GetString("UTDefaultValueToCompoundSegmentVarFromAdditionalDefaults", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; the UriTemplate variable declaration '{1}' provides a default value to query variable '{2}'. Note that UriTemplate doesn't support default values to query variables. See the documentation for UriTemplate for more details.. + /// + internal static string UTDefaultValueToQueryVar { + get { + return ResourceManager.GetString("UTDefaultValueToQueryVar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; the query variable '{1}' has been provided a default value as part of the additional defaults. Note that UriTemplate doesn't support default values to query variables. See the documentation for UriTemplate for more details.. + /// + internal static string UTDefaultValueToQueryVarFromAdditionalDefaults { + get { + return ResourceManager.GetString("UTDefaultValueToQueryVarFromAdditionalDefaults", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; UriTemplate does not support two adjacent variables with no literal in compound segments, such as in the segment '{1}'.. + /// + internal static string UTDoesNotSupportAdjacentVarsInCompoundSegment { + get { + return ResourceManager.GetString("UTDoesNotSupportAdjacentVarsInCompoundSegment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; the UriTemplate variable declaration '{1}' provides an empty default value to path variable '{2}'. Note that UriTemplate path variables cannot be bound to a null or empty value. See the documentation for UriTemplate for more details.. + /// + internal static string UTInvalidDefaultPathValue { + get { + return ResourceManager.GetString("UTInvalidDefaultPathValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UriTemplate does not support '{0}' as a valid format for a segment or a query part.. + /// + internal static string UTInvalidFormatSegmentOrQueryPart { + get { + return ResourceManager.GetString("UTInvalidFormatSegmentOrQueryPart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; the UriTemplate variable declaration '{1}' isn't a valid variable construct. Note that UriTemplate variable definitions are either a simple, non-empty, variable name or a 'name=value' format, where the name must not be empty and the value provides a default value to the variable. See the documentation for UriTemplate for more details.. + /// + internal static string UTInvalidVarDeclaration { + get { + return ResourceManager.GetString("UTInvalidVarDeclaration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; the wildcard ('{1}') cannot appear in a variable name or literal, unless as a construct for a wildcard segment. Note that a wildcard segment, either a literal or a variable, is valid only as the last path segment in the template; the wildcard can appear only once. See the documentation for UriTemplate for more details.. + /// + internal static string UTInvalidWildcardInVariableOrLiteral { + get { + return ResourceManager.GetString("UTInvalidWildcardInVariableOrLiteral", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; the additional default value '{1}' has a null value as default value. Note that null default values must be only provided to concrete path variables. See the documentation for UriTemplate for more details.. + /// + internal static string UTNullableDefaultAtAdditionalDefaults { + get { + return ResourceManager.GetString("UTNullableDefaultAtAdditionalDefaults", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; the UriTemplate path variable '{1}' has a null default value while following path variable '{2}' has no defaults or provides a non-null default value. Note that UriTemplate path variable with null default value must be followed only with other path variables with null defaulted values. See the documentation for UriTemplate for more details.. + /// + internal static string UTNullableDefaultMustBeFollowedWithNullables { + get { + return ResourceManager.GetString("UTNullableDefaultMustBeFollowedWithNullables", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; the UriTemplate path variable '{1}' has a null default value while the following path segment '{2}' is not a variable segment with a null default value. Note that UriTemplate path variable with null default values must be followed only with other path variables with null defaulted value. See the documentation for UriTemplate for more details.. + /// + internal static string UTNullableDefaultMustNotBeFollowedWithLiteral { + get { + return ResourceManager.GetString("UTNullableDefaultMustNotBeFollowedWithLiteral", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; the UriTemplate path variable '{1}' has a null default value while the template is finished with a wildcard. Note that UriTemplate path variable with null default values must be followed only with other path variables with null defaulted value. See the documentation for UriTemplate for more details.. + /// + internal static string UTNullableDefaultMustNotBeFollowedWithWildcard { + get { + return ResourceManager.GetString("UTNullableDefaultMustNotBeFollowedWithWildcard", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; the query string cannot end with '&amp;'. See the documentation for UriTemplate for more details.. + /// + internal static string UTQueryCannotEndInAmpersand { + get { + return ResourceManager.GetString("UTQueryCannotEndInAmpersand", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; each portion of the query string must be of the form 'name=value', when value cannot be a compound segment. See the documentation for UriTemplate for more details.. + /// + internal static string UTQueryCannotHaveCompoundValue { + get { + return ResourceManager.GetString("UTQueryCannotHaveCompoundValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; each portion of the query string must be of the form 'name' or of the form 'name=value'. See the documentation for UriTemplate for more details.. + /// + internal static string UTQueryCannotHaveEmptyName { + get { + return ResourceManager.GetString("UTQueryCannotHaveEmptyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; each portion of the query string must be of the form 'name' or of the form 'name=value', where name is a simple literal. See the documentation for UriTemplate for more details.. + /// + internal static string UTQueryMustHaveLiteralNames { + get { + return ResourceManager.GetString("UTQueryMustHaveLiteralNames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; each portion of the query string must be of the form 'name' or of the form 'name=value', where each name is unique. Note that the names are case-insensitive. See the documentation for UriTemplate for more details.. + /// + internal static string UTQueryNamesMustBeUnique { + get { + return ResourceManager.GetString("UTQueryNamesMustBeUnique", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; the UriTemplate last path segment '{1}' provides a default value to final star variable '{2}'. Note that UriTemplate doesn't support default values to final star variable. See the documentation for UriTemplate for more details.. + /// + internal static string UTStarVariableWithDefaults { + get { + return ResourceManager.GetString("UTStarVariableWithDefaults", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; the UriTemplate final star variable '{1}' has been provides a default value as part of the additional defaults information. Note that UriTemplate doesn't support default values to final star variable. See the documentation for UriTemplate for more details.. + /// + internal static string UTStarVariableWithDefaultsFromAdditionalDefaults { + get { + return ResourceManager.GetString("UTStarVariableWithDefaultsFromAdditionalDefaults", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UriTemplateTable does not support '{0}' and '{1}' since they are not equivalent, but cannot be disambiguated because they have equivalent paths and the same common literal values for the query string. See the documentation for UriTemplateTable for more detail.. + /// + internal static string UTTAmbiguousQueries { + get { + return ResourceManager.GetString("UTTAmbiguousQueries", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to BaseAddress must an absolute uri.. + /// + internal static string UTTBaseAddressMustBeAbsolute { + get { + return ResourceManager.GetString("UTTBaseAddressMustBeAbsolute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to BaseAddress has not been set. Set the BaseAddress property before calling MakeReadOnly, Match, or MatchSingle.. + /// + internal static string UTTBaseAddressNotSet { + get { + return ResourceManager.GetString("UTTBaseAddressNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot change BaseAddress after calling MakeReadOnly.. + /// + internal static string UTTCannotChangeBaseAddress { + get { + return ResourceManager.GetString("UTTCannotChangeBaseAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UriTemplateTable (with allowDuplicateEquivalentUriTemplates = false) does not support both '{0}' and '{1}', since they are equivalent. Call MakeReadOnly with allowDuplicateEquivalentUriTemplates = true to use both of these UriTemplates in the same table. See the documentation for UriTemplateTable for more detail.. + /// + internal static string UTTDuplicate { + get { + return ResourceManager.GetString("UTTDuplicate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to KeyValuePairs must have at least one element.. + /// + internal static string UTTEmptyKeyValuePairs { + get { + return ResourceManager.GetString("UTTEmptyKeyValuePairs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An invalid template '{0}' was passed as the key in a pair of template and its associated object. UriTemplateTable Key-Value pairs must always contain a valid UriTemplate object as key; note that UriTemplateTable doesn't support templates that are ignoring the trailing slash in respect to matching. See the documentation for UriTemplateTable for more details.. + /// + internal static string UTTInvalidTemplateKey { + get { + return ResourceManager.GetString("UTTInvalidTemplateKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There were multiple UriTemplateMatch results, but MatchSingle was called.. + /// + internal static string UTTMultipleMatches { + get { + return ResourceManager.GetString("UTTMultipleMatches", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parameter 'baseAddress' must an absolute uri.. + /// + internal static string UTTMustBeAbsolute { + get { + return ResourceManager.GetString("UTTMustBeAbsolute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A null UriTemplate was passed as the key in a pair of template and its associated object. UriTemplateTable Key-Value pairs must always contain a valid UriTemplate object as key. See the documentation for UriTemplateTable for more details.. + /// + internal static string UTTNullTemplateKey { + get { + return ResourceManager.GetString("UTTNullTemplateKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UriTemplateTable does not support multiple templates that have equivalent path as template '{0}' but have different query strings, where the query strings cannot all be disambiguated via literal values. See the documentation for UriTemplateTable for more detail.. + /// + internal static string UTTOtherAmbiguousQueries { + get { + return ResourceManager.GetString("UTTOtherAmbiguousQueries", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The UriTemplate '{0}' is not valid; the UriTemplate variable named '{1}' appears multiple times in the template. Note that UriTemplate variable names are case-insensitive. See the documentation for UriTemplate for more details.. + /// + internal static string UTVarNamesMustBeUnique { + get { + return ResourceManager.GetString("UTVarNamesMustBeUnique", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value of this argument must be greater than 0.. + /// + internal static string ValueMustBeGreaterThanZero { + get { + return ResourceManager.GetString("ValueMustBeGreaterThanZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value of this argument must fall within the range {0} to {1}.. + /// + internal static string ValueMustBeInRange { + get { + return ResourceManager.GetString("ValueMustBeInRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value of this argument must be non-negative.. + /// + internal static string ValueMustBeNonNegative { + get { + return ResourceManager.GetString("ValueMustBeNonNegative", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value of this argument must be positive.. + /// + internal static string ValueMustBePositive { + get { + return ResourceManager.GetString("ValueMustBePositive", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parameter at index {0} is null.. + /// + internal static string VariantArrayNull { + get { + return ResourceManager.GetString("VariantArrayNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WaitForMessage timed out after {0}. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string WaitForMessageTimedOut { + get { + return ResourceManager.GetString("WaitForMessageTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Similar ServiceEndpoints were exported. The WSDL export process was forced to suffix wsdl:binding names to avoid naming conflicts. + /// Similar ServiceEndpoints means different binding instances having the Name: {0} and Namespace: {1} and either the same ContractDescription or at least the same contract Name: {2}.. + /// + internal static string WarnDuplicateBindingQNameNameOnExport { + get { + return ResourceManager.GetString("WarnDuplicateBindingQNameNameOnExport", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An operation was skipped during export because the property '{0}' is set to '{1}'. This operation should be used for server only and should not be exposed from WSDL. + ///Contract Name:{2} + ///Contract Namespace:{3} + ///Operation Name:{4}. + /// + internal static string WarnSkippingOpertationWithSessionOpenNotificationEnabled { + get { + return ResourceManager.GetString("WarnSkippingOpertationWithSessionOpenNotificationEnabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An operation was skipped during export because it has a wildcard action. This is not supported in WSDL. + ///Contract Name:{0} + ///Contract Namespace:{1} + ///Operation Name:{2}. + /// + internal static string WarnSkippingOpertationWithWildcardAction { + get { + return ResourceManager.GetString("WarnSkippingOpertationWithWildcardAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specified argument was out of the range of valid values.. + /// + internal static string WebHeaderArgumentOutOfRange { + get { + return ResourceManager.GetString("WebHeaderArgumentOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter '{0}' cannot be an empty string.. + /// + internal static string WebHeaderEmptyStringCall { + get { + return ResourceManager.GetString("WebHeaderEmptyStringCall", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enumeration has either not started or has already finished.. + /// + internal static string WebHeaderEnumOperationCantHappen { + get { + return ResourceManager.GetString("WebHeaderEnumOperationCantHappen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specified value has invalid Control characters.. + /// + internal static string WebHeaderInvalidControlChars { + get { + return ResourceManager.GetString("WebHeaderInvalidControlChars", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specified value has invalid CRLF characters.. + /// + internal static string WebHeaderInvalidCRLFChars { + get { + return ResourceManager.GetString("WebHeaderInvalidCRLFChars", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specified value has invalid HTTP Header characters.. + /// + internal static string WebHeaderInvalidHeaderChars { + get { + return ResourceManager.GetString("WebHeaderInvalidHeaderChars", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specified value has invalid non-ASCII characters.. + /// + internal static string WebHeaderInvalidNonAsciiChars { + get { + return ResourceManager.GetString("WebHeaderInvalidNonAsciiChars", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to HttpChannelFactory cannot create the channel with shape '{0}' when the {1} of {2} was set as '{3}'.. + /// + internal static string WebSocketCannotCreateRequestClientChannelWithCertainWebSocketTransportUsage { + get { + return ResourceManager.GetString("WebSocketCannotCreateRequestClientChannelWithCertainWebSocketTransportUsage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server didn't accept the connection request. It is possible that the client side message encoding format or message transfer mode doesn't match the setting on the server side. Please check your binding settings.. + /// + internal static string WebSocketContentTypeAndTransferModeMismatchFromServer { + get { + return ResourceManager.GetString("WebSocketContentTypeAndTransferModeMismatchFromServer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server didn't accept the connection request. It is possible that the client side message encoding format doesn't match the setting on the server side. Please check your binding settings.. + /// + internal static string WebSocketContentTypeMismatchFromServer { + get { + return ResourceManager.GetString("WebSocketContentTypeMismatchFromServer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSocket object cannot be accessed directly.. + /// + internal static string WebSocketContextWebSocketCannotBeAccessedError { + get { + return ResourceManager.GetString("WebSocketContextWebSocketCannotBeAccessedError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid value for the {0} type. The type '{1}' does not derive from the appropriate base class '{2}' or is abstract.. + /// + internal static string WebSocketElementConfigInvalidHttpMessageHandlerFactoryType { + get { + return ResourceManager.GetString("WebSocketElementConfigInvalidHttpMessageHandlerFactoryType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This service does not support WebSocket connections.. + /// + internal static string WebSocketEndpointDoesNotSupportWebSocketError { + get { + return ResourceManager.GetString("WebSocketEndpointDoesNotSupportWebSocketError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This service only supports WebSocket connections.. + /// + internal static string WebSocketEndpointOnlySupportWebSocketError { + get { + return ResourceManager.GetString("WebSocketEndpointOnlySupportWebSocketError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value specified ('{0}') contains more than one subprotocol which is not supported.. + /// + internal static string WebSocketInvalidProtocolContainsMultipleSubProtocolString { + get { + return ResourceManager.GetString("WebSocketInvalidProtocolContainsMultipleSubProtocolString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Empty string is not a valid subprotocol value. Please use "null" to specify no value.. + /// + internal static string WebSocketInvalidProtocolEmptySubprotocolString { + get { + return ResourceManager.GetString("WebSocketInvalidProtocolEmptySubprotocolString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subprotocol '{0}' is invalid because it contains the invalid character '{1}'.. + /// + internal static string WebSocketInvalidProtocolInvalidCharInProtocolString { + get { + return ResourceManager.GetString("WebSocketInvalidProtocolInvalidCharInProtocolString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subprotocol '{0}' was not requested by the client - no '{1}' header was included in the request.. + /// + internal static string WebSocketInvalidProtocolNoHeader { + get { + return ResourceManager.GetString("WebSocketInvalidProtocolNoHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subprotocol '{0}' was not requested by the client. The client requested the following subprotocol(s): '{1}'.. + /// + internal static string WebSocketInvalidProtocolNotInClientList { + get { + return ResourceManager.GetString("WebSocketInvalidProtocolNotInClientList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maximum number of pending WebSocket connections ({0}) has been reached. Consider increasing the '{1}' quota on the '{2}' property of the transport.. + /// + internal static string WebSocketMaxPendingConnectionsReached { + get { + return ResourceManager.GetString("WebSocketMaxPendingConnectionsReached", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The WebSocketModule is not loaded. Check if the WebSocket feature is installed and the WebSocketModule is enabled in the list of IIS modules (see http://go.microsoft.com/fwlink/?LinkId=231398 for details).. + /// + internal static string WebSocketModuleNotLoaded { + get { + return ResourceManager.GetString("WebSocketModuleNotLoaded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This method is not supported for this HTTP content.. + /// + internal static string WebSocketOpaqueStreamContentNotSupportError { + get { + return ResourceManager.GetString("WebSocketOpaqueStreamContentNotSupportError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The opening handshake properties associated with the current WebSocket connection are not available. The most likely cause is that the property '{0}' on the '{1}' object returned from the custom '{2}' is not set.. + /// + internal static string WebSocketOpeningHandshakePropertiesNotAvailable { + get { + return ResourceManager.GetString("WebSocketOpeningHandshakePropertiesNotAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' operation timed out after '{1}'. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string WebSocketOperationTimedOut { + get { + return ResourceManager.GetString("WebSocketOperationTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Receive operation timed out after '{0}'. For duplex sessionful channels, the receive timeout is also the idle timeout for the channel, so consider setting a suitably large value for the ReceiveTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string WebSocketReceiveTimedOut { + get { + return ResourceManager.GetString("WebSocketReceiveTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This platform does not support client side WebSockets natively. Support for client side WebSockets can be enabled on this platform by providing an implementation of {0}.. + /// + internal static string WebSocketsClientSideNotSupported { + get { + return ResourceManager.GetString("WebSocketsClientSideNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Send operation timed out after '{0}'. Increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.. + /// + internal static string WebSocketSendTimedOut { + get { + return ResourceManager.GetString("WebSocketSendTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSockets are not supported in the classic pipeline mode. Consider using the integrated pipeline mode for the application pool.. + /// + internal static string WebSocketsNotSupportedInClassicPipeline { + get { + return ResourceManager.GetString("WebSocketsNotSupportedInClassicPipeline", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This platform does not support server side WebSockets.. + /// + internal static string WebSocketsServerSideNotSupported { + get { + return ResourceManager.GetString("WebSocketsServerSideNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot write to the stream because the end of the stream marker was already written.. + /// + internal static string WebSocketStreamWriteCalledAfterEOMSent { + get { + return ResourceManager.GetString("WebSocketStreamWriteCalledAfterEOMSent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server didn't accept the connection request. It is possible that the WebSocket subprotocol sent by your client is not supported by the server. Protocol(s) supported by the server are '{0}'.. + /// + internal static string WebSocketSubProtocolMismatchFromServer { + get { + return ResourceManager.GetString("WebSocketSubProtocolMismatchFromServer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A WebSocket error occurred.. + /// + internal static string WebSocketTransportError { + get { + return ResourceManager.GetString("WebSocketTransportError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the policy being imported for contract '{0}:{1}' is invalid:'{2}'. It should be either '{3}', '{4}' or '{5}'.. + /// + internal static string WebSocketTransportPolicyAssertionInvalid { + get { + return ResourceManager.GetString("WebSocketTransportPolicyAssertionInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected WebSocket close message received when receiving a message.. + /// + internal static string WebSocketUnexpectedCloseMessageError { + get { + return ResourceManager.GetString("WebSocketUnexpectedCloseMessageError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSocket upgrade request failed. Received response status code '{0} ({1})', expected: '{2} ({3})'.. + /// + internal static string WebSocketUpgradeFailedError { + get { + return ResourceManager.GetString("WebSocketUpgradeFailedError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSocket upgrade request failed. The header '{0}' is missing in the response.. + /// + internal static string WebSocketUpgradeFailedHeaderMissingError { + get { + return ResourceManager.GetString("WebSocketUpgradeFailedHeaderMissingError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected response - the server accepted the upgrade request but specified the subprotocol '{0}' when no subprotocol was requested.. + /// + internal static string WebSocketUpgradeFailedInvalidProtocolError { + get { + return ResourceManager.GetString("WebSocketUpgradeFailedInvalidProtocolError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSocket upgrade request failed. The value of header '{0}' is '{1}'. The expected value is '{2}'.. + /// + internal static string WebSocketUpgradeFailedWrongHeaderError { + get { + return ResourceManager.GetString("WebSocketUpgradeFailedWrongHeaderError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The server didn't accept the connection request. It is possible that the WebSocket protocol version on your client doesn't match the one on the server('{0}').. + /// + internal static string WebSocketVersionMismatchFromServer { + get { + return ResourceManager.GetString("WebSocketVersionMismatchFromServer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MSDTC whereabouts information's host name byte count was invalid.. + /// + internal static string WhereaboutsImplausibleHostNameByteCount { + get { + return ResourceManager.GetString("WhereaboutsImplausibleHostNameByteCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MSDTC whereabouts information's protocol count was invalid.. + /// + internal static string WhereaboutsImplausibleProtocolCount { + get { + return ResourceManager.GetString("WhereaboutsImplausibleProtocolCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MSDTC whereabouts information's host name was invalid.. + /// + internal static string WhereaboutsInvalidHostName { + get { + return ResourceManager.GetString("WhereaboutsInvalidHostName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MSDTC whereabouts information did not contain a host name.. + /// + internal static string WhereaboutsNoHostName { + get { + return ResourceManager.GetString("WhereaboutsNoHostName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MSDTC whereabouts information could not be deserialized.. + /// + internal static string WhereaboutsReadFailed { + get { + return ResourceManager.GetString("WhereaboutsReadFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The standard whereabouts signature was missing from the MSDTC whereabouts information.. + /// + internal static string WhereaboutsSignatureMissing { + get { + return ResourceManager.GetString("WhereaboutsSignatureMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WMI GetObject Query: {0}. + /// + internal static string WmiGetObject { + get { + return ResourceManager.GetString("WmiGetObject", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WMI PutInstance Class: {0}. + /// + internal static string WmiPutInstance { + get { + return ResourceManager.GetString("WmiPutInstance", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The number of encrypted keys in the message has exceeded the maximum allowed number '{0}'.. + /// + internal static string WrappedKeyLimitExceeded { + get { + return ResourceManager.GetString("WrappedKeyLimitExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An asynchronous write was called on the stream without a free buffer.. + /// + internal static string WriteAsyncWithoutFreeBuffer { + get { + return ResourceManager.GetString("WriteAsyncWithoutFreeBuffer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An asynchronous write is pending on the stream. Ensure that there are no uncompleted asynchronous writes before attempting the next write. . + /// + internal static string WriterAsyncWritePending { + get { + return ResourceManager.GetString("WriterAsyncWritePending", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint has sent an fault message with an unexpected sequence identifier over a session. The fault may be intended for a different session. The fault reason is: {0} The reliable session was faulted.. + /// + internal static string WrongIdentifierFault { + get { + return ResourceManager.GetString("WrongIdentifierFault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The identity of the security session renew message does not match the identity of the session token.. + /// + internal static string WrongIdentityRenewingToken { + get { + return ResourceManager.GetString("WrongIdentityRenewingToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The WS-AtomicTransaction header was invalid or corrupt.. + /// + internal static string WsatHeaderCorrupt { + get { + return ResourceManager.GetString("WsatHeaderCorrupt", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The WS-AT messaging library failed to initialize.. + /// + internal static string WsatMessagingInitializationFailed { + get { + return ResourceManager.GetString("WsatMessagingInitializationFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The MSDTC transaction manager's WS-AtomicTransaction protocol service '{0}' is disabled and cannot unmarshal incoming transactions.. + /// + internal static string WsatProtocolServiceDisabled { + get { + return ResourceManager.GetString("WsatProtocolServiceDisabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A client-side channel to the WS-AT protocol service could not be created.. + /// + internal static string WsatProxyCreationFailed { + get { + return ResourceManager.GetString("WsatProxyCreationFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The WS-AtomicTransaction transaction formatter could not read the registry value '{0}'.. + /// + internal static string WsatRegistryValueReadError { + get { + return ResourceManager.GetString("WsatRegistryValueReadError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A registration service address could not be created from MSDTC whereabouts information.. + /// + internal static string WsatUriCreationFailed { + get { + return ResourceManager.GetString("WsatUriCreationFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A previous call to this WsdlExporter left it in a faulted state. It is no longer usable.. + /// + internal static string WsdlExporterIsFaulted { + get { + return ResourceManager.GetString("WsdlExporterIsFaulted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A WSDL import extension threw an exception during the BeforeImport call: {0} + ///Error: {1}. + /// + internal static string WsdlExtensionBeforeImportError { + get { + return ResourceManager.GetString("WsdlExtensionBeforeImportError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An exception was thrown in a call to a WSDL export extension: {0} + /// contract: {1}. + /// + internal static string WsdlExtensionContractExportError { + get { + return ResourceManager.GetString("WsdlExtensionContractExportError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An exception was thrown in a call to a WSDL export extension: {0} + /// Endpoint: {1}. + /// + internal static string WsdlExtensionEndpointExportError { + get { + return ResourceManager.GetString("WsdlExtensionEndpointExportError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An exception was thrown while running a WSDL import extension: {0} + ///Error: {1}. + /// + internal static string WsdlExtensionImportError { + get { + return ResourceManager.GetString("WsdlExtensionImportError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type {0} registered as a WSDL extension does not have a public default constructor. WSDL extensions must have a public default constructor.. + /// + internal static string WsdlExtensionTypeRequiresDefaultConstructor { + get { + return ResourceManager.GetString("WsdlExtensionTypeRequiresDefaultConstructor", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ContractDescription argument to ImportEndpoints must be contained in the KnownContracts collection.. + /// + internal static string WsdlImporterContractMustBeInKnownContracts { + get { + return ResourceManager.GetString("WsdlImporterContractMustBeInKnownContracts", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A previous call to this WsdlImporter left it in a faulted state. It is no longer usable.. + /// + internal static string WsdlImporterIsFaulted { + get { + return ResourceManager.GetString("WsdlImporterIsFaulted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error importing a {0} that the {1} is dependent on. + ///XPath to {0}: {2}. + /// + internal static string WsdlImportErrorDependencyDetail { + get { + return ResourceManager.GetString("WsdlImportErrorDependencyDetail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot import {0} + ///Detail: {2} + ///XPath to Error Source: {1}. + /// + internal static string WsdlImportErrorMessageDetail { + get { + return ResourceManager.GetString("WsdlImportErrorMessageDetail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A previous attempt to import this {0} already failed.. + /// + internal static string WsdlItemAlreadyFaulted { + get { + return ResourceManager.GetString("WsdlItemAlreadyFaulted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Binding validation failed because the WSHttpBinding does not support reliable sessions over transport security (HTTPS). The channel factory or service host could not be opened. Use message security for secure reliable messaging over HTTP.. + /// + internal static string WSHttpDoesNotSupportRMWithHttps { + get { + return ResourceManager.GetString("WSHttpDoesNotSupportRMWithHttps", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The sequence has been terminated by the remote endpoint. {0} The reliable session was faulted.. + /// + internal static string WsrmFaultReceived { + get { + return ResourceManager.GetString("WsrmFaultReceived", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while processing a message. {0}. + /// + internal static string WsrmMessageProcessingError { + get { + return ResourceManager.GetString("WsrmMessageProcessingError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The returned {0}Response was carrying the a wsa:RelatesTo header that does not correlate with the wsa:MessageId header on the {0} request. This is a violation of the WS-Addressing request reply protocol. The reliable session cannot continue.. + /// + internal static string WsrmMessageWithWrongRelatesToExceptionString { + get { + return ResourceManager.GetString("WsrmMessageWithWrongRelatesToExceptionString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint has responded to a {0} request message with an invalid reply. The reply has a wsa:RelatesTo header with an unexpected identifier. The reliable session cannot continue.. + /// + internal static string WsrmMessageWithWrongRelatesToFaultString { + get { + return ResourceManager.GetString("WsrmMessageWithWrongRelatesToFaultString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remote endpoint sent a wsrm:{0} request message with a wsa:ReplyTo address containing a URI which is not equivalent to the remote address. This is not supported. The reliable session was faulted.. + /// + internal static string WsrmRequestIncorrectReplyToExceptionString { + get { + return ResourceManager.GetString("WsrmRequestIncorrectReplyToExceptionString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The wsrm:{0} request message's wsa:ReplyTo address containing a URI which is not equivalent to the remote address. This is not supported. The reliable session was faulted.. + /// + internal static string WsrmRequestIncorrectReplyToFaultString { + get { + return ResourceManager.GetString("WsrmRequestIncorrectReplyToFaultString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The incoming message is not a WS-ReliableMessaging 1.1 message and could not be processed.. + /// + internal static string WsrmRequiredExceptionString { + get { + return ResourceManager.GetString("WsrmRequiredExceptionString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The RM server requires the use of WS-ReliableMessaging 1.1 protocol. This is likely caused by a binding mismatch.. + /// + internal static string WsrmRequiredFaultString { + get { + return ResourceManager.GetString("WsrmRequiredFaultString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to X509Chain does not have any valid certificates.. + /// + internal static string X509ChainIsEmpty { + get { + return ResourceManager.GetString("X509ChainIsEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find '{0}' value in dictionary string.. + /// + internal static string XDCannotFindValueInDictionaryString { + get { + return ResourceManager.GetString("XDCannotFindValueInDictionaryString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An internal error has occurred. The XML buffer is not in the correct state to perform the operation.. + /// + internal static string XmlBufferInInvalidState { + get { + return ResourceManager.GetString("XmlBufferInInvalidState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The size necessary to buffer the XML content exceeded the buffer quota.. + /// + internal static string XmlBufferQuotaExceeded { + get { + return ResourceManager.GetString("XmlBufferQuotaExceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Context protocol was unable to parse the callback context header.. + /// + internal static string XmlFormatViolationInCallbackContextHeader { + get { + return ResourceManager.GetString("XmlFormatViolationInCallbackContextHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Context protocol was unable to parse the context header.. + /// + internal static string XmlFormatViolationInContextHeader { + get { + return ResourceManager.GetString("XmlFormatViolationInContextHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cdata '{0}'. + /// + internal static string XmlFoundCData { + get { + return ResourceManager.GetString("XmlFoundCData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to comment '{0}'. + /// + internal static string XmlFoundComment { + get { + return ResourceManager.GetString("XmlFoundComment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to element '{0}' from namespace '{1}'. + /// + internal static string XmlFoundElement { + get { + return ResourceManager.GetString("XmlFoundElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to end element '{0}' from namespace '{1}'. + /// + internal static string XmlFoundEndElement { + get { + return ResourceManager.GetString("XmlFoundEndElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to end of file. + /// + internal static string XmlFoundEndOfFile { + get { + return ResourceManager.GetString("XmlFoundEndOfFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node {0}. + /// + internal static string XmlFoundNodeType { + get { + return ResourceManager.GetString("XmlFoundNodeType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to text '{0}'. + /// + internal static string XmlFoundText { + get { + return ResourceManager.GetString("XmlFoundText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Required xml:lang attribute value is missing.. + /// + internal static string XmlLangAttributeMissing { + get { + return ResourceManager.GetString("XmlLangAttributeMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Line {0}, position {1}.. + /// + internal static string XmlLineInfo { + get { + return ResourceManager.GetString("XmlLineInfo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The XmlReader is not currently in a node of type Element.. + /// + internal static string XmlNodeIsNotAnElement { + get { + return ResourceManager.GetString("XmlNodeIsNotAnElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start element expected. Found {0}.. + /// + internal static string XmlStartElementExpected { + get { + return ResourceManager.GetString("XmlStartElementExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XPath:{0}. + /// + internal static string XPathPointer { + get { + return ResourceManager.GetString("XPathPointer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "XPath Unavailable". + /// + internal static string XPathUnavailable { + get { + return ResourceManager.GetString("XPathUnavailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Missing required '{0}' attribute.. + /// + internal static string XsdMissingRequiredAttribute1 { + get { + return ResourceManager.GetString("XsdMissingRequiredAttribute1", resourceCulture); + } + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/Resources/SR.resx b/src/System.ServiceModel.Syndication/src/Resources/SR.resx new file mode 100644 index 000000000000..5534250e892a --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/Resources/SR.resx @@ -0,0 +1,7928 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The XmlReader is not currently in a node of type Element. + + + The hour can't be lower than 0 or greater than 23. + + + No IPEndpoints were found for host {0}. + + + No DNS entries exist for host {0}. + + + Attribute '{0}' is required on element '{1}'. + + + Crypto algorithm {0} not supported in this context. + + + The custom crypto algorithm '{0}' obtained using CryptoConfig is not a valid or supported hash algorithm. + + + The client credential entered was invalid. + + + Either the client credential was invalid or there was an error collecting the client credentials by the SSPI. + + + The custom crypto algorithm '{0}' obtained using CryptoConfig is not a valid or supported asymmetric signature algorithm. + + + The security token serializer must be specified on the security token provider. + + + The key length '{0}' is not a multiple of 8 for symmetric keys. + + + The channel behaviors configured for the issuer address '{0}' cannot contain a behavior of type '{1}'. + + + Operation Action={0} + + + The security token manager cannot create a token provider for requirement '{0}'. + + + The security token manager cannot create a token authenticator for requirement '{0}'. + + + The signature verification failed. Please see inner exception for fault details. + + + The security token manager cannot create a token serializer for security token version '{0}'. + + + The supporting signature is not signed with a derived key. The binding's supporting token parameter '{0}' requires key derivation. + + + The primary signature is not signed with a derived key. The binding's primary token parameter '{0}' requires key derivation. + + + The primary signature is not signed with a key derived from the encrypted key. The binding's token parameter '{0}' requires key derivation. + + + The message is not encrypted with a key derived from the encrypted key. The binding's token parameter '{0}' requires key derivation. + + + The DataProtectionSecurityStateEncoder is unable to decode the byte array. Ensure that a 'UserProfile' is loaded, if this is a 'web farm scenario' ensure all servers are running as the same user with the roaming profiles or provide a custom SecurityStateEncoder'. + + + The DataProtectionSecurityStateEncoder is unable to encode the byte array. Ensure that a 'UserProfile' is loaded, if this is a 'web farm scenario' ensure all servers are running as the same user with the roaming profiles or provide a custom SecurityStateEncoder'. + + + The message is not encrypted with a key derived from the encryption token. The binding's token parameter '{0}' requires key derivation. + + + The security token manager requires the security binding element to be specified in order to create a token authenticator for requirement '{0}'. + + + The security token manager requires the security binding element to be specified in order to create a token provider for requirement '{0}'. + + + The security session received an unexpected close response from the other party. + + + The security session received an unexpected close from the other party. + + + The service was unable to verify the cipher strengths negotiated as part of the SSL handshake. + + + SecurityVersion.WSSecurityJan2004 does not support header encryption. Header with name '{0}' and namespace '{1}' is configured for encryption. Consider using SecurityVersion.WsSecurity11 and above or use transport security to encrypt the full message. + + + The Header ('{0}', '{1}') was encrypted but not signed. All encrypted headers outside the security header should be signed. + + + Unable to obtain XmlDictionaryReaderQuotas from the Binding. If you have specified a custom EncodingBindingElement, verify that the EncodingBindingElement can handle XmlDictionaryReaderQuotas in its GetProperty<T>() method. + + + SecurityVersion.WSSecurityJan2004 does not support header decryption. Use SecurityVersion.WsSecurity11 and above or use transport security to encrypt the full message. + + + Unable to decrypt an encrypted data block. Please verify that the encryption algorithm and keys used by the sender and receiver match. + + + The authenticate method in the ServiceAuthenticationManager returned null. If you do not want to return any authorization policies in the collection then return an empty ReadOnlyCollection instead. + + + There was an error serializing the security token. Please see the inner exception for more details. + + + There was an error creating the security key identifier clause from the security token XML. Please see the inner exception for more details. + + + There was an error deserializing the security token XML. Please see the inner exception for more details. + + + The token requirement '{0}' does not specify the target address. This is required by the token manager for creating the corresponding security token provider. + + + The derived key has not been computed for the security token. + + + The binding ('{0}', '{1}') has been configured with a security algorithm suite '{2}' that is incompatible with the issued token key size '{3}' specified on the binding. + + + The IssuedToken security authentication mode requires the issued token to contain a symmetric key. + + + The binding ('{0}', '{1}') uses an Issued Token with Bearer Key Type in a invalid context. The Issued Token with a Bearer Key Type can only be used as a Signed Supporting token or a Signed Encrypted Supporting token. See the SecurityBindingElement.EndpointSupportingTokenParameters property. + + + Policy for multiple issuer endpoints was retrieved from '{0}' but the relying party's policy does not specify which issuer endpoint to use. One of the endpoints was selected as the issuer endpoint to use. If you are using svcutil, the other endpoints will be available in commented form in the configuration as <alternativeIssuedTokenParameters>. Check the configuration to ensure that the right issuer endpoint was selected. + + + The AuthenticationManager cannot be added to the binding parameters because the binding parameters already contains a AuthenticationManager '{0}'. If you are configuring a custom AuthenticationManager for the service, please first remove any existing AuthenticationManagers from the behaviors collection before adding the custom AuthenticationManager. + + + The AuthenticationSchemes cannot be added to the binding parameters because the binding parameters already contains AuthenticationSchemes '{0}'. If you are configuring custom AuthenticationSchemes for the service, please first remove any existing AuthenticationSchemes from the behaviors collection before adding custom AuthenticationSchemes. + + + Unable to find a SecurityBindingElement. + + + The ServiceCredentials cannot be added to the binding parameters because the binding parameters already contains a SecurityCredentialsManager '{0}'. If you are configuring custom credentials for the service, please first remove any existing ServiceCredentials from the behaviors collection before adding the custom credential. + + + The ClientCredentials cannot be added to the binding parameters because the binding parameters already contains a SecurityCredentialsManager '{0}'. If you are configuring custom credentials for the channel, please first remove any existing ClientCredentials from the behaviors collection before adding the custom credential. + + + The binding ('{0}', '{1}') has been configured with a MutualCertificateDuplexBindingElement that requires a client certificate. The client certificate is currently missing. + + + The binding ('{0}', '{1}') is configured with a security token parameter '{2}' that has an incompatible security token inclusion mode '{3}'. Specify an alternate security token inclusion mode (for example, '{4}'). + + + Unable to create a bi-directional (request-reply or duplex) channel for security negotiation. Please ensure that the binding is capable of creating a bi-directional channel. + + + There are too many active security negotiations or secure conversations at the service. Please retry later. + + + There are too many pending secure conversations on the server. Please retry later. + + + The RequestSecurityToken message does not match the endpoint filters the service '{0}' is expecting incoming messages to match. This may be because the RequestSecurityToken was intended to be sent to a different service. + + + The security session requires a security token authenticator that implements '{0}'. '{1}' does not implement '{0}'. + + + The security session requires a security token resolver that implements '{1}'. The security token resolver '{0}' does not implement '{1}'. + + + The session security token authenticator returned a token of type '{0}'. The token type expected is '{1}'. + + + The session security token provider returned a token of type '{0}'. The token type expected is '{1}'. + + + The security standards manager was not specified on '{0}'. + + + The security negotiation message with action '{0}' is larger than the maximum allowed buffer size '{1}'. If you are using a streamed transport consider increasing the maximum buffer size on the transport. + + + The channel demuxer Open failed previously with exception '{0}'. + + + The security channel listener was not specified on '{0}'. + + + ExtendedProtectionPolicy specified a PolicyEnforcement of 'Always' which is not supported for the authentication mode requested. This prevents the ExtendedProtectionPolicy from being enforced. For StandardBindings use a SecurityMode of TransportWithMessageCredential and a ClientCredential type of Windows. For CustomBindings use SspiNegotiationOverTransport or KerberosOverTransport. Alternatively, specify a PolicyEnforcement of 'Never'. + + + ExtendedProtectionPolicy specified a PolicyEnforcement of 'Always' and a ChannelBinding was not found. This prevents the ExtendedProtectionPolicy from being enforced. Change the binding to make a ChannelBinding available, for StandardBindings use a SecurityMode of TransportWithMessageCredential and a ClientCredential type of Windows. For CustomBindings use SspiNegotiationOverTransport or KerberosOverTransport. Alternatively, specify a PolicyEnforcement of 'Never'. + + + The security settings lifetime manager was not specified on '{0}'. + + + The listener is not accepting new secure conversations because it is closing. + + + The server is not accepting new secure conversations currently because it is closing. Please retry later. + + + The cipher key negotiated by SSL is too small ('{0}' bits). Keys of such lengths are not allowed as they may result in information disclosure. Please configure the initiator machine to negotiate SSL cipher keys that are '{1}' bits or longer. + + + The length ('{0}' bytes) of the derived key's Nonce exceeds the maximum length ('{1}' bytes) allowed. + + + The length ('{0}' bytes) of the derived key's Label exceeds the maximum length ('{1}' bytes) allowed. + + + The derived key's Offset ('{0}' bytes) exceeds the maximum offset ('{1}' bytes) allowed. + + + The derived key's generation ('{0}') and length ('{1}' bytes) result in a key derivation offset that is greater than the maximum offset ('{2}' bytes) allowed. + + + The number of derived keys in the message has exceeded the maximum allowed number '{0}'. + + + The number of encrypted keys in the message has exceeded the maximum allowed number '{0}'. + + + Unable to finish reading Base64 data as the given buffer quota has been exceeded. Buffer quota: {0}. Consider increasing the MaxReceivedMessageSize quota on the TransportBindingElement. Please note that a very high value for MaxReceivedMessageSize will result in buffering a large message and might open the system to DOS attacks. + + + Manual addressing is not supported with message level security. Configure the binding ('{0}', '{1}') to use transport security or to not do manual addressing. + + + The target service address was not specified on '{0}'. + + + The issued token cache was not specified on '{0}'. + + + The security algorithm suite was not specified on '{0}'. + + + A security token ('{0}', '{1}') was found outside the security header. The message may have been altered in transit. + + + The SecurityTokenProvider '{0}' could not resolve the token. + + + A secure conversation cancellation is not allowed by the binding. + + + The security binding element for bootstrap security was not specified on '{0}'. + + + The context for building the issuer channel was not specified on '{0}'. + + + The binding to use to communicate to the federation service at '{0}' is not specified. + + + It is likely that certificate '{0}' may not have a private key that is capable of key exchange or the process may not have access rights for the private key. Please see inner exception for detail. + + + The certificate '{0}' must have a private key. The process must have access rights for the private key. + + + No outgoing EndpointAddress is available to check the identity on a message to be sent. + + + No outgoing EndpointAddress is available to check the identity on a received reply. + + + No signing token is available to do an incoming identity check. + + + The PSHA1 key length '{0}' is invalid. + + + Clone() was not implemented properly by '{0}'. The cloned object was '{1}'. + + + The issued token is of unexpected type '{0}'. Expected token type '{1}'. + + + The service operation '{0}' that belongs to the contract with the '{1}' name and the '{2}' namespace does not allow impersonation. + + + The RequestSecurityTokenResponse has multiple RequestedSecurityToken elements. + + + The RequestSecurityTokenResponse has multiple RequestedProofToken elements. + + + The proof token XML element is not expected in the response. + + + The key length '{0}' requested is invalid. + + + The security token parameters to use for the issued token are not set on '{0}'. + + + The message could not be processed because the action '{0}' is invalid or unrecognized. + + + Token inclusion mode '{0}' is not supported. + + + The policy to import a process cannot import a binding for contract ({0},{1}). The protection requirements for the binding are not compatible with a binding already imported for the contract. You must reconfigure the binding. + + + The symmetric security protocol can either be configured with a symmetric token provider and a symmetric token authenticator or an asymmetric token provider. It cannot be configured with both. + + + ClientCredentialType.None is not valid for the TransportWithMessageCredential security mode. Specify a message credential type or use a different security mode. + + + The security session id '{0}' is already present in the filter table. + + + A supporting token that satisfies parameters '{0}' and attachment mode '{1}' was not provided. + + + The supporting token provided for parameters '{0}' did not endorse the primary signature. + + + The supporting token provided for parameters '{0}' was not signed as part of the primary signature. + + + The supporting token provided for parameters '{0}' was not encrypted. + + + A basic token is not expected in the security header in this context. + + + The request for security token could not be satisfied because authentication failed. + + + The caller was not authenticated by the service. + + + The request for security token has invalid or malformed elements. + + + A signed supporting token is not expected in the security header in this context. + + + Security token parameters must be specified with supporting tokens for each message. + + + The signature token '{0}' is not the same token as the encryption token '{1}'. + + + The reverting operation failed with the exception '{0}'. + + + Unrecognized supporting token '{0}' was encountered. + + + More than one supporting signature was encountered using the same supporting token '{0}'. + + + An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. + + + At least one security token in the message could not be validated. + + + The message could not be processed. This is most likely because the action '{0}' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding. + + + The security context token is expired or is not valid. The message was not processed. + + + Transport security negotiation failed due to an underlying IO error: {0}. + + + The security negotiation with '{0}' cannot be initiated because the confidential endpoint address header ('{1}', '{2}') cannot be encrypted during the course of the negotiation. + + + An error occurred when processing the security tokens in the message. + + + An error occurred when verifying security for the message. + + + The service does not allow you to log on anonymously. + + + Obtaining metadata from issuer '{0}' failed with error '{1}'. + + + Importing metadata from issuer '{0}' failed with error '{1}'. + + + Multiple correlation tokens were found in the security correlation state. + + + No correlation token was found in the security correlation state. + + + Multiple supporting token authenticators with the token parameter type equal to '{0}' cannot be specified. If more than one Supporting Token of the same type is expected in the response, then configure the supporting token collection with just one entry for that SecurityTokenParameters. The SecurityTokenAuthenticator that gets created from the SecurityTokenParameters will be used to authenticate multiple tokens. It is not possible to add SecurityTokenParameters of the same type in the SupportingTokenParameters collection or repeat it across EndpointSupportingTokenParameters and OperationSupportingTokenParameters. + + + A leg of the federated security chain contains multiple IssuedSecurityTokenParameters. The InfoCard system only supports one IssuedSecurityTokenParameters for each leg. + + + An unrecognized token authenticator '{0}' was used for token processing. + + + The SecurityTokenParameters and SecurityToken tuple specified for use in the security header must both be null or must both be non-null. + + + The CloneCore method of {0} type returned an invalid result. + + + Certificate-based client authentication is not supported in TransportCredentialOnly security mode. Select the Transport security mode. + + + BasicHttp binding requires that BasicHttpBinding.Security.Message.ClientCredentialType be equivalent to the BasicHttpMessageCredentialType.Certificate credential type for secure messages. Select Transport or TransportWithMessageCredential security for UserName credentials. + + + The client must provide key entropy in key entropy mode '{0}'. + + + A Proof Token was found in the response that was returned by the Security Token Service for a Bearer Key Type token request. Note that Proof Tokens should not be generated when a Bearer Key Type request is made. + + + Bearer Key Type is not supported with WSFederationHttpBinding. Please use WS2007FederationHttpBinding. + + + Unable to create Key Type element for the Key Type '{0}'. This might be due to a wrong version of MessageSecurityVersion set on the SecurityBindingElement. + + + The issuer cannot provide key entropy or a proof token in key entropy mode '{0}'. + + + The client cannot provide key entropy in key entropy mode '{0}'. + + + The issuer must provide a proof token in key entropy mode '{0}'. + + + The issuer must provide a computed key in key entropy mode '{0}'. + + + The issuer must provide key entropy in key entropy mode '{0}'. + + + The issuer cannot provide a computed key in key entropy mode '{0}'. + + + The computed key algorithm '{0}' is not supported. + + + The ReplayWindow and ClockSkew cannot be the maximum possible value when replay detection is enabled. + + + The session channel must be opened before the session ID can be accessed. + + + The binding ('{0}','{1}') for contract ('{2}','{3}') has been configured with an incompatible security version that does not support unattached references to EncryptedKeys. Use '{4}' or higher as the security version for the binding. + + + The '{0}','{1}' binding for the '{2}','{3}' contract is configured with a security version that does not support external references to X.509 tokens using the certificate's thumbprint value. Use '{4}' or higher as the security version for the binding. + + + The SecurityBinding for the ('{0}','{1}') binding for the ('{2}','{3}') contract only supports the OneWay operation. + + + Cannot map Windows user '{0}' to a UserPrincipalName that can be used for S4U impersonation. + + + Resolving an External reference token requires appropriate SecurityTokenParameters to be specified. + + + The SecurityContextSecurityToken's key needs to be renewed. + + + The client's security session was not able to close its output session within the configured timeout ({0}). + + + Client is unable to finish the security negotiation within the configured timeout ({0}). The current negotiation leg is {1} ({2}). + + + Client is unable to request the security session within the configured timeout ({0}). + + + The service's security session was not able to close its output session within the configured timeout ({0}). + + + The service's security session did not receive a 'close' message from the client within the configured timeout ({0}). + + + The client's security session did not receive a 'close response' message from the service within the configured timeout ({0}). + + + Cannot renew the security session key. + + + Cannot renew the security session key. Session Key Renewal is not supported. + + + Error parsing SecurityContextSecurityToken Cookie XML. + + + The SecurityContextSecurityToken's Cookie element either does not contain '{0}' or has a wrong value for it. + + + Error decoding the Cookie element of SecurityContextSecurityToken. + + + Issuing cookie SecurityContextSecurityToken is not supported. + + + Security policy import failed. The security policy contains supporting token requirements at the operation scope. The contract description does not specify the action for the request message associated with this operation. + + + Signature confirmation is not expected in the security header. + + + The signature confirmation elements cannot occur after the primary signature. + + + Signature confirmation was expected to be present in the security header. + + + The SecurityVersion '{0}' does not support signature confirmation. Use a later SecurityVersion. + + + The protocol factory must support Request/Reply security in order to offer signature confirmation. + + + Not all the signatures in the request message were confirmed in the reply message. + + + The request did not have any signatures but the reply has signature confirmations. + + + There are too many renewed session keys that have not been used. + + + The session key must be renewed before it can secure application messages. + + + The token's crypto collection has multiple objects of type '{0}'. + + + The token's crypto collection does not support algorithm '{0}'. + + + SymmetricSecurityBindingElement cannot build a channel or listener factory. The ProtectionTokenParameters property is required but not set. Binding element configuration: {0} + + + AsymmetricSecurityBindingElement cannot build a channel or listener factory. The InitiatorTokenParameters property is required but not set. Binding element configuration: {0} + + + AsymmetricSecurityBindingElement cannot build a channel or listener factory. The RecipientTokenParameters property is required but not set. Binding element configuration: {0} + + + The service cannot cache the negotiation state as the capacity '{0}' has been reached. Retry the request. + + + Internal SSL error (refer to Win32 status code for details). Check the server certificate to determine if it is capable of key exchange. + + + The key rollover interval cannot be greater than the key renewal interval. + + + The request message must be protected. This is required by an operation of the contract ('{0}','{1}'). The protection must be provided by the binding ('{2}','{3}'). + + + The response message must be protected. This is required by an operation of the contract ('{0}', '{1}'). The protection must be provided by the binding ('{2}', '{3}'). + + + The contract ('{0}','{1}') contains some unknown header ('{2}','{3}') which cannot be secured. Please choose ProtectionLevel.None for this header. + + + The binding ('{0}','{1}') supports streaming which cannot be configured together with message level security. Consider choosing a different transfer mode or choosing the transport level security. + + + The supporting token in the renew message has a different generation '{0}' than the current session token's generation '{1}'. + + + Security Support Provider Interface (SSPI) authentication failed. The server may not be running in an account with identity '{0}'. If the server is running in a service account (Network Service for example), specify the account's ServicePrincipalName as the identity in the EndpointAddress for the server. If the server is running in a user account, specify the account's UserPrincipalName as the identity in the EndpointAddress for the server. + + + For this security protocol, the incoming signing token must be an EncryptedKey. + + + The security session was terminated This may be because no messages were received on the session for too long. + + + No AppliesTo element is present in the deserialized RequestSecurityToken/RequestSecurityTokenResponse. + + + Symmetric Key length {0} is not supported by the algorithm suite '{1}'. + + + For replay detection to be done ProtectionLevel must be Sign or EncryptAndSign. + + + Can't infer an external reference for '{0}' token type. + + + Unable to create Attached or Unattached reference for '{0}'. + + + The configured Trust version does not support sessions. Use WSTrustFeb2005 or above. + + + The configured WS-Trust version does not support issued tokens. WS-Trust February 2005 or later is required. + + + The binding ('{0}','{1}') for contract ('{2}','{3}') supports impersonation only on Windows 2003 Server and newer version of Windows. Use SspiNegotiated authentication and a binding with Secure Conversation with cancellation enabled. + + + Impersonation using the client token is not possible. The binding ('{0}', '{1}') for contract ('{2}', '{3}') uses the Username Security Token for client authentication with a Membership Provider registered. Use a different type of security token for the client. + + + Cannot establish a reliable session without secure conversation. Enable secure conversation. + + + Failed to revert impersonation. {0} + + + In order to flow a transaction, flowing issued tokens must also be supported. + + + The configured SecurityVersion does not support signature confirmation. Use WsSecurity11 or above. + + + The configured SecureConversation version does not support sessions. Use WSSecureConversationFeb2005 or above. + + + SOAP security negotiation failed. See inner exception for more details. + + + SOAP security negotiation with '{0}' for target '{1}' failed. See inner exception for more details. + + + The one-way operation returned a fault message. The reason for the fault was '{0}'. + + + The one-way operation returned a fault message with Action='{0}'. + + + The one-way operation returned a non-null message with Action='{0}'. + + + Cannot find the security session with the ID '{0}'. + + + The SecurityContextSecurityToken with Context-id={0} (generation-id={1}) has expired. + + + The SecurityContextSecurityToken with Context-id={0} (no key generation-id) has expired. + + + Security sessions require all messages to be signed. + + + Required timestamp missing in security header. + + + The request message in the request context received from channel '{0}' is null. + + + The key effective and expiration times must be bounded by the token effective and expiration times. + + + The valid from time is greater than the valid to time. + + + No session token was present in the message. + + + Key length '{0}' is not a multiple of 8 for symmetric keys. + + + Invalid binary representation of an X.509 certificate. + + + Security policy export failed. The binding contains a TransportSecurityBindingElement but no transport binding element that implements ITransportTokenAssertionProvider. Policy export for such a binding is not supported. Make sure the transport binding element in the binding implements the ITransportTokenAssertionProvider interface. + + + Cannot import the security policy. The protection requirements for the secure conversation bootstrap binding are not supported. Protection requirements for the secure conversation bootstrap must require both the request and the response to be signed and encrypted. + + + Cannot import the policy. The value of the attribute '{0}' must be either 'true', 'false', '1' or '0'. The following error occurred: '{1}'. + + + The security policy expert failed. The provided transport token assertion of type '{0}' did not create a transport token assertion to include the sp:TransportBinding security policy assertion. + + + Message security policy for the '{0}' action requires confidentiality without integrity. Confidentiality without integrity is not supported. + + + The primary signature must be encrypted. + + + A symmetric crypto could not be created from token '{0}'. + + + The key size requirements for the '{0}' algorithm suite are not met by the '{1}' token which has key size of '{2}'. + + + The received message does not meet the required message protection order '{0}'. + + + Primary signature must be computed before supporting token signatures. + + + Element to sign must have id. + + + The token Serializer cannot serialize '{0}'. If this is a custom type you must supply a custom serializer. + + + Signing without primary signature requires timestamp. + + + This operation cannot be done after processing is started. + + + The recursive policy fetching limit has been reached. Check to determine if there is a loop in the federation service chain. + + + The ('{0}', '{1}') signed header contains the ('{2}', '{3}') attribute. The expected attribute is ('{4}', '{5}'). + + + The address of the security token issuer is not specified. An explicit issuer address must be specified in the binding for target '{0}' or the local issuer address must be configured in the credentials. + + + More than one SecurityBindingElement found in the binding ('{0}', '{1}) for contract ('{2}', '{3}'). Only one SecurityBindingElement is allowed. + + + ClientCredentials cannot create a local token provider for token requirement {0}. + + + A security policy was imported for the endpoint. The security policy contains requirements that cannot be represented in a Windows Communication Foundation configuration. Look for a comment about the SecurityBindingElement parameters that are required in the configuration file that was generated. Create the correct binding element with code. The binding configuration that is in the configuration file is not secure. + + + The configuration schema is insufficient to describe the non-standard configuration of the following security binding element: + + + The wsdl schema that was used to create this configuration file contained a 'RequireIssuerSerialReference' assertion for a X509Token. This can not be represented in configuration, you will need to programatically adjust the appropriate X509SecurityTokenParameters.X509KeyIdentifierClauseType to X509KeyIdentifierClauseType.IssuerSerial. The default of X509KeyIdentifierClauseType.Thumbprint will be used, which may cause interop issues. + + + The security protocol '{0}' cannot do replay detection. + + + Security processor was unable to find a security header with actor '{0}' in the message. This might be because the message is an unsecured fault or because there is a binding mismatch between the communicating parties. This can occur if the service is configured for security and the client is not using security. + + + Security processor was unable to find a security header in the message. This might be because the message is an unsecured fault or because there is a binding mismatch between the communicating parties. This can occur if the service is configured for security and the client is not using security. + + + No primary signature available for supporting token signature verification. + + + Supporting token signatures not expected. + + + Cannot read the token from the '{0}' element with the '{1}' namespace for BinarySecretSecurityToken, with a '{2}' ValueType. If this element is expected to be valid, ensure that security is configured to consume tokens with the name, namespace and value type specified. + + + Element '{0}' with namespace '{1}' not found. + + + Expected element '{0}' or element '{1}' (from namespace '{2}'). + + + AcceleratedTokenAuthenticator does not expect RequestSecurityTokenResponse from the client. + + + The '{0}' binding with the '{1}' namespace is configured to issue cookie security context tokens. COM+ Integration services does not support cookie security context tokens. + + + The signature must be in the security header. + + + The '{0}' required message part was not signed. + + + The '{0}', '{1}' required message part was not signed. + + + The '{0}' required message part was not encrypted. + + + The '{0}', '{1}' required message part was not encrypted. + + + Signature verification failed. + + + Cannot issue the token type '{0}'. + + + There is no negotiation message to send. + + + The issued token has an invalid key size '{0}'. + + + Cannot determine the key size of the issued token. + + + The negotiation has not yet completed. + + + The negotiation has already completed. + + + Request Message is missing a MessageID header. One is required to correlate a reply. + + + Cannot create a security session. Retry later. + + + The security session with id '{0}' is already pending. + + + No security session with id '{0}' is pending. + + + No security session listener was found for message with action '{0}'. + + + The session token was not closed by the server. + + + '{0}' protocol can only be used by the Initiator. + + + '{0}' protocol can only be used at the Recipient. + + + Unexpected code path for server security application, sending outgoing message on Recipient. + + + Only body return values are supported currently for protection, MessagePartDescription was specified. + + + Unknown token attachment mode: {0}. + + + Security protocol must be '{0}', type is: '{1}'.; + + + The initial request context was already specified. Can not create two for same message. + + + {0}.OnCloseMessageReceived when state == Created. + + + Shutdown request was not received. + + + Unknown filter type: '{0}'. + + + Standards manager of filter does not match that of filter table. Can not have two different filters. + + + Session filter's isStrictMode differs from filter table's isStrictMode. + + + SecuritySessionServerSettings.CreateAcceptor, channelAcceptor must be null, can not create twice. + + + Invalid TransactionFlowOption value. + + + Security token manager could not parse token with name '{0}', namespace '{1}', valueType '{2}'. + + + Security negotiation message has incorrect action '{0}'. + + + The specified key size {0} is invalid. The key size must be between {1} and {2}. + + + Could not get token information (error=0x{0:X}). + + + Unexpected end of file. + + + The security timestamp is invalid because its creation time ('{0}') is greater than or equal to its expiration time ('{1}'). + + + The security timestamp is stale because its expiration time ('{0}') is in the past. Current time is '{1}' and allowed clock skew is '{2}'. + + + The security timestamp is invalid because its creation time ('{0}') is in the future. Current time is '{1}' and allowed clock skew is '{2}'. + + + The security timestamp is stale because its creation time ('{0}') is too far back in the past. Current time is '{1}', maximum timestamp lifetime is '{2}' and allowed clock skew is '{3}'. + + + The nonce is invalid or replayed. + + + Message part specification must be made constant before being set. + + + Issuer entropy is not BinarySecretSecurityToken or WrappedKeySecurityToken. + + + No RequestSecurityTokenResponse elements were found. + + + The SecurityContextSecurityToken does not have a cookie. + + + TokenProvider returned token of incorrect type '{0}'. + + + {0} is not available in deserialized RequestSecurityToken. + + + {0} is only available in a deserialized RequestSecurityToken. + + + {0} is not available in deserialized RequestSecurityTokenResponse. + + + {0} is only available in a deserialized RequestSecurityTokenResponse. + + + The RequestSecurityTokenResponseCollection received has more than one RequestSecurityTokenResponse element. Only one RequestSecurityTokenResponse element was expected. + + + VirtualPathExtension is not allowed to be removed. + + + The protocol '{0}' is not supported. + + + The BaseUriWithWildcard object has invalid fields after deserialization. + + + Registered relativeAddress '{0}' in configuration file is not a valid one. Possible causes could be : You specified an empty addreess or an absolute address (i.e., starting with '/' or '\'), or the address contains invalid character[s]. The supported relativeAddress formats are "[folder/]filename" or "~/[folder/]filename". + + + '{0}' is an absolute address. The supported relativeAddress formats are "[subfolder/]filename" or "~/[subfolder/]filename". + + + Cannot create security binding element based on the configuration data. When secure conversation authentication mode is selected, the secure conversation bootstrap binding element must also be specified. + + + Setting minFreeMemoryPercentageToActivateService requires full trust privilege. Please change the application's trust level or remove this setting from the configuration file. + + + This service requires ASP.NET compatibility and must be hosted in IIS. Either host the service in IIS with ASP.NET compatibility turned on in web.config or set the AspNetCompatibilityRequirementsAttribute.AspNetCompatibilityRequirementsMode property to a value other than Required. + + + The '{0}' protocol binding '{1}' specifies an invalid port number '{2}'. + + + The protocol binding '{0}' does not conform to the syntax for '{1}'. The following is an example of valid '{1}' protocol bindings: '{2}'. + + + The protocol binding '{0}' is not valid for '{1}'. This might be because the port number is out of range. + + + There is no compatible TransportManager found for URI '{0}'. This may be because you have used an absolute address that points outside of the virtual application. Please use a relative address instead. + + + There is no compatible TransportManager found for URI '{0}'. This may be because you have used an absolute address that points outside of the virtual application, or the binding settings of the endpoint do not match those that have been set by other services or endpoints. Note that all bindings for the same protocol should have the same settings in the same application. + + + '{0}' cannot be invoked within the current hosting environment. This API requires that the calling application be hosted in IIS or WAS. + + + The requested service, '{0}' could not be activated. See the server's diagnostic trace logs for more information. + + + The value for the Service attribute was not provided in the ServiceHost directive. + + + The service endpoint failed to listen on the URI '{0}' because access was denied. Verify that the current user is granted access in the appropriate allowAccounts section of SMSvcHost.exe.config. + + + The service endpoint failed to listen on the URI '{0}' because the shared memory section was not found. Verify that the '{1}' service is running. + + + The TransportManager failed to listen on the supplied URI using the {0} service: {1}. + + + failed to start the service ({0}). Refer to the Event Log for more details + + + failed to start the service because it is disabled. An administrator can enable it by running 'sc.exe config {0} start= demand'. + + + failed to start the service. Refer to the Event Log for more details + + + failed to look up the service process in the SCM ({0}) + + + failed to look up the service SID in the SCM ({0}) + + + failed to read the service's endpoint with native error code {0}. See inner exception for details + + + the service failed the security checks + + + failed to retrieve the UserSid of the service process ({0}) + + + failed to retrieve the UserSid of the current process + + + failed to retrieve the LogonSid of the service process ({0}) + + + failed to establish a data connection to the service + + + failed to create a data connection to the service + + + failed to establish the data connection because of an I/O error + + + the version is not supported by the service + + + failed to grant the PROCESS_DUP_HANDLE access right to the target service's account SID '{0}'. + + + the URI is too long + + + the quota was exceeded + + + the protocol is not supported + + + the URI is already registered with the service + + + the service failed to listen + + + The message could not be dispatched to the service at address '{0}'. Refer to the server Event Log for more details + + + The message could not be dispatched because the service at the endpoint address '{0}' is unavailable for the protocol of the address. + + + The endpoint address for the NT service '{0}' read from shared memory is empty. + + + The message could not be dispatched because the transport manager has been stopped. This can happen if the application is being recycled or disabled. + + + The '{0}' from the '{1}' namespace is empty and does not specify a valid identity claim. + + + '{0}' from namespace '{1}' is not expected. Expecting element '{2}' from namespace '{3}' + + + '{0}' from namespace '{1}' is not expected to appear more than once + + + An unsupported security policy assertion was detected during the security policy import: {0} + + + The extensions cannot contain an Identity if one is supplied as a constructor argument. + + + Value '{0}' provided for '{1}' from namespace '{2}' is an invalid absolute URI. + + + The binding ('{0}','{1}') for contract ('{2}','{3}') is configured with SecureConversation, but the authentication mode is not able to provide the request/reply-based integrity and confidentiality required for the negotiation. + + + The '{0}'.'{1}' binding for the '{2}'.'{3}' contract is configured with an authentication mode that requires transport level integrity and confidentiality. However the transport cannot provide integrity and confidentiality. + + + The contract operation '{0}' requires Windows identity for automatic impersonation. A Windows identity that represents the caller is not provided by binding ('{1}','{2}') for contract ('{3}','{4}'. + + + A listen URI must be specified in order to open this {0}. + + + Channel interface type '{0}' is not supported. + + + This property cannot be changed after the transport manager has been opened. + + + This operation is only valid after the transport manager has been opened. + + + Unrecognized identity type Name='{0}', Namespace='{1}'. + + + Cannot read the Identity element. The Identity type is not supported or the Identity element is empty. + + + Cannot load the X.509 certificate identity specified in the configuration. + + + The ClaimType '{0}' is not recognized. Expected ClaimType '{1}'. + + + An AsyncCallback threw an exception. + + + You cannot Send messages on a channel after CloseOutputSession has been called. + + + The communication object, {0}, cannot be modified while it is in the {1} state. + + + The communication object, {0}, cannot be modified unless it is in the Created state. + + + The communication object, {0}, is in the {1} state. Communication objects cannot be used for communication unless they are in the Opened state. + + + The communication object, {0}, cannot be used for communication because it is in the Faulted state. + + + The communication object, {0}, cannot be used for communication because it is in the Faulted state: {1} + + + The communication object, {0}, cannot be used for communication because it has been Aborted. + + + The communication object, {0}, cannot be used for communication because it has been Aborted: {1} + + + The communication object, {0}, has overridden the virtual function {1} but it does not call version defined in the base class. + + + The communication object, {0}, is not part of WCF and is in an unsupported state '{1}'. This indicates an internal error in the implementation of that communication object. + + + The communication object, {0}, cannot be used due to an error that occurred during close. + + + A call to IChannelFactory.CreateChannel made on an object of type {0} failed because Open has not been called on this object. + + + Cannot modify channel parameters because the {0} is in the {1} state. This operation is only supported in the Created state. + + + Cannot propagate channel parameters because the {0} is in the {1} state. This operation is only supported in the Opening or Opened state when the collection is locked. + + + Binding '{0}' is not configured properly. OneWayBindingElement requires an inner binding element that supports IRequestChannel/IReplyChannel or IDuplexSessionChannel. + + + The specified channel type {0} is not supported by this channel manager. + + + SecurityContext for the UltimateReceiver role is missing from the SecurityContextProperty of the request message with action '{0}'. + + + Cannot start impersonation because the SecurityContext for the UltimateReceiver role from the request message with the '{0}' action is not mapped to a Windows identity. + + + Unexpected internal enum value: {0}. + + + Invalid decoder state machine. + + + Operation property of OperationAttributeGenerationContext is required to generate an attribute based on settings. + + + The username/password Membership provider {0} specified in the configuration is invalid. No such provider was found registered under system.web/membership/providers. + + + The RoleProvider {0} specified in the configuration is invalid. No such provider was found registered under system.web/roleManager/providers. + + + The {0} object has been disposed. + + + The XmlReader used for the body of the message must be positioned on an element. + + + A property with the name '{0}' already exists. + + + A property with the name '{0}' is not present. + + + The message header with name '{0}' and namespace '{1}' is already present in the set of understood headers. + + + The message header with name '{0}' and namespace '{1}' is not present in the set of understood headers. + + + Multiple headers with name '{0}' and namespace '{1}' found. + + + Multiple headers with name '{0}' and namespace '{1}' and role '{2}' found. + + + Multiple RelatesTo headers with relationship '{0}' found. Only one is allowed per relationship. + + + Additional XML content is present in the fault detail element. Only a single element is allowed. + + + The body of the message cannot be read because it is empty. + + + Message is closed. + + + The operation cannot be completed because the stream is closed. + + + The body writer returned from OnCreateBufferedCopy was not buffered. + + + The body writer does not support writing more than once because it is not buffered. + + + KeySize element not present in RequestSecurityTokenResponse. + + + A reply message cannot be created because the request message does not have a MessageID. + + + There is not a header with name {0} and namespace {1} in the message. + + + MessageBuffer is closed. + + + The text encoding '{0}' used in the text message format is not supported. + + + At least one fault reason must be specified. + + + The translation set cannot contain nulls. + + + The fault does not have detail information. + + + Expected XML qualified name, found '{0}'. + + + Unbound prefix used in qualified name '{0}'. + + + ... + + + ... stream ... + + + ... Error reading body: {0}: {1} ... + + + The fault reason does not contain any text translations. + + + Client cannot determine the Service Principal Name based on the identity in the target address '{0}' for the purpose of SspiNegotiation/Kerberos. The target address identity must be a UPN identity (like acmedomain\alice) or SPN identity (like host/bobs-machine). + + + Required xml:lang attribute value is missing. + + + Unrecognized charSet '{0}' in contentType. + + + Unrecognized contentType ({0}). Expected: {1}. + + + Cannot process contentType. + + + The envelope version of the incoming message ({0}) does not match that of the encoder ({1}). Make sure the binding is configured with the same version as the expected messages. + + + The message version of the outgoing message ({0}) does not match that of the encoder ({1}). Make sure the binding is configured with the same version as the message. + + + MessageVersion '{0}' not supported by MTOM encoder. + + + Read is not supported on this stream. + + + Seek is not supported on this stream. + + + An asynchronous write is pending on the stream. Ensure that there are no uncompleted asynchronous writes before attempting the next write. + + + A newly accepted connection did not receive initialization data from the sender within the configured ChannelInitializationTimeout ({0}). As a result, the connection will be aborted. If you are on a highly congested network, or your sending machine is heavily loaded, consider increasing this value or load-balancing your server. + + + The remote endpoint of the socket ({0}) did not respond to a close request within the allotted timeout ({1}). It is likely that the remote endpoint is not calling Close after receiving the EOF signal (null) from Receive. The time allotted to this operation may have been a portion of a longer timeout. + + + A graceful close was attempted on the socket, but the other side ({0}) is still sending data. + + + The pipe cannot be closed while a write to the pipe is pending. + + + The shutdown indicator could not be written to the pipe. The application on the other end of the pipe may not be listening for it. The pipe will still be closed. + + + The shutdown indicator was not received from the pipe. The application on the other end of the pipe may not have sent it. The pipe will still be closed. + + + The pipe name could not be obtained for the pipe URI: {0} + + + The pipe name could not be obtained for {0}. + + + The pipe was not able to be set to message mode: {0} + + + The pipe could not close gracefully. This may be caused by the application on the other end of the pipe exiting. + + + The pipe cannot be written to because it is already in the process of shutting down. + + + The read from the pipe expected just a signal, but received actual data. + + + The pipe cannot be written to or read from because it is already in the process of being closed. + + + Server cannot accept pipe: {0} + + + Cannot listen on pipe '{0}': {1} + + + Cannot listen on pipe name '{0}' because another pipe endpoint is already listening on that name. + + + Cannot listen on pipe '{0}' because the pipe name could not be reserved: {1} + + + The pipe listener has been disposed. + + + Connections cannot be created until the pipe has started listening. Call Listen() before attempting to accept a connection. + + + A pipe endpoint exists for '{0}', but the connect failed: {1} + + + Cannot connect to endpoint '{0}'. + + + Cannot connect to endpoint '{0}' within the allotted timeout of {1}. The time allotted to this operation may have been a portion of a longer timeout. + + + Cannot connect to endpoint '{0}' within the allotted timeout of {1}. The server has likely reached the MaxConnections quota and is too busy to accept new connections. The time allotted to this operation may have been a portion of a longer timeout. + + + The pipe endpoint '{0}' could not be found on your local machine. + + + URIs used with pipes must use the scheme: 'net.pipe'. + + + The pipe write did not write all the bytes. + + + The operation cannot be completed because the pipe was closed. This may have been caused by the application on the other end of the pipe exiting. + + + The read from the pipe did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + The write to the pipe did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + The pipe connection was aborted because an asynchronous read from the pipe did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + The pipe connection was aborted because an asynchronous write to the pipe did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + There was an error writing to the pipe: {0}. + + + There was an error reading from the pipe: {0}. + + + Unrecognized error {0} (0x{1}) + + + {0} ({1}, 0x{2}) + + + There is already a write in progress for the pipe. Wait for the first operation to complete before attempting to write again. + + + There is already a read in progress for the pipe. Wait for the first operation to complete before attempting to read again. + + + There was an error duplicating the. + + + The Session value '{0}' is invalid. Please specify 'CurrentSession','ServiceSession' or a valid non-negative Windows Session Id. + + + The package full name '{0}' is invalid. + + + The socket was aborted because an asynchronous receive from the socket did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + The socket connection was aborted because an asynchronous send to the socket did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + This operation is not valid until security negotiation is complete. + + + Error while reading message framing format at position {0} of stream (state: {1}) + + + More data was expected, but EOF was reached. + + + Expected record type '{0}', found '{1}'. + + + Framing major version {0} is not supported. + + + Framing mode {0} is not supported. + + + Specified size is too large for this implementation. + + + The framing via size ({0}) exceeds the quota. + + + The framing via ({0}) is not a valid URI. + + + The framing fault size ({0}) exceeds the quota. + + + The framing content type size ({0}) exceeds the quota. + + + The value cannot be accessed because it has not yet been fully decoded. + + + An attempt was made to decode a value after the framing stream was ended. + + + Stream Security is required at {0}, but no security context was negotiated. This is likely caused by the remote endpoint missing a StreamSecurityBindingElement from its binding. + + + The binary encoder session information exceeded the maximum size quota ({0}). To increase this quota, use the MaxSessionSize property on the BinaryMessageEncodingBindingElement. + + + The binary encoder session is not valid. There was an error decoding a previous message. + + + The binary encoder session information is not properly formed. + + + The channel received an unexpected fault input message while closing. The fault reason given is: '{0}' + + + The channel received an unexpected fault input message with Action = '{0}' while closing. You should only close your channel when you are not expecting any more input messages. + + + The channel received an unexpected input message with Action '{0}' while closing. You should only close your channel when you are not expecting any more input messages. + + + The maximum message size quota for incoming messages ({0}) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. + + + The maximum message size quota for outgoing messages ({0}) has been exceeded. + + + The maximum message size quota for incoming messages has been exceeded for the remote channel. See the server logs for more details. + + + TimeoutStream requires an inner Stream that supports timeouts; its CanTimeout property must be true. + + + The filter already exists in the filter table. + + + An internal error has occurred. Unexpected error modifying filter table. + + + The number of XML infoset nodes inspected by the navigator has exceeded the quota ({0}). + + + Value cannot be negative. + + + The set of actions cannot be empty. + + + The prefix '{0}' is not defined. + + + Multiple filters matched. + + + The type of IMessageFilterTable created for a particular Filter type must always be the same. + + + The MessageFilterTable state is corrupt. The requested lookup cannot be performed. + + + The IMessageFilterTable created for a Filter cannot be a MessageFilterTable or a subclass of MessageFilterTable. + + + NodeQuota must be greater than 0. + + + Parameter value cannot be an empty string. + + + Required inner element '{0}' was not found. + + + Invalid attribute on the XPath. + + + When present, the dialect attribute must have the value '{0}'. + + + Could not compile the XPath expression '{0}' with the given XsltContext. + + + XmlReader not positioned at a start element. + + + The position is not valid for this navigator. + + + Cannot call '{0}' on a non-atomized navigator. + + + XML unique ID not supported. + + + A filter has attempted to access the body of a Message. Use a MessageBuffer instead if body filtering is required. + + + Not allowed to override prefix '{0}'. + + + The function '{0}' is not implemented. + + + XPathNavigator positions cannot be compared. + + + XPathNavigator must be a SeekableXPathNavigator. + + + Context node is not supported in node sequences. + + + IXsltContextFunction return type '{0}' not supported. + + + IXsltContextVariable type '{0}' not supported. + + + IXsltContextVariables cannot return null. + + + The argument to an IXsltContextFunction could not be converted to a string. + + + An internal error has occurred. Item already exists. + + + Positioned before first element. + + + Positioned after last element. + + + The XPathNodeIterator has been invalidated. XPathNodeIterators passed as arguments to IXsltContextFunctions are only valid within the function. They cannot be cached for later use or returned as the result of the function. + + + The string value can't be determined because the XPathNodeIterator has been moved past the first node. + + + {0} {1} + + + Addressing10 ({0}) + + + Addressing200408 ({0}) + + + AddressingNone ({0}) + + + Addressing Version '{0}' is not supported. + + + The '{0}' addressing mode is not supported. + + + Soap11 ({0}) + + + Soap12 ({0}) + + + EnvelopeNone ({0}) + + + The IMessageProperty could not be copied. CreateCopy returned null. + + + Unrecognized message version. + + + Unrecognized envelope version: {0}. + + + Envelope Version '{0}' is not supported. + + + Cannot detect WS-Addressing version. EndpointReference does not start with an Element. + + + Envelope Version '{0}' does not support adding Message Headers. + + + Addressing Version '{0}' does not support adding WS-Addressing headers. + + + The element '{0}' in namespace '{1}' is not valid. This either means that element '{0}' is a duplicate element, or that it is not a legal extension because extension elements cannot be in the addressing namespace. + + + The '{0}' header cannot be added because it does not support the specified message version '{1}'. + + + This message cannot support the operation because it has been copied. + + + This message cannot support the operation because it has been written. + + + This message cannot support the operation because it has been read. + + + An internal error has occurred. Invalid MessageState. + + + The body reader is in ReadState '{0}' and cannot be consumed. + + + The size necessary to buffer the XML content exceeded the buffer quota. + + + An internal error has occurred. The XML buffer is not in the correct state to perform the operation. + + + A body element was not found inside the message envelope. + + + The version of the header(s) ({0}) differs from the version of the message ({1}). + + + Manual addressing is enabled on this factory, so all messages sent must be pre-addressed. + + + A one-way header was expected on this message and none was found. It is possible that your bindings are mismatched. + + + Receive on local address {0} timed out after {1}. The time allotted to this operation may have been a portion of a longer timeout. + + + Receive timed out after {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + WaitForMessage timed out after {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + Receive timed out after {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + Receive request timed out after {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + Receive request on local address {0} timed out after {1}. The time allotted to this operation may have been a portion of a longer timeout. + + + Sending to via {0} timed out after {1}. The time allotted to this operation may have been a portion of a longer timeout. + + + Close timed out after {0}. Increase the timeout value passed to the call to Close or increase the CloseTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. + + + Open timed out after {0} while establishing a transport session to {1}. The time allotted to this operation may have been a portion of a longer timeout. + + + Request timed out after {0} while establishing a transport connection to {1}. The time allotted to this operation may have been a portion of a longer timeout. + + + Connecting to via {0} timed out after {1}. Connection attempts were made to {2} of {3} available addresses ({4}). Check the RemoteAddress of your channel and verify that the DNS records for this endpoint correspond to valid IP Addresses. The time allotted to this operation may have been a portion of a longer timeout. + + + The request channel timed out attempting to send after {0}. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. + + + The request channel timed out while waiting for a reply after {0}. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. + + + The policy being imported for contract '{0}:{1}' contains multiple HTTP authentication scheme assertions. Since at most one such assertion is allowed, policy import has failed. This may be resolved by updating the policy to contain no more than one HTTP authentication scheme assertion. + + + More than one '{0}' objects were found in the BindingParameters of the BindingContext. This is usually caused by having multiple '{0}' objects in a CustomBinding. Remove all but one of these elements. + + + The '{0}' can only be used with HTTP (or HTTPS) transport. + + + The value specified, '{0}', for the If-Modified-Since header does not parse into a valid date. Check the property value and ensure that it is of the proper format. + + + The SOAP action specified on the message, '{0}', does not match the action specified on the HttpRequestMessageProperty, '{1}'. + + + The SOAP action specified on the message, '{0}', does not match the action specified in the content-type of the HttpRequestMessageProperty, '{1}'. + + + The SOAP action specified on the message, '{0}', does not match the HTTP SOAP Action, '{1}'. + + + An error ({0}) occurred while parsing the content type of the HTTP request. The content type was: {1}. + + + The HTTP service located at {0} is unavailable. This could be because the service is too busy or because no endpoint was found listening at the specified address. Please ensure that the address is correct and try accessing the service again later. + + + The HTTP request to '{0}' was aborted. This may be due to the local channel being closed while the request was still in progress. If this behavior is not desired, then update your code so that it does not close the channel while request operations are still in progress. + + + The HTTP request to '{0}' has exceeded the allotted timeout of {1}. The time allotted to this operation may have been a portion of a longer timeout. + + + The HTTP request to '{0}' has exceeded the allotted timeout of {1} while reading the response. The time allotted to this operation may have been a portion of a longer timeout. + + + An error ({0}) occurred while transmitting data over the HTTP channel. + + + An error occurred while receiving the HTTP response to {0}. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details. + + + An error occurred while making the HTTP request to {0}. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server. + + + HTTP request streaming cannot be used in conjunction with HTTP authentication. Either disable request streaming or specify anonymous HTTP authentication. + + + A reply has already been sent from this RequestContext. + + + Unable to start the HTTP listener. The URI provided, '{0}', is invalid for listening. Check the base address of your service and verify that it is a valid URI. + + + The requestContext has been aborted. + + + The receive context, {0}, is in the {1} state. Receive contexts cannot be used for sending delayed acks unless they are in the Received state. + + + The receive context, {0}, is in an unsupported state '{1}'. This indicates an internal error in the implementation of that receive context. + + + The receive context, {0}, cannot be used for sending delayed acks because it is in the Faulted state. + + + Invalid HostNameComparisonMode value: {0}. + + + Invalid data buffer. + + + A security session renew response was received with an invalid action '{0}'. + + + A security session close response was received with an invalid action '{0}', + + + TransactedBatchingBehavior cannot be used when ReceiveContext is being used. + + + Could not formulate request message for security session operation '{0}'. + + + There is no handler registered for session token issuance event. + + + There is no handler registered for session token renew event. + + + The identity of the security session renew message does not match the identity of the session token. + + + The RequestSecurityToken has an invalid or unspecified RequestType '{0}'. + + + The RequestSecurityToken must specify a CloseTarget. + + + Secure channel cannot be opened because security negotiation with the remote endpoint has failed. This may be due to absent or incorrectly specified EndpointIdentity in the EndpointAddress used to create the channel. Please verify the EndpointIdentity specified or implied by the EndpointAddress correctly identifies the remote endpoint. + + + The CloseTarget specified '{0}' does not identify the security token that signed the message. + + + The renew security session message does not have the session token as a supporting token. + + + The RequestSecurityToken must specify a RenewTarget. + + + There is no endorsing session token that matches the specified RenewTarget '{0}'. + + + Invalid format for encrypted body. + + + The EncryptedData or EncryptedKey is in an invalid state for this operation. + + + No signature message parts were specified for messages with the '{0}' action. + + + No encryption message parts were specified for messages with the '{0}' action. + + + The receiver sent back a security session fault message. Retry the request. + + + The Inner listener factory of {0} must be set before this operation. + + + Cannot create security binding element based on configuration data. The secure conversation bootstrap requires another secure conversation which is not supported. + + + Cannot open ChannelFactory as the inner channel factory was not set during the initialization process. + + + Duplex security is not supported by the security protocol factory '{0}'. + + + Request-reply security is not supported by the security protocol factory '{0}'. + + + The security protocol factory must be set before this operation is performed. + + + Security session protocol factory must be set before this operation is performed. + + + Security channel or listener factory creation failed. Secure conversation security token parameters do not specify the bootstrap security binding element. + + + The required '{0}' property on the '{1}' security protocol factory is not set or has an invalid value. + + + The protocol factory cannot create a protocol. + + + The identity check failed for the outgoing message. The expected identity is '{0}' for the '{1}' target endpoint. + + + The identity check failed for the incoming message. The expected identity is '{0}' for the '{1}' target endpoint. + + + The Identity check failed for the incoming message. The remote endpoint did not provide a domain name system (DNS) claim and therefore did not satisfied DNS identity '{0}'. This may be caused by lack of DNS or CN name in the remote endpoint X.509 certificate's distinguished name. + + + The Identity check failed for the outgoing message. The remote endpoint did not provide a domain name system (DNS) claim and therefore did not satisfied DNS identity '{0}'. This may be caused by lack of DNS or CN name in the remote endpoint X.509 certificate's distinguished name. + + + Identity check failed for incoming message. The expected DNS identity of the remote endpoint was '{0}' but the remote endpoint provided DNS claim '{1}'. If this is a legitimate remote endpoint, you can fix the problem by explicitly specifying DNS identity '{1}' as the Identity property of EndpointAddress when creating channel proxy. + + + Identity check failed for outgoing message. The expected DNS identity of the remote endpoint was '{0}' but the remote endpoint provided DNS claim '{1}'. If this is a legitimate remote endpoint, you can fix the problem by explicitly specifying DNS identity '{1}' as the Identity property of EndpointAddress when creating channel proxy. + + + The serialized token version {0} is unsupported. + + + The RequestSecurityTokenResponseCollection does not contain an authenticator. + + + The negotiation RequestSecurityTokenResponse has a different context from the authenticator RequestSecurityTokenResponse. + + + The recipient did not provide its certificate. This certificate is required by the TLS protocol. Both parties must have access to their certificates. + + + The authenticator was not included in the final leg of negotiation. + + + The RequestSecurityTokenResponse CombinedHash is incorrect. + + + The certificate for the client has not been provided. The certificate can be set on the ClientCredentials or ServiceCredentials. + + + The client certificate is not provided. Specify a client certificate in ServiceCredentials. + + + The client certificate is not provided. Specify a client certificate in ClientCredentials. + + + The service certificate is not provided. Specify a service certificate in ServiceCredentials. + + + The service certificate is not provided for target '{0}'. Specify a service certificate in ClientCredentials. + + + The username is not provided. Specify username in ClientCredentials. + + + Object is read-only. + + + Element {0} cannot be empty. + + + XML child node {0} of type {1} is unexpected for element {2}. + + + The context-id={0} (generation-id={1}) is already registered with SecurityContextSecurityTokenAuthenticator. + + + The context-id={0} (no key generation-id) is already registered with SecurityContextSecurityTokenAuthenticator. + + + There is no SecurityContextSecurityToken with context-id={0} (generation-id={1}) registered with SecurityContextSecurityTokenAuthenticator. + + + There is no SecurityContextSecurityToken with context-id={0} (no key generation-id) registered with SecurityContextSecurityTokenAuthenticator. + + + The SecurityContextSecurityToken has an invalid Cookie. The following error occurred when processing the Cookie: '{0}'. + + + The SecurityContextSecurityToken with context-id={0} (key generation-id={1}) is not registered. + + + The SecurityContextSecurityToken with context-id={0} (key generation-id={1}) has expired. + + + The SecurityContextSecurityToken with context-id={0} (no key generation-id) has expired. + + + The SecurityContextSecurityToken does not have a context-id. + + + For sending a message on server side composite duplex channels, the message must have either the 'Via' property or the 'To' header set. + + + The 'Via' property on the message is set to Anonymous Uri '{0}'. Please set the 'Via' property to a non-anonymous address as message cannot be addressed to anonymous Uri on server side composite duplex channels. + + + The 'To' header on the message is set to Anonymous Uri '{0}'. Please set the 'To' header to a non-anonymous address as message cannot be addressed to anonymous Uri on server side composite duplex channels. + + + This SecurityProtocol instance was not set up to process outgoing messages. + + + This SecurityProtocol instance was not set up to process incoming messages. + + + The token provider cannot get tokens for target '{0}'. + + + Key derivation algorithm '{0}' is not supported. + + + Cannot find the correlation state for applying security to reply at the responder. + + + The reply was not signed with the required signing token. + + + Encryption not expected for this message. + + + A signature is not expected for this message. + + + The QName is invalid. + + + The ICrypto implementation '{0}' is not supported. + + + On DuplexSecurityProtocolFactory, the same protocol factory cannot be set for the forward and reverse directions. + + + The algorithm '{0}' is not accepted for operation '{1}' by algorithm suite {2}. + + + '{0}' does not support '{1}' creation. + + + Cannot create an ICrypto interface from the '{0}' token for signature verification. + + + Message security verification failed. + + + Transport secured messages should have the 'To' header specified. + + + The message received over Transport security was missing the 'To' header. + + + The message received over Transport security has unsigned 'To' header. + + + More than one 'To' header specified in a message secured by Transport Security. + + + Received security header contains unexpected token '{0}'. + + + Cannot find the X.509 certificate using the following search criteria: StoreName '{0}', StoreLocation '{1}', FindType '{2}', FindValue '{3}'. + + + Cannot find The X.509 certificate using the following search criteria: StoreName '{0}', StoreLocation '{1}', FindType '{2}', FindValue '{3}' for target '{4}'. + + + Found multiple X.509 certificates using the following search criteria: StoreName '{0}', StoreLocation '{1}', FindType '{2}', FindValue '{3}'. Provide a more specific find value. + + + Found multiple X.509 certificates using the following search criteria: StoreName '{0}', StoreLocation '{1}', FindType '{2}', FindValue '{3}' for target '{4}'. Provide a more specific find value. + + + The KeyInfo clause is missing or empty in EncryptedKey. + + + The EncryptedKey clause was not wrapped with the required encryption token '{0}'. + + + The message was not encrypted with the required encryption token. + + + The timestamp must occur first in this security header layout. + + + The timestamp must occur last in this security header layout. + + + Only one primary signature is allowed in a security header. + + + The signing token {0} has no keys. The security token is used in a context that requires it to perform cryptographic operations, but the token contains no cryptographic keys. Either the token type does not support cryptographic operations, or the particular token instance does not contain cryptographic keys. Check your configuration to ensure that cryptographically disabled token types (for example, UserNameSecurityToken) are not specified in a context that requires cryptographic operations (for example, an endorsing supporting token). + + + The signing token {0} has no key that supports the algorithm suite {1}. + + + Delayed security application has already been completed. + + + Cannot resolve KeyInfo in derived key token for resolving source token: KeyInfoClause '{0}'. + + + KeyInfo clause '{0}' resolved to token '{1}', which does not contain a Symmetric key that can be used for derivation. + + + Cannot resolve KeyInfo for verifying signature: KeyInfo '{0}', available tokens '{1}'. + + + Cannot resolve KeyInfo for unwrapping key: KeyInfo '{0}', available tokens '{1}'. + + + Cannot resolve KeyInfo for decryption: KeyInfo '{0}', available tokens '{1}'. + + + An empty value was found for the required base-64 attribute name '{0}', namespace '{1}'. + + + The security header element '{0}' with the '{1}' id must be signed. + + + The '{0}' security token with the '{1}' attachment mode must be signed. + + + The '{0}' security token with the '{1}' attachment mode must be encrypted. + + + Operation '{0}' is not valid in message body state '{1}'. + + + EncryptedKey with ReferenceList is not allowed according to the current settings. + + + Cannot find a token authenticator for the '{0}' token type. Tokens of that type cannot be accepted according to current security settings. + + + No signature was created because not part of the message matched the supplied message part specification. + + + Supporting SecurityToken cannot be written without encryption. + + + The '{0}' id occurred twice in the message that is supplied for verification. + + + Canonicalization algorithm '{0}' is not supported. + + + The KeyInfo value was not found in the encrypted item to find the decrypting token. + + + No KeyInfo in signature to find verification token. + + + Security header is empty. + + + The encryption method is missing in encrypted data. + + + The Encrypted Header and the Security Header '{0}' attribute did not match. Encrypted Header: {1}. Security Header: {2}. + + + At most one reference list is supported with default policy check. + + + At most one signature is supported with default policy check. + + + Unexpected encrypted element in security header. + + + Id is missing in encrypted item in security header. + + + The supplied token manager cannot create a token reference. + + + The timestamp element added to security header to sign has no id. + + + An encrypted header must have an id. + + + The data reference '{0}' could not be resolved in the received message. + + + A timestamp element has already been set for this security header. + + + More than one Timestamp element was present in security header. + + + The incoming message was signed with a token which was different from what used to encrypt the body. This was not expected. + + + Cannot create the '{0}' symmetric algorithm from the token. + + + Unrecognized encoding occurred while reading the binary security token. + + + Cannot resolve reference URI '{0}' in signature to compute digest. + + + No timestamp is available in the security header to do replay detection. + + + No signature is available in the security header to provide the nonce for replay detection. + + + There is no namespace binding for prefix '{0}' in scope. + + + Derived Key Token cannot derive key from the secret. + + + Both offset and generation cannot be specified for Derived Key Token. + + + Either offset or generation must be specified for Derived Key Token. + + + DerivedKeyToken requires a reference to a token. + + + DerivedKey length ({0}) exceeds the allowed settings ({1}). + + + The Implicit derived key clause '{0}' specifies a derivation key length ({1}) which exceeds the allowed maximum length ({2}). + + + The received derived key token has a invalid offset value specified. Value: {0}. The value should be greater than or equal to zero. + + + The received derived key token has a invalid generation value specified. Value: {0}. The value should be greater than or equal to zero. + + + The XML element {0} does not have a child of type {1}. + + + RequestedSecurityToken not specified in RequestSecurityTokenResponse. + + + Binary encoding {0} is not supported. + + + Invalid key encryption algorithm {0}. + + + The asynchronous result object used to end this operation was not the object that was returned when the operation was initiated. + + + Unable to create token reference. + + + null + + + The specified nonce is too short. The minimum required nonce length is 4 bytes. + + + There is no binary negotiation to send to the other party. + + + Security negotiation failure because an incorrect Context attribute specified in RequestSecurityToken/RequestSecurityTokenResponse from the other party. + + + No binary negotiation was received from the other party. + + + The proof token was not wrapped correctly in the RequestSecurityTokenResponse. + + + Final RSTR from other party does not contain a service token. + + + The Security Support Provider Interface (SSPI) negotiation failed. + + + Cannot authenticate the other party. + + + Incoming binary negotiation has invalid ValueType {0}. + + + The channel is not open. + + + Security negotiation failed because the remote party did not send back a reply in a timely manner. This may be because the underlying transport connection was aborted. + + + SecurityVersion must be WsSecurity10 or WsSecurity11. + + + Creation time must be before expiration time. + + + Negotiation state already exists for context '{0}'. + + + Cannot find the negotiation state for the context '{0}'. + + + Send cannot be called when the session does not expect output. + + + The session was closed before message transfer was complete. + + + The item cannot be added. The maximum cache size is ({0} items). + + + The server's X509SecurityTokenProvider cannot be null. + + + Expected binary secret of type {0} but got secret of type {1}. + + + The '{0}' username token has an unsupported password type. + + + Unrecognized identity property type: '{0}'. + + + There was no channel that could accept the message with action '{0}'. + + + There was no endpoint listening at {0} that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. + + + This factory buffers messages, so the message sizes must be in the range of an integer value. + + + For TransferMode.Buffered, MaxReceivedMessageSize and MaxBufferSize must be the same value. + + + MaxBufferSize must not exceed MaxReceivedMessageSize. + + + This Factory buffers messages, so the message sizes must be in the range of a int value. + + + URI {0} could not be set because its size ({1}) exceeds the max supported size ({2}). + + + Expecting first char - c - to be in set [Char.IsLetter(c) && c == '_', found '{0}'. + + + Expecting all chars - c - of id to be in set [Char.IsLetter(c), Char.IsNumber(c), '.', '_', '-'], found '{0}'. + + + HTTP could not register URL {0}. Another application has already registered this URL with HTTP.SYS. + + + HTTP could not register URL {0}. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). + + + HTTP could not register URL {0} because TCP port {1} is being used by another application. + + + HTTP could not register URL {0} because the MaxEndpoints quota has been exceeded. To correct this, either close other HTTP-based services, or increase your MaxEndpoints registry key setting (see http://go.microsoft.com/fwlink/?LinkId=70352 for details). + + + The remote server returned an unexpected response: ({0}) {1}. + + + The number of bytes available is inconsistent with the HTTP Content-Length header. There may have been a network error or the client may be sending invalid requests. + + + A response was received from a one-way send over the underlying IRequestChannel. Make sure the remote endpoint has a compatible binding at its endpoint (one that contains OneWayBindingElement). + + + The receiver returned an error indicating that the content type was missing on the request to {0}. See the inner exception for more information. + + + Duplex channel to {0} was aborted during the open process. + + + Operation was aborted while establishing a connection to {0}. + + + The incoming message contains a SOAP header representing the WS-Addressing '{0}', yet the HTTP transport is configured with AddressingVersion.None. As a result, the message is being dropped. If this is not desired, then update your HTTP binding to support a different AddressingVersion. + + + There is a problem with the XML that was received from the network. See inner exception for more details. + + + An IPv4 address was specified ({0}), but IPv4 is not enabled on this machine. + + + An IPv6 address was specified ({0}), but IPv6 is not enabled on this machine. + + + Cannot find a unique port number that is available for both IPv4 and IPv6. + + + There is already a listener on IP endpoint {0}. This could happen if there is another application already listening on this endpoint or if you have multiple service endpoints in your service host with the same IP endpoint but with incompatible binding configurations. + + + Insufficient winsock resources available to complete socket connection initiation. + + + Insufficient memory avaliable to complete the operation. + + + Could not connect to {0}. TCP error code {1}: {2}. + + + Could not connect to {0}. The connection attempt lasted for a time span of {3}. TCP error code {1}: {2}. + + + A TCP error ({0}: {1}) occurred while listening on IP Endpoint={2}. + + + A TCP error ({0}: {1}) occurred while transmitting data. + + + A TCP error ({0}: {1}) occurred while transmitting data. The local IP address and port is {2}. The remote IP address and port is {3}. + + + The socket connection was aborted by your local machine. This could be caused by a channel Abort(), or a transmission error from another thread using this socket. + + + The HTTP request context was aborted while writing the response. As a result, the response may not have been completely written to the network. This can be remedied by gracefully closing the request context rather than aborting it. + + + The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '{0}'. + + + The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '{0}'. The local IP address and port is {1}. The remote IP address and port is {2}. + + + The socket transfer timed out after {0}. You have exceeded the timeout set on your binding. The time allotted to this operation may have been a portion of a longer timeout. + + + The socket transfer timed out after {0}. You have exceeded the timeout set on your binding. The time allotted to this operation may have been a portion of a longer timeout. The local IP address and port is {1}. The remote IP address and port is {2}. + + + The socket connection has been disposed. + + + The socket listener has been disposed. + + + The socket listener is not listening. + + + No duplex session listener was listening at {0}. This could be due to an incorrect via set on the client or a binding mismatch. + + + The entry found in AuthenticationManager's CustomTargetNameDictionary for {0} does not match the requested identity of {1}. + + + An HTTP Content-Type header is required for SOAP messaging and none was found. + + + Content Type {0} was sent to a service expecting {1}. The client and service bindings may be mismatched. + + + The content type {0} of the response message does not match the content type of the binding ({1}). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first {2} bytes of the response were: '{3}'. + + + The content type {0} of the message is not supported by the encoder. + + + The binding specified requires that the to and via URIs must match because the Addressing Version is set to None. The to URI specified was '{0}'. The via URI specified was '{1}'. + + + The server challenged this request and streamed requests cannot be resubmitted. To enable HTTP server challenges, set your TransferMode to Buffered or StreamedResponse. + + + Content Type {0} was not supported by service {1}. The client and service bindings may be mismatched. + + + Server faulted with code '{0}'. + + + Content type '{0}' is too long to be processed by the remote host. See the server logs for more details. + + + Via '{0}' is too long to be processed by the remote host. See the server logs for more details. + + + The .Net Framing mode being used is not supported by '{0}'. See the server logs for more details. + + + The .Net Framing version being used is not supported by '{0}'. See the server logs for more details. + + + The requested upgrade is not supported by '{0}'. This could be due to mismatched bindings (for example security enabled on the client and not on the server). + + + Server '{0}' sent back a fault indicating it is too busy to process the request. Please retry later. Please see the inner exception for fault details. + + + Server '{0}' sent back a fault indicating it is in the process of shutting down. Please see the inner exception for fault details. + + + Server '{0}' is too busy to process this request. Try again later. + + + Protocol Type {0} was sent to a service that does not support that type of upgrade. + + + .Net Framing upgrade request for {0} was sent to a service that is not setup to receive upgrades. + + + You have tried to create a channel to a service that does not support .Net Framing. + + + You have tried to create a channel to a service that does not support .Net Framing. It is possible that you are encountering an HTTP endpoint. + + + An error occurred while transmitting data. + + + The server rejected the upgrade request. + + + The server at {0} rejected the session-establishment request. + + + Cannot resolve the host name of URI "{0}" using DNS. + + + The '{0}' authentication scheme has been specified on the HTTP factory. However, the factory only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. + + + The value specified for the AuthenticationScheme property on the HttpTransportBindingElement ('{0}') is not allowed when building a ChannelFactory. If you used a standard binding, ensure the ClientCredentialType is not set to HttpClientCredentialType.InheritedFromHost, a value which is invalid on a client. If you set the value to '{0}' directly on the HttpTransportBindingElement, please set it to Digest, Negotiate, NTLM, Basic, or Anonymous. + + + The '{0}' authentication scheme has been specified for the proxy on the HTTP factory. However, the factory only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. + + + The remote HTTP server did not satisfy the mutual authentication requirement. + + + The HTTP request is unauthorized with client authentication scheme '{0}'. The authentication header received from the server was '{1}'. + + + The HTTP request with client authentication scheme '{0}' failed with '{1}' status. + + + The HTTP request was forbidden with client authentication scheme '{0}'. + + + The provided URI scheme '{0}' is invalid; expected '{1}'. + + + The HTTPS listener factory was configured to require a client certificate and the '{0}' authentication scheme. However, only one form of client authentication can be required at once. + + + Could not find an appropriate transport manager for listen URI '{0}'. + + + The specified channel listener at '{0}' is not registered with this transport manager. + + + The HTTPS channel factory does not support explicit specification of an identity in the EndpointAddress unless the authentication scheme is NTLM or Negotiate. + + + The endpoint identity specified when creating the HTTPS channel to '{0}' contains multiple server certificates. However, the HTTPS transport only supports the specification of a single server certificate. In order to create an HTTPS channel, please specify no more than one server certificate in the endpoint identity. + + + The server certificate with name '{0}' failed identity verification because its thumbprint ('{1}') does not match the one specified in the endpoint identity ('{2}'). As a result, the current HTTPS request has failed. Please update the endpoint identity used on the client or the certificate used by the server. + + + A registration already exists for URI '{0}'. + + + Could not establish secure channel for SSL/TLS with authority '{0}'. + + + Could not establish trust relationship for the SSL/TLS secure channel with authority '{0}'. + + + Could not find a compatible transport manager for URI '{0}'. + + + The SPN for the responding server at URI '{0}' could not be determined. + + + The remote server did not satisfy the mutual authentication requirement. + + + Transfer mode {0} is not supported by {1}. + + + The token provider of type '{0}' did not return a token of type '{1}'. Check the credential configuration. + + + The required UserNameSecurityToken was not provided. + + + The following remote identity failed verification: '{0}'. + + + You cannot specify an explicit Proxy Address as well as UseDefaultWebProxy=true in your HTTP Transport Binding Element. + + + The HTTP proxy authentication credential specified an impersonation level restriction ({0}) that is stricter than the restriction for target server authentication ({1}). + + + The HTTP proxy authentication credential specified an mutual authentication requirement ({0}) that is stricter than the requirement for target server authentication ({1}). + + + The NTLM authentication scheme was specified, but the target credential does not allow NTLM. + + + The impersonation level '{0}' was specified, yet HTTP Digest authentication can only support 'Impersonation' level when used with an explicit credential. + + + The scheme parameter must not be empty. + + + The protection level '{0}' was specified, yet SSL transport security only supports EncryptAndSign. + + + {0}. This often indicates that a service that HTTP.SYS depends upon (such as httpfilter) is not started. + + + {0}. This often indicates that the HTTP client has prematurely closed the underlying TCP connection. + + + Opening the channel timed out after {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + Opening the {0} channel timed out after {1}. The time allotted to this operation may have been a portion of a longer timeout. + + + TimeSpan must be greater than TimeSpan.Zero. + + + TimeSpan cannot be less than TimeSpan.Zero. + + + The value of this argument must be non-negative. + + + The value of this argument must be positive. + + + The value of this argument must be greater than 0. + + + The value of this argument must fall within the range {0} to {1}. + + + The specified offset exceeds the upper bound of the buffer ({0}). + + + The specified offset exceeds the buffer size ({0} bytes). + + + The specified size exceeds the remaining buffer space ({0} bytes). + + + The space needed for encoding ({0} bytes) exceeds the message frame offset. + + + {0} returned true from OnTryCreateFaultMessage, but did not return a fault message. + + + {0} returned false from OnTryCreateFaultMessage, but returned a non-null fault message. + + + {0} returned true from OnTryCreateException, but did not return an Exception. + + + {0} returned false from OnTryCreateException, but returned a non-null Exception (See InnerException for details). + + + Policy chain contains self issued URI or a managed issuer in the wrong position. + + + The Binding with name {0} failed validation because it contains a BindingElement with type {1} which is not supported in partial trust. Consider using BasicHttpBinding or WSHttpBinding, or hosting your application in a full-trust environment. + + + The WSHttpBinding with name {0} failed validation because it contains a BindingElement with type {1} which is not supported in partial trust. Consider disabling the message security and reliable session options, using BasicHttpBinding, or hosting your application in a full-trust environment. + + + The Binding with name {0} failed validation because the Binding type {1} is not supported in partial trust. Consider using BasicHttpBinding or WSHttpBinding, or hosting your application in a full-trust environment. + + + The Service with name '{0}' could not be constructed because the application does not have permission to construct the type: both the Type and its default parameter-less constructor must be public. + + + The Method with name '{1}' in Type '{0}' could not be invoked because the application does not have permission to invoke the method: both the Method and its containing Type must be public. + + + Access to performance counters is denied. Application may be running in partial trust. Either disable performance counters or configure the application to run in full trust. + + + Performance counter instance names may not be unique. See "http://go.microsoft.com/fwlink/?LinkId=524462" for details. + + + Access to windows management instrumentation (WMI) is denied. Application may be running in partial trust. Either disable WMI or configure the application to run in full trust. + + + Unable to log messages. Application may be running in partial trust. Either disable message logging or configure the application to run in full trust. + + + The 'scopeName' argument to the InstanceKey constructor must be a non-empty string which indicates the scope of uniqueness for the key. Durable services use the service namespace and name as the scope of uniqueness. + + + The 'provider' argument to the InstanceKey constructor must be a non-empty string which identifies the source of the key data. The 'provider' argument can be null, in which case the default correlation provider name is used. + + + The 'Name' property cannot be set on an invalid InstanceKey. + + + The type {0} is not a supported result type. + + + The result cannot be represented as a nodeset. Only results of type XPathResultType.NodeSet can be represented as nodesets. + + + Message with id {0} was not in a locked state. + + + Validity of message with id {0} has expired. + + + The StreamUpgradeInitiator specified ({0}) is not supported by this IStreamUpgradeChannelBindingProvider implementation. The most likely cause of this is passing a StreamUpgradeInitiator that was not created by the StreamUpgradeProvider associated with the current IStreamUpgradeChannelBindingProvider implementation. + + + The StreamUpgradeAcceptor specified ({0}) is not supported by this IStreamUpgradeChannelBindingProvider implementation. The most likely cause of this is passing a StreamUpgradeAcceptor that was not created by the StreamUpgradeProvider associated with this IStreamUpgradeChannelBindingProvider implementation. + + + The StreamUpgradeProvider {0} does not support the specified ChannelBindingKind ({1}). + + + Extended protection is not supported on this platform. Please install the appropriate patch or change the ExtendedProtectionPolicy on the Binding or BindingElement to a value with a PolicyEnforcement value of "Never" or "WhenSupported". + + + The Authentication Scheme "Basic" does not support Extended Protection. Please use a different authentication scheme or disable the ExtendedProtectionPolicy on the Binding or BindingElement by creating a new ExtendedProtectionPolicy with a PolicyEnforcement value of "Never". + + + CustomChannelBindings are not supported. Please remove the CustomChannelBinding from the ExtendedProtectionPolicy". + + + ClientCredentialType '{0}' can only be used on the server side, not the client side. Please use one of the following values instead 'None, Basic, Client, Digest, Ntlm, Windows'. + + + When authentication schemes 'Basic' and also '{0}' are enabled, the value of IncludeWindowsGroups for Windows ('{1}') and UserName authentication ('{2}') must match. Please consider using the same value in both places. + + + The authentication schemes cannot be inherited from the host for binding '{0}'. No AuthenticationScheme was specified on the ServiceHost or in the virtual application in IIS. This may be resolved by enabling at least one authentication scheme for this virtual application in IIS, through the ServiceHost.Authentication.AuthenticationSchemes property or in the configuration at the <serviceAuthenticationManager> element. + + + The authentication schemes configured on the host ('{0}') do not allow those configured on the binding '{1}' ('{2}'). Please ensure that the SecurityMode is set to Transport or TransportCredentialOnly. Additionally, this may be resolved by changing the authentication schemes for this application through the IIS management tool, through the ServiceHost.Authentication.AuthenticationSchemes property, in the application configuration file at the <serviceAuthenticationManager> element, by updating the ClientCredentialType property on the binding, or by adjusting the AuthenticationScheme property on the HttpTransportBindingElement. + + + Object type must be an enum with the flag attribute. '{0}' is not an enum - or the flag attribute is not set. Please use an enum type with the flag attribute instead. + + + Object type must be an enum with the flag attribute and may only contain powers of two for the flags enum values or a combination of such values. Please use an enum type according to these rules. + + + There is no pending asynchronous write on this stream. Ensure that there is pending write on the stream or verify that the implementation does not try to complete the same operation multiple times. + + + Cannot write to a buffer which is currently being flushed. + + + An asynchronous write was called on the stream without a free buffer. + + + The transport configured on this binding does not appear to support the CompressionFormat specified ({0}) on the message encoder. To resolve this issue, set the CompressionFormat on the {1} to '{2}' or use a different transport. + + + The value '{1}' is not supported in this context for the binding security property '{0}'. + + + The value '{1}' is not supported in this context for the binding property '{0}'. + + + The value of MaxPendingAccepts should not be larger than {0}. + + + The initialization process of the request message timed out after {0}. To increase this quota, use the '{1}' property on the '{2}'. + + + The value '{1}' for the '{0}' property is not supported in Windows Store apps. + + + The remote endpoint requested an address for acknowledgements that is not the same as the address for application messages. The channel could not be opened because this is not supported. Ensure the endpoint address used to create the channel is identical to the one the remote endpoint was set up with. + + + The address for acknowledgements must be the same as the address for application messages. Verify that your endpoint is configured to use the same URI for these two addresses. + + + The {0}:{1} assertion is not supported. + + + An unexpected error occurred while attempting to close the output half of the duplex reliable session. + + + The remote endpoint sent conflicting requests to create a reliable session. The conflicting requests have inconsistent filter criteria such as address or action. The reliable session has been faulted. + + + The remote endpoint sent conflicting requests to create a reliable session. The remote endpoint requested both a one way and a two way session. The reliable session has been faulted. + + + A message with action {0} could not be parsed. + + + The request to create a reliable session has been refused by the RM Destination. {0} The channel could not be opened. + + + The endpoint processing requests to create a reliable session only supports sessions in which the AcksTo Uri and the Endpoint Uri are the same. + + + The endpoint processing requests to create a reliable session only supports sessions in which the AcksTo Uri and the ReplyTo Uri are the same. + + + The endpoint at {0} processes duplex sessions. The create sequence request must contain an offer for a return sequence. This is likely caused by a binding mismatch. + + + The endpoint at {0} processes input sessions. The create sequence request must not contain an offer for a return sequence. This is likely caused by a binding mismatch. + + + The request to create a reliable session contains an invalid wsrm:IncompleteSequenceBehavior value. This is a WS-ReliableMessaging protocol violation. + + + The request to create a reliable session contains the wsse:SecurityTokenReference but does not carry a wsrm:UsesSequenceSTR header. This is a WS-ReliableMessaging protocol violation. The session could not be created. + + + The endpoint at {0} processes reply sessions. The create sequence request must contain an offer for a return sequence. This is likely caused by a binding mismatch. + + + The RM Destination requires the WS-SecureConversation protocol in the binding. This is likely caused by a binding mismatch. + + + The endpoint processing requests to create a reliable session does not support sessions that use SSL. This is likely caused by a binding mismatch. The session could not be created. + + + The request to create a reliable session carries a wsrm:UsesSequenceSTR header, but does not contain the wsse:SecurityTokenReference. This is a WS-ReliableMessaging protocol violation. The session could not be created. + + + The message is not a valid SOAP message. The body contains more than 1 root element. + + + The remote endpoint replied to a request for a two way session with an offer for a one way session. This is likely caused by a binding mismatch. The channel could not be opened. + + + The client requested creation of a two way session. A one way session was created. The session cannot continue without as a one way session. This is likely caused by a binding mismatch. + + + The response to the request to create a reliable session contains an invalid wsrm:IncompleteSequenceBehavior value. This is a WS-ReliableMessaging protocol violation. + + + The remote endpoint replied to a request for a one way session with an offer for a two way session. This is a WS-ReliableMessaging protocol violation. The channel could not be opened. + + + A return sequence was not offered by the create sequence request. The create sequence response cannot accept a return sequence. + + + The remote endpoint replied to a request for a two way session with an offer for a one way session. This is a WS-ReliableMessaging protocol violation. The channel could not be opened. + + + A return sequence was offered by the create sequence request but the create sequence response did not accept this sequence. + + + The WS-RM policy under the namespace {0} requires the wsrmp:ExactlyOnce, wsrmp:AtLeastOnce, or wsrmp:AtMostOnce assertion. Nothing was found. + + + The WS-RM policy under the namespace {0} requires the wsrmp:ExactlyOnce, wsrmp:AtLeastOnce, or wsrmp:AtMostOnce assertion. The {1} element under the {2} namespace was found. + + + The remote endpoint sent a TerminateSequence protocol message before fully acknowledging all messages in the reply sequence. This is a violation of the reliable request reply protocol. The reliable session was faulted. + + + The remote endpoint has closed the underlying secure session before the reliable session fully completed. The reliable session was faulted. + + + The underlying secure session has faulted before the reliable session fully completed. The reliable session was faulted. + + + The remote endpoint has errantly sent a TerminateSequence protocol message before the sequence finished. + + + The {0}:{1} element requires a {2}:{3} child element but has the {4} child element under the {5} namespace. + + + The {0}:{1} element requires a {2}:{3} child element but has no child elements. + + + The remote endpoint specified two different last message numbers. The reliable session is in an inconsistent state since it cannot determine the actual last message. The reliable session was faulted. + + + The SequenceAcknowledgement violates the cumulative acknowledgement invariant. + + + A violation of acknowledgement protocol has been detected. An InvalidAcknowledgement fault was sent to the remote endpoint and the reliable session was faulted. + + + An acknowledgement was received indicating the remaining buffer space on the remote endpoint is {0}. This number cannot be less than zero. The reliable session was faulted. + + + A message was received with a sequence number of {0}. Sequence numbers cannot be less than 1. The reliable session was faulted. + + + An acknowledgement range starting at {0} and ending at {1} was received. This is an invalid acknowledgement range. The reliable session was faulted. + + + The remote endpoint responded to the {0} request with a response with action {1}. The response must be a {0}Response with action {2}. The channel could not be opened. + + + The remote endpoint responded to the {0} request with a response with action {1}. The response must be a {0}Response with action {2}. The channel was faulted. + + + The {0} request's response was a message with action {1}. The response must be a {0}Response with action {2}. The reliable session cannot continue. + + + A message was received with a sequence number higher than the sequence number of the last message in this sequence. This is a violation of the sequence number protocol. The reliable session was faulted. + + + The value for wsrm:MessageNumber exceeds the value of the MessageNumber accompanying a LastMessage element in this Sequence. + + + Binding validation failed because the TransportBindingElement's ManualAddressing property was set to true on a binding that is configured to create reliable sessions. This combination is not supported and the channel factory or service host was not opened. + + + The maximum retry count has been exceeded with no response from the remote endpoint. The reliable session was faulted. This is often an indication that the remote endpoint is no longer available. + + + A problem occurred while reading a message. See inner exception for details. + + + The maximum message number for this sequence has been exceeded. The reliable session was faulted. + + + The maximum value for wsrm:MessageNumber has been exceeded. + + + The {0} assertion's Milliseconds attribute does not fall within the range this binding uses. The ReliableSessionBindingElement could not be created. + + + The remote endpoint did not include a final acknowledgement in the reply to the close sequence request message. This is a violation of the WS-ReliableMessaging protocol. The reliable session was faulted. + + + The wsa:MessageId header must be present on a wsrm:{0} message. + + + The returned wsrm:{0}Response message was missing the required wsa:RelatesTo header. This is a violation of the WS-Addressing request reply protocol. The reliable session was faulted. + + + The wsa:ReplyTo header must be present on a wsrm:{0} message. + + + More than one version of the {0} assertion was found. The ReliableSessionBindingElement could not be created. + + + The endpoint only processes messages using the WS-ReliableMessaging protocol. The message sent to the endpoint does not have an action or any headers used by the protocol and cannot be processed. + + + A message with action {0} is an empty message. This message cannot be processed because the body of this WS-ReliableMessaging protocol message must carry information pertaining to a reliable session. + + + The action {0} is not supported by this endpoint. Only WS-ReliableMessaging February 2005 messages are processed by this endpoint. + + + The remote endpoint closed the session before acknowledging all responses. All replies could not be delivered. The reliable session was faulted. + + + The remote endpoint returned a {0}Response when the {0} request had not been sent. This is a WS-ReliableMessaging protocol violation. The reliable session was faulted. + + + The {0}Response was received when the {0} request had not been sent. This is a WS-ReliableMessaging protocol violation. The reliable session cannot continue. + + + The remote endpoint failed to include a required SequenceAcknowledgement header on a reliable reply message. The reliable session was faulted. + + + Due to a request context abort call, the reliable reply session channel potentially has a gap in its reply sequence. The ExactlyOnce assurance can no longer be satisfied. The reliable session was faulted. + + + The required {0} attribute is missing from the {1} element in the {2} assertion. The ReliableSessionBindingElement could not be created. + + + The {0} assertion's required Milliseconds attribute is not schema compliant. Milliseconds must be convertible to an unsigned long. The ReliableSessionBindingElement could not be created. + + + The endpoint at {0} has stopped accepting wsrm sessions. + + + The Sequence is closed and cannot accept new messages. + + + The RM Source could not transfer the last message within the timeout the user specified. + + + The server received a TerminateSequence message before all reply sequence messages were acknowledged. This is a violation of the reply sequence acknowledgement protocol. + + + The wsrm:TerminateSequence protocol message was transmitted before the sequence was successfully completed. + + + The inactivity timeout of ({0}) has been exceeded. + + + Two different wsrm:LastMsgNumber values were specified. Because of this the reliable session cannot complete. + + + The user specified maximum retry count for a particular message has been exceeded. Because of this the reliable session cannot continue. + + + The CloseSequence request's reply message must carry a final acknowledgement. This is a violation of the WS-ReliableMessaging protocol. The reliable session cannot continue. + + + Due to a user abort the reliable session cannot continue. + + + The necessary size to buffer a sequence message has exceeded the configured buffer quota. Because of this the reliable session cannot continue. + + + The session has stopped waiting for a particular reply. Because of this the reliable session cannot continue. + + + A reply message was received with no acknowledgement. + + + All of the reply sequence's messages must be acknowledged prior to closing the request sequence. This is a violation of the reply sequence's delivery guarantee. The session cannot continue. + + + The user of the remote endpoint's reliable session expects no more messages and a new message arrived. Due to this the reliable session cannot continue. + + + The wsrm:LastMsgNumber value is too small. A message with a larger sequence number has already been received. + + + The RM destination received an acknowledgement message. The RM destination does not process acknowledgement messages. + + + The RM source received an AckRequested message. The RM source does not process AckRequested messages. + + + The RM source received an CloseSequence message. The RM source does not process CloseSequence messages. + + + The RM destination received an CloseSequenceResponse message. The RM destination does not process CloseSequenceResponse messages. + + + The RM source received a CreateSequence request. The RM source does not process CreateSequence requests. + + + The RM destination received multiple CreateSequence requests with different OfferId values over the same session. + + + The RM destination received a CreateSequenceResponse message. The RM destination does not process CreateSequenceResponse messages. + + + The RM source received multiple CreateSequenceResponse messages with different sequence identifiers over the same session. + + + The RM source received a TerminateSequence message. The RM source does not process TerminateSequence messages. + + + The RM destination received a TerminateSequenceResponse message. The RM destination does not process TerminateSequenceResponse messages. + + + The RM source does not support an RM destination initiated close since messages can be lost. The reliable session cannot continue. + + + The RM source does not support an RM destination initiated termination since messages can be lost. The reliable session cannot continue. + + + An unknown error occurred while trying to add a sequence message to the window. + + + The remote endpoint specified a last message number that is smaller than a sequence number that has already been seen. The reliable session is in an inconsistent state since it cannot determine the actual last message. The reliable session was faulted. + + + The message could not be transferred within the allotted timeout of {0}. There was no space available in the reliable channel's transfer window. The time allotted to this operation may have been a portion of a longer timeout. + + + The close operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + The open operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + The operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + The request operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + The send operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout. + + + The remote endpoint sent an unexpected ack. Simplex servers do not process acks. + + + The remote endpoint sent an unexpected request for an ack. Simplex clients do not send acks and do not process requests for acks. + + + The remote endpoint sent an unexpected close sequence message. Simplex clients do not process this message. + + + The remote endpoint sent an unexpected close sequence response message. Simplex servers do not process this message. + + + The remote endpoint sent an unexpected request to create a sequence. Clients do not process requests for a sequence. + + + The remote endpoint sent an unexpected create sequence response. Servers do not process this message. + + + The remote endpoint sent inconsistent requests to create the same sequence. The OfferId values are not identical. + + + The remote endpoint sent inconsistent responses to the same create sequence request. The sequence identifiers are not identical. + + + The remote endpoint sent an unexpected terminate sequence message. Simplex clients do not process this message. + + + The remote endpoint sent an unexpected terminate sequence response message. Simplex servers do not process this message. + + + The remote endpoint replied to the request for a sequence with a response that could not be parsed. See inner exception for details. The channel could not be opened. + + + The value of wsrm:Identifier is not a known Sequence identifier. + + + The remote endpoint no longer recognizes this sequence. This is most likely due to an abort on the remote endpoint. {0} The reliable session was faulted. + + + The remote endpoint has sent a message containing an unrecognized sequence identifier. The reliable session was faulted. + + + The remote endpoint has sent an unrecognized fault with namespace, {0}, name {1}, and reason {2}. The reliable session was faulted. + + + The remote endpoint has sent an unrecognized fault with namespace, {0}, name {1}, and reason {2}. The channel could not be opened. + + + The remote endpoint closed the sequence before message transfer was complete. This is not supported since all messages could not be transferred. The reliable session was faulted. + + + The remote endpoint terminated the sequence before message transfer was complete. This is not supported since all messages could not be transferred. The reliable session was faulted. + + + The remote endpoint has sent an fault message with an unexpected sequence identifier over a session. The fault may be intended for a different session. The fault reason is: {0} The reliable session was faulted. + + + Binding validation failed because the WSHttpBinding does not support reliable sessions over transport security (HTTPS). The channel factory or service host could not be opened. Use message security for secure reliable messaging over HTTP. + + + The sequence has been terminated by the remote endpoint. {0} The reliable session was faulted. + + + An error occurred while processing a message. {0} + + + The returned {0}Response was carrying the a wsa:RelatesTo header that does not correlate with the wsa:MessageId header on the {0} request. This is a violation of the WS-Addressing request reply protocol. The reliable session cannot continue. + + + The remote endpoint has responded to a {0} request message with an invalid reply. The reply has a wsa:RelatesTo header with an unexpected identifier. The reliable session cannot continue. + + + The remote endpoint sent a wsrm:{0} request message with a wsa:ReplyTo address containing a URI which is not equivalent to the remote address. This is not supported. The reliable session was faulted. + + + The wsrm:{0} request message's wsa:ReplyTo address containing a URI which is not equivalent to the remote address. This is not supported. The reliable session was faulted. + + + The incoming message is not a WS-ReliableMessaging 1.1 message and could not be processed. + + + The RM server requires the use of WS-ReliableMessaging 1.1 protocol. This is likely caused by a binding mismatch. + + + The operations {0} and {1} have the same action ({2}). Every operation must have a unique action value. + + + Cannot create a typed message due to action mismatch, expecting {0} encountered {1} + + + Part {1} in message {0} cannot be exported with RPC or encoded since its type is anonymous. + + + The IAsyncResult returned from Begin and the IAsyncResult supplied to the Callback are on different objects. These are required to be the same object. + + + Binding name cannot be null or empty. + + + Value '{0}' provided for {1} property is an invalid URI. + + + Parameter value '{0}' is an invalid URI. + + + Header name cannot be null or empty. + + + Could not find a base address that matches scheme {0} for the endpoint with binding {1}. Registered base address schemes are [{2}]. + + + The scheme '{0}' used by binding {1} does not match the required scheme '{2}'. + + + Only a '{0}' using '{1}' or '{2}' is supported in this scenario. + + + MessageVersion '{0}' is not supported in this scenario. Only MessageVersion '{1}' is supported. + + + The binding associated with ServiceMetadataBehavior or ServiceDebugBehavior is not supported. The inner binding elements used by this binding must support IReplyChannel. Verify that HttpGetBinding/HttpsGetBinding (on ServiceMetadataBehavior) and HttpHelpPageBinding/HttpsHelpPageBinding (on ServiceDebugBehavior) are supported. + + + Method '{0}' in class '{1}' has bad parameter metadata: a pass-by-reference parameter is marked with the 'in' but not the 'out' parameter mode. + + + Method '{0}' in class '{1}' has bad parameter metadata: a pass-by-value parameter is marked with the 'out' parameter mode. + + + When calling the CreateFromPolicy method, the policy argument must be an XmlElement instance with LocalName '{1}' and NamespaceUri '{0}'. This XmlElement has LocalName '{3}' and NamespaceUri '{2}'. + + + The URI supplied to ServiceMetadataBehavior via the ExternalMetadataLocation property or the externalMetadataLocation attribute in the serviceMetadata section in config must be a relative URI or an absolute URI with an http or https scheme. '{0}' was specified, which is a absolute URI with {1} scheme. + + + The URL supplied to ServiceMetadataBehavior via the ExternalMetadataLocation property or the externalMetadataLocation attribute in the serviceMetadata section in config was a relative URL and there is no base address with which to resolve it. '{0}' was specified. + + + There was a problem reading the MetadataSet argument: a MetadataSection instance with identifier '{0}' and dialect '{1}' has a Metadata property whose type does not match the dialect. The expected Metadata type for this dialect is '{2}' but was found to be '{3}'. + + + Metadata contains a reference that cannot be resolved: '{0}'. + + + The MaximumResolvedReferences property of MetadataExchangeClient must be greater than or equal to one. '{0}' was specified. + + + The MetadataExchangeClient was not supplied with a MetadataReference or MetadataLocation from which to get metadata. You must supply one to the constructor, to the GetMetadata method, or to the BeginGetMetadata method. + + + The MetadataExchangeClient could not create an IChannelFactory for: address='{0}', dialect='{1}', and identifier='{2}'. + + + The MetadataExchangeClient could not create an HttpWebRequest for: address='{0}', dialect='{1}', and identifier='{2}'. + + + The MetadataExchangeClient instance could not be initialized because no Binding is available for scheme '{0}'. You can supply a Binding in the constructor, or specify a configurationName. + + + The TransactionProtocol setting was not understood. A supported protocol must be specified. + + + The MetadataResolver cannot recieve an empty contracts argument to the Resolve or BeginResolve methods. You must supply at least one ContractDescription. + + + The ContractDescriptions in contracts must all have unique Name and Namespace pairs. More than one ContractDescription had the pair Name='{0}' and Namespace='{1}'. + + + The contracts argument to the Resolve or BeginResolve methods cannot contain a null ContractDescription. + + + The binding specified to do metadata exchange does not contain a TransportBindingElement. + + + The binding (Name={0}, Namespace={1}) does not contain a TransportBindingElement. + + + Body object cannot be null in message {0} + + + Type {0} cannot inherit from any class other than object to be used as body object in RPC style. + + + Type {0} implements interface {1} which is not supported for body object in RPC style. + + + CallbackBehaviorAttribute can only be run as a behavior on an endpoint with a duplex contract. Contract '{0}' is not duplex, as it contains no callback operations. + + + This operation would deadlock because the reply cannot be received until the current Message completes processing. If you want to allow out-of-order message processing, specify ConcurrencyMode of Reentrant or Multiple on {0}. + + + In order to use the contract '{0}' with DuplexChannelFactory, the contract must specify a valid callback contract. If your contract does not have a callback contract, consider using ChannelFactory instead of DuplexChannelFactory. + + + The dispatch instance for duplex callbacks cannot be activated - you must provide an instance. + + + ServiceHostBase's AddBaseAddress method cannot be called after the InitializeDescription method has completed. + + + Cannot make a call on this channel because a call to Open() is in progress. + + + The MetadataExchangeClient can only get metadata from absolute addresses. It cannot get metadata from '{0}'. + + + The MetadataExchangeClient can only get metadata from http or https addresses when using MetadataExchangeClientMode HttpGet. It cannot get metadata from '{0}'. + + + The MetadataExchangeClient can only get metadata from http and https MetadataLocations. It cannot get metadata from '{0}'. + + + The configured policy specifies more than one TransactionProtocol across the operations. A single TransactionProtocol for each endpoint must be specified. + + + Generating message contract since the operation {0} is neither RPC nor document wrapped. + + + Generating message contract since the wrapper namespace ({1}) of message {0} does not match the default value ({2}) + + + Generating message contract since the wrapper name ({1}) of message {0} does not match the default value ({2}) + + + Generating message contract since element name {0} from namespace {1} is not marked nillable + + + Generating message contract since message {0} requires protection. + + + Headers are not supported in RPC encoded format. Headers are ignored in message {0}. + + + Generating message contract since message {0} has headers + + + Generating message contract since the operation {0} has untyped Message as argument or return type + + + Generating message contract since message part namespace ({0}) does not match the default value ({1}) + + + There are two contracts listening on the same binding ({2}) and address with conflicting settings. Specifically, the contract '{0}' specifies SessionMode.NotAllowed while the contract '{1}' specifies SessionMode.Required. You should either change one of the SessionMode values or specify a different address (or ListenUri) for each endpoint. + + + This collection does not support setting extensions by index. Please consider using the InsertItem or RemoveItem methods. + + + This ChannelDispatcher is not currently attached to the provided ServiceHost. + + + Cannot add a ChannelDispatcher to more than one ServiceHost. + + + Cannot open ChannelDispatcher because it is not attached to a ServiceHost. + + + Cannot open ChannelDispatcher because it is does not have a MessageVersion set. + + + The ChannelDispatcher at '{0}' is unable to open its IChannelListener as there are no endpoints for the ChannelDispatcher. + + + The ChannelDispatcher at '{0}' with contract(s) '{1}' is unable to open its IChannelListener. + + + The type argument passed to the generic ChannelFactory class must be an interface type. + + + ApplyConfiguration requires that the Endpoint property be initialized. Either provide a valid ServiceEndpoint in the CreateDescription method or override the ApplyConfiguration method to provide an alternative implementation. + + + CreateFactory requires that the Endpoint property be initialized. Either provide a valid ServiceEndpoint in the CreateDescription method or override the CreateFactory method to provide an alternative implementation. + + + An operation marked as IsTerminating has already been invoked on this channel, causing the channel's connection to terminate. No more operations may be invoked on this channel. Please re-create the channel to continue communication. + + + This channel can no longer be used to send messages as the output session was auto-closed due to a server-initiated shutdown. Either disable auto-close by setting the DispatchRuntime.AutomaticInputSessionShutdown to false, or consider modifying the shutdown protocol with the remote server. + + + Array of type {0} is not supported. + + + Can only store into ArgBuilder or LocalBuilder. Got: {0}. + + + Expecting End {0}. + + + {0} is not assignable from {1}. + + + No conversion possible to {0}. + + + CODEGEN: {0} + + + Internal Error: Unrecognized constant type {0}. + + + This collection does not support setting items by index. + + + This operation is not supported because the collection is read-only. + + + The collection of type {0} does not support values of type {1}. + + + Top level XML element with name {0} in namespace {1} cannot reference {2} type because it already references a different type ({3}). Use a different operation name or MessageBodyMemberAttribute to specify a different name for the Message or Message parts. + + + Duplicate top level XML Schema type with name {0} in namespace {1}. + + + The value of OperationContext.Current is not the OperationContext value installed by this OperationContextScope. + + + ContractDescription's Name must be a non-empty string. + + + ContractDescription '{0}' has zero operations; a contract must have at least one operation. + + + ContractDescription '{0}' has zero IsInitiating=true operations; a contract must have at least one IsInitiating=true operation. + + + The service class of type {0} both defines a ServiceContract and inherits a ServiceContract from type {1}. Contract inheritance can only be used among interface types. If a class is marked with ServiceContractAttribute, it must be the only type in the hierarchy with ServiceContractAttribute. Consider moving the ServiceContractAttribute on type {1} to a separate interface that type {1} implements. + + + The service class of type {0} both defines a ServiceContract and inherits a ServiceContract from type {1}. Contract inheritance can only be used among interface types. If a class is marked with ServiceContractAttribute, then another service class cannot derive from it. + + + SynchronizedReadOnlyCollection's CopyTo only works if the underlying list implements ICollection. + + + The callback contract of contract {0} either does not exist or does not define any operations. If this is not a duplex contract, consider using ChannelFactory instead of DuplexChannelFactory. + + + This CreateChannel overload cannot be called on this instance of DuplexChannelFactory, as the DuplexChannelFactory was not initialized with an InstanceContext. Please call the CreateChannel overload that takes an InstanceContext. + + + This CreateChannel overload cannot be called on this instance of DuplexChannelFactory, as the DuplexChannelFactory was initialized with a Type and no valid InstanceContext was provided. Please call the CreateChannel overload that takes an InstanceContext. + + + This CreateChannel overload cannot be called on this instance of DuplexChannelFactory, as the InstanceContext provided to the DuplexChannelFactory does not contain a valid UserObject. + + + The InstanceContext provided to the ChannelFactory contains a UserObject that does not implement the CallbackContractType '{0}'. + + + ChannelFactory does not support the contract {0} as it defines a callback contract with one or more operations. Please consider using DuplexChannelFactory instead of ChannelFactory. + + + The CustomBinding on the ServiceEndpoint with contract '{0}' lacks a TransportBindingElement. Every binding must have at least one binding element that derives from TransportBindingElement. + + + The Scheme cannot be computed for this binding because this CustomBinding lacks a TransportBindingElement. Every binding must have at least one binding element that derives from TransportBindingElement. + + + The formatter threw an exception while trying to deserialize the message: {0} + + + This operation is not possible since the dictionary is empty. + + + The type or member named '{0}' could not be loaded because it has two incompatible attributes: '{1}' and '{2}'. To fix the problem, remove one of the attributes from the type or member. + + + The endpoint's address is not specified. + + + The endpoint's contract is not specified. + + + The endpoint's binding is not specified. + + + The channel is configured to use interactive initializer '{0}', but the channel was Opened without calling DisplayInitializationUI. Call DisplayInitializationUI before calling Open or other methods on this channel. + + + AllowInitializationUI was set to false for this channel, but the channel is configured to use the '{0}' as an interactive initializer. + + + This is a Windows&#169; Communication Foundation service.<BR/><BR/><B>Metadata publishing for this service is currently disabled.</B><BR/><BR/>If you have access to the service, you can enable metadata publishing by completing the following steps to modify your web or application configuration file:<BR/><BR/>1. Create the following service behavior configuration, or add the &lt;serviceMetadata&gt; element to an existing service behavior configuration: + + + 2. Add the behavior configuration to the service: + + + Note: the service name must match the configuration name for the service implementation.<BR/><BR/>3. Add the following endpoint to your service configuration: + + + Note: your service must have an http base address to add this endpoint.<BR/><BR/>The following is an example service configuration file with metadata publishing enabled: + + + For more information on publishing metadata please see the following documentation: <a href="http://go.microsoft.com/fwlink/?LinkId=65455">http://go.microsoft.com/fwlink/?LinkId=65455</a>. + + + Note: the service name must match the configuration name for the service implementation. + + + Add the following endpoint. + + + Note: your service must have an http base address to add this endpoint. + + + Add the following element to your service behavior configuration. + + + <P class='intro'><B>C#</B></P> + + + <P class='intro'><B>Visual Basic</B></P> + + + Service + + + {0} Service + + + You have created a service.<P class='intro'>To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:</P> + + + You have created a service.<P class='intro'>To test this service, you will need to create a client and use it to call the service; however, metadata publishing via ?WSDL is currently disabled. This can be enabled via the service's configuration file. </P> + + + This will generate a configuration file and a code file that contains the client class. Add the two files to your client application and use the generated client class to call the Service. For example:<BR/> + + + Use the 'client' variable to call operations on the service. + + + Always close the client. + + + The service encountered an error. + + + Operation '{0}' could not be loaded as it uses an unsupported combination of Use and Style settings: Document with Encoded. To fix the problem, change the Use setting to Literal or change the Style setting to Rpc. + + + Fault could not be loaded as the Use setting is Encoded and it references a schema definition using Element attribute. To fix the problem, change the Use setting to Literal. + + + Message part {0} in namespace {1} appears more than once in Message. + + + This service has multiple endpoints listening at '{0}' which share the same initiating action '{1}'. As a result, messages with this action would be dropped since the dispatcher would not be able to determine the correct endpoint for handling the message. Please consider hosting these Endpoints at separate ListenUris. + + + The IEndpointBehavior '{0}' cannot be used on the server side; this behavior can only be applied to clients. + + + Cannot add EndpointDispatcher to more than one ChannelDispatcher. + + + This EndpointDispatcher is not currently attached to the provided ChannelDispatcher. + + + Error creating a reader for the MTOM message + + + Error in deserializing body of request message for operation '{0}'. + + + Error in deserializing body of request message for operation '{0}'. {1} + + + Error in deserializing body of reply message for operation '{0}'. + + + Error in deserializing body of reply message for operation '{0}'. {1} + + + There was an error in serializing body of message {0}: '{1}'. Please see InnerException for more details. + + + There was an error in deserializing one of the headers in message {0}. Please see InnerException for more details. + + + There was an error in serializing one of the headers in message {0}: '{1}'. Please see InnerException for more details. + + + Server returned an invalid SOAP Fault. Please see InnerException for more details. + + + An error occurred while loading attribute '{0}' on type '{1}'. Please see InnerException for more details. + + + An error occurred while loading attribute '{0}' on method '{1}' in type '{2}'. Please see InnerException for more details. + + + An error occurred while loading attribute '{0}' on parameter {1} of method '{2}' in type '{3}'. Please see InnerException for more details. + + + An error occurred while loading attribute '{0}'. Please see InnerException for more details. + + + --- End of inner ExceptionDetail stack trace --- + + + An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: + + + Internal Error: Message must be a valid IMethodCallMessage. + + + The specified ContractDescription could not be exported to WSDL because the Type property of the MessagePartDescription with name '{1}' in the OperationDescription with name '{0}' is not set. The Type property must be set in order to create WSDL. + + + Fault named {0} in operation {1} cannot be imported. {2} + + + In operation {0}, more than one fault is declared with detail type {1} + + + In operation {0}, more than one fault is declared with element name {1} in namespace {2} + + + {0}: {1} (Fault Detail is equal to {2}). + + + The creator of this fault did not specify a Reason. + + + In operation {0}, the schema type corresponding to the fault detail type {1} is anonymous. Please set Fault name explicitly to export anonymous types. + + + Header name mismatch in member {1} of type {0}. The header name found in the description is {2}. The element name deduced by the formatter is {3}. This mismatch can happen if the ElementName specified in XmlElementAttribute or XmlArrayAttribute does not match the name specified in the MessageHeaderAttribute or MessageHeaderArrayAttribute or the member name. + + + Header name mismatch in operation {0} from contract {1}:{2}. The header name found in the description is {3}. The element name deduced by the formatter is {4}. This mismatch can happen if the ElementName specified in XmlElementAttribute or XmlArrayAttribute does not match the name specified in the MessageHeaderAttribute or MessageHeaderArrayAttribute or the member name. + + + Header namespace mismatch in member {1} of type {0}. The header namespace found in the description is {2}. The element namespace deduced by the formatter is {3}. This mismatch can happen if the Namespace specified in XmlElementAttribute or XmlArrayAttribute does not match the namespace specified in the MessageHeaderAttribute or MessageHeaderArrayAttribute or the contract namespace. + + + Header namespace mismatch in operation {0} from contract {1}:{2}. The header namespace found in the description is {3}. The element namespace deduced by the formatter is {4}. This mismatch can happen if the Namespace specified in XmlElementAttribute or XmlArrayAttribute does not match the namespace specified in the MessageHeaderAttribute or MessageHeaderArrayAttribute or the contract namespace. + + + The header '{0}' from the namespace '{1}' was not understood by the recipient of this message, causing the message to not be processed. This error typically indicates that the sender of this message has enabled a communication protocol that the receiver cannot process. Please ensure that the configuration of the client's binding is consistent with the service's binding. + + + Message {0} must not have headers to be used in RPC encoded style. + + + This value cannot be changed after the ServiceHost has opened. + + + This value cannot be changed after the ChannelFactory has opened. + + + This value cannot be changed after the first ClientBase of type '{0}' has been created. + + + {0} cannot be changed after the ServiceHost has opened. + + + Operation {0} binding {1} has extra part {2} that is not present in other bindings + + + Style {1} on header {0} does not match expected style {2}. + + + All parts of message in operation {0} must either contain type or element. + + + Style {1} inferred from messages in operation {0} does not match expected style {2} specified via bindings. + + + Bindings for operation {0} cannot specify different use and style values. Binding {1} specifies use {2} and style {3} while binding {4} specifies use {5} and style {6}. + + + Extensions for operation {0} in binding {1} cannot specify different use values. + + + Message bindings for operation {0} in binding {1} cannot specify different use values. + + + Fault bindings for operation {0} in binding {1} cannot specify different use values. + + + Service implementation object invoked with wrong number of input parameters, operation expects {0} parameters but was called with {1} parameters. + + + Service implementation object invoked with null input parameters, but operation expects {0} parameters. + + + The InstanceContext has no provider for creating Service implementation objects. + + + This OperationContextScope is being disposed out of order. + + + The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs. + + + The client was unable to process the callback request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from CallbackBehaviorAttribute or from the <clientDebug> configuration behavior) on the client in order to send the exception information back to the server, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the client trace logs. + + + IAsyncResult's State must be the state argument passed to your Begin call. + + + IAsyncResult not provided or of wrong type. + + + The CallbackContract {0} is invalid because it is not an interface type. + + + Invalid IContextChannel passed to OperationContext. Must be either a server dispatching channel or a client proxy channel. + + + This OperationContextScope is being disposed on a different thread than it was created. + + + OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name '{0}' and namespace '{1}'. Found node type '{2}' with name '{3}' and namespace '{4}' + + + The OperationFormatter could not deserialize any information from the Message because the Message is empty (IsEmpty = true). + + + There was an error while trying to serialize parameter {0}:{1}. The InnerException message was '{2}'. Please see InnerException for more details. + + + There was an error while trying to deserialize parameter {0}:{1}. Please see InnerException for more details. + + + There was an error while trying to deserialize parameter {0}:{1}. The InnerException message was '{2}'. Please see InnerException for more details. + + + The operation {0} either has a parameter or a return type that is attributed with MessageContractAttribute. In order to represent the request message using a Message Contract, the operation must have a single parameter attributed with MessageContractAttribute. In order to represent the response message using a Message Contract, the operation's return value must be a type that is attributed with MessageContractAttribute and the operation may not have any out or ref parameters. + + + MessageHeaderArrayAttribute found on member {0} is not a single dimensional array. + + + Outgoing request message for operation '{0}' specified Action='{1}', but contract for that operation specifies Action='{2}'. The Action specified in the Message must match the Action in the contract, or the operation contract must specify Action='*'. + + + Outgoing reply message for operation '{0}' specified Action='{1}', but contract for that operation specifies ReplyAction='{2}'. The Action specified in the Message must match the ReplyAction in the contract, or the operation contract must specify ReplyAction='*'. + + + In order to use Streams with the MessageContract programming model, the type {0} must have a single member with MessageBodyMember attribute and the member type must be Stream. + + + For request in operation {0} to be a stream the operation must have a single parameter whose type is Stream. + + + For response in operation {0} to be a stream the operation must have a single out parameter or return value whose type is Stream. + + + Buffer size must be at least {0} bytes. + + + The PrimitiveOperationFormatter was given a parameter or return type which it does not support. + + + The static CreateChannel method cannot be used with the contract {0} because that contract defines a callback contract. Please try using one of the static CreateChannel overloads on DuplexChannelFactory<TChannel>. + + + XmlSerializer attribute {0} is not valid in {1}. Only SoapElement attribute is supported. + + + XmlSerializer attribute {0} is not valid in {1}. Only XmlElement, XmlArray, XmlArrayItem and XmlAnyElement attributes are supported in MessageContract when IsWrapped is false. + + + XmlSerializer attribute {0} is not valid in {1}. Only XmlElement, XmlArray, XmlArrayItem, XmlAnyAttribute and XmlAnyElement attributes are supported when IsWrapped is true. + + + {0} must contain either a single ServiceKnownTypeAttribute that refers to a method or a set of ServiceKnownTypeAttributes, each specifying a valid type + + + The return type of method {1} in type {2} must be IEnumerable<Type> to be used by ServiceKnownTypeAttribute in {0} + + + ServiceKnownTypeAttribute in {0} refers to a method {1} that does not exist in type {2} + + + KnownType cannot be null in operation {0} + + + The type {1} defines a MessageContract but also derives from a type {0} that does not define a MessageContract. All of the objects in the inheritance hierarchy of {1} must defines a MessageContract. + + + The message cannot be deserialized into MessageContract type {0} since it does not have a default (parameterless) constructor. + + + MessageOperationFormatter cannot serialize faults. + + + The value '{0}' is not valid for the Location property. The Location property must be a valid absolute or relative URI. + + + Method {0} is not supported on this proxy, this can happen if the method is not marked with OperationContractAttribute or if the interface type is not marked with ServiceContractAttribute. + + + Callback method {0} is not supported, this can happen if the method is not marked with OperationContractAttribute or if its interface type is not the target of the ServiceContractAttribute's CallbackContract. + + + ServiceHost implementation type {0} does not implement ServiceContract {1}. + + + A DispatchOperation (or ClientOperation) can only be added to its parent DispatchRuntime (or ClientRuntime). + + + No Action header was found with namespace '{0}' for the given message. + + + Calling Post() on '{0}' resulted in multiple callbacks. This indicates a problem in '{0}'. + + + The callback passed to operation '{0}' was called more than once. This indicates an internal error in the implementation of that operation. + + + Method {0} in type {1} has more than one header part of type array of XmlElement. + + + A ServiceContract has more the one operation with an Action of "*". A ServiceContract can have at most one operation an Action = "*". + + + The Service contains multiple ServiceEndpoints with different ContractDescriptions which each have Name='{0}' and Namespace='{1}'. Either provide ContractDescriptions with unique Name and Namespaces, or ensure the ServiceEndpoints have the same ContractDescription instance. + + + Part {1}:{0} is repeating and is not supported in Soap Encoding. + + + The Name property must be a non-empty string. + + + The ConfigurationName property must be a non-empty string. + + + Cannot handle invocation of {0} on interface {1} because the OperationSelector on ClientRuntime is null. + + + The service type provided could not be loaded as a service because it does not have a default (parameter-less) constructor. To fix the problem, add a default constructor to the type, or pass an instance of the type to the host. + + + The contract specified by type '{0}' is ambiguous. The type derives from at least two different types that each define its own service contract. For this type to be used as a contract type, exactly one of its inherited contracts must be more derived than any of the others. + + + Extension {0} prevented call to operation '{1}' from replying by setting the reply to null. + + + Formatter {0} returned a null reply message for call to operation '{1}'. + + + The operation '{0}' could not be completed because the sessionful channel timed out waiting to receive a message. To increase the timeout, either set the receiveTimeout property on the binding in your configuration file, or set the ReceiveTimeout property on the Binding directly. + + + {0} must be a relative URI or an absolute URI with scheme '{1}'. '{2}' is an absolute URI with scheme '{3}'. + + + The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http base address. Either supply an http base address or set HttpGetUrl to an absolute address. + + + The HttpsGetEnabled property of ServiceMetadataBehavior is set to true and the HttpsGetUrl property is a relative address, but there is no https base address. Either supply an https base address or set HttpsGetUrl to an absolute address. + + + The ChannelDispatcher with ListenUri '{0}' has endpoints with the following contracts: {1}. Metadata endpoints cannot share ListenUris. The conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config. + + + Service implementation type is an interface or abstract class and no implementation object was provided. + + + This property sets EnableFaults on the client. To set EnableFaults on the server, use ChannelDispatcher's EnableFaults. + + + This property sets ManualAddressing on the client. To set ManualAddressing on the server, use ChannelDispatcher's ManualAddressing. + + + TransactedBatchingBehavior validation failed. Service or client cannot be started. Transacted batching is not supported for session contracts. Remove transacted batching behavior from the endpoint or define a non-sessionful contract. + + + TransactedBatchingBehavior validation failed. Service cannot be started. Transacted batching requires ServiceBehavior.ReleaseServiceInstanceOnTransactionComplete to be false. + + + The service implementation object was not initialized or is not available. + + + The WS-Addressing "none" value is not valid for the August 2004 version of WS-Addressing. + + + An object that is not an exception was thrown. + + + The operation '{0}' cannot be the first operation to be called because IsInitiating is false. + + + There was no CLR type specified for parameter {0}, preventing the operation from being generated. + + + The one-way operation '{1}' on ServiceContract '{0}' is configured for transaction flow. Transactions cannot be flowed over one-way operations. + + + The incoming message with action could not be processed because it is targeted at a request-reply operation, but cannot be replied to as the MessageId property is not set. + + + OperationBehaviorAttribute can only go on the service class, it cannot be put on the ServiceContract interface. Method '{0}' on type '{1}' violates this. + + + The ReleaseInstanceMode property on OperationBehaviorAttribute can only be set on non-callback operations. Method '{0}' violates this. + + + Method '{0}' has OperationContractAttribute, but enclosing type '{1}' does not have ServiceContractAttribute. OperationContractAttribute can only be used on methods in ServiceContractAttribute types or on their CallbackContract types. + + + Method '{1}' has {0}, but enclosing type '{2}' does not have ServiceContractAttribute. {0} can only be used on methods in ServiceContractAttribute types. + + + OperationDescription's Name must be a non-empty string. + + + All parameter names used in operations that make up a service contract must not be null. + + + OperationDescription '{0}' is invalid because its Messages property contains an invalid number of MessageDescription instances. Each OperationDescription must have one or two messages. + + + There was a mismatch between the number of supplied arguments and the number of expected arguments. Specifically, the argument '{0}' has '{1}' elements while the argument '{2}' has '{3}' elements. + + + The 'parameters' argument must be an array that contains a single Message object. + + + The 'parameters' argument must be either null or an empty array. + + + The 'parameters' argument must be an array of one element. + + + Message part name {0} is not unique in an RPC Message. + + + The contract '{0}' has at least one operation annotated with '{1}', but the binding used for the contract endpoint at address '{2}' does not support required binding property '{3}'. Please ensure that the binding used for the contract supports the ReceiveContext capability. + + + Required message property '{0}' is missing from the IncomingProperties collections of the received message. Ensure that when the receive context is enabled on the binding, the created channel ensures that '{0}' is present on all received messages. + + + The request message has ReplyTo='{0}' but IContextChannel.LocalAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress. Enable ManualAddressing or avoid setting ReplyTo on the message. + + + The request message has FaultTo='{0}' but IContextChannel.LocalAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress. Enable ManualAddressing or avoid setting FaultTo on the message. + + + The request message has From='{0}' but IContextChannel.LocalAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress. Enable ManualAddressing or avoid setting From on the message. + + + The request message has ReplyTo='{0}' but IContextChannel.RemoteAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress because sending a reply to a different address than the original sender can create a security risk. If you want to process such messages, enable ManualAddressing. + + + The request message has FaultTo='{0}' but IContextChannel.RemoteAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress because sending a reply to a different address than the original sender can create a security risk. If you want to process such messages, enable ManualAddressing. + + + The request message has From='{0}' but IContextChannel.RemoteAddress is '{1}'. When ManualAddressing is false, these values must be the same, null, or EndpointAddress.AnonymousAddress because sending a reply to a different address than the original sender can create a security risk. If you want to process such messages, enable ManualAddressing. + + + A message was received with a WS-Addressing ReplyTo or FaultTo header targeted at the "None" address. These values are not valid for request-reply operations. Please consider using a one-way operation or enabling ManualAddressing if you need to support ReplyTo or FaultTo values of "None." + + + This request operation did not receive a reply within the configured timeout ({0}). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client. + + + This request operation sent to {0} did not receive a reply within the configured timeout ({1}). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client. + + + A reply message was received for operation '{0}' with action '{1}'. However, your client code requires action '{2}'. + + + Required runtime property '{0}' is not initialized on DispatchRuntime. Do not remove ServiceBehaviorAttribute from ServiceDescription.Behaviors or ensure that you include a third-party service behavior that supplies this value. + + + The MetadataExchangeClient has resolved more than MaximumResolvedReferences. + + + The 'result' argument must be of type Message. + + + Could not revert impersonation on current thread. Continuing would compromise system security. Terminating process. + + + RPC Message {1} in operation {0} has an invalid body name {2}. It must be {3} + + + RPC Message {1} in operation {0} must have a single MessageBodyMember. + + + There was a problem loading the XSD documents provided: a reference to a schema element with name '{0}' and namespace '{1}' could not be resolved because the element definition could not be found in the schema for targetNamespace '{1}'. Please check the XSD documents provided and try again. + + + There was a problem loading the XSD documents provided: a reference to a schema type with name '{0}' and namespace '{1}' could not be resolved because the type definition could not be found in the schema for targetNamespace '{1}'. Please check the XSD documents provided and try again. + + + Service description message '{1}' from target namespace '{2}' does not contain part named '{0}'. + + + Schema with target namespace '{0}' could not be found. + + + SecurityContextProperty is missing from the request Message, this may indicate security is configured incorrectly. + + + The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error. + + + Endpoints cannot be added after the ServiceHost has been opened/faulted/aborted/closed. + + + Endpoints cannot be added before the Description property has been initialized. + + + ApplyConfiguration requires that the Description property be initialized. Either provide a valid ServiceDescription in the CreateDescription method or override the ApplyConfiguration method to provide an alternative implementation. + + + LoadConfigurationSection requires that the Description property be initialized. Provide a valid ServiceDescription in the CreateDescription method. + + + InitializeRuntime requires that the Description property be initialized. Either provide a valid ServiceDescription in the CreateDescription method or override the InitializeRuntime method to provide an alternative implementation. + + + InitializeDescription must be called with a serviceType or singletonInstance parameter. + + + Header properties cannot be set in MessageHeaderAttribute of {0} as its type is MessageHeader<T>. + + + An exception has been thrown when reading the stream. + + + The message containing this stream has been closed. Note that request streams cannot be accessed after the service operation returns. + + + The message containing this stream has been closed. + + + This channel cannot send any more messages because IsTerminating operation '{0}' has already been called. + + + Throttle limit must be greater than zero. To disable, set to Int32.MaxValue. + + + The timeout value provided was not of a recognized format. Please see InnerException for more details. + + + Timeout must be greater than or equal to TimeSpan.Zero. To disable timeout, specify TimeSpan.MaxValue. + + + Timeouts larger than Int32.MaxValue TotalMilliseconds (approximately 24 days) cannot be honored. To disable timeout, specify TimeSpan.MaxValue. + + + Cannot create a unique part name for {0}. + + + An unrecognized element was encountered in the XML during deserialization which was ignored. + + + TransactedBatchingBehavior validation failed. The service endpoint cannot be started. TransactedBatchingBehavior requires a binding that contains a binding element ITransactedBindingElement that returns true for ITransactedBindingElement.TransactedReceiveEnabled. If you are using NetMsmqBinding or MsmqIntegrationBinding make sure that ExactlyOnce is set to true. + + + TThe operation '{1}' on contract '{0}' is configured with TransactionAutoComplete set to false and with ConcurrencyMode not set to Single. TransactionAutoComplete set to false requires ConcurrencyMode.Single. + + + The '{0}' service is configured with ReleaseServiceInstanceOnTransactionComplete set to true, but the ConcurrencyMode is not set to Single. The ReleaseServiceInstanceOnTransactionComplete requires the use of ConcurrencyMode.Single. + + + The '{0}' service is configured with EnsureOrderedDispatch set to true, but the ConcurrencyMode is not set to Single. EnsureOrderedDispatch requires the use of ConcurrencyMode.Single. + + + The DispatchRuntime.EnsureOrderedDispatch property is set to true, but the DispatchRuntime.ConcurrencyMode is not set to Single. EnsureOrderedDispatch requires the use of ConcurrencyMode.Single. + + + The service does not support concurrent transactions. + + + The transaction under which this method call was executing was asynchronously aborted. + + + The SetTransactionComplete method was called in the operation '{0}' on contract '{1}' when TransactionAutoComplete was set to true. The SetTransactionComplete method can only be called when TransactionAutoComplete is set to false. This is an invalid scenario and the current transaction was aborted. + + + The SetTransactionComplete method was wrongly called more than once in the operation '{0}' on contract '{1}'. The SetTransactionComplete method can only be called once. This is an invalid scenario and the current transaction was aborted. + + + The binding for the endpoint at address '{0}' is configured with both the MsmqTransportBindingElement and the TransactionFlowBindingElement. These two elements cannot be used together. + + + The operation '{1}' on contract '{0}' is configured with TransactionAutoComplete set to false and the InstanceContextMode is not set to PerSession. TransactionAutoComplete set to false requires the use of InstanceContextMode.PerSession. + + + The operation '{0}' on callback contract '{1}' is configured with TransactionAutoComplete set to false. TransactionAutoComplete set to false cannot be used with operations on callback contracts. + + + The operation '{1}' on contract '{0}' is configured with TransactionAutoComplete set to false but SessionMode is not set to Required. TransactionAutoComplete set to false requires SessionMode.Required. + + + The service '{0}' is configured with TransactionAutoCompleteOnSessionClose set to true and with an InstanceContextMode not set to PerSession. TransactionAutoCompleteOnSessionClose set to true requires an instancing mode that uses sessions. + + + The service '{0}' is configured with a TransactionTimeout but no operations are configured with TransactionScopeRequired set to true. TransactionTimeout requires at least one operation with TransactionScopeRequired set to true. + + + The service '{0}' is configured with a TransactionIsolationLevel but no operations are configured with TransactionScopeRequired set to true. TransactionIsolationLevel requires at least one operation with TransactionScopeRequired set to true. + + + The service '{0}' is configured with ReleaseServiceInstanceOnTransactionComplete but no operations are configured with TransactionScopeRequired set to true. The ReleaseServiceInstanceOnTransactionComplete property requires at least one operation with TransactionScopeRequired set to true. Remove the ReleaseServiceInstanceOnTransactionComplete property from the service if this is the case. + + + The service '{0}' is configured with TransactionAutoCompleteOnSessionClose, but no operations are configured with TransactionScopeRequired set to true. The TransactionAutoCompleteOnSessionClose property requires at least one operation with TransactionScopeRequired set to true. Remove the TransactionAutoCompleteOnSessionClose property from the service if this is the case. + + + The service operation requires a transaction to be flowed. + + + The flowed transaction could not be unmarshaled. The following exception occurred: {0} + + + The incoming transaction cannot be deserialized. The transaction header in the message was either malformed or in an unrecognized format. The client and the service must be configured to use the same protocol and protocol version. The following exception occurred: {0} + + + The transaction header '{0}' within the namespace '{1}' was not understood by the service. The client and the service must be configured to use the same protocol and protocol version ('{2}'). + + + An attempt was made to add more than one transaction to a message. At most one transaction can be added. + + + Internal Error: The instance of the MessageContract cannot be null in {0}. + + + The operation '{0}' could not be loaded because it specifies "rpc-style" in "literal" mode, but uses message contract types or the System.ServiceModel.Channels.Message. This combination is disallowed -- specify a different value for style or use parameters other than message contract types or System.ServiceModel.Channels.Message. + + + The operation '{0}' could not be loaded because it has a parameter or return type of type System.ServiceModel.Channels.Message or a type that has MessageContractAttribute and other parameters of different types. When using System.ServiceModel.Channels.Message or types with MessageContractAttribute, the method must not use any other types of parameters. + + + When using the rpc-encoded style, message contract types or the System.ServiceModel.Channels.Message type cannot be used if the operation has no parameters or has a void return value. Add a blank message contract type as a parameter or return type to operation '{0}'. + + + This fault did not provide a matching translation: {0} + + + This fault did not provide a reason (MessageFault.Reason was null). + + + This fault did not provide a reason (MessageFault.Reason.Translations.Count was 0). + + + User operation '{0}.{1}' threw an exception that is unhandled in user code. This exception will be rethrown. If this is a recurring problem, it may indicate an error in the implementation of the '{0}.{1}' method. + + + Parameter '{0}' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is '{1}'. + + + In order to use one of the ServiceHost constructors that takes a service instance, the InstanceContextMode of the service must be set to InstanceContextMode.Single. This can be configured via the ServiceBehaviorAttribute. Otherwise, please consider using the ServiceHost constructors that take a Type argument. + + + Cannot add outgoing headers to message as MessageVersion in OperationContext.Current '{0}' does not match with the header version of message being processed '{1}'. + + + When multiple endpoints on a service share the same ListenUri, those endpoints must all have the same Identity in their EndpointAddress. The endpoints at ListenUri '{0}' do not meet this criteria. + + + Wrapper element name cannot be empty. + + + Wrapper type for message {0} cannot be projected as a data contract type since it has multiple namespaces. Consider using the XmlSerializer + + + WSDL part {0} in message {1} from namespace {2} must have either an element or a type name + + + DataContractSerializer does not support collection specified on element '{0}' + + + Invalid OperationFormatUse specified in the OperationFormatStyle of operation {0}, DataContractSerializer supports only Literal. + + + XmlArrayAttribute cannot be used in repeating part {1}:{0}. + + + Could not find default endpoint element that references contract '{0}' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element. + + + Could not find endpoint element with name '{0}' and contract '{1}' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element. + + + The Address property on ChannelFactory.Endpoint was null. The ChannelFactory's Endpoint must have a valid Address specified. + + + In order to generate configuration information using the GenerateServiceEndpoint method, the ServiceContractGenerator instance must have been initialized with a valid Configuration object. + + + The ServiceHost close operation timed out after {0}. This could be because a client failed to close a sessionful channel within the required time. The time allotted to this operation may have been a portion of a longer timeout. + + + Close process timed out waiting for service dispatch to complete. + + + The WSDL binding named {0} is not valid because no match for operation {1} was found in the corresponding portType definition. + + + The WSDL binding named {0} is not valid because an operation binding doesn't have a name specified. + + + The underlying channel factory could not be created because no binding information was found in the configuration file for endpoint with name '{0}'. Please check the endpoint configuration section with name '{0}' to ensure that binding information is present and correct. + + + The underlying channel factory could not be created because no Binding was passed to the ChannelFactory. Please supply a valid Binding instance via the ChannelFactory constructor. + + + The endpoint configuration section for contract '{0}' with name '{1}' could not be loaded because more than one endpoint configuration with the same name and contract were found. Please check your config and try again. + + + An endpoint configuration section for contract '{0}' could not be loaded because more than one endpoint configuration for that contract was found. Please indicate the preferred endpoint configuration section by name. + + + In operation '{0}', cannot pass null to methods that take Message as input parameter. + + + In operation '{0}', cannot return null from methods that return Message. + + + ServiceHost only supports class service types. + + + The contract name '{0}' could not be found in the list of contracts implemented by the service '{1}'. + + + In order to add an endpoint to the service '{0}', a non-empty contract name must be specified. + + + The contract name 'IMetadataExchange' could not be found in the list of contracts implemented by the service {0}. Add a ServiceMetadataBehavior to the configuration file or to the ServiceHost directly to enable support for this contract. + + + The contract type {0} is not attributed with ServiceContractAttribute. In order to define a valid contract, the specified type (either contract interface or service class) must be attributed with ServiceContractAttribute. + + + An endpoint for type '{0}' could not be added because the ServiceHost instance was not initialized properly. In order to add endpoints by Type, the CreateDescription method must be called. If you are using a class derived from ServiceHost, ensure that the class is properly calling base.CreateDescription. + + + Instance of MessagePartDescription Name='{0}' Namespace='{1}' cannot be used in this context: required 'Type' property was not set. + + + The wsdl operation input {0} in portType {1} does not reference a message. This is either because the message attribute is missing or empty. + + + The wsdl operation output {0} in portType {1} does not reference a message. This is either because the message attribute is missing or empty. + + + The wsdl operation {0} in portType {1} contains a fault that does not reference a message. This is either because the message attribute is missing or empty. + + + Cannot create a typed message from type '{0}'. The functionality only valid for types decorated with MessageContractAttribute. + + + A Channel/Service Endpoint is null. + + + A Channel/Service endpoint's Binding is null. + + + A Channel/Service endpoint's Contract is null. + + + A Channel/Service endpoint's Contract's name is null or empty. + + + A Channel/Service endpoint's Contract's namespace is null. + + + Service '{0}' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element. + + + DeliveryRequirementsAttribute requires QueuedDelivery, but binding for the endpoint with contract '{0}' doesn't support it or isn't configured properly to support it. + + + DeliveryRequirementsAttribute disallows QueuedDelivery, but binding for the endpoint with contract '{0}' supports it. + + + The DeliveryRequirementsAttribute on contract '{0}' specifies that the binding must support ordered delivery (RequireOrderedDelivery). This condition could not be verified because the configured binding does not implement IBindingDeliveryCapabilities. The DeliveryRequirementsAttribute may only be used with bindings that implement the IBindingDeliveryCapabilities interface. + + + The DeliveryRequirementsAttribute on contract '{0}' specifies a QueuedDeliveryRequirements constraint. This condition could not be verified because the configured binding does not implement IBindingDeliveryCapabilities. The DeliveryRequirementsAttribute may only be used with bindings that implement the IBindingDeliveryCapabilities interface. + + + The DeliveryRequirementsAttribute on contract '{0}' specifies a QueuedDeliveryRequirements value of NotAllowed. However, the configured binding for this contract specifies that it does support queued delivery. A queued binding may not be used with this contract. + + + At least one operation on the '{0}' contract is configured with the TransactionFlowAttribute attribute set to Mandatory but the channel's binding '{1}' is not configured with a TransactionFlowBindingElement. The TransactionFlowAttribute attribute set to Mandatory cannot be used without a TransactionFlowBindingElement. + + + At least one operation on the '{0}' contract is configured with the TransactionFlowAttribute attribute set to Mandatory but the channel's binding '{1}' is not configured with a TransactionFlowBindingElement. The TransactionFlowAttribute attribute set to Mandatory cannot be used without a TransactionFlowBindingElement. + + + The message with Action '{0}' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None). + + + The message with To '{0}' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree. + + + The message with Action '{0}' cannot be processed at the receiver because this Action is reserved for the connection opening messages only and cannot be sent from client to server. To invoke this operation on the server, call the '{1}' method on the client proxy instead. + + + The operation '{0}' could not be invoked because the property '{1}' on the OperationContract is set to '{2}'. To invoke this operation on the server, call the '{3}' method on the client proxy instead. + + + When using the IAsyncResult design pattern, the End method cannot be decorated with OperationContractAttribute. Only the corresponding Begin method can be decorated with OperationContractAttribute; that attribute will apply to the Begin-End pair of methods. Method '{0}' in type '{1}' violates this. + + + The WS-AT messaging library failed to initialize. + + + A client-side channel to the WS-AT protocol service could not be created. + + + The DispatchOperation '{0}' requires Formatter, since DeserializeRequest and SerializeReply are not both false. + + + The ClientOperation '{0}' requires Formatter, since SerializeRequest and DeserializeReply are not both false. + + + DispatchOperation requires Invoker. + + + Channel requirements cannot be met by the ChannelFactory for Binding '{0}' since the contract requires support for one of these channel types '{1}' but the binding doesn't support any of them. + + + Channel type '{1}' was requested, but Binding '{0}' doesn't support it or isn't configured properly to support it. + + + ChannelDispatcher requirements cannot be met by the IChannelListener for Binding '{0}' since the contract requires support for one of these channel types '{1}' but the binding only supports these channel types '{2}'. + + + The listener at Uri '{0}' could not be initialized because it was created for an unrecognized channel type. + + + Contract requires Session, but Binding '{0}' doesn't support it or isn't configured properly to support it. + + + Contract does not allow Session, but Binding '{0}' does not support Datagram or is not configured properly to support it. + + + Contract requires OneWay, but Binding '{0}' doesn't support it or isn't configured properly to support it. + + + Contract requires TwoWay (either request-reply or duplex), but Binding '{0}' doesn't support it or isn't configured properly to support it. + + + Contract requires Request/Reply, but Binding '{0}' doesn't support it or isn't configured properly to support it. + + + Contract requires Duplex, but Binding '{0}' doesn't support it or isn't configured properly to support it. + + + Binding '{0}' doesn't support creating any channel types. This often indicates that the BindingElements in a CustomBinding have been stacked incorrectly or in the wrong order. A Transport is required at the bottom of the stack. The recommended order for BindingElements is: TransactionFlow, ReliableSession, Security, CompositeDuplex, OneWay, StreamSecurity, MessageEncoding, Transport. + + + The contract '{0}' is not self-consistent -- it has one or more IsTerminating or non-IsInitiating operations, but it does not have the SessionMode property set to SessionMode.Required. The IsInitiating and IsTerminating attributes can only be used in the context of a session. + + + The operation contract '{0}' is not self-consistent. When the '{1}' is set to '{2}', both '{3}' and '{4}' properties must be true, and the operation must not have any input parameters. + + + The ServiceHost must be configured with either a serviceType or a serviceInstance. Both of these values are currently null. + + + The ServiceMetadataExtension instance could not be added to the ServiceHost instance because it has already been added to another ServiceHost instance. + + + The ServiceMetadataExtension instance could not be removed from the ServiceHost instance because it has not been added to any ServiceHost instance. + + + The ServiceMetadataExtension instance could not be removed from the ServiceHost instance because it has already been added to a different ServiceHost instance. + + + A value of type '{0}' cannot be added to the generic collection, because the collection has been parameterized with a different type. + + + A null value cannot be added to the generic collection, because the collection has been parameterized with a value type. + + + Cannot add two items with the same key to SynchronizedKeyedCollection. + + + Item does not exist in SynchronizedKeyedCollection. + + + A reply message was received without a valid RelatesTo header. This may have been caused by a missing RelatesTo header or a RelatesTo header with an invalid WS-Addressing Relationship type. + + + Internal Error: The InnerChannel property is null. + + + The current channel does not support closing the output session as this channel does not implement ISessionChannel<IDuplexSession>. + + + The ServiceEndpoint with name '{0}' could not be exported to WSDL because the Binding property is null. To fix this, set the Binding property to a valid Binding instance. + + + A binding instance has already been associated to listen URI '{0}'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config. + + + The following Policy Assertions were not Imported: + + + + XPath:{0} + Assertions: + + + "XPath Unavailable" + + + A policy expression was ignored because another policy expression with that ID has already been read in this document. +XPath:{0} + + + A policy document was ignored because a policy expression with that ID has already been imported. +Policy ID:{0} + + + A metadata section containing policy did not have an identifier so it cannot be referenced. + + + XPath:{0} + + + A policy reference was ignored because the policy with ID '{0}' could not be found. + + + A policy reference was ignored because the URI of the reference was empty. + + + A policy reference was ignored because the required {0} attribute was missing. + + + The policy expression was not fully imported because it exceeded the maximum allowable complexity. The import stopped at element '{0}' '{1}'. + + + The policy expression was not fully imported because its normalized form was too large. + + + Unrecognized policy element {0} in namespace {1}. + + + "{0}" is not a supported WS-Policy document root element. + + + The "{0}" namespace is not a recognized WS-Policy namespace. + + + Cannot find usable policy alternatives. + + + Unreachable policy detected. +A WS-Policy element embedded in WSDL is missing a fragment identifier. This policy cannot be referenced by any WS-PolicyAttachment mechanisms. +XPath:{0} + + + The processing of the WSDL parameter failed. Error: {0} + + + The optional WSDL extension element '{0}' from namespace '{1}' was not handled. +XPath: {2} + + + The required WSDL extension element '{0}' from namespace '{1}' was not handled. + + + An unrecognized WSDL extension of Type '{0}' was not handled. + + + A previous call to this WsdlExporter left it in a faulted state. It is no longer usable. + + + A previous call to this WsdlImporter left it in a faulted state. It is no longer usable. + + + The ContractDescription argument to ImportEndpoints must be contained in the KnownContracts collection. + + + A previous attempt to import this {0} already failed. + + + The type {0} registered as a policy extension does not implement IPolicyImportExtension + + + The type {0} registered as a policy extension does not have a public default constructor. Policy extensions must have a public default constructor + + + An exception was thrown in a call to a policy import extension. +Extension: {0} +Error: {1} + + + An exception was thrown in a call to a policy export extension. +Extension: {0} +Error: {1} + + + Calling IWsdlExportExtension.ExportContract twice with the same ContractDescription is not supported. + + + Duplicate contract XmlQualifiedNames are not supported. +Another ContractDescription with the Name: {0} and Namespace: {1} has already been exported. + + + Similar ServiceEndpoints were exported. The WSDL export process was forced to suffix wsdl:binding names to avoid naming conflicts. + Similar ServiceEndpoints means different binding instances having the Name: {0} and Namespace: {1} and either the same ContractDescription or at least the same contract Name: {2}. + + + An operation was skipped during export because it has a wildcard action. This is not supported in WSDL. +Contract Name:{0} +Contract Namespace:{1} +Operation Name:{2} + + + An operation was skipped during export because the property '{0}' is set to '{1}'. This operation should be used for server only and should not be exposed from WSDL. +Contract Name:{2} +Contract Namespace:{3} +Operation Name:{4} + + + The type {0} registered as a WSDL extension does not implement IWsdlImportExtension. + + + The type {0} registered as a WSDL extension does not have a public default constructor. WSDL extensions must have a public default constructor. + + + An exception was thrown in a call to a WSDL export extension: {0} + contract: {1} + + + An exception was thrown in a call to a WSDL export extension: {0} + Endpoint: {1} + + + A WSDL import extension threw an exception during the BeforeImport call: {0} +Error: {1} + + + An exception was thrown while running a WSDL import extension: {0} +Error: {1} + + + Cannot import {0} +Detail: {2} +XPath to Error Source: {1} + + + There was an error importing a {0} that the {1} is dependent on. +XPath to {0}: {2} + + + The {0} binding element requires envelope version '{1}' It doesn't support '{2}'. + + + No value. + + + The '{0}' binding element does not support cloning. + + + WsdlImporter encountered unrecognized policy assertions in ServiceDescription '{0}': + + + The {0} declared on method '{1}' in type '{2}' is invalid. {0}s are only valid on methods that are declared in a type that has ServiceContractAttribute. Either add ServiceContractAttribute to type '{2}' or remove {0} from method '{1}'. + + + Too many attributes of type {0} on {1}. + + + Couldn't find required attribute of type {0} on {1}. + + + Attempted to get contract type for {0}, but that type is not a ServiceContract, nor does it inherit a ServiceContract. + + + OperationContract method '{0}' in type '{1}' does not properly implement the async pattern, as no corresponding method '{2}' could be found. Either provide a method called '{2}' or set the AsyncPattern property on method '{0}' to false. + + + OperationContract method '{0}' in type '{1}' does not properly implement the async pattern, as more than one corresponding method '{2}' was found. When using the async pattern, exactly one end method must be provided. Either remove or rename one or more of the '{2}' methods such that there is just one, or set the AsyncPattern property on method '{0}' to false. + + + Invalid async End method signature for method {0} in ServiceContract type {1}. Your end method must take an IAsyncResult as the last argument. + + + Invalid async Begin method signature for method {0} in ServiceContract type {1}. Your begin method must take an AsyncCallback and an object as the last two arguments and return an IAsyncResult. + + + Because base ServiceContract '{0}' has a CallbackContract '{1}', derived ServiceContract '{2}' must also specify either '{1}' or a derived type as its CallbackContract. + + + In a contract inheritance hierarchy, the ServiceContract's CallbackContract must be a subtype of the CallbackContracts of all of the CallbackContracts of the ServiceContracts inherited by the original ServiceContract, Types {0} and {1} violate this rule. + + + Cannot have two operations in the same contract with the same name, methods {0} and {1} in type {2} violate this rule. You can change the name of one of the operations by changing the method name or by using the Name property of OperationContractAttribute. + + + The {0}.{1} operation references a message element [{2}] that has already been exported from the {3}.{4} operation. You can change the name of one of the operations by changing the method name or using the Name property of OperationContractAttribute. Alternatively, you can control the element name in greater detail using the MessageContract programming model. + + + Cannot inherit two different operations with the same name, operation '{0}' from contracts '{1}' and '{2}' violate this rule. You can change the name of one of the operations by changing the method name or by using the Name property of OperationContractAttribute. + + + The synchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must define the same number and types of parameters. In this case, some of the arguments are different. To fix it, ensure that the OperationContracts define the same number and types of arguments, in the same order. Alternatively, changing the name of one of the methods will prevent matching. + + + The synchronous OperationContract method '{0}' in type '{1}' was matched with the task-based asynchronous OperationContract method '{2}' because they have the same operation name '{3}'. When a synchronous OperationContract method is matched to a task-based asynchronous OperationContract method, the two OperationContracts must define the same number and types of parameters. In this case, some of the arguments are different. To fix it, ensure that the OperationContracts define the same number and types of arguments, in the same order. Alternatively, changing the name of one of the methods will prevent matching. + + + The task-based asynchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a task-based asynchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must define the same number and types of parameters. In this case, some of the arguments are different. To fix it, ensure that the OperationContracts define the same number and types of arguments, in the same order. Alternatively, changing the name of one of the methods will prevent matching. + + + The synchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must define the same return type. In this case, the return types are different. To fix it, ensure that method '{0}' and method '{3}' have the same return type. Alternatively, changing the name of one of the methods will prevent matching. + + + The synchronous OperationContract method '{0}' in type '{1}' was matched with the task-based asynchronous OperationContract method '{2}' because they have the same operation name '{3}'. When a synchronous OperationContract method is matched to a task-based asynchronous OperationContract method, the two OperationContracts must define the same return type. In this case, the return types are different. To fix it, ensure that method '{0}' and method '{2}' have the same return type. Alternatively, changing the name of one of the methods will prevent matching. + + + The task-based asynchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must define the same return type. In this case, the return types are different. To fix it, ensure that method '{0}' and method '{3}' have the same return type. Alternatively, changing the name of one of the methods will prevent matching. + + + The synchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, any additional attributes must be declared on the synchronous OperationContract method. In this case, the asynchronous OperationContract method '{2}' has one or more attributes of type '{5}'. To fix it, remove the '{5}' attribute or attributes from method '{2}'. Alternatively, changing the name of one of the methods will prevent matching. + + + The synchronous OperationContract method '{0}' in type '{1}' was matched with the task-based asynchronous OperationContract method '{2}' because they have the same operation name '{3}'. When a synchronous OperationContract method is matched to a task-based asynchronous OperationContract method, any additional attributes must be declared on the synchronous OperationContract method. In this case, the task-based asynchronous OperationContract method '{2}' has one or more attributes of type '{4}'. To fix it, remove the '{4}' attribute or attributes from method '{2}'. Alternatively, changing the name of one of the methods will prevent matching. + + + The task-based asynchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a task-based asynchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, any additional attributes must be declared on the task-based asynchronous OperationContract method. In this case, the asynchronous OperationContract method '{2}' has one or more attributes of type '{5}'. To fix it, remove the '{5}' attribute or attributes from method '{2}'. Alternatively, changing the name of one of the methods will prevent matching. + + + The synchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must have the same value for the '{5}' property. In this case, the values are different. To fix it, change the '{5} property of one of the OperationContracts to match the other. Alternatively, changing the name of one of the methods will prevent matching. + + + The synchronous OperationContract method '{0}' in type '{1}' was matched with the task-based asynchronous OperationContract method '{2}' because they have the same operation name '{3}'. When a synchronous OperationContract method is matched to a task-based asynchronous OperationContract method, the two OperationContracts must have the same value for the '{4}' property. In this case, the values are different. To fix it, change the '{4} property of one of the OperationContracts to match the other. Alternatively, changing the name of one of the methods will prevent matching. + + + The task-based asynchronous OperationContract method '{0}' in type '{1}' was matched with the asynchronous OperationContract methods '{2}' and '{3}' because they have the same operation name '{4}'. When a task-based asynchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must have the same value for the '{5}' property. In this case, the values are different. To fix it, change the '{5} property of one of the OperationContracts to match the other. Alternatively, changing the name of one of the methods will prevent matching. + + + Operations marked with IsOneWay=true must not declare output parameters, by-reference parameters or return values. + + + One way operation {0} cannot not specify a reply action. + + + The method '{1}' in type '{0}' is marked IsOneWay=true and declares one or more FaultContractAttributes. One-way methods cannot declare FaultContractAttributes. To fix it, change IsOneWay to false or remove the FaultContractAttributes. + + + Only malformed Messages are supported. + + + Cannot locate operation {0} in Contract {1}. + + + Unsupported WSDL, only one message part is supported for fault messages. This fault message references zero or more than one message part. If you have edit access to the WSDL file, you can fix the problem by removing the extra message parts such that fault message references just one part. + + + Unsupported WSDL, the fault message part must reference an element. This fault message does not reference an element. If you have edit access to the WSDL document, you can fix the problem by referencing a schema element using the 'element' attribute. + + + Async End called on wrong channel. + + + Async End called with an IAsyncResult from a different Begin method. + + + The received transaction has an isolation level of '{0}' but the service is configured with a TransactionIsolationLevel of '{1}'. The isolation level for received transactions and the service must be the same. + + + The value of the addressHeaders argument is invalid because the collection contains null values. Null is not a valid value for the AddressHeaderCollection. + + + The array passed does not have enough space to hold all the properties contained by this collection. + + + The value could not be added to the collection, as the collection already contains an item of the same type: '{0}'. This collection only supports one instance of each type. + + + Cannot create channel for a contract that requires request/reply and a binding that requires manual addressing but only supports duplex communication. + + + Missing required '{0}' attribute. + + + Ignoring invalid SOAP header extension in wsdl:operation name='{0}' from targetNamespace='{1}'. Reason: {2} + + + Ignoring invalid SOAP fault extension in wsdl:operation name='{0}' from targetNamespace='{1}'. Reason: {2} + + + Ignoring invalid part in wsdl:message name='{0}' from targetNamespace='{1}'. Reason: {2} + + + PrivacyNotice element must have a Version attribute. + + + PrivacyNotice element Version attribute must have an integer value. + + + Binding validation failed. The client cannot send messages. A conflict in the binding properties caused this failure. The UseActiveDirectory is set to true and QueueTransferProtocol is set to Native. To resolve the conflict, correct one of the properties. + + + Binding validation failed because the binding's ReceiveErrorHandlig property is set to Move or Reject while the version of MSMQ installed on this system is not 4.0 or higher. The channel listener cannot be opened. Resolve the conflict by setting the ReceiveErrorHandling property to Drop or Fault, or by upgrading to MSMQ v4.0. + + + The Ambient transaction used to Complete the ReceiveContext Operation is not in an active state. + + + Binding validation failed because the binding's MsmqAuthenticationMode property is set to Certificate while the MsmqProtectionLevel property is not set to Sign or EncryptAndSign. The channel factory or service host cannot be opened. Resolve the conflict by correcting one of the properties. + + + Binding validation failed. The service or the client cannot be started. A conflict in the binding properties caused this failure. The MsmqAuthenticationMode is set to None and MsmqProtectionLevel is not set to None. To resolve to conflict, correct one of the properties. + + + Binding validation failed because the binding's MsmqAuthenticationMode property is set to WindowsDomain while the MsmqProtectionLevel property is not set to Sign or EncryptAndSign. The channel factory or service host cannot be opened. Resolve the conflict by correcting one of the properties. + + + Creation of a message security context failed because the attached sender certificate was invalid or cannot be validated. The message cannot be received. Ensure that a valid certificate is attached to the message and that the certificate is present in the receiver's certificate store. + + + The content type of an incoming message is unknown or not supported. The message cannot be received. Ensure that the sender was configured to use the same message encoder as the receiver. + + + An incoming MSMQ message contained invalid or unexpected .NET Message Framing information in its body. The message cannot be received. Ensure that the sender is using a compatible service contract with a matching SessionMode. + + + An XML error was encountered while reading a WCF message. The message cannot be received. Ensure the message was sent by a WCF client which used an identical message encoder. + + + TransactedBatchingBehavior validation failed because none of the service operations had the TransactionScopeRequired property set to true on their OperationBehavior attribute. The service host cannot be started. Ensure this requirement is met if you wish to use this behavior. + + + A mismatch was detected between the serialization format specified in the MsmqIntegrationMessageProperty and the body of the MSMQ message. The message cannot be sent. The serialization format ByteArray requires the body of the MSMQ message to be of type byte[]. + + + An error occurred while deserializing an MSMQ message's ActiveX body. The message cannot be received. The specified variant type for the body does not match the actual MSMQ message body. + + + An error occurred while deserializing an MSMQ message's XML body. The message cannot be received. Ensure that the service contract is decorated with appropriate [ServiceKnownType] attributes or the TargetSerializationTypes property is set on the MsmqIntegrationBindingElement. + + + The properties of the message are mismatched. The message cannot be sent. The BodyType message property cannot be specified if the ActiveX serialization format is used. + + + The sender's X.509 certificate was not found. The message cannot be sent. Ensure the certificate is available in the sender's certificate store. + + + Binding validation failed. The client cannot send the message. The DeadLetterQueue is set to Custom, but the CustomDeadLetterQueue is not specified. Specify the URI of the dead letter queue for each application in the CustomDeadLetterQueue property. + + + An error was encountered while deserializing the message. The message cannot be received. + + + Binding validation failed because the endpoint listen URI does not represent an MSMQ direct format name. The service host cannot be opened. Make sure you use a direct format name for the endpoint's listen URI. + + + The host in the CustomDeadLetterQueue URI is not "localhost" or the local machine name. A custom DLQ must reside on the sender's machine. + + + Binding validation failed. The client cannot send a message. The specified dead letter queue does not exist or cannot be written. Ensure the queue exists with the proper authorization to write to it. + + + Binding validation failed because the binding's MsmqProtectionLevel property is set to EncryptAndSign while the UseActiveDirectory is not set to true. The channel factory or the service host cannot be opened. Resolve the conflict by correcting one of the properties. + + + Binding validation failed. The service or the client cannot be started. The ExactlyOnce property is set to false and ReceiveContext is enabled. This is not supported. To resolve the conflict, either set ExactlyOnce to true or disable ReceiveContext. + + + The version check failed with the error: '{0}'. The version of MSMQ cannot be detected All operations that are on the queued channel will fail. Ensure that MSMQ is installed and is available. + + + The message ID '{0}' is not in the right format. + + + The specified addressing scheme is invalid for this binding. The NetMsmqBinding scheme must be net.msmq. The MsmqIntegrationBinding scheme must be msmq.formatname. + + + The MsmqIntegrationBinding validation failed. The service cannot be started. The {0} binding does not support the method signature for the service operation {1} in the {2} contract. Correct the service operation to use the MsmqIntegrationBinding. + + + The ActiveX serialization failed because the serialization format cannot be recognized. The message cannot be received. + + + The variant type is not recognized. The ActiveX serialization failed. The message cannot be sent. The specified variant type is not supported. + + + {0} ({1}, 0x{2}) + + + The message cannot be sent because it's missing an MsmqIntegrationMessageProperty. All messages sent over MSMQ integration channels must carry the MsmqIntegrationMessageProperty. + + + Binding validation failed. The service or the client cannot be started. The ExactlyOnce property is set to true and the Durable property is set to false. This is not supported. To resolve the conflict, correct one of these properties. + + + Argument must be a positive number or zero. + + + A mismatch between the binding and MSMQ queue configuration was detected. The service cannot be started. The ExactlyOnce property is set to false and the queue to read messages from is a transactional queue, Correct the error by setting the ExactlyOnce property to true or create a non-transactional binding. + + + Binding validation failed because the URI represents a subqueue and the ReceiveErrorHandling parameter is set to Move. The service host or channel listener cannot be opened. Resolve this conflict by setting the ReceiveErrorHandling to Fault, Drop or Reject. + + + Creation of a message security context failed because the sender's SID was not found in the message. The message cannot be received. The WindowsDomain MsmqAuthenticationMode requires the sender's SID. + + + An error occurred while opening the queue:{0}. The message cannot be sent or received from the queue. Ensure that MSMQ is installed and running. Also ensure that the queue is available to open with the required access mode and authorization. + + + An error occurred when converting the '{0}' queue path name to the format name: {1}. All operations on the queued channel failed. Ensure that the queue address is valid. MSMQ must be installed with Active Directory integration enabled and access to it is available. + + + Binding validation failed. The client cannot send messages. The CustomDeadLetterQueue property is set, but the DeadLetterQueue property is not set to Custom. Set the DeadLetterQueue property to Custom. + + + Binding validation failed. The client cannot send messages. A conflict in the binding properties is causing the failure. To use the custom dead letter queue, ExactlyOnce must be set to true to resolve to conflict. + + + A mismatch between the binding and MSMQ configuration was detected. The client cannot send messages. To use the custom dead letter queue, you must have MSMQ version 4.0 or higher. If you do not have MSMQ version 4.0 or higher set the DeadLetterQueue property to System or None. + + + The transport channel detected a poison message. This occurred because the message exceeded the maximum number of delivery attempts or because the channel detected a fundamental problem with the message. The inner exception may contain additional information. + + + There was an error opening the queue. Ensure that MSMQ is installed and running, the queue exists and has proper authorization to be read from. The inner exception may contain additional information. + + + The ReceiveContext delete operation failed because the message with Id '{0}' could not be received from the lock subqueue. + + + The ReceiveContext unlock operation failed because the message with Id '{0}' could not be moved from the lock subqueue to the main queue. + + + The queue could not be opened because the ReceiveContext feature is not supported on subqueues. Specify a different queue to receive from, or disable ReceiveContext. + + + An error occurred while receiving a message from the queue: {0}. Ensure that MSMQ is installed and running. Make sure the queue is available to receive from. + + + A transaction error occurred for this session. The session channel is faulted. Messages in the session cannot be sent or received. A queued session cannot be associated with more than one transaction. Ensure that all messages in the session are sent or received using a single transaction. + + + An error occurred while sending to the queue: {0}.Ensure that MSMQ is installed and running. If you are sending to a local queue, ensure the queue exists with the required access mode and authorization. + + + A serialization error occurred. The message cannot be sent or received. The MSMQ integration channel is able to serialize no more than {0} types. + + + The transaction associated with this session channel has been rolled back because Abort was called on the session channel before the transaction committed. + + + Session channels must not have pending messages when the transactions associated with these channels are committed. Pending messages are either messages that have not been received from the session channel or messages that have been received but Complete has not been called for them. The channel has faulted and the transaction was rolled back. + + + Session channels must be closed before the transaction is committed. The channel has faulted and the transaction was rolled back. + + + The total size of messages sent in this session exceeded the maximum value of Int32. The messages in this session cannot be sent. + + + An attempt made to close the session channel while there are still messages pending in the session. Current transaction will be rolled back and the session channel will be faulted. Messages in a session must be consumed all at once. + + + An attempt was made to close the session channel while there are still messages pending in the session. The sessiongram will be rolled back to the queue and the session channel will be faulted. + + + A serialization error occurred because of a mismatch between the value of the SerializationFormat property and the type of the body. The message cannot be sent. Ensure the type of the body is Stream or use a different SerializationFormat. + + + The message time to live (TTL) is too large. The message cannot be sent. The message TTL cannot exceed the Int32 maximum value. + + + A client X.509 certificate was not specified through the channel factory's Credentials property, but one is required when the binding's MsmqAuthenticationMode property is set to Certificate. The message cannot be sent. + + + The current transaction is not active. Messages in this session cannot be sent or received and the session channel will be faulted. All messages in a session must be sent or received using a single transaction. + + + Binding validation failed because the binding's ExactlyOnce property is set to true while the destination queue is non-transactional. The service host cannot be opened. Resolve this conflict by setting the ExactlyOnce property to false or creating a transactional queue for this binding. + + + A transaction was not found in Transaction.Current but one is required for this operation. The channel cannot be opened. Ensure this operation is being called within a transaction scope. + + + A transaction is required but is not available. Messages cannot be sent or received. Ensure that the transaction scope is specified to send or receive messages. + + + A mismatch occurred between the binding and the MSMQ configuration. Messages cannot be sent. The custom dead letter queue specified in the binding must be a transactional queue. Ensure that the custom dead letter queue address is correct and the queue is a transactional queue. + + + The net.msmq scheme does not support port numbers. To correct this, remove the port number from the URI. + + + Unrecognized error {0} (0x{1}) + + + The serialization failed because the serialization format '{0}' is not supported. The message cannot be sent or received. + + + Binding validation failed because the binding's MsmqAuthenticationMode property is set to WindowsDomain but MSMQ is installed with Active Directory integration disabled. The channel factory or service host cannot be opened. + + + The URL in invalid. The URL for the queue cannot contain the '$' character. Use the syntax in net.msmq://machine/private/queueName to address a private queue. + + + The URI is invalid because it is missing a host. + + + Failed to reacquire lock for message. + + + Cannot find '{0}' value in dictionary string. + + + WMI GetObject Query: {0} + + + WMI PutInstance Class: {0} + + + Cannot dequeue a '{0}' object while in the Created state. + + + The binding (Name={0}, Namespace={1}) cannot be used to create a ChannelFactory or a ChannelListener because it appears to be missing a TransportBindingElement. Every binding must have at least one binding element that derives from TransportBindingElement. + + + The TransportBindingElement of type '{0}' in this CustomBinding returned a null or empty string for the Scheme. TransportBindingElement's Scheme must be a non-empty string. + + + Binding '{0}' lacks a TransportBindingElement. Every binding must have a binding element that derives from TransportBindingElement. This binding element must appear last in the BindingElementCollection. + + + In Binding '{0}', TransportBindingElement '{1}' does not appear last in the BindingElementCollection. Please change the order of elements such that the TransportBindingElement is last. + + + None of the binding elements in binding '{0}' define a message version. At least one binding element must define a message version and return it from the GetProperty<MessageVersion> method. + + + Some of the binding elements in this binding were not used when building the ChannelFactory / ChannelListener. This may be have been caused by the binding elements being misordered. The recommended order for binding elements is: TransactionFlow, ReliableSession, Security, CompositeDuplex, OneWay, StreamSecurity, MessageEncoding, Transport. Note that the TransportBindingElement must be last. The following binding elements were not built: {0}. + + + More than one MessageEncodingBindingElement was found in the BindingParameters of the BindingContext. This usually is caused by having multiple MessageEncodingBindingElements in a CustomBinding. Remove all but one of these elements. + + + More than one IStreamUpgradeProviderElement was found in the BindingParameters of the BindingContext. This usually is caused by having multiple IStreamUpgradeProviderElements in a CustomBinding. Remove all but one of these elements. + + + More than one PeerResolverBindingElement was found in the BindingParameters of the BindingContext. This usually is caused by having multiple PeerResolverBindingElements in a CustomBinding. Remove all but one of these elements. + + + More than one PeerCustomResolverBindingElement was found in the BindingParameters of the BindingContext. This usually is caused by having multiple PeerCustomResolverBindingElement in a CustomBinding. Remove all but one of these elements. + + + The security capabilities of binding '{0}' do not match those of the generated runtime object. Most likely this means the binding contains a StreamSecurityBindingElement, but lacks a TransportBindingElement that supports Stream Security (such as TCP or Named Pipes). Either remove the unused StreamSecurityBindingElement or use a transport that supports this element. + + + Only an absolute Uri can be used as a base address. + + + This collection already contains an address with scheme {0}. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'. + + + A base address cannot contain a Uri user info section. + + + The binding does not contain a TransportBindingElement. + + + The binding does not contain a ChannelDemuxerBindingElement. + + + A base address cannot contain a Uri query string. + + + A base address cannot contain a Uri fragment. + + + The given URI must be absolute. + + + The binding for scheme '{0}' specified in the protocol mapping does not exist and must be created. + + + The binding on the service endpoint cannot be configured. + + + Configuration binding extension '{0}' could not be found. Verify that this binding extension is properly registered in system.serviceModel/extensions/bindingExtensions and that it is spelled correctly. + + + A binding reference cycle was detected in your configuration. The following reference cycle must be removed: {0}. + + + The binding specified cannot be null or an empty string. Please specify a valid binding. Valid binding values can be found in the system.serviceModel/extensions/bindingExtensions collection. + + + Cannot parse type '{0}' into a System.ServiceModel.Dispatcher.XPathMessageFilter. + + + Configuration endpoint extension '{0}' could not be found. Verify that this endpoint extension is properly registered in system.serviceModel/extensions/endpointExtensions and that it is spelled correctly. + + + An endpoint reference cycle was detected in your configuration. The following reference cycle must be removed: {0}. + + + The endpoint specified cannot be null or an empty string. Please specify a valid endpoint. Valid endpoint values can be found in the system.serviceModel/extensions/endpointExtensions collection. + + + Filter element body must not be empty. + + + An extension named {0} already appears in the {1}. Extension names must be unique. + + + An extension of name '{0}' already appears in extension collection. Extension names must be unique. + + + An extension of type '{0}' already appears in extension collection. Extension types must be unique. + + + A child element with the element name '{0}' already exists. Child elements can only be added once. + + + A child element named '{0}' with same key already exists at the same configuration scope. Collection elements must be unique within the same configuration scope (e.g. the same application.config file). Duplicate key value: '{1}'. + + + The '{0}' configuration element key cannot be null. + + + At least one of the configuration element keys '{0}' must not be null. + + + Extension element '{0}' cannot be added to this element. Verify that the extension is registered in the extension collection at system.serviceModel/extensions/{1}. + + + Extension collection '{0}' not found. + + + The extension of type '{0}' is not registered in the extension collection '{1}'. + + + Invalid value for serviceAuthenticationManagerType. The serviceAuthenticationManagerType '{0}' does not derive from '{1}'. + + + Invalid value in policyType. The policyType '{0}' does not implement from '{1}'. + + + The {1} binding does not have a configured binding named '{0}'. + + + The binding at {1} does not have a configured binding named '{0}'. This is an invalid value for {2}. + + + Cannot add the behavior extension '{0}' to the common endpoint behavior because it does not implement '{1}'. + + + Cannot add the behavior extension '{0}' to the common service behavior because it does not implement '{1}'. + + + Invalid value for the certificate validator type. The type '{0}' does not derive from the appropriate base class '{1}'. + + + Invalid value for the client credentials type. The type '{0}' does not derive from the appropriate base class '{1}'. + + + The value '{0}' is not a valid instance of type '{1}'. + + + The instance is not a valid configurable value of type '{0}'. + + + {0} is not a valid encoding string for System.Text.Encoding.GetEncoding(string). + + + There is no endpoint behavior named '{0}'. + + + Cannot add the '{0}' behavior extension to '{1}' endpoint behavior because the underlying behavior type does not implement the IEndpointBehavior interface. + + + The endpoint at {1} does not have a configured endpoint named '{0}'. This is an invalid value for {2}. + + + The attribute '{0}' cannot be specified on element '{1}' when attribute '{2}' is not specified. + + + The CreateServiceEndpoint method in type '{0}' returned null instead of an instance of type '{1}'. + + + Invalid element in configuration. The extension '{0}' does not derive from correct extension base type '{1}'. + + + Invalid element in configuration. The extension name '{0}' is not registered in the collection at system.serviceModel/extensions/{1}. + + + The '{0}' type must derive from {1} to be used in the {2} collection. + + + The element {0} requires a key of type '{1}'. Type of the key passed in: '{2}'. + + + '{0}' is not a valid reliable messaging version. Valid values are 'WSReliableMessagingFebruary2005' and 'WSReliableMessaging11'. + + + Invalid value for the saml serializer type. The type '{0}' does not derive from the appropriate base class: '{1}'. + + + Invalid binding path. There is no binding registered with the configuration path '{0}'. + + + Invalid value for the service credentials type. The type '{0}' does not derive from the appropriate base class '{1}'. + + + Invalid value for the security state encoder type. The type '{0}' does not derive from the appropriate base class '{1}'. + + + Invalid value for the username password validator type. The type '{0}' does not derive from the appropriate base class '{1}'. + + + Invalid value for serviceAuthorizationManagerType. The serviceAuthorizationManagerType '{0}' does not derive from '{1}'. + + + There is no service behavior named '{0}'. + + + Cannot add the behavior extension '{0}' to the service behavior named '{1}' because the underlying behavior type does not implement the IServiceBehavior interface. + + + Start must be between 0 and {0}. Value passed in is {1}. + + + '{0}' is not a valid transaction protocol. Valid values are 'OleTransactions', 'WSAtomicTransactionOctober2004', and 'WSAtomicTransaction11'. + + + The type '{0}' registered for extension '{1}' could not be loaded. + + + Invalid binding type for binding extension configuration object. This binding extension manages configuration of binding type '{0}' and cannot act upon type '{1}'. + + + Invalid binding element type for binding element extension configuration object. This binding element extension manages configuration of binding element type '{0}' and cannot act upon type '{1}'. + + + Invalid endpoint type for endpoint extension configuration object. This endpoint extension manages configuration of endpoint type '{0}' and cannot act upon type '{1}'. + + + No elements matching the key '{0}' were found in the configuration element collection. + + + The key does not match the indexer key. When setting the value of a specific index, the key of the desired value must match the index at which it is being set. Key on element (expected value): {0}. Key provided to indexer: {1}. + + + Cannot add the message encoding element '{0}'. Another message encoding element already exists in the binding '{1}'. There can only be one message encoding element for each binding. + + + Cannot find the extension collection associated with extension of type '{0}'. + + + Federated issuer address cannot be null when specifying an issuer binding. + + + The configuration is read only. + + + The '{0}' configuration section cannot be created. The machine.config file is missing information. Verify that this configuration section is properly registered and that you have correctly spelled the section name. For Windows Communication Foundation sections, run ServiceModelReg.exe -i to fix this error. + + + Cannot add stream upgrade element '{0}'. Another stream upgrade element already exists in the binding '{1}'. There can only be one stream update element per binding. + + + Cannot add the transport element '{0}'. Another transport element already exists in the binding '{1}'. There can only be one transport element for each binding. + + + The XmlElement must contain XML content. + + + The XPathFilter for an XPathFilterElement cannot be null. + + + Namespace prefix '{0}' referenced in XPath expression was not found. + + + (Default) + + + MTAWorkerThread exception + + + An unexpected error has occurred. + + + The CLSID specified in the service file is not configured in the specified application. (The CLSID is {0}, the AppID is {1}.) + + + The CLSID specified in the service file does not have a service element in a configuration file. (The CLSID is {0}.) + + + An endpoint configured for the COM+ CLSID {0} is not a configured interface on the class. (The contract type is {1}.) + + + The COM+ string in the .svc file was formatted incorrectly. (The string is "{0}".) + + + The contract type name in the configuration file was not in the form of an interface identifier. (The string is "{0}".) + + + The configured application was not found. (The Application ID was {0}.) + + + A transaction vote request was completed, but there was no outstanding vote request. + + + Failed to convert type library to assembly + + + Incorrect Interface version in registry + + + Failed to load type library + + + An attempt to load the native type library '{0}' was made. Native type libraries cannot be loaded. + + + Could not find interface in the Assembly + + + The '{0}' user-defined type could not be found. Ensure that the correct type and type library are registered and specified. + + + Could not find keyword {0}. + + + Invalid serializer specified. The only valid values are 'xml' and 'datacontract'. + + + The keyword '{0}' has no equal sign following it. Ensure that each keyword is followed by an equal sign and a value. + + + No value found for a keyword. + + + Badly terminated value {0}. + + + Missing Quote in value {0}. + + + Repeated moniker keyword. + + + Interface {0} not found in configuration. + + + Interface {0} has a null namespace or name. + + + Method {0} given in config was not found on interface {1}. + + + Only one type of server identity can be specified. + + + Address not specified. + + + Mex binding section name attribute not specified. + + + Mex address not specified. + + + Contract not specified. + + + Binding not specified. + + + Binding namespace not specified. + + + Failed to do mex retrieval:{0}. + + + None of the contract in metadata matched the contract specified. + + + The contract does not have an endpoint supporting the binding specified. + + + Moniker Missing Colon + + + Multiple server identity keywords were specified. Ensure that at most one identity keyword is specified. + + + The object does not support the interface '{0}'. + + + Could not duplicate the token (error=0x{0:X}). + + + Could not perform an AccessCheck (error=0x{0:X}). + + + Could not impersonate the anonymous user (error=0x{0:X}). + + + The provided SafeArray parameter was passed by value. SafeArray parameters must be passed by reference. + + + Multi-dimensional SafeArray parameters cannot be used. + + + The elements of the SafeArray must be of the type VARIANT. + + + The lower bound of the SafeArray was not zero. SafeArrays with a lower bound other than zero cannot be used. + + + Could not open the thread token (error=0x{0:X}). + + + Could not open the process token (error=0x{0:X}). + + + The isolation level for component {0} is invalid. (The value was {1}.) + + + The conversion between the client parameter type '{0}' to the required server parameter type '{1}' cannot be performed. + + + The required outer proxy could not be created. Ensure that the service moniker is correctly installed and registered. + + + Cannot load library {0}. Ensure that WCF is properly installed. + + + Interface Not Registered + + + Bad Interface Registration + + + The argument passed to SetObject is not a COM object. + + + No type library available for interface + + + Cannot find CLSID {0} in COM+ application {1}. + + + Cannot create an instance of the specified service: access is denied. + + + An internal error occurred attempting to create an instance of the specified service. + + + No services are configured for the application. + + + Access is denied. The message was not authenticated with a valid windows identity. + + + The session requirements of the contracts are inconsistent. All COM contracts in a service must have the same session requirement. + + + Access is denied. + + + Parameter at index {0} is null. + + + Unable to retrieve IUnknown for object. + + + QueryInterface succeeded but the persistable type wrapper was null. + + + Unexpected threading model. WCF/COM+ integration only supports STA and MTA threading models. + + + None of the methods were found for interface {0}. + + + The {0} operation on the service {1} could not be found in the catalog. + + + The interface with IID {0} cannot be exposed as a web service + + + The parameter named {0} of type {1} on method {2} of interface {3} cannot be serialized. + + + The return value of type {0} on method {1} of interface {2} cannot be serialized. + + + The COM+ Integration service '{0}' specified in configuration is not in a supported format and could not be started. Ensure that the configuration is correctly specified. + + + The method '{0}' could not be found. Ensure that the correct method name is specified. + + + The Dispatch ID '{0}' could not be found or is invalid. + + + At least one operation is asynchronous. Asynchronous operations are not allowed. + + + There are duplicate operations, which is invalid. Remove the duplicates. + + + The number of parameters in the request did not match the number supported by the method. Ensure that the correct number of parameters are specified. + + + Binding type {0} instance {1} not found in config. + + + The required address keyword was not specified. + + + The required binding keyword was not specified or is not valid. + + + A VARIANT parameter was passed by value. VARIANT parameters must be passed by reference. + + + The type for the '{0}' parameter in '{1}' within the namespace '{2}' cannot not be resolved. + + + The operation cannot be performed after the communications channel has been created. + + + The interface with IID {0} has no methods configured in the COM+ catalog and cannot be exposed as a web service. + + + The interface with IID {0} is not configured in the COM+ catalog and cannot be exposed as a web service. + + + The channeloption intrinsic object cannot be created because the channel builder is not initialized. + + + There is no transaction in the context of the operation. + + + The service does not accept issued tokens. + + + There was an error verifying some XML Schemas generated during export: +{0} + + + There was a validation error on a schema generated during export: + Source: {0} + Line: {1} Column: {2} + Validation Error: {3} + + + The Address, Binding and Contract keywords are required. + + + Type load for contract interface ID {0} failed with Error:{1}. + + + Fail to load binding {0} from config. Error:{1}. + + + Application {0} is marked Pooled. Pooled applications are not supported under COM+ hosting. + + + Application {0} has recycling enabled. Recycling of applications is not supported under COM+ hosting. + + + The client token at least needs to have the SecurityImpersonationLevel of at least Impersonation for Out of process Webhost activations. + + + This InstanceContext requires a valid Message to obtain the instance. + + + From: {0} +AppId: {1} +ClsId: {2} +Incoming TransactionId: {3} +Requesting Identity: {4} + + + From: {0} +AppId: {1} +ClsId: {2} +Iid: {3} +Action: {4} +Instance Id: {5} +Managed Thread Id: {6} +Unmanaged Thread Id: {7} +Requesting Identity: {8} + + + AppId: {0} +ClsId: {1} + + + + AppId: {0} + + + Iid: {0} +Type Library ID: {1} + + + A Windows hotfix or later service pack is required on Windows XP and Windows Server 2003 to use WS-AtomicTransaction and COM+ Integration Web service transaction functionality. See the Microsoft .NET Framework release notes for instructions on installing the required hotfix. + + + Generating manifest file {0} failed with {1}. + + + Directory {0} not found. + + + Cannot access directory {0}. + + + The object with CLSID '{0}' does not support the required IPersistStream interface. + + + CLSID of type {0} does not match the CLSID on PersistStreamTypeWrapper which is {1}. + + + Target object does not support IPersistStream. + + + Target type is an interface but corresponding type is not PersistStreamTypeWrapper. + + + CLSID {0} is not allowed. + + + Transferring to ComPlus logical thread {0}. + + + The cNamedArgs parameter is not supported and must be 0. + + + Binding '{0}' was not found in config. The config file must be present and contain a binding matching the one specified in the moniker. + + + The claimType cannot be an empty string. + + + X509Chain does not have any valid certificates. + + + X509CertificateValidationMode.Custom requires a CustomCertificateValidator. Specify the CustomCertificateValidator property. + + + UserNamePasswordValidationMode.MembershipProvider requires a MembershipProvider. Specify the MembershipProvider property. + + + UserNamePasswordValidationMode.Custom requires a CustomUserNamePasswordValidator. Specify the CustomUserNamePasswordValidator property. + + + The Security Support Provider Interface does not support Impersonation level 'None'. Specify Identification, Impersonation or Delegation level. + + + The public key is not an RSA key. + + + The '{0}' dynamic link library (dll) failed to load. + + + Writing audit messages to the Security log is not supported by the current platform. You must write audit messages to the Application log. + + + No custom principal is specified in the authorization context. + + + Access is denied. + + + SecurityAuditBehavior is not supported on the channel factory. + + + The Infocard token created during channel intialization has expired. Please create a new channel to reacquire token. + + + No Infocard token was found in the ChannelParameters. Infocard requires that the security token be created during channel intialization. + + + Message with action {0} received from a neighbor is missing a via Header. + + + The LinkUtility message received from a neighbor has invalid values for usefull '{0}' and total '{1}'. + + + Internal Error: Peer Neighbor state change from {0} to {1} is invalid. + + + The MaxReceivedMessageSize of the associated listener ({0}) is greater than the MaxReceivedMessageSize of the PeerNode ({1}) with the meshid ({2}), ensure that all ChannelFactories and Endpoints for this mesh have the same configuration for MaxRecievedMessageSize. + + + Binding settings conflict with an existing instance that is using the same mesh name. Check the value of the property {0}. + + + value must be >= {0} and <= {1}. + + + Invalid message: the peer channel via ({0}) has a size of ({1}) it exceeds the maximum via size of ({2}). + + + The PeerNode cannot be opened because it has been Aborted. + + + PNRP is not available. Please refer to the documentation with your system for details on how to install and enable PNRP. + + + The PNRP service is not installed on this machine. Please refer to the documentation with your system for details on how to install and enable PNRP. + + + A PeerResolverBindingElement is required in the {0} binding. The default resolver (PNRP) is not available. + + + Resolver must be specified. The default resolver (PNRP) is not available. Please refer to the documentation with your system for details on how to install and enable PNRP. + + + The specified ResolverType: {0} cannot be loaded. Please ensure that the type name specified refers to a type that can be loaded. + + + Specified resolver settings are not enough to create a valid resolver. Please ensure that a ResolverType and an Address is specified for the custom resolver. + + + The ListenIPAddress {0} is invalid. + + + Internal Error. PeerFlooder instance is already disposed. It cannot be used to send messages. + + + Internal Error. Address of the Service cannot be registered with PNRP. + + + The registrationId {0} is invalid. + + + Application message contains a header that conflicts with a PeerChannel specific header. Name = {0} and Namespace = {1}. + + + PNRP could not find any clouds that match the current operation. + + + "Specified addresses can not be registered with PNRP because either PNRP is not enabled or the specified addresses do not have corresponding clouds. Please refer to the documentation with your system for details on how to install and enable PNRP." + + + The binding's PeerTransportSecuritySettings can not be supported under the current system security configuration. + + + Credentials specified are not sufficient to carry requested operation. Please specify a valid value for {0}. + + + Connection was not accepted because the SecurityContext contained tokens that do not match the current security settings. + + + Addresses specified in the registration exceed PNRP's per registration address limit. + + + Provided information is Insufficient to create a valid connection to the resolver service. + + + Specified PeerResolverMode value {0} is invalid. Please specify either PeerResolveMode.Auto, Default, or Pnrp. + + + concrete PeerResolver implementation must override Initialize to accept metadata about resolver service. + + + The operation: {0} is not valid while the object is in open state. + + + The operation: {0} is not valid while the object is in closed state. + + + Registration info can not be null. Please ensure that the Register operation is invoked with a valid RegistrationInfo object. + + + Resolve info can not be null. Please ensure that the Resolve operation is invoked with a valid ResolveInfo object. + + + Refresh info can not be null. Please ensure that the Refresh operation is invoked with a valid RefreshInfo object. + + + MessageBody does not contain a valid {0} message. Please ensure that the message is well formed. + + + A peer registration with the service address {0} already exists. + + + MeshId: {0}, Node Id: {1}, Online: {2}, Open: {3}, Port: {4} + + + The MessagePropagationFilter threw an exception. Please refer to InnerException. + + + An event notification threw an exception. Please refer to InnerException. + + + The Peer resolver threw an exception. Please refer to InnerException. + + + One of the addresses specified doesn't match any PNRP cloud for registration.{0} + + + Specified cloud {0} could not be used for the specified operation because it is disabled. + + + Specified cloud {0} is configured for Resolve operations only. + + + Requested PNRP operation {0} could not be performed because the port is blocked possibly by a firewall. + + + Specified mesh name {0} cannot be used because a name can only be registered once per process. + + + Invalid RefreshInterval value of {0}; it must be greater than zero + + + Invalid CleanupInterval value of {0}; it must be greater than zero + + + Multiple link-local only interfaces detected. Please specifiy the interface you require by using the ListenIpAddress attribute in the PeerTransportBindingElement + + + Registration with zero addresses detected. Please call Register with more than zero addresses. + + + Certificate generation has failed. Please see the inner exception for more information. + + + Throttle on the mesh {0} waiting. + + + Attempting to prune the slow neighbor for the mesh {0}. + + + Maintainer is starting for the mesh {0}. + + + Maintainer is attempting a connection to Peer {0} for the mesh {1}. + + + Maintainer encountered exception when attempting a connection to Peer {0} for the mesh {1}. Exception is {2}. + + + Mantainer's InitialConnect is running for the mesh {0}. + + + Mantainer is attempting to prune connections for the mesh {0}. + + + Mantainer is attempting to establish additional connections for the mesh {0}. + + + BasicHttpContextBinding {0}:{1} requires that AllowCookies property is set to true. + + + The message contains a callback context header with an endpoint reference for AddressingVersion '{0}'. Callback context can only be transmitted when the AddressingVersion is configured with 'WSAddressing10'. + + + The callback address already has a context header in it. + + + The callback address contains multiple context headers. There can be at most one context header in a callback address. + + + The incoming message with action '{0}' contains a callback context header with name '{1}' and namespace '{2}'. Callback context headers are not expected in incoming messages at the client. + + + The message contains a callback context message property. Callback context can be transmitted only when the ContextBindingElement is configured with ContextExchangeMechanism of ContextSoapHeader. + + + ContextBindingElement cannot provide channel factory for the requested channel shape {0}. + + + ContextBindingElement cannot provide channel listener for the requested channel shape {0}. + + + Value '{0}' specified for 'name' attribute of ContextMessageProperty is either null or has invalid character(s). Please ensure value of 'name' is within the allowed value space. + + + Context protocol was unable to parse the context header. Nodes disallowed by the context header schema were found inside the context header. + + + The outgoing message with action '{0}' contains a callback context message property. Callback context cannot be transmitted in outgoing messages at the server. + + + Channel context management cannot be enabled or disabled after the channel is opened. + + + Context cached at the channel cannot be set or retrieved when the context management is disabled at the channel layer. Ensure context channel property 'IContextManager.Enabled' is set to true. + + + Context cached at the channel layer cannot be changed after the channel is opened. + + + Cannot specify 'ContextMessageProperty' in message when using context channel with context management enabled. Ensure the message does not have 'ContextMessageProperty' or disable context management by setting channel property 'IContextManager.Enabled' to false. + + + Context channel received a message with context which does not match the current context cached at the channel. Ensure service does not change context after it was originally set or disable context management by setting channel property 'IContextManager.Enabled' to false. + + + Service behavior {0} requires that the binding associated with endpoint {1} listening on {2} supports the context protocol, because the contract associated with this endpoint may require a session. Currently configured binding for this endpoint does not support the context protocol. Please modify the binding to add support for the context protocol or modify the SessionMode on the contract to NotAllowed. + + + Binding {1}:{2} is configured with ContextExchangeMechanism.HttpCookie which is not compatible with the transport type {0}. Please modify the ContextExchangeMechanism or use HTTP or HTTPS transport. + + + ContextBindingElement of binding {0}:{1} is configured with ContextExchangeMode.HttpCookie but the configuration of this binding's HttpTransportBindingElement prevents upper channel layers from managing cookies. Please set the HttpTransportBindingElement.AllowCookies property to false or change the ContextExchangeMechanism of ContextBindingElement to SoapHeader. + + + ContextBindingElementImporter cannot import policy because PolicyImportContext.BindingElements collection is null. + + + EndpointAddress: {0}, Via:{1} + + + Context protocol was unable to parse the context header. + + + Context protocol was unable to parse the callback context header. + + + The OLE Transactions header was invalid or corrupt. + + + The WS-AtomicTransaction header was invalid or corrupt. + + + The issued token accompanying the WS-AtomicTransaction coordination context was invalid or corrupt. + + + The OLE Transactions propagation token received in the message could not be used to unmarshal a transaction. It may be invalid or corrupt. + + + The WS-AtomicTransaction extended information included in the OLE Transactions propagation token was invalid or corrupt. + + + An error occurred communicating with the distributed transaction manager. + + + The WS-AtomicTransaction protocol service could not unmarshal the flowed transaction. The following exception occured: {0} + + + The transaction identifier element in the registration header is invalid + + + The context identifier element in the registration header is invalid. + + + The token identifier element in the registration header is invalid. + + + The transaction identifier element in the coordination context is invalid. + + + The WS-AtomicTransaction transaction formatter could not read the registry value '{0}'. + + + The MSDTC transaction manager's WS-AtomicTransaction protocol service '{0}' is disabled and cannot unmarshal incoming transactions. + + + The MSDTC transaction manager has disabled incoming transactions. + + + The incoming transaction cannot be unmarshaled because the source MSDTC transaction manager has either disabled outbound transactions or disabled its WS-AtomicTransaction protocol service. + + + A registration service address could not be created from MSDTC whereabouts information. + + + The MSDTC whereabouts information could not be deserialized. + + + The standard whereabouts signature was missing from the MSDTC whereabouts information. + + + The MSDTC whereabouts information's protocol count was invalid. + + + The MSDTC whereabouts information's host name byte count was invalid. + + + The MSDTC whereabouts information's host name was invalid. + + + The MSDTC whereabouts information did not contain a host name. + + + The specified WSAT protocol version is invalid. + + + The parameter cannot be empty. + + + The requested resouce has not changed and should be taken from cache. + + + The requested resource has moved to one of the following locations: +{0} + + + The requested resource must be accessed through one of the following intermediary service locations: +{0} + + + The requested resource has been moved. + + + At least one RedirectionLocation must be provided for this RedirectionType. + + + RedirectionType 'Cache' does not allow any RedirectionLocation objects be passed into the constructor. + + + {0} ({1}) + + + {0} + + + The requested resource is available. + + + Executing user callback. + + + Close '{0}'. + + + Construct ChannelFactory. Contract type: '{0}'. + + + Construct ServiceHost '{0}'. + + + Execute '{0}.{1}'. + + + Execute Async: Begin: '{0}.{1}'; End: '{2}.{3}'. + + + Close ChannelFactory. Contract type: '{0}'. + + + Close ClientBase. Contract type: '{0}'. + + + Close ServiceHost '{0}'. + + + Listen at '{0}'. + + + Open '{0}'. + + + Open ServiceHost '{0}'. + + + Open ChannelFactory. Contract type: '{0}'. + + + Open ClientBase. Contract type: '{0}'. + + + Process action '{0}'. + + + Processing message {0}. + + + Receive bytes on connection '{0}'. + + + Set up Secure Session. + + + Renew Secure Session. + + + Close Security Session. + + + Shared listener connection: '{0}'. + + + Socket connection: '{0}'. + + + Reading data from connection on '{0}'. + + + Receiving data at via '{0}'. + + + Begin method execution. + + + Created: {0} + + + Disposed: {0} + + + Sent a message over a channel + + + Prepared message for sending over a channel + + + ComPlus:channel created. + + + ComPlus:Dispatch method details. + + + ComPlus:DllHost initializer:Adding host. + + + ComPlus:Started DllHost initializer. + + + ComPlus:Starting DllHost initializer. + + + ComPlus:Stopped DllHost initializer. + + + ComPlus:Stopping DllHost initializer. + + + ComPlus:Entering COM+ activity. + + + ComPlus:Executing COM call. + + + ComPlus:Received instance creation request. + + + ComPlus:Created instance. + + + ComPlus:Released instance. + + + ComPlus:Invoked method. + + + ComPlus:Invoking method. + + + Complus:Invoking method with transaction in COM+ context. + + + Complus:Invoking method with new incoming transaction. + + + ComPlus:Left COM+ activity. + + + Complus:Mex channel loader loaded. + + + Complus:Metadata exchange completed successfully. + + + ComPlus:Created service contract. + + + ComPlus:Created service endpoint. + + + ComPlus:Started service. + + + ComPlus:Started service:details. + + + ComPlus:Starting service. + + + ComPlus:Stopped service. + + + ComPlus:Stopping service. + + + ComPlus:Service moniker parsed. + + + ComPlus:Type library converter event. + + + ComPlus:Finished type library import. + + + ComPlus:Type library import: using assembly. + + + ComPlus:Type library import: using type library. + + + ComPlus:Starting type library import. + + + ComPlus:Transaction aborted by COM+ context. + + + ComPlus:Transaction aborted by Transaction Manager. + + + ComPlus:Transaction committed. + + + ComPlus:Typed channel builder loaded. + + + ComPlus:WSDL channel builder loaded. + + + Aborted '{0}'. + + + Failed to abort {0} + + + Failed to close {0} + + + Closed {0} + + + Created {0} + + + Closing {0} + + + Disposing {0} + + + CommunicationObject faulted due to exception. + + + Faulted {0} + + + Failed to open {0} + + + Opened {0} + + + Opening {0} + + + The configuration is read-only. + + + Extension type is not configured. + + + The connection has been abandoned. + + + Connection information. + + + An exception occurred while closing the connections in this connection pool. + + + A connection has exceeded the idle timeout of this connection pool ({0}) and been closed. + + + A connection has exceeded the connection lease timeout of this connection pool ({0}) and been closed. + + + MaxOutboundConnectionsPerEndpoint quota ({0}) has been reached, so connection was closed and not stored in this connection pool. + + + MaxOutboundConnectionsPerEndpoint quota ({0}) has been reached, so the connection was closed and not reused by the listener. + + + No matching <service> tag was found. Default endpoints added. + + + Failed to trace a message + + + Did not understand message header. + + + A response message was received, but there are no outstanding requests waiting for this message. The message is being dropped. + + + The given schema cannot be imported in this format. + + + The type of the element does not match the configuration type. + + + End method execution. + + + Endpoint listener closed. + + + Endpoint listener opened. + + + Error invoking user code + + + Configuration evaluation context not found. + + + Starting Security ExportChannelBinding + + + Finished Security ExportChannelBinding + + + The extension collection does not exist. + + + The extension collection is empty. + + + Extension element not associated with an extension collection. + + + The extension element already exists in the collection. + + + Extension type not found. + + + Failed to set an activity id header on an outgoing message + + + Failed to read an activity id header on a message + + + Evaluating message logging filter against the message exceeded the node quota set on the filter. + + + Get BehaviorElement. + + + Get ChannelEndpointElement. + + + Get machine.config common behaviors. + + + Get configuration section. + + + Get configured binding. + + + Get default configured binding. + + + Get configured endpoint. + + + Get default configured endpoint. + + + Get ServiceElement. + + + Authentication failed for HTTP(S) connection + + + The HTTP SOAPAction header and the wsa:Action SOAP header did not match. + + + Failed to lookup a channel to receive an incoming message. Either the endpoint or the SOAP action was not found. + + + Failed to send request message over HTTP + + + Failed to send response message over HTTP + + + Received bad HTTP response + + + HTTP response was received + + + The HTTP concurrent receive quota was reached. + + + Client certificate is invalid. + + + Client certificate is invalid with native error code {0} (see http://go.microsoft.com/fwlink/?LinkId=187517 for details). + + + Client certificate is required. No certificate was found in the request. This might be because the client certificate could not be successfully validated by the operating system or IIS. For information on how to bypass those validations and use a custom X509CertificateValidator in WCF please see http://go.microsoft.com/fwlink/?LinkId=208540. + + + Starting Security ImportChannelBinding + + + Finished Security ImportChannelBinding + + + An existing incompatible transport manager was found for the specified URI. + + + Initiating Named Pipe connection. + + + Initiating TCP connection. + + + The IssuanceTokenProvider has started a new security negotiation. + + + The IssuanceTokenProvider has completed the security negotiation. + + + The IssuanceTokenProvider applied a redirection header. + + + The IssuanceTokenProvider removed the expired service token. + + + IssuanceTokenProvider pruned service token cache. + + + The IssuanceTokenProvider used the cached service token. + + + Listener created + + + Listener disposed + + + Maximum number of pending connections has been reached. + + + Maximum number of inbound session channel has been reached. + + + A message was closed + + + A message was closed again + + + A message was copied + + + Reached the limit of messages to log. Message logging is stopping. + + + Message not logged because its size exceeds configured quota + + + A message was read + + + Sent a message over a channel. + + + Received a message over a channel. + + + A message was written + + + Switched threads while processing a message. + + + MsmqActivation service cannot peek on the queue. + + + MsmqActivation service cannot discover queues. + + + MSMQ datagram message received. + + + MSMQ datagram message sent. + + + MSMQ detected successfully. + + + Entered batching mode. + + + Expected exception caught. + + + Hosting environment found the base address for the service. + + + Left batching mode. + + + MsmqActivation service found application matching queue. + + + Cannot move or delete message because it is still locked under the transaction. + + + Message was dropped. + + + Message was rejected. + + + Cannot move or delete message. + + + Poison message moved to the poison subqueue. + + + Poison message moved to the retry subqueue. + + + Poison message rejected. + + + Pool of the native MSMQ messages is full. This may affect performance. + + + Transaction which received this message was aborted at least once. + + + MSMQ queue closed. + + + MSMQ queue opened. + + + Cannot detect if the queue is transactional. + + + MsmqActivation service started scan for queues. + + + MSMQ transport session received. + + + MSMQ transport session sent. + + + MSMQ Activation service started application. + + + Hosting environment started service. + + + Unexpected acknowledgment value. + + + Failed to receive a message over a named pipe channel. + + + Received a message over a named pipe channel. + + + NegotiationTokenAuthenticator was attached. + + + NegotiationTokenProvider was attached. + + + No existing transport manager was found for the specified URI. + + + Transport is listening at base URI. + + + The configuration system has detected a duplicate key in a different configuration scope and is overriding with the more recent value. + + + A message was received by a peer channel. + + + A message was sent on a peer channel. + + + A PeerNode received a message that did not match any local channels. + + + A PeerNode received a flooded message that was not propagated further. + + + A PeerNode received a flooded message. + + + Received message could not be forwarded to other neighbors since it exceeded the quota set for the peer node. + + + A Peer Neighbor close has failed. + + + A Peer Neighbor closing has failed. + + + A Peer Neighbor Manager is offline. + + + A Peer Neighbor Manager is online. + + + A message was received by a Peer Neighbor. + + + A Peer Neighbor was not accepted. + + + A Peer Neighbor was not found. + + + A Peer Neighbor open has failed. + + + A Peer Neighbor state change has failed. + + + A Peer Neighbor state has changed. + + + A PeerNode address has changed. + + + A neighbor connection could not be established due to insufficient or wrong credentials. + + + A neighbor security handshake as timed out. + + + A PeerNode was closed. + + + A PeerNode is closing. + + + Peer node open failed. + + + A PeerNode was opened. + + + A PeerNode is opening. + + + Message source could not be authenticated. + + + PeerService Opened and listening at '{0}'. + + + A performance counter failed to load. Some performance counters will not be available. + + + Failed to load the performance counter '{0}'. Some performance counters will not be available + + + There was an error while updating the performance counter '{0}'. This performance counter will be disabled. + + + Loading performance counters for the service failed. Performance counters will not be available for this service. + + + Unloading the performance counters failed. + + + Registered addresses in PNRP. + + + Resolved addresses in PNRP. + + + Unexpected Exception during PNRP resolve operation. + + + Unregistered addresses in PNRP. + + + A null Message (signalling end of channel) was received from a datagram channel, but the channel is still in the Opened state. This indicates a bug in the datagram channel, and the demuxer receive loop has been prematurely stalled. + + + PeerMaintainer Activity. + + + A reliable channel has been opened. + + + Behavior type already exists in the collection + + + Received reply over request channel + + + A failure occured while performing a security related operation. + + + An active security session was removed by the server. + + + A failure occurred while writing to the security audit log. + + + The security audit log is written successfully. + + + The security protocol verified the incoming message. + + + The security protocol secured the outgoing message. + + + The security protocol cannot secure the outgoing message. + + + The security protocol cannot verify the incoming message. + + + The client security session renewed the session key. + + + A Close message was sent by the client security session. + + + Close response message was sent by client security session. + + + Close message was received by client security session.TraceCodeSecurityClientSessionKeyRenewed=Client security session renewed session key. + + + The client security session discarded the previous session key. + + + The SecurityContextSecurityToken cache is full. + + + Identity cannot be determined for an EndpointReference. + + + Identity was determined for an EndpointReference. + + + The HostName portion of an endpoint address cannot be normalized. + + + Identity verification failed. + + + Identity verification succeeded. + + + Security impersonation failed at the server. + + + Security Impersonation succeeded at the server. + + + An inactive security session was faulted by the server. + + + Service security negotiation processing failure. + + + A new security session key was issued by the server. + + + A pending security session was added to the server. + + + The pending security session was closed by the server. + + + A pending security session was activated by the server. + + + The server security session received a close message from the client. + + + Server security session received Close response message from client. + + + Server security session sent session aborted fault to client. + + + The security session key was updated by the server. + + + The server security session sent a key renewal fault to the client. + + + The server security session sent a close response to the client. + + + Server security session sent Close to client. + + + Client security session received session aborted fault from server. + + + Failure sending security session aborted fault to client. + + + The client security session received a closed reponse from the server. + + + A failure occurred when sending a security session Close response to the client. + + + Failure sending security session Close to client. + + + The client security session received a key renewal fault from the server. + + + The client security session was redirected. + + + A failure occurred when sending a renewal fault on the security session key to the client. + + + The client security session operation failed. + + + The security session operation completed successfully at the client. + + + A security session operation was started at the client. + + + The security session operation failed at the server. + + + The ServicePrincipalName could not be mapped to a SecurityIdentifier. + + + Security Token Authenticator was closed. + + + Security Token Authenticator was opened. + + + Security Token Provider was closed. + + + Security Token Provider was opened. + + + ServiceChannel information. + + + ServiceHost base addresses. + + + ServiceHost close operation timedout. + + + ServiceHost faulted. + + + ServiceHost error on calling ReleasePerformanceCounters. + + + The system hit the limit set for throttle '{0}'. Limit for this throttle was set to {1}. Throttle value can be changed by modifying attribute '{2}' in serviceThrottle element or by modifying '{0}' property on behavior ServiceThrottlingBehavior. + + + The system hit an internal throttle limit. Limit for this throttle was set to {0}. This throttle cannot be configured. + + + The system hit the limit set for the '{0}' throttle. Throttle value can be changed by modifying {0} property on {1}. + + + Switched threads while processing a message for Contract '{0}' at Address '{1}'. ConcurrencyMode for service is set to Single/Reentrant and the service is currently processing another message. + + + Switched threads while processing a message for Contract '{0}' at Address '{1}'. Cannot process more than one transaction at a time and the transaction associated with the previous message is not yet complete. Ensure that the caller has committed the transaction. + + + Switched threads while processing a message for Contract '{0}' at Address '{1}'. Waiting for the completion of ReceiveContext acknowledgement. If your service seems to be not processing the message ensure that the channel implementation of receive context completes the operation. + + + Switched threads while processing a message for Contract '{0}' at Address '{1}'. UseSynchronizationContext property on ServiceBehaviorAttribute is set to true, and SynchronizationContext.Current was non-null when opening ServiceHost. If your service seems to be not processing messages, consider setting UseSynchronizationContext to false. + + + Replying to an operation threw a exception. + + + The Request/Reply operation {0} has no Reply Message. + + + The Request/Reply operation {0} has no IRequestContext to use for the reply. + + + Service security negotiation completed. + + + The incoming message is not part of an existing security session. + + + Create ServiceHost. + + + The TransportManager was successfully closed. + + + A named pipe was successfully duplicated. + + + A socket was successfully duplicated. + + + The PROCESS_DUP_HANDLE access right has been granted to the {0} service's account with SID '{1}'. + + + The TransportManager is now successfully listening. + + + Behavior type is not of expected type + + + An attempt to reuse a pooled connection failed. Another attempt will be made with {0} remaining in the overall timeout. + + + An attempt to connect to the named pipe endpoint at '{1}' failed. Another attempt will be made with {0} remaining in the overall timeout. + + + The operating system's timer resolution was detected as {0} ticks, which is about {1} milliseconds. + + + RequestContext aborted + + + PipeConnection aborted + + + The shared memory for the endpoint of the service '{0}' does not exist. The service may not be started. + + + SocketConnection aborted + + + SocketConnection aborted under Close + + + SocketConnection close + + + SocketConnection create + + + SpnegoTokenProvider completed SSPI negotiation. + + + SpnegoTokenAuthenticator completed SSPI negotiation. + + + Client's outgoing SSPI negotiation. + + + Service's outgoing SSPI negotiation. + + + The remote SSL client failed to provide a required certificate. + + + The stream security upgrade was accepted successfully. + + + Failed to receive a message over TCP channel + + + Received a message over TCP channel + + + Understood message header. + + + No service available to handle this action + + + Unhandled exception in user operation '{0}.{1}'. + + + Webhost could not activate service + + + Webhost couldn't compile service + + + Setting a value via WMI. + + + A non-critical error or warning occurred during WSDL Export + + + A non-critical error or warning occurred in the MetadataExchangeClient during WSDL Import This could result in some endpoints not being imported. + + + An incoming channel was disposed because there was an error while attempting to open it. + + + Listen at '{0}'. + + + An invalid create sequence message was received. + + + An invalid WS-RM message was received. + + + An incoming create sequence request was rejected because the maximum pending channel count was reached. + + + A message in a WS-RM sequence has been dropped because it could not be buffered. + + + The reliable session infrastructure detected a system clock change. This will temporarily result in a less optimal message retry strategy. + + + WS-RM SequenceAcknowledgement received. + + + WS-RM Last Sequence message received. + + + WS-RM Sequence message received. + + + WS-RM SequenceAcknowledgement sent. + + + WS-RM Last Sequence message sent. + + + WS-RM Sequence message sent. + + + A WS-RM sequence has faulted. + + + Channel connection was dropped + + + An async callback threw an exception! + + + The MetadataExchangeClient is sending a request for metadata. + + + The MetadataExchangeClient received a reply. + + + The ServiceDebugBehavior Help Page is enabled at a relative address and cannot be created because there is no base address. + + + The TCP connect operation failed. + + + The transaction '{0}' was received for operation '{1}' from a transacted transport, such as MSMQ. + + + The transaction '{0}' was flowed to operation '{1}'. + + + The transaction '{0}' was received for operation '{1}' from an InstanceContext transaction. + + + Existing transaction '{0}' being used for operation '{1}'. + + + The transaction '{0}' for operation '{1}' was completed due to the TransactionAutoComplete OperationBehaviorAttribute member being set to true. + + + The transaction '{0}' for operation '{1}' was completed due to an unhandled execution exception. + + + The transaction '{0}' for operation '{1}' was completed due to a call to SetTransactionComplete. + + + The transaction '{0}' was completed when the session was closed due to the TransactionAutoCompleteOnSessionClose ServiceBehaviorAttribute member. + + + The transaction '{0}' for operation '{1}' was completed due to asynchronous abort. + + + The transaction '{0}' for operation '{1}' remains attached to the InstanceContext. + + + The transaction '{0}' was aborted because it was uncompleted when the session was closed and the TransactionAutoCompleteOnSessionClose OperationBehaviorAttribute was set to false. + + + The service instance was released on the completion of the transaction '{0}' because the ReleaseServiceInstanceOnTransactionComplete ServiceBehaviorAttribute was set to true. + + + The transaction '{0}' was asynchronously aborted. + + + The OleTransactions protocol negotiation failed for coordination context '{0}'. + + + The transaction '{0}' for operation '{1}' was newly created. + + + Activating message received. + + + InstanceContext cached for InstanceId {0}. + + + InstanceContext for InstanceId {0} removed from cache. + + + DurableInstance's InstanceContext refcount incremented. + + + DurableInstance's InstanceContext refcount decremented. + + + ContextChannel created. + + + A new ContextChannel was accepted. + + + Context added to Message. + + + Context retrieved from Message. + + + WorkflowServiceHost created. + + + ServiceDurableInstance '{0}' deleted from persistence store. + + + ServiceDurableInstance '{0}' disposed. + + + ServiceDurableInstance loaded from persistence store. + + + ServiceDurableInstance saved to persistence store. + + + WorkflowDurableInstance '{0}' loaded. + + + WorkflowDurableInstance '{0}' activated. + + + WorkflowDurableInstance aborted. + + + Work item enqueued. + + + Reply sent for InstanceId {0}. + + + Fault Sent for InstanceId {0}. + + + Sql execution started. + + + Sql execution complete. + + + SqlPersistenceProvider.Open() parameters. + + + SynchronizationContextWorkflowSchedulerService - Timer {0} cancelled. + + + SynchronizationContextWorkflowSchedulerService - Timer {0} created for InstanceId {1}. + + + Reading of a syndication feed started. + + + Reading of a syndication feed completed. + + + Reading of a syndication item started. + + + Reading of a syndication item completed. + + + Writing of a syndication feed started. + + + Writing of a syndication feed completed. + + + Writing of a syndication item started. + + + Writing of a syndication item completed. + + + Syndication element with name '{0}' and namespace '{1}' was not written. + + + Syndication element with name '{0}' and namespace '{1}' is invalid. + + + HTTP query string parameter with name '{0}' was ignored. + + + Incoming HTTP request with URI '{0}' matched operation '{1}'. + + + Incoming HTTP request with URI '{0}' does not match any operation. + + + Parameter 'baseAddress' must an absolute uri. + + + BaseAddress must an absolute uri. + + + Cannot change BaseAddress after calling MakeReadOnly. + + + There were multiple UriTemplateMatch results, but MatchSingle was called. + + + BaseAddress has not been set. Set the BaseAddress property before calling MakeReadOnly, Match, or MatchSingle. + + + KeyValuePairs must have at least one element. + + + UriTemplate '{0}' contains {1} path variables and {2} query variables but {3} values were passed to the BindByPosition method. The number of values passed to BindByPosition should be greater than or equal to the number of path variables in the template and cannot be greater than the total number of variables in the template. + + + baseAddress must an absolute Uri. + + + The UriTemplate '{0}' is not valid; each portion of the query string must be of the form 'name' or of the form 'name=value', where each name is unique. Note that the names are case-insensitive. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; the query string cannot end with '&amp;'. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; each portion of the query string must be of the form 'name' or of the form 'name=value'. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; the UriTemplate variable named '{1}' appears multiple times in the template. Note that UriTemplate variable names are case-insensitive. See the documentation for UriTemplate for more details. + + + UriTemplateTable does not support '{0}' and '{1}' since they are not equivalent, but cannot be disambiguated because they have equivalent paths and the same common literal values for the query string. See the documentation for UriTemplateTable for more detail. + + + UriTemplateTable does not support multiple templates that have equivalent path as template '{0}' but have different query strings, where the query strings cannot all be disambiguated via literal values. See the documentation for UriTemplateTable for more detail. + + + UriTemplateTable (with allowDuplicateEquivalentUriTemplates = false) does not support both '{0}' and '{1}', since they are equivalent. Call MakeReadOnly with allowDuplicateEquivalentUriTemplates = true to use both of these UriTemplates in the same table. See the documentation for UriTemplateTable for more detail. + + + UriTemplate does not support '{0}' as a valid format for a segment or a query part. + + + The path variable '{0}' in the UriTemplate must be bound to a non-empty string value. + + + UriTemplate '{0}' contains no variables; yet the BindByPosition method was called with {1} values. + + + UTCSR - Lookup was called before match + + + The UriTemplate '{0}' is not valid; UriTemplate does not support two adjacent variables with no literal in compound segments, such as in the segment '{1}'. + + + The UriTemplate '{0}' is not valid; each portion of the query string must be of the form 'name=value', when value cannot be a compound segment. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; each portion of the query string must be of the form 'name' or of the form 'name=value', where name is a simple literal. See the documentation for UriTemplate for more details. + + + Changing an inline default value with information from the additional default values is not supported; the default value to the variable '{0}' was already provided as part of the UriTemplate '{1}'. See the documentation for UriTemplate for more details. + + + The default values of UriTemplate are immutable; they cannot be modified after the construction of the UriTemplate instance. See the documentation of UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; the UriTemplate compound path segment '{1}' provides a default value to variable '{2}'. Note that UriTemplate doesn't support default values to variables in compound segments. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; the UriTemplate variable declaration '{1}' provides a default value to query variable '{2}'. Note that UriTemplate doesn't support default values to query variables. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; the UriTemplate variable declaration '{1}' provides an empty default value to path variable '{2}'. Note that UriTemplate path variables cannot be bound to a null or empty value. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; the UriTemplate variable declaration '{1}' isn't a valid variable construct. Note that UriTemplate variable definitions are either a simple, non-empty, variable name or a 'name=value' format, where the name must not be empty and the value provides a default value to the variable. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; the wildcard ('{1}') cannot appear in a variable name or literal, unless as a construct for a wildcard segment. Note that a wildcard segment, either a literal or a variable, is valid only as the last path segment in the template; the wildcard can appear only once. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; the UriTemplate last path segment '{1}' provides a default value to final star variable '{2}'. Note that UriTemplate doesn't support default values to final star variable. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; the path variable '{1}', defined as part of a compound path segment has been provided with a default value as part of the additional defaults. Note that UriTemplate doesn't support default values to variables in compound segments. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; the query variable '{1}' has been provided a default value as part of the additional defaults. Note that UriTemplate doesn't support default values to query variables. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; the additional default value '{1}' has a null value as default value. Note that null default values must be only provided to concrete path variables. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; the UriTemplate path variable '{1}' has a null default value while following path variable '{2}' has no defaults or provides a non-null default value. Note that UriTemplate path variable with null default value must be followed only with other path variables with null defaulted values. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; the UriTemplate path variable '{1}' has a null default value while the following path segment '{2}' is not a variable segment with a null default value. Note that UriTemplate path variable with null default values must be followed only with other path variables with null defaulted value. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; the UriTemplate path variable '{1}' has a null default value while the template is finished with a wildcard. Note that UriTemplate path variable with null default values must be followed only with other path variables with null defaulted value. See the documentation for UriTemplate for more details. + + + The UriTemplate '{0}' is not valid; the UriTemplate final star variable '{1}' has been provides a default value as part of the additional defaults information. Note that UriTemplate doesn't support default values to final star variable. See the documentation for UriTemplate for more details. + + + An invalid template '{0}' was passed as the key in a pair of template and its associated object. UriTemplateTable Key-Value pairs must always contain a valid UriTemplate object as key; note that UriTemplateTable doesn't support templates that are ignoring the trailing slash in respect to matching. See the documentation for UriTemplateTable for more details. + + + A null UriTemplate was passed as the key in a pair of template and its associated object. UriTemplateTable Key-Value pairs must always contain a valid UriTemplate object as key. See the documentation for UriTemplateTable for more details. + + + The BindByName method of UriTemplate was called with an empty name in the collection of arguments for the bind. Note that the NameValueCollection or the Dictionary passed to BindByName cannot contain an empty (or null) name as a key. See the documentation of UriTemplate for more details. + + + The UriTemplate contains a literal value for query key '{0}', but that key also is present in the NameValueCollection. Either remove that key from the NameValueCollection, or else change the UriTemplate to not have a query literal for that key. + + + The name of the extension element must be specified. + + + The Rss20Serializer does not support RSS version '{0}'. + + + The Atom10 specification requires '{0}' to have one of these values: "text", "html", "xhtml", however this value is '{1}' in the document being deserialized. + + + Error in line {0} position {1}. + + + An error was encountered when parsing the feed's XML. Refer to the inner exception for more details. + + + An error was encountered when parsing the document's XML. Refer to the inner exception for more details. + + + An error was encountered when parsing the item's XML. Refer to the inner exception for more details. + + + An error was encountered when parsing a DateTime value in the XML. + + + The outer element name must be specified. + + + The element with name '{0}' and namespace '{1}' is not an allowed feed format. + + + The element with name '{0}' and namespace '{1}' is not an allowed document format. + + + The element with name '{0}' and namespace '{1}' is not an allowed item format. + + + The syndication feed formatter must be configured with a syndication feed. + + + The document formatter must be configured with a document. + + + The syndication item formatter must be configured with a syndication item. + + + A feed containing items that are not buffered (i.e. the items are not stored in an IList) cannot clone its items. Buffer the items in the feed before calling Clone on it or pass false to the Clone method. + + + The feed being deserialized has non-contiguous sets of items in it. This is not supported by '{0}'. + + + The feed created a null category. + + + The item created a null category. + + + The feed created a null person. + + + The item created a null person. + + + =The feed created a null item. + + + Reading of a syndication feed started. + + + Reading of a syndication feed completed. + + + Reading of a syndication item started. + + + Reading of a syndication item completed. + + + Writing of a syndication feed started. + + + Writing of a syndication feed completed. + + + Writing of a syndication item started. + + + Writing of a syndication item completed. + + + Syndication XML node of type '{0}' with name '{1}' and namespace '{2}' ignored on read. + + + Reading of a service document started. + + + Reading of a service document completed. + + + Writing of a service document started. + + + Writing of a service document completed. + + + Reading of a categories document started. + + + Reading of a categories document completed. + + + Writing of a categories document started. + + + Writing of a categories document completed. + + + The feed's authors were not serialized as part of serializing the feed in RSS 2.0 format. + + + The feed's contributors were not serialized as part of serializing the feed in RSS 2.0 format. + + + The feed's id was not serialized as part of serializing the feed in RSS 2.0 format. + + + The feed's links were not serialized as part of serializing the feed in RSS 2.0 format. + + + The item's authors were not serialized as part of serializing the feed in RSS 2.0 format. + + + The item's contributors were not serialized as part of serializing the feed in RSS 2.0 format. + + + The item's links were not serialized as part of serializing the feed in RSS 2.0 format. + + + The item's copyrights were not serialized as part of serializing the feed in RSS 2.0 format. + + + The item's content was not serialized as part of serializing the feed in RSS 2.0 format. + + + The item's last updated time was not serialized as part of serializing the feed in RSS 2.0 format. + + + The outer name of the element extension cannot be empty. + + + The Type of object passed as parameter '{0}' is not derived from {1}. Ensure that the type of object passed is either of type {1} or derived from {1}. + + + Failed to impersonate client identity during serialization of the response message. + + + Line {0}, position {1}. + + + end of file + + + element '{0}' from namespace '{1}' + + + end element '{0}' from namespace '{1}' + + + text '{0}' + + + cdata '{0}' + + + comment '{0}' + + + node {0} + + + Start element expected. Found {0}. + + + A single WSDL document could not be generated for this service. Multiple service contract namespaces were found ({0}). Ensure that all your service contracts have the same namespace. + + + You can also access the service description as a single file: + + + The use of '{0}' on the task-based asynchronous method is not supported. + + + Client side task-based asynchronous method must not have any out or ref parameters. Any data that would have been returned through an out or ref parameter should instead be returned as part of the TResult in the resulting task. + + + Generating message contract since the operation has multiple return values. + + + ID0020: The collection is empty. + + + ID2004: IAsyncResult must be the AsyncResult instance returned from the Begin call. The runtime is expecting '{0}', and the actual type is '{1}'. + + + ID3002: WSTrustServiceContract could not create a SecurityTokenService instance from WSTrustServiceContract.SecurityTokenServiceConfiguration. + + + ID3004: Cannot obtain the schema for namespace: '{0}'. + + + ID3022: The WSTrustServiceContract only supports receiving RequestSecurityToken messages. If you need to support more message types, override the WSTrustServiceContract.DispatchRequest method. + + + ID3023: The WSTrustServiceContract only supports receiving RequestSecurityToken messages asynchronously. If you need to support more message types, override the WSTrustServiceContract.BeginDispatchRequest and EndDispatchRequest. + + + ID3097: ServiceHost does not contain any valid Endpoints. Add at least one valid endpoint in the SecurityTokenServiceConfiguration.TrustEndpoints collection. + + + ID3112: Unrecognized RequestType '{0}' specified in the incoming request. + + + ID3113: The WSTrustServiceContract does not support receiving '{0}' messages with the '{1}' SOAP action. If you need to support this, override the ValidateDispatchContext method. + + + ID3114: The WSTrustServiceContract cannot deserialize the WS-Trust request. + + + ID3137: The TrustVersion '{0}', is not supported, only 'TrustVersion.WSTrust13' and 'TrustVersion.WSTrustFeb2005' is supported. + + + ID3138: The RequestSecurityTokenResponse that was received did not contain a SecurityToken. + + + ID3139: The WSTrustChannel cannot compute a proof key. The KeyType '{0}' is not supported. Valid proof key types supported by the WSTrustChannel are WSTrust13 and WSTrustFeb2005. + + + ID3140: Specify one or more BaseAddresses to enable metadata or set DisableWsdl to true in the SecurityTokenServiceConfiguration. + + + ID3141: The RequestType '{0}', is not supported. If you need to support this RequestType, override the corresponding virtual method in your SecurityTokenService derived class. + + + ID3144: The PortType '{0}' Operation '{1}' has Message '{2}' is expected to have only one part but contains '{3}'. + + + ID3146: WsdlEndpointConversionContext.WsdlPort cannot be null. + + + ID3147: WsdlEndpointConversionContext.WsdlPort.Service cannot be null. + + + ID3148: WsdlEndpointConversionContext.WsdlPort.Service.ServiceDescription cannot be null. + + + ID3149: Cannot find an input message type for PortType '({0}, {1})' for operation '{2}' in the given ServiceDescription. + + + ID3150: Cannot find an output message type for PortType '({0}, {1})' for operation '{2}' in the given ServiceDescription. + + + ID3190: The WSTrustChannel cannot compute a proof key without a valid SecurityToken set as the RequestSecurityToken.UseKey when the RequestSecurityToken.KeyType is '{0}'. + + + ID3191: The WSTrustChannel received a RequestedSecurityTokenResponse message containing an Entropy without a ComputedKeyAlgorithm. + + + ID3192: The WSTrustChannel cannot compute a proof key. The received RequestedSecurityTokenResponse does not contain a RequestedProofToken and the ComputedKeyAlgorithm specified in the response is not supported: '{0}'. + + + ID3193: The WSTrustChannel cannot compute a proof key. The received RequestedSecurityTokenResponse indicates that the proof key is computed using combined entropy. However, the response does not include an entropy. + + + ID3194: The WSTrustChannel cannot compute a proof key. The received RequestedSecurityTokenResponse indicates that the proof key is computed using combined entropy. However, the request does not include an entropy. + + + ID3269: Cannot determine the TrustVersion. It must either be specified explicitly, or a SecurityBindingElement must be present in the binding. + + + ID3270: The WSTrustChannel does not support multi-leg issuance protocols. The RSTR received from the STS must be enclosed in a RequestSecurityTokenResponseCollection element. + + + ID3285: The WS-Trust operation '{0}' is not valid or unsupported. + + + ID3286: The 'inner' parameter must implement the 'System.ServiceModel.Channels.IChannel' interface. + + + ID3287: WSTrustChannelFactory does not support changing the value of this property after a channel is created. + + + ID4008: '{0}' does not provide an implementation for '{1}'. + + + ID4039: A custom ServiceAuthorizationManager has been configured. Any custom ServiceAuthorizationManager must be derived from IdentityModelServiceAuthorizationManager. + + + ID4041: Cannot configure the ServiceHost '{0}'. The ServiceHost is in a bad state and cannot be configured. + + + ID4053: The token has WS-SecureConversation version '{0}'. Version '{1}' was expected. + + + ID4072: The SecurityTokenHandler '{0}' registered for TokenType '{1}' must derive from '{2}'. + + + ID4101: The token cannot be validated because it is not a SamlSecurityToken or a Saml2SecurityToken. Token type: '{0}' + + + ID4192: The reader is not positioned on a KeyInfo element that can be read. + + + ID4240: The tokenRequirement must derived from 'RecipientServiceModelSecurityTokenRequirement' for SecureConversationSecurityTokens. The tokenRequirement is of type '{0}'. + + + ID4244: Internal error: sessionAuthenticator must support IIssuanceSecurityTokenAuthenticator. + + + ID4245: Internal error: sessionAuthenticator must support ICommunicationObject. + + + ID4268: MergeClaims must have at least one identity that is not null. + + + ID4271: No IAuthorizationPolicy was found for the Transport security token '{0}'. + + + ID4274: The Configuration property of this SecurityTokenHandler is set to null. Tokens cannot be read or validated in this state. Set this property or add this SecurityTokenHandler to a SecurityTokenHandlerCollection with a valid Configuration property. + + + ID4285: Cannot replace SecurityToken with Id '{0}' in cache with new one. Token must exist in cache to be replaced. + + + ID4287: The SecurityTokenRequirement '{0}' doesn't contain a ListenUri. + + + ID5004: Unrecognized namespace: '{0}'. + + + Authorize + + + OnAuthorizeRequest Failed. + + + OnAuthorizeRequest Succeeded. + + + Authentication failed. + + + The IssuedSecurityTokenProvider cannot support the FederatedClientCredentialsParameters. The FederatedClientCredentialsParameters has already provided the '{0}' parameter. + + + The TrustVersion '{0}', is not supported, only 'TrustVersion.WSTrust13' and 'TrustVersion.WSTrustFeb2005' is supported. + + + The input {0} must be a '{1}' object. + + + The input handler list cannot be empty. + + + The '{0}' list is invalid because the property '{1}' of '{2}' is not null. + + + The '{0}' list created by the Func '{1}' is invalid because it contains one or more null items. + + + The config element '{0}' is invalid because the attribute '{1}' and the sub element '{2}' were both specified. These are mutually exclusive items and cannot be used simultaneouly. + + + This '{0}' object cannot be used to generate configuration because it was created with the constructor that takes a '{1}' as the paramter. This functionality is not supported through configuration files. Please use a different constructor if you wish to generate a configuration file. + + + Invalid type: '{0}'. It must inherit from base type '{1}', cannot be abstract, and must expose a public default constructor. + + + '{0}' cannot return a null '{1}' instance. Please ensure that '{0}' returns a valid '{1}' instance. + + + HTTP pipeline operation cancelled. + + + The message property '{0}' is missing in the HttpRequestMessage. Please make sure this property not removed or changed from the properties of the HttpRequestMessage. If you are creating a new HttpRequestMessage, please copy this property from the old message to the new one. + + + The message property '{0}' inside the HttpRequestMessage is not with expected type '{1}'. Please make sure this property not removed or changed from the properties of the HttpRequestMessage. If you are creating a new HttpRequestMessage, please copy this property from the old message to the new one. + + + The value '{0}' is not a valid content type. + + + The property '{0}' is not supported when building a ChannelFactory. The property value must be null when calling BuildChannelFactory. + + + Cound not load type '{0}' from the assemblies in current AppDomain. + + + The HTTP response message should not be null. Please ensure your '{0}' instance returns a non-null '{1}' object. + + + The subprotocol '{0}' was not requested by the client - no '{1}' header was included in the request. + + + The subprotocol '{0}' was not requested by the client. The client requested the following subprotocol(s): '{1}'. + + + The subprotocol '{0}' is invalid because it contains the invalid character '{1}'. + + + The value specified ('{0}') contains more than one subprotocol which is not supported. + + + Empty string is not a valid subprotocol value. Please use "null" to specify no value. + + + This method is not supported for this HTTP content. + + + Invalid value for the {0} type. The type '{1}' does not derive from the appropriate base class '{2}' or is abstract. + + + This service only supports WebSocket connections. + + + This service does not support WebSocket connections. + + + WebSocket upgrade request failed. Received response status code '{0} ({1})', expected: '{2} ({3})'. + + + WebSocket upgrade request failed. The header '{0}' is missing in the response. + + + WebSocket upgrade request failed. The value of header '{0}' is '{1}'. The expected value is '{2}'. + + + Unexpected response - the server accepted the upgrade request but specified the subprotocol '{0}' when no subprotocol was requested. + + + WebSocket object cannot be accessed directly. + + + A WebSocket error occurred. + + + Unexpected WebSocket close message received when receiving a message. + + + Cannot write to the stream because the end of the stream marker was already written. + + + HttpChannelFactory cannot create the channel with shape '{0}' when the {1} of {2} was set as '{3}'. + + + Maximum number of pending WebSocket connections ({0}) has been reached. Consider increasing the '{1}' quota on the '{2}' property of the transport. + + + The opening handshake properties associated with the current WebSocket connection are not available. The most likely cause is that the property '{0}' on the '{1}' object returned from the custom '{2}' is not set. + + + The operation to establish the WebSocket connection timed out. To increase this time limit, use the OpenTimeout property on the service endpoint's binding. + + + The task was cancelled. + + + An error occured when getting the WebSocketVersion from the WebSocket factory of type '{0}'. See the inner exception for details. + + + The WebSocketVersion returned by the WebSocket factory of type '{0}' is either null, empty or invalid. + + + An error occurred when creating the WebSocket with the factory of type '{0}'. See the inner exception for details. + + + WebSocket creation failed. The '{0}' returned a WebSocket that is either null or not opened. + + + The WebSocket returned by the factory of type '{0}' has the SubProtocol '{1}' that doesn't match the requested SubProtocol value '{2}'. + + + The '{0}' contains multiple '{1}' objects, which is invalid. At most one '{1}' should be specified. + + + The Send operation timed out after '{0}'. Increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. + + + The Receive operation timed out after '{0}'. For duplex sessionful channels, the receive timeout is also the idle timeout for the channel, so consider setting a suitably large value for the ReceiveTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. + + + The '{0}' operation timed out after '{1}'. The time allotted to this operation may have been a portion of a longer timeout. + + + This platform does not support server side WebSockets. + + + This platform does not support client side WebSockets natively. Support for client side WebSockets can be enabled on this platform by providing an implementation of {0}. + + + WebSockets are not supported in the classic pipeline mode. Consider using the integrated pipeline mode for the application pool. + + + The WebSocketModule is not loaded. Check if the WebSocket feature is installed and the WebSocketModule is enabled in the list of IIS modules (see http://go.microsoft.com/fwlink/?LinkId=231398 for details). + + + The name of the policy being imported for contract '{0}:{1}' is invalid:'{2}'. It should be either '{3}', '{4}' or '{5}'. + + + The server didn't accept the connection request. It is possible that the WebSocket protocol version on your client doesn't match the one on the server('{0}'). + + + The server didn't accept the connection request. It is possible that the WebSocket subprotocol sent by your client is not supported by the server. Protocol(s) supported by the server are '{0}'. + + + The server didn't accept the connection request. It is possible that the client side message encoding format doesn't match the setting on the server side. Please check your binding settings. + + + The server didn't accept the connection request. It is possible that the client side message encoding format or message transfer mode doesn't match the setting on the server side. Please check your binding settings. + + + This collection holds request headers and cannot contain the specified response header '{0}'. + + + This collection holds response headers and cannot contain the specified request header '{0}'. + + + Support for {0} and {1} can not be enabled with {2} when the {3} of the {4} is '{5}'. Ensure the {4} used with the binding has a {3} of '{6}'. + + + Enumeration has either not started or has already finished. + + + The parameter '{0}' cannot be an empty string. + + + Specified value has invalid Control characters. + + + Specified value has invalid CRLF characters. + + + Specified value has invalid HTTP Header characters. + + + Specified value has invalid non-ASCII characters. + + + Specified argument was out of the range of valid values. + + + Failed to copy the HTTP header '{0}' with value '{1}' to '{2}'. + + \ No newline at end of file diff --git a/src/System.ServiceModel.Syndication/src/Rss20Constants.cs b/src/System.ServiceModel.Syndication/src/Rss20Constants.cs new file mode 100644 index 000000000000..bd2130a5ae80 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/Rss20Constants.cs @@ -0,0 +1,46 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + internal static class Rss20Constants + { + public const string AuthorTag = "author"; + public const string CategoryTag = "category"; + public const string ChannelTag = "channel"; + public const string CopyrightTag = "copyright"; + public const string DescriptionTag = "description"; + public const string DomainTag = "domain"; + public const string EnclosureTag = "enclosure"; + public const string ExtensionWrapperTag = "extensionWrapper"; + public const string GeneratorTag = "generator"; + public const string GuidTag = "guid"; + public const string ImageTag = "image"; + public const string IsPermaLinkTag = "isPermaLink"; + public const string ItemTag = "item"; + public const string LanguageTag = "language"; + public const string LastBuildDateTag = "lastBuildDate"; + public const string LengthTag = "length"; + public const string LinkTag = "link"; + public const string ManagingEditorTag = "managingEditor"; + public const string PubDateTag = "pubDate"; + public const string Rss20Namespace = ""; + public const string RssTag = "rss"; + public const string SourceTag = "source"; + public const string SpecificationLink = "http://blogs.law.harvard.edu/tech/rss"; + public const string TitleTag = "title"; + public const string TypeTag = "type"; + public const string UrlTag = "url"; + public const string Version = "2.0"; + public const string VersionTag = "version"; + public const string DocumentationTag = "docs"; + public const string TimeToLiveTag = "ttl"; + public const string TextInputTag = "textInput"; + public const string SkipHoursTag = "skipHours"; + public const string SkipDaysTag = "skipDays"; + public const string HourTag = "hour"; + public const string DayTag = "day"; + public const string NameTag = "name"; + } +} diff --git a/src/System.ServiceModel.Syndication/src/Rss20FeedFormatter.cs b/src/System.ServiceModel.Syndication/src/Rss20FeedFormatter.cs new file mode 100644 index 000000000000..fccb74965ec8 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/Rss20FeedFormatter.cs @@ -0,0 +1,1662 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using Microsoft.ServiceModel.Syndication.Resources; + using System; + using System.Collections.Generic; + using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; + using System.Globalization; + using System.Text; + using System.Threading; + using System.Threading.Tasks; + using System.Xml; + using System.Xml.Schema; + using System.Xml.Serialization; + + + [XmlRoot(ElementName = Rss20Constants.RssTag, Namespace = Rss20Constants.Rss20Namespace)] + public class Rss20FeedFormatter : SyndicationFeedFormatter + { + private static readonly XmlQualifiedName s_rss20Domain = new XmlQualifiedName(Rss20Constants.DomainTag, string.Empty); + private static readonly XmlQualifiedName s_rss20Length = new XmlQualifiedName(Rss20Constants.LengthTag, string.Empty); + private static readonly XmlQualifiedName s_rss20Type = new XmlQualifiedName(Rss20Constants.TypeTag, string.Empty); + private static readonly XmlQualifiedName s_rss20Url = new XmlQualifiedName(Rss20Constants.UrlTag, string.Empty); + private static List acceptedDays = new List { "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday" }; + private const string Rfc822OutputLocalDateTimeFormat = "ddd, dd MMM yyyy HH:mm:ss zzz"; + private const string Rfc822OutputUtcDateTimeFormat = "ddd, dd MMM yyyy HH:mm:ss Z"; + + private Atom10FeedFormatter _atomSerializer; + private Type _feedType; + private int _maxExtensionSize; + private bool _preserveAttributeExtensions; + private bool _preserveElementExtensions; + private bool _serializeExtensionsAsAtom; + + //Custom Parsers + // value, localname , ns , result + public Func StringParser { get; set; } = DefaultStringParser; + public Func DateParser { get; set; } = DefaultDateParser; + public Func UriParser { get; set; } = DefaultUriParser; + + static private string DefaultStringParser(string value, string localName, string ns) + { + return value; + } + + static private Uri DefaultUriParser(string value, string localName, string ns) + { + return new Uri(value, UriKind.RelativeOrAbsolute); + } + + private async Task OnReadImage(XmlReaderWrapper reader, SyndicationFeed result) + { + await reader.ReadStartElementAsync(); + string localName = string.Empty; + + while (await reader.IsStartElementAsync()) + { + if (await reader.IsStartElementAsync(Rss20Constants.UrlTag, Rss20Constants.Rss20Namespace)) + { + result.ImageUrl = UriParser(await reader.ReadElementStringAsync(), Rss20Constants.UrlTag, Rss20Constants.Rss20Namespace); + } + else if(await reader.IsStartElementAsync(Rss20Constants.LinkTag, Rss20Constants.Rss20Namespace)) + { + result.ImageLink = UriParser(await reader.ReadElementStringAsync(), Rss20Constants.LinkTag, Rss20Constants.Rss20Namespace); + } + else if (await reader.IsStartElementAsync(Rss20Constants.TitleTag, Rss20Constants.Rss20Namespace)) + { + result.ImageTitle = new TextSyndicationContent(StringParser(await reader.ReadElementStringAsync(), Rss20Constants.TitleTag, Rss20Constants.Rss20Namespace)); + } + } + await reader.ReadEndElementAsync(); // image + return true; + } + + public Rss20FeedFormatter() + : this(typeof(SyndicationFeed)) + { + } + + public Rss20FeedFormatter(Type feedTypeToCreate) + : base() + { + if (feedTypeToCreate == null) + { + throw new ArgumentNullException(nameof(feedTypeToCreate)); + } + if (!typeof(SyndicationFeed).IsAssignableFrom(feedTypeToCreate)) + { + throw new ArgumentException(string.Format(SR.InvalidObjectTypePassed, nameof(feedTypeToCreate), nameof(SyndicationFeed))); + } + _serializeExtensionsAsAtom = true; + _maxExtensionSize = int.MaxValue; + _preserveElementExtensions = true; + _preserveAttributeExtensions = true; + _atomSerializer = new Atom10FeedFormatter(feedTypeToCreate); + _feedType = feedTypeToCreate; + } + + public Rss20FeedFormatter(SyndicationFeed feedToWrite) + : this(feedToWrite, true) + { + } + + public Rss20FeedFormatter(SyndicationFeed feedToWrite, bool serializeExtensionsAsAtom) + : base(feedToWrite) + { + // No need to check that the parameter passed is valid - it is checked by the c'tor of the base class + _serializeExtensionsAsAtom = serializeExtensionsAsAtom; + _maxExtensionSize = int.MaxValue; + _preserveElementExtensions = true; + _preserveAttributeExtensions = true; + _atomSerializer = new Atom10FeedFormatter(this.Feed); + _feedType = feedToWrite.GetType(); + } + + public bool PreserveAttributeExtensions + { + get { return _preserveAttributeExtensions; } + set { _preserveAttributeExtensions = value; } + } + + public bool PreserveElementExtensions + { + get { return _preserveElementExtensions; } + set { _preserveElementExtensions = value; } + } + + public bool SerializeExtensionsAsAtom + { + get { return _serializeExtensionsAsAtom; } + set { _serializeExtensionsAsAtom = value; } + } + + public override string Version + { + get { return SyndicationVersions.Rss20; } + } + + protected Type FeedType + { + get + { + return _feedType; + } + } + + public override bool CanRead(XmlReader reader) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + + return reader.IsStartElement(Rss20Constants.RssTag, Rss20Constants.Rss20Namespace); + } + + public override Task ReadFromAsync(XmlReader reader, CancellationToken ct) + { + if (!CanRead(reader)) + { + throw new XmlException(string.Format(SR.UnknownFeedXml, reader.LocalName, reader.NamespaceURI)); + } + + SetFeed(CreateFeedInstance()); + return ReadXmlAsync(XmlReaderWrapper.CreateFromReader(reader), this.Feed); + } + + private Task WriteXmlAsync(XmlWriter writer) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + + return WriteFeedAsync(writer); + } + + public override async Task WriteToAsync(XmlWriter writer, CancellationToken ct) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + + writer = XmlWriterWrapper.CreateFromWriter(writer); + + await writer.WriteStartElementAsync(Rss20Constants.RssTag, Rss20Constants.Rss20Namespace); + await WriteFeedAsync(writer); + await writer.WriteEndElementAsync(); + } + + protected internal override void SetFeed(SyndicationFeed feed) + { + base.SetFeed(feed); + _atomSerializer.SetFeed(this.Feed); + } + + private async Task ReadItemFromAsync(XmlReaderWrapper reader, SyndicationItem result, Uri feedBaseUri) + { + result.BaseUri = feedBaseUri; + await reader.MoveToContentAsync(); + bool isEmpty = reader.IsEmptyElement; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + string ns = reader.NamespaceURI; + string name = reader.LocalName; + if (name == "base" && ns == Atom10FeedFormatter.XmlNs) + { + result.BaseUri = FeedUtils.CombineXmlBase(result.BaseUri, await reader.GetValueAsync()); + continue; + } + + if (FeedUtils.IsXmlns(name, ns) || FeedUtils.IsXmlSchemaType(name, ns)) + { + continue; + } + + string val = await reader.GetValueAsync(); + if (!TryParseAttribute(name, ns, val, result, this.Version)) + { + if (_preserveAttributeExtensions) + { + result.AttributeExtensions.Add(new XmlQualifiedName(name, ns), val); + } + } + } + } + + await reader.ReadStartElementAsync(); + + if (!isEmpty) + { + string fallbackAlternateLink = null; + XmlDictionaryWriter extWriter = null; + bool readAlternateLink = false; + try + { + XmlBuffer buffer = null; + while (await reader.IsStartElementAsync()) + { + bool notHandled = false; + if (await reader.MoveToContentAsync() == XmlNodeType.Element && reader.NamespaceURI == Rss20Constants.Rss20Namespace) + { + switch (reader.LocalName) + { + case Rss20Constants.TitleTag: + result.Title = new TextSyndicationContent(StringParser(await reader.ReadElementStringAsync(), Rss20Constants.TitleTag, Rss20Constants.Rss20Namespace)); + break; + + case Rss20Constants.LinkTag: + result.Links.Add(await ReadAlternateLinkAsync(reader, result.BaseUri)); + readAlternateLink = true; + break; + + case Rss20Constants.DescriptionTag: + result.Summary = new TextSyndicationContent(StringParser(await reader.ReadElementStringAsync(), Rss20Constants.DescriptionTag, Rss20Constants.Rss20Namespace)); + break; + + case Rss20Constants.AuthorTag: + result.Authors.Add(await ReadPersonAsync(reader, result)); + break; + + case Rss20Constants.CategoryTag: + result.Categories.Add(await ReadCategoryAsync(reader, result)); + break; + + case Rss20Constants.EnclosureTag: + result.Links.Add(await ReadMediaEnclosureAsync(reader, result.BaseUri)); + break; + + case Rss20Constants.GuidTag: + { + bool isPermalink = true; + string permalinkString = reader.GetAttribute(Rss20Constants.IsPermaLinkTag, Rss20Constants.Rss20Namespace); + if (permalinkString != null && permalinkString.Equals("false",StringComparison.OrdinalIgnoreCase)) + { + isPermalink = false; + } + string localName = reader.LocalName; + string namespaceUri = reader.NamespaceURI; + result.Id = StringParser(await reader.ReadElementStringAsync(), localName, namespaceUri); + if (isPermalink) + { + fallbackAlternateLink = result.Id; + } + + break; + } + + case Rss20Constants.PubDateTag: + { + bool canReadContent = !reader.IsEmptyElement; + await reader.ReadStartElementAsync(); + if (canReadContent) + { + string str = await reader.ReadStringAsync(); + if (!string.IsNullOrEmpty(str)) + { + result.PublishDate = DateParser(str, reader.LocalName, reader.NamespaceURI); + } + + await reader.ReadEndElementAsync(); + } + + break; + } + + case Rss20Constants.SourceTag: + { + SyndicationFeed feed = new SyndicationFeed(); + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + string ns = reader.NamespaceURI; + string name = reader.LocalName; + if (FeedUtils.IsXmlns(name, ns)) + { + continue; + } + string val = await reader.GetValueAsync(); + if (name == Rss20Constants.UrlTag && ns == Rss20Constants.Rss20Namespace) + { + feed.Links.Add(SyndicationLink.CreateSelfLink(UriParser(val, Rss20Constants.UrlTag,ns))); + } + else if (!FeedUtils.IsXmlns(name, ns)) + { + if (_preserveAttributeExtensions) + { + feed.AttributeExtensions.Add(new XmlQualifiedName(name, ns), val); + } + } + } + } + string localName = reader.LocalName; + string namespaceUri = reader.NamespaceURI; + string feedTitle = StringParser(await reader.ReadElementStringAsync(), localName, namespaceUri); + feed.Title = new TextSyndicationContent(feedTitle); + result.SourceFeed = feed; + + break; + } + + default: + notHandled = true; + break; + } + } + else + { + notHandled = true; + } + + if (notHandled) + { + bool parsedExtension = _serializeExtensionsAsAtom && _atomSerializer.TryParseItemElementFromAsync(reader, result).Result; + + if (!parsedExtension) + { + parsedExtension = TryParseElement(reader, result, this.Version); + } + + if (!parsedExtension) + { + if (_preserveElementExtensions) + { + if (buffer == null) + { + buffer = new XmlBuffer(_maxExtensionSize); + extWriter = buffer.OpenSection(XmlDictionaryReaderQuotas.Max); + extWriter.WriteStartElement(Rss20Constants.ExtensionWrapperTag); + } + + await XmlReaderWrapper.WriteNodeAsync(extWriter, reader, false); + } + else + { + await reader.SkipAsync(); + } + } + } + } + + LoadElementExtensions(buffer, extWriter, result); + } + finally + { + if (extWriter != null) + { + ((IDisposable)extWriter).Dispose(); + } + } + + await reader.ReadEndElementAsync(); // item + + if (!readAlternateLink && fallbackAlternateLink != null) + { + result.Links.Add(SyndicationLink.CreateAlternateLink(new Uri(fallbackAlternateLink, UriKind.RelativeOrAbsolute))); + readAlternateLink = true; + } + + // if there's no content and no alternate link set the summary as the item content + if (result.Content == null && !readAlternateLink) + { + result.Content = result.Summary; + result.Summary = null; + } + } + } + + internal Task ReadItemFromAsync(XmlReaderWrapper reader, SyndicationItem result) + { + return ReadItemFromAsync(reader, result, null); + } + + internal Task WriteItemContentsAsync(XmlWriter writer, SyndicationItem item) + { + writer = XmlWriterWrapper.CreateFromWriter(writer); + return WriteItemContentsAsync(writer, item, null); + } + + protected override SyndicationFeed CreateFeedInstance() + { + return SyndicationFeedFormatter.CreateFeedInstance(_feedType); + } + + protected virtual async Task ReadItemAsync(XmlReader reader, SyndicationFeed feed) + { + if (feed == null) + { + throw new ArgumentNullException(nameof(feed)); + } + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + SyndicationItem item = CreateItem(feed); + XmlReaderWrapper readerWrapper = XmlReaderWrapper.CreateFromReader(reader); + await ReadItemFromAsync(readerWrapper, item, feed.BaseUri); // delegate => ItemParser(reader,item,feed.BaseUri);// + return item; + } + + protected virtual async Task WriteItemAsync(XmlWriter writer, SyndicationItem item, Uri feedBaseUri) + { + writer = XmlWriterWrapper.CreateFromWriter(writer); + + await writer.WriteStartElementAsync(Rss20Constants.ItemTag, Rss20Constants.Rss20Namespace); + await WriteItemContentsAsync(writer, item, feedBaseUri); + await writer.WriteEndElementAsync(); + } + + protected virtual async Task WriteItemsAsync(XmlWriter writer, IEnumerable items, Uri feedBaseUri) + { + if (items == null) + { + return; + } + + foreach (SyndicationItem item in items) + { + await this.WriteItemAsync(writer, item, feedBaseUri); + } + } + + private static string NormalizeTimeZone(string rfc822TimeZone, out bool isUtc) + { + isUtc = false; + // return a string in "-08:00" format + if (rfc822TimeZone[0] == '+' || rfc822TimeZone[0] == '-') + { + // the time zone is supposed to be 4 digits but some feeds omit the initial 0 + StringBuilder result = new StringBuilder(rfc822TimeZone); + if (result.Length == 4) + { + // the timezone is +/-HMM. Convert to +/-HHMM + result.Insert(1, '0'); + } + result.Insert(3, ':'); + return result.ToString(); + } + switch (rfc822TimeZone) + { + case "UT": + case "Z": + isUtc = true; + return "-00:00"; + case "GMT": + return "-00:00"; + case "A": + return "-01:00"; + case "B": + return "-02:00"; + case "C": + return "-03:00"; + case "D": + case "EDT": + return "-04:00"; + case "E": + case "EST": + case "CDT": + return "-05:00"; + case "F": + case "CST": + case "MDT": + return "-06:00"; + case "G": + case "MST": + case "PDT": + return "-07:00"; + case "H": + case "PST": + return "-08:00"; + case "I": + return "-09:00"; + case "K": + return "-10:00"; + case "L": + return "-11:00"; + case "M": + return "-12:00"; + case "N": + return "+01:00"; + case "O": + return "+02:00"; + case "P": + return "+03:00"; + case "Q": + return "+04:00"; + case "R": + return "+05:00"; + case "S": + return "+06:00"; + case "T": + return "+07:00"; + case "U": + return "+08:00"; + case "V": + return "+09:00"; + case "W": + return "+10:00"; + case "X": + return "+11:00"; + case "Y": + return "+12:00"; + default: + return ""; + } + } + + private async Task ReadSkipHoursAsync(XmlReaderWrapper reader, SyndicationFeed result) + { + await reader.ReadStartElementAsync(); + + while (await reader.IsStartElementAsync()) + { + + if(reader.LocalName == Rss20Constants.HourTag) + { + string val = StringParser(await reader.ReadElementStringAsync(), Rss20Constants.HourTag, Rss20Constants.Rss20Namespace); + int hour = int.Parse(val); + bool parsed = false; + parsed = int.TryParse(val,NumberStyles.Integer,NumberFormatInfo.InvariantInfo,out hour); + + if(parsed == false) + { + throw new ArgumentException("The number on skip hours must be an integer betwen 0 and 23."); + } + + if (hour < 0 || hour > 23) + { + throw new ArgumentException("The hour can't be lower than 0 or greater than 23."); + } + + result.SkipHours.Add(hour); + } + else + { + await reader.SkipAsync(); + } + + } + + await reader.ReadEndElementAsync(); + } + + + private bool checkDay(string day) + { + if (acceptedDays.Contains(day.ToLower())) + { + return true; + } + + return false; + } + + private async Task ReadSkipDaysAsync(XmlReaderWrapper reader, SyndicationFeed result) + { + await reader.ReadStartElementAsync(); + + while (await reader.IsStartElementAsync()) + { + if (reader.LocalName == Rss20Constants.DayTag) + { + string day = StringParser(await reader.ReadElementStringAsync(), Rss20Constants.DayTag, Rss20Constants.Rss20Namespace); + + //Check if the day is actually an accepted day. + if (checkDay(day)) + { + result.SkipDays.Add(day); + } + } + else + { + await reader.SkipAsync(); + } + } + + await reader.ReadEndElementAsync(); + } + + internal static void RemoveExtraWhiteSpaceAtStart(StringBuilder stringBuilder) + { + int i = 0; + while (i < stringBuilder.Length) + { + if (!char.IsWhiteSpace(stringBuilder[i])) + { + break; + } + ++i; + } + if (i > 0) + { + stringBuilder.Remove(0, i); + } + } + + private static void ReplaceMultipleWhiteSpaceWithSingleWhiteSpace(StringBuilder builder) + { + int index = 0; + int whiteSpaceStart = -1; + while (index < builder.Length) + { + if (char.IsWhiteSpace(builder[index])) + { + if (whiteSpaceStart < 0) + { + whiteSpaceStart = index; + // normalize all white spaces to be ' ' so that the date time parsing works + builder[index] = ' '; + } + } + else if (whiteSpaceStart >= 0) + { + if (index > whiteSpaceStart + 1) + { + // there are at least 2 spaces... replace by 1 + builder.Remove(whiteSpaceStart, index - whiteSpaceStart - 1); + index = whiteSpaceStart + 1; + } + whiteSpaceStart = -1; + } + ++index; + } + // we have already trimmed the start and end so there cannot be a trail of white spaces in the end + Debug.Assert(builder.Length == 0 || builder[builder.Length - 1] != ' ', "The string builder doesnt end in a white space"); + } + + private string AsString(DateTimeOffset dateTime) + { + if (dateTime.Offset == Atom10FeedFormatter.zeroOffset) + { + return dateTime.ToUniversalTime().ToString(Rfc822OutputUtcDateTimeFormat, CultureInfo.InvariantCulture); + } + else + { + StringBuilder sb = new StringBuilder(dateTime.ToString(Rfc822OutputLocalDateTimeFormat, CultureInfo.InvariantCulture)); + // the zzz in Rfc822OutputLocalDateTimeFormat makes the timezone e.g. "-08:00" but we require e.g. "-0800" without the ':' + sb.Remove(sb.Length - 3, 1); + return sb.ToString(); + } + } + + private async Task ReadAlternateLinkAsync(XmlReaderWrapper reader, Uri baseUri) + { + SyndicationLink link = new SyndicationLink(); + link.BaseUri = baseUri; + link.RelationshipType = Atom10Constants.AlternateTag; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + if (reader.LocalName == "base" && reader.NamespaceURI == Atom10FeedFormatter.XmlNs) + { + link.BaseUri = FeedUtils.CombineXmlBase(link.BaseUri, await reader.GetValueAsync()); + } + else if (!FeedUtils.IsXmlns(reader.LocalName, reader.NamespaceURI)) + { + if (this.PreserveAttributeExtensions) + { + link.AttributeExtensions.Add(new XmlQualifiedName(reader.LocalName, reader.NamespaceURI), await reader.GetValueAsync()); + } + } + } + } + string localName = reader.LocalName; + string namespaceUri = reader.NamespaceURI; + link.Uri = UriParser(await reader.ReadElementStringAsync(), localName, namespaceUri);//new Uri(uri, UriKind.RelativeOrAbsolute); + return link; + } + + private async Task ReadCategoryAsync(XmlReaderWrapper reader, SyndicationFeed feed) + { + SyndicationCategory result = CreateCategory(feed); + await ReadCategoryAsync(reader, result); + return result; + } + + private async Task ReadCategoryAsync(XmlReaderWrapper reader, SyndicationCategory category) + { + bool isEmpty = reader.IsEmptyElement; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + string ns = reader.NamespaceURI; + string name = reader.LocalName; + if (FeedUtils.IsXmlns(name, ns)) + { + continue; + } + string val = await reader.GetValueAsync(); + if (name == Rss20Constants.DomainTag && ns == Rss20Constants.Rss20Namespace) + { + category.Scheme = val; + } + else if (!TryParseAttribute(name, ns, val, category, this.Version)) + { + if (_preserveAttributeExtensions) + { + category.AttributeExtensions.Add(new XmlQualifiedName(name, ns), val); + } + } + } + } + + await reader.ReadStartElementAsync(Rss20Constants.CategoryTag, Rss20Constants.Rss20Namespace); + + if (!isEmpty) + { + category.Name = StringParser(await reader.ReadStringAsync(), reader.LocalName, Rss20Constants.Rss20Namespace); + await reader.ReadEndElementAsync(); + } + } + + private async Task ReadCategoryAsync(XmlReaderWrapper reader, SyndicationItem item) + { + SyndicationCategory result = CreateCategory(item); + await ReadCategoryAsync(reader, result); + return result; + } + + + private async Task ReadMediaEnclosureAsync(XmlReaderWrapper reader, Uri baseUri) + { + SyndicationLink link = new SyndicationLink(); + link.BaseUri = baseUri; + link.RelationshipType = Rss20Constants.EnclosureTag; + bool isEmptyElement = reader.IsEmptyElement; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + string ns = reader.NamespaceURI; + string name = reader.LocalName; + if (name == "base" && ns == Atom10FeedFormatter.XmlNs) + { + link.BaseUri = FeedUtils.CombineXmlBase(link.BaseUri, await reader.GetValueAsync()); + continue; + } + if (FeedUtils.IsXmlns(name, ns)) + { + continue; + } + string val = await reader.GetValueAsync(); + if (name == Rss20Constants.UrlTag && ns == Rss20Constants.Rss20Namespace) + { + link.Uri = new Uri(val, UriKind.RelativeOrAbsolute); + } + else if (name == Rss20Constants.TypeTag && ns == Rss20Constants.Rss20Namespace) + { + link.MediaType = val; + } + else if (name == Rss20Constants.LengthTag && ns == Rss20Constants.Rss20Namespace) + { + link.Length = !string.IsNullOrEmpty(val) ? Convert.ToInt64(val, CultureInfo.InvariantCulture.NumberFormat) : 0; + } + else if (!FeedUtils.IsXmlns(name, ns)) + { + if (_preserveAttributeExtensions) + { + link.AttributeExtensions.Add(new XmlQualifiedName(name, ns), val); + } + } + } + } + + await reader.ReadStartElementAsync(Rss20Constants.EnclosureTag, Rss20Constants.Rss20Namespace); + + if (!isEmptyElement) + { + await reader.ReadEndElementAsync(); + } + + return link; + } + + private async Task ReadPersonAsync(XmlReaderWrapper reader, SyndicationFeed feed) + { + SyndicationPerson result = CreatePerson(feed); + await ReadPersonAsync(reader, result); + return result; + } + + private async Task ReadPersonAsync(XmlReaderWrapper reader, SyndicationPerson person) + { + bool isEmpty = reader.IsEmptyElement; + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + string ns = reader.NamespaceURI; + string name = reader.LocalName; + if (FeedUtils.IsXmlns(name, ns)) + { + continue; + } + string val = await reader.GetValueAsync(); + if (!TryParseAttribute(name, ns, val, person, this.Version)) + { + if (_preserveAttributeExtensions) + { + person.AttributeExtensions.Add(new XmlQualifiedName(name, ns), val); + } + } + } + } + + await reader.ReadStartElementAsync(); + if (!isEmpty) + { + string email = StringParser(await reader.ReadStringAsync(),reader.LocalName,reader.NamespaceURI); + await reader.ReadEndElementAsync(); + person.Email = email; + } + } + + private async Task ReadPersonAsync(XmlReaderWrapper reader, SyndicationItem item) + { + SyndicationPerson result = CreatePerson(item); + await ReadPersonAsync(reader, result); + return result; + } + + private bool checkTextInput(SyndicationTextInput textInput) + { + //All textInput items are required, we check if all items were instantiated. + return (textInput.Description != null && textInput.title != null && textInput.name != null && textInput.link != null); + } + + private async Task readTextInputTag(XmlReaderWrapper reader, SyndicationFeed result) + { + await reader.ReadStartElementAsync(); + + SyndicationTextInput textInput = new SyndicationTextInput(); + string val = String.Empty; + + while (await reader.IsStartElementAsync()) + { + string name = reader.LocalName; + string namespaceUri = reader.NamespaceURI; + val = StringParser(await reader.ReadElementStringAsync(), name, Rss20Constants.Rss20Namespace); + + switch (name) + { + case Rss20Constants.DescriptionTag: + textInput.Description = val; + break; + + case Rss20Constants.TitleTag: + textInput.title = val; + break; + + case Rss20Constants.LinkTag: + textInput.link = new SyndicationLink(UriParser(val, name, namespaceUri)); + break; + + case Rss20Constants.NameTag: + textInput.name = val; + break; + + default: + //ignore! + break; + } + } + + if(checkTextInput(textInput) == true) + { + result.TextInput = textInput; + } + + await reader.ReadEndElementAsync(); + } + + private async Task ReadXmlAsync(XmlReaderWrapper reader, SyndicationFeed result) + { + string baseUri = null; + await reader.MoveToContentAsync(); + + string version = reader.GetAttribute(Rss20Constants.VersionTag, Rss20Constants.Rss20Namespace); + if (version != Rss20Constants.Version) + { + throw new NotSupportedException(FeedUtils.AddLineInfo(reader, (string.Format(SR.UnsupportedRssVersion, version)))); + } + + if (reader.AttributeCount > 1) + { + string tmp = reader.GetAttribute("base", Atom10FeedFormatter.XmlNs); + if (!string.IsNullOrEmpty(tmp)) + { + baseUri = tmp; + } + } + + await reader.ReadStartElementAsync(); + await reader.MoveToContentAsync(); + + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + string ns = reader.NamespaceURI; + string name = reader.LocalName; + + if (name == "base" && ns == Atom10FeedFormatter.XmlNs) + { + baseUri = await reader.GetValueAsync(); + continue; + } + + if (FeedUtils.IsXmlns(name, ns) || FeedUtils.IsXmlSchemaType(name, ns)) + { + continue; + } + + string val = await reader.GetValueAsync(); + if (!TryParseAttribute(name, ns, val, result, this.Version)) + { + if (_preserveAttributeExtensions) + { + result.AttributeExtensions.Add(new XmlQualifiedName(name, ns), val); + } + } + } + } + + if (!string.IsNullOrEmpty(baseUri)) + { + result.BaseUri = new Uri(baseUri, UriKind.RelativeOrAbsolute); + } + + bool areAllItemsRead = true; + await reader.ReadStartElementAsync(Rss20Constants.ChannelTag, Rss20Constants.Rss20Namespace); + + XmlBuffer buffer = null; + XmlDictionaryWriter extWriter = null; + NullNotAllowedCollection feedItems = new NullNotAllowedCollection(); + + try + { + while (await reader.IsStartElementAsync()) + { + bool notHandled = false; + if (await reader.MoveToContentAsync() == XmlNodeType.Element && reader.NamespaceURI == Rss20Constants.Rss20Namespace) + { + switch (reader.LocalName) + { + case Rss20Constants.TitleTag: + result.Title = new TextSyndicationContent(StringParser(await reader.ReadElementStringAsync(), Rss20Constants.TitleTag, Rss20Constants.Rss20Namespace)); + break; + + case Rss20Constants.LinkTag: + result.Links.Add(await ReadAlternateLinkAsync(reader, result.BaseUri)); + break; + + case Rss20Constants.DescriptionTag: + result.Description = new TextSyndicationContent(StringParser(await reader.ReadElementStringAsync(), Rss20Constants.DescriptionTag, Rss20Constants.Rss20Namespace)); + break; + + case Rss20Constants.LanguageTag: + + result.Language = StringParser(await reader.ReadElementStringAsync(), Rss20Constants.LanguageTag, Rss20Constants.Rss20Namespace); + break; + + case Rss20Constants.CopyrightTag: + result.Copyright = new TextSyndicationContent(StringParser(await reader.ReadElementStringAsync(), Rss20Constants.CopyrightTag, Rss20Constants.Rss20Namespace)); + break; + + case Rss20Constants.ManagingEditorTag: + result.Authors.Add(await ReadPersonAsync(reader, result)); + break; + + case Rss20Constants.LastBuildDateTag: + { + bool canReadContent = !reader.IsEmptyElement; + await reader.ReadStartElementAsync(); + if (canReadContent) + { + string str = await reader.ReadStringAsync(); + + if (!string.IsNullOrEmpty(str)) + { + result.LastUpdatedTime = DateParser(str, Rss20Constants.LastBuildDateTag, reader.NamespaceURI); + } + + await reader.ReadEndElementAsync(); + } + + break; + } + + case Rss20Constants.CategoryTag: + result.Categories.Add(await ReadCategoryAsync(reader, result)); + break; + + case Rss20Constants.GeneratorTag: + result.Generator = StringParser(await reader.ReadElementStringAsync(), Rss20Constants.GeneratorTag, Rss20Constants.Rss20Namespace); + break; + + case Rss20Constants.ImageTag: + { + await OnReadImage(reader, result); + break; + } + + case Rss20Constants.ItemTag: + { + NullNotAllowedCollection items = new NullNotAllowedCollection(); + while (await reader.IsStartElementAsync(Rss20Constants.ItemTag, Rss20Constants.Rss20Namespace)) + { + feedItems.Add(await ReadItemAsync(reader, result)); + } + + + areAllItemsRead = true; + break; + } + + //Optional tags + case Rss20Constants.DocumentationTag: + result.Documentation = await ReadAlternateLinkAsync(reader, result.BaseUri); + break; + + case Rss20Constants.TimeToLiveTag: + string value = StringParser(await reader.ReadElementStringAsync(), Rss20Constants.TimeToLiveTag, Rss20Constants.Rss20Namespace); + int timeToLive = int.Parse(value); + result.TimeToLive = timeToLive; + break; + + case Rss20Constants.TextInputTag: + await readTextInputTag(reader, result); + break; + + case Rss20Constants.SkipHoursTag: + await ReadSkipHoursAsync(reader, result); + break; + + case Rss20Constants.SkipDaysTag: + await ReadSkipDaysAsync(reader, result); + break; + + default: + notHandled = true; + break; + } + } + else + { + notHandled = true; + } + + if (notHandled) + { + bool parsedExtension = _serializeExtensionsAsAtom && await _atomSerializer.TryParseFeedElementFromAsync(reader, result); + + if (!parsedExtension) + { + parsedExtension = TryParseElement(reader, result, this.Version); + } + + if (!parsedExtension) + { + if (_preserveElementExtensions) + { + if (buffer == null) + { + buffer = new XmlBuffer(_maxExtensionSize); + extWriter = buffer.OpenSection(XmlDictionaryReaderQuotas.Max); + extWriter.WriteStartElement(Rss20Constants.ExtensionWrapperTag); + } + + await XmlReaderWrapper.WriteNodeAsync(extWriter, reader, false); + } + else + { + await reader.SkipAsync(); + } + } + } + + if (!areAllItemsRead) + { + break; + } + } + + //asign all read items to feed items. + result.Items = feedItems; + LoadElementExtensions(buffer, extWriter, result); + } + catch (FormatException e) + { + throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingFeed), e); + } + catch (ArgumentException e) + { + throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingFeed), e); + } + finally + { + if (extWriter != null) + { + ((IDisposable)extWriter).Dispose(); + } + } + if (areAllItemsRead) + { + await reader.ReadEndElementAsync(); // channel + await reader.ReadEndElementAsync(); // rss + } + } + + private async Task WriteAlternateLinkAsync(XmlWriter writer, SyndicationLink link, Uri baseUri) + { + await writer.WriteStartElementAsync(Rss20Constants.LinkTag, Rss20Constants.Rss20Namespace); + Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(baseUri, link.BaseUri); + if (baseUriToWrite != null) + { + await writer.WriteAttributeStringAsync("xml", "base", Atom10FeedFormatter.XmlNs, FeedUtils.GetUriString(baseUriToWrite)); + } + await link.WriteAttributeExtensionsAsync(writer, SyndicationVersions.Rss20); + await writer.WriteStringAsync(FeedUtils.GetUriString(link.Uri)); + await writer.WriteEndElementAsync(); + } + + private async Task WriteCategoryAsync(XmlWriter writer, SyndicationCategory category) + { + if (category == null) + { + return; + } + await writer.WriteStartElementAsync(Rss20Constants.CategoryTag, Rss20Constants.Rss20Namespace); + await WriteAttributeExtensionsAsync(writer, category, this.Version); + if (!string.IsNullOrEmpty(category.Scheme) && !category.AttributeExtensions.ContainsKey(s_rss20Domain)) + { + await writer.WriteAttributeStringAsync(Rss20Constants.DomainTag, Rss20Constants.Rss20Namespace, category.Scheme); + } + await writer.WriteStringAsync(category.Name); + await writer.WriteEndElementAsync(); + } + + private async Task WriteFeedAsync(XmlWriter writer) + { + if (this.Feed == null) + { + throw new InvalidOperationException(SR.FeedFormatterDoesNotHaveFeed); + } + if (_serializeExtensionsAsAtom) + { + await writer.InternalWriteAttributeStringAsync("xmlns", Atom10Constants.Atom10Prefix, null, Atom10Constants.Atom10Namespace); + } + await writer.WriteAttributeStringAsync(Rss20Constants.VersionTag, Rss20Constants.Version); + await writer.WriteStartElementAsync(Rss20Constants.ChannelTag, Rss20Constants.Rss20Namespace); + if (this.Feed.BaseUri != null) + { + await writer.InternalWriteAttributeStringAsync("xml", "base", Atom10FeedFormatter.XmlNs, FeedUtils.GetUriString(this.Feed.BaseUri)); + } + await WriteAttributeExtensionsAsync(writer, this.Feed, this.Version); + string title = this.Feed.Title != null ? this.Feed.Title.Text : string.Empty; + await writer.WriteElementStringAsync(Rss20Constants.TitleTag, Rss20Constants.Rss20Namespace, title); + + SyndicationLink alternateLink = null; + for (int i = 0; i < this.Feed.Links.Count; ++i) + { + if (this.Feed.Links[i].RelationshipType == Atom10Constants.AlternateTag) + { + alternateLink = this.Feed.Links[i]; + await WriteAlternateLinkAsync(writer, alternateLink, this.Feed.BaseUri); + break; + } + } + + string description = this.Feed.Description != null ? this.Feed.Description.Text : string.Empty; + await writer.WriteElementStringAsync(Rss20Constants.DescriptionTag, Rss20Constants.Rss20Namespace, description); + + if (this.Feed.Language != null) + { + await writer.WriteElementStringAsync(Rss20Constants.LanguageTag, this.Feed.Language); + } + + if (this.Feed.Copyright != null) + { + await writer.WriteElementStringAsync(Rss20Constants.CopyrightTag, Rss20Constants.Rss20Namespace, this.Feed.Copyright.Text); + } + + // if there's a single author with an email address, then serialize as the managingEditor + // else serialize the authors as Atom extensions + if ((this.Feed.Authors.Count == 1) && (this.Feed.Authors[0].Email != null)) + { + await WritePersonAsync(writer, Rss20Constants.ManagingEditorTag, this.Feed.Authors[0]); + } + else + { + if (_serializeExtensionsAsAtom) + { + await _atomSerializer.WriteFeedAuthorsToAsync(writer, this.Feed.Authors); + } + } + + if (this.Feed.LastUpdatedTime > DateTimeOffset.MinValue) + { + await writer.WriteStartElementAsync(Rss20Constants.LastBuildDateTag); + await writer.WriteStringAsync(AsString(this.Feed.LastUpdatedTime)); + await writer.WriteEndElementAsync(); + } + + for (int i = 0; i < this.Feed.Categories.Count; ++i) + { + await WriteCategoryAsync(writer, this.Feed.Categories[i]); + } + + if (!string.IsNullOrEmpty(this.Feed.Generator)) + { + await writer.WriteElementStringAsync(Rss20Constants.GeneratorTag, this.Feed.Generator); + } + + if (this.Feed.Contributors.Count > 0) + { + if (_serializeExtensionsAsAtom) + { + await _atomSerializer.WriteFeedContributorsToAsync(writer, this.Feed.Contributors); + } + } + + if (this.Feed.ImageUrl != null) + { + await writer.WriteStartElementAsync(Rss20Constants.ImageTag); + await writer.WriteElementStringAsync(Rss20Constants.UrlTag, FeedUtils.GetUriString(this.Feed.ImageUrl)); + + string imageTitle = Feed.ImageTitle == null ? title : Feed.ImageTitle.Text; + await writer.WriteElementStringAsync(Rss20Constants.TitleTag, Rss20Constants.Rss20Namespace, imageTitle); + + string imgAlternateLink = alternateLink != null ? FeedUtils.GetUriString(alternateLink.Uri) : string.Empty; + + string imageLink = Feed.ImageLink == null ? imgAlternateLink : FeedUtils.GetUriString(Feed.ImageLink); + await writer.WriteElementStringAsync(Rss20Constants.LinkTag, Rss20Constants.Rss20Namespace, imageLink); + await writer.WriteEndElementAsync(); // image + } + + //Optional spec items + //time to live + if(this.Feed.TimeToLive != 0) + { + await writer.WriteElementStringAsync(Rss20Constants.TimeToLiveTag, this.Feed.TimeToLive.ToString()); + } + + //skiphours + if(this.Feed.SkipHours.Count > 0) + { + await writer.WriteStartElementAsync(Rss20Constants.SkipHoursTag); + + foreach(int hour in this.Feed.SkipHours) + { + writer.WriteElementString(Rss20Constants.HourTag,hour.ToString()); + } + + await writer.WriteEndElementAsync(); + } + + //skipDays + if(this.Feed.SkipDays.Count > 0) + { + await writer.WriteStartElementAsync(Rss20Constants.SkipDaysTag); + + foreach(string day in this.Feed.SkipDays) + { + await writer.WriteElementStringAsync(Rss20Constants.DayTag,day); + } + + await writer.WriteEndElementAsync(); + } + + //textinput + if(this.Feed.TextInput != null) + { + await writer.WriteStartElementAsync(Rss20Constants.TextInputTag); + + await writer.WriteElementStringAsync(Rss20Constants.DescriptionTag, this.Feed.TextInput.Description); + await writer.WriteElementStringAsync(Rss20Constants.TitleTag, this.Feed.TextInput.title); + await writer.WriteElementStringAsync(Rss20Constants.LinkTag, this.Feed.TextInput.link.GetAbsoluteUri().ToString()); + await writer.WriteElementStringAsync(Rss20Constants.NameTag, this.Feed.TextInput.name); + + await writer.WriteEndElementAsync(); + } + + if (_serializeExtensionsAsAtom) + { + await _atomSerializer.WriteElementAsync(writer, Atom10Constants.IdTag, this.Feed.Id); + + // dont write out the 1st alternate link since that would have been written out anyway + bool isFirstAlternateLink = true; + for (int i = 0; i < this.Feed.Links.Count; ++i) + { + if (this.Feed.Links[i].RelationshipType == Atom10Constants.AlternateTag && isFirstAlternateLink) + { + isFirstAlternateLink = false; + continue; + } + await _atomSerializer.WriteLinkAsync(writer, this.Feed.Links[i], this.Feed.BaseUri); + } + } + + await WriteElementExtensionsAsync(writer, this.Feed, this.Version); + await WriteItemsAsync(writer, this.Feed.Items, this.Feed.BaseUri); + await writer.WriteEndElementAsync(); // channel + } + + private async Task WriteItemContentsAsync(XmlWriter writer, SyndicationItem item, Uri feedBaseUri) + { + Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(feedBaseUri, item.BaseUri); + if (baseUriToWrite != null) + { + await writer.InternalWriteAttributeStringAsync("xml", "base", Atom10FeedFormatter.XmlNs, FeedUtils.GetUriString(baseUriToWrite)); + } + await WriteAttributeExtensionsAsync(writer, item, this.Version); + string guid = item.Id ?? string.Empty; + bool isPermalink = false; + SyndicationLink firstAlternateLink = null; + for (int i = 0; i < item.Links.Count; ++i) + { + if (item.Links[i].RelationshipType == Atom10Constants.AlternateTag) + { + if (firstAlternateLink == null) + { + firstAlternateLink = item.Links[i]; + } + if (guid == FeedUtils.GetUriString(item.Links[i].Uri)) + { + isPermalink = true; + break; + } + } + } + if (!string.IsNullOrEmpty(guid)) + { + await writer.WriteStartElementAsync(Rss20Constants.GuidTag); + if (isPermalink) + { + await writer.WriteAttributeStringAsync(Rss20Constants.IsPermaLinkTag, "true"); + } + else + { + await writer.WriteAttributeStringAsync(Rss20Constants.IsPermaLinkTag, "false"); + } + await writer.WriteStringAsync(guid); + await writer.WriteEndElementAsync(); + } + if (firstAlternateLink != null) + { + await WriteAlternateLinkAsync(writer, firstAlternateLink, (item.BaseUri != null ? item.BaseUri : feedBaseUri)); + } + + if (item.Authors.Count == 1 && !string.IsNullOrEmpty(item.Authors[0].Email)) + { + await WritePersonAsync(writer, Rss20Constants.AuthorTag, item.Authors[0]); + } + else + { + if (_serializeExtensionsAsAtom) + { + await _atomSerializer.WriteItemAuthorsToAsync(writer, item.Authors); + } + } + + for (int i = 0; i < item.Categories.Count; ++i) + { + await WriteCategoryAsync(writer, item.Categories[i]); + } + + bool serializedTitle = false; + if (item.Title != null) + { + await writer.WriteElementStringAsync(Rss20Constants.TitleTag, item.Title.Text); + serializedTitle = true; + } + + bool serializedContentAsDescription = false; + TextSyndicationContent summary = item.Summary; + if (summary == null) + { + summary = (item.Content as TextSyndicationContent); + serializedContentAsDescription = (summary != null); + } + // the spec requires the wire to have a title or a description + if (!serializedTitle && summary == null) + { + summary = new TextSyndicationContent(string.Empty); + } + if (summary != null) + { + await writer.WriteElementStringAsync(Rss20Constants.DescriptionTag, Rss20Constants.Rss20Namespace, summary.Text); + } + + if (item.SourceFeed != null) + { + await writer.WriteStartElementAsync(Rss20Constants.SourceTag, Rss20Constants.Rss20Namespace); + await WriteAttributeExtensionsAsync(writer, item.SourceFeed, this.Version); + SyndicationLink selfLink = null; + for (int i = 0; i < item.SourceFeed.Links.Count; ++i) + { + if (item.SourceFeed.Links[i].RelationshipType == Atom10Constants.SelfTag) + { + selfLink = item.SourceFeed.Links[i]; + break; + } + } + if (selfLink != null && !item.SourceFeed.AttributeExtensions.ContainsKey(s_rss20Url)) + { + await writer.WriteAttributeStringAsync(Rss20Constants.UrlTag, Rss20Constants.Rss20Namespace, FeedUtils.GetUriString(selfLink.Uri)); + } + string title = (item.SourceFeed.Title != null) ? item.SourceFeed.Title.Text : string.Empty; + await writer.WriteStringAsync(title); + await writer.WriteEndElementAsync(); + } + + if (item.PublishDate > DateTimeOffset.MinValue) + { + await writer.WriteElementStringAsync(Rss20Constants.PubDateTag, Rss20Constants.Rss20Namespace, AsString(item.PublishDate)); + } + + // serialize the enclosures + SyndicationLink firstEnclosureLink = null; + bool passedFirstAlternateLink = false; + + for (int i = 0; i < item.Links.Count; ++i) + { + if (item.Links[i].RelationshipType == Rss20Constants.EnclosureTag) + { + if (firstEnclosureLink == null) + { + firstEnclosureLink = item.Links[i]; + await WriteMediaEnclosureAsync(writer, item.Links[i], item.BaseUri); + continue; + } + } + else if (item.Links[i].RelationshipType == Atom10Constants.AlternateTag) + { + if (!passedFirstAlternateLink) + { + passedFirstAlternateLink = true; + continue; + } + } + if (_serializeExtensionsAsAtom) + { + await _atomSerializer.WriteLinkAsync(writer, item.Links[i], item.BaseUri); + } + } + + + if (item.LastUpdatedTime > DateTimeOffset.MinValue) + { + if (_serializeExtensionsAsAtom) + { + await _atomSerializer.WriteItemLastUpdatedTimeToAsync(writer, item.LastUpdatedTime); + } + } + + if (_serializeExtensionsAsAtom) + { + await _atomSerializer.WriteContentToAsync(writer, Atom10Constants.RightsTag, item.Copyright); + } + + if (!serializedContentAsDescription) + { + if (_serializeExtensionsAsAtom) + { + await _atomSerializer.WriteContentToAsync(writer, Atom10Constants.ContentTag, item.Content); + } + } + + if (item.Contributors.Count > 0) + { + if (_serializeExtensionsAsAtom) + { + await _atomSerializer.WriteItemContributorsToAsync(writer, item.Contributors); + } + } + + await WriteElementExtensionsAsync(writer, item, this.Version); + } + + private async Task WriteMediaEnclosureAsync(XmlWriter writer, SyndicationLink link, Uri baseUri) + { + await writer.WriteStartElementAsync(Rss20Constants.EnclosureTag, Rss20Constants.Rss20Namespace); + Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(baseUri, link.BaseUri); + if (baseUriToWrite != null) + { + await writer.InternalWriteAttributeStringAsync("xml", "base", Atom10FeedFormatter.XmlNs, FeedUtils.GetUriString(baseUriToWrite)); + } + await link.WriteAttributeExtensionsAsync(writer, SyndicationVersions.Rss20); + if (!link.AttributeExtensions.ContainsKey(s_rss20Url)) + { + await writer.WriteAttributeStringAsync(Rss20Constants.UrlTag, Rss20Constants.Rss20Namespace, FeedUtils.GetUriString(link.Uri)); + } + if (link.MediaType != null && !link.AttributeExtensions.ContainsKey(s_rss20Type)) + { + await writer.WriteAttributeStringAsync(Rss20Constants.TypeTag, Rss20Constants.Rss20Namespace, link.MediaType); + } + if (link.Length != 0 && !link.AttributeExtensions.ContainsKey(s_rss20Length)) + { + await writer.WriteAttributeStringAsync(Rss20Constants.LengthTag, Rss20Constants.Rss20Namespace, Convert.ToString(link.Length, CultureInfo.InvariantCulture)); + } + await writer.WriteEndElementAsync(); + } + + private async Task WritePersonAsync(XmlWriter writer, string elementTag, SyndicationPerson person) + { + await writer.WriteStartElementAsync(elementTag, Rss20Constants.Rss20Namespace); + await WriteAttributeExtensionsAsync(writer, person, this.Version); + await writer.WriteStringAsync(person.Email); + await writer.WriteEndElementAsync(); + } + + private static bool OriginalDateParser(string dateTimeString, out DateTimeOffset dto) + { + StringBuilder dateTimeStringBuilder = new StringBuilder(dateTimeString.Trim()); + if (dateTimeStringBuilder.Length < 18) + { + return false; + } + + int timeZoneStartIndex; + for (timeZoneStartIndex = dateTimeStringBuilder.Length-1; dateTimeStringBuilder[timeZoneStartIndex] != ' '; timeZoneStartIndex--); + timeZoneStartIndex++; + + string timeZoneSuffix = dateTimeStringBuilder.ToString().Substring(timeZoneStartIndex); + dateTimeStringBuilder.Remove(timeZoneStartIndex, dateTimeStringBuilder.Length - timeZoneStartIndex); + bool isUtc; + dateTimeStringBuilder.Append(NormalizeTimeZone(timeZoneSuffix, out isUtc)); + string wellFormattedString = dateTimeStringBuilder.ToString(); + + DateTimeOffset theTime; + string[] parseFormat = + { + "ddd, dd MMMM yyyy HH:mm:ss zzz", + "dd MMMM yyyy HH:mm:ss zzz", + "ddd, dd MMM yyyy HH:mm:ss zzz", + "dd MMM yyyy HH:mm:ss zzz", + + "ddd, dd MMMM yyyy HH:mm zzz", + "dd MMMM yyyy HH:mm zzz", + "ddd, dd MMM yyyy HH:mm zzz", + "dd MMM yyyy HH:mm zzz" + }; + + if (DateTimeOffset.TryParseExact(wellFormattedString, parseFormat, + CultureInfo.InvariantCulture.DateTimeFormat, + (isUtc ? DateTimeStyles.AdjustToUniversal : DateTimeStyles.None), out theTime)) + { + dto = theTime; + return true; + } + + return false; + } + + // Custom parsers + public static DateTimeOffset DefaultDateParser(string dateTimeString, string localName, string ns) + { + bool parsed = false; + DateTimeOffset dto; + parsed = DateTimeOffset.TryParse(dateTimeString, out dto); + if (parsed) + return dto; + + + //original parser here + parsed = OriginalDateParser(dateTimeString,out dto); + if (parsed) + return dto; + + //Impossible to parse - using a default date; + return new DateTimeOffset(); + } + } + + [XmlRoot(ElementName = Rss20Constants.RssTag, Namespace = Rss20Constants.Rss20Namespace)] + public class Rss20FeedFormatter : Rss20FeedFormatter + where TSyndicationFeed : SyndicationFeed, new() + { + // constructors + public Rss20FeedFormatter() + : base(typeof(TSyndicationFeed)) + { + } + public Rss20FeedFormatter(TSyndicationFeed feedToWrite) + : base(feedToWrite) + { + } + public Rss20FeedFormatter(TSyndicationFeed feedToWrite, bool serializeExtensionsAsAtom) + : base(feedToWrite, serializeExtensionsAsAtom) + { + } + + protected override SyndicationFeed CreateFeedInstance() + { + return new TSyndicationFeed(); + } + } + + + internal class ItemParseOptions + { + public bool readItemsAtLeastOnce; + public bool areAllItemsRead; + + public ItemParseOptions(bool readItemsAtLeastOnce, bool areAllItemsRead) + { + this.readItemsAtLeastOnce = readItemsAtLeastOnce; + this.areAllItemsRead = areAllItemsRead; + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/Rss20ItemFormatter.cs b/src/System.ServiceModel.Syndication/src/Rss20ItemFormatter.cs new file mode 100644 index 000000000000..181d322d164c --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/Rss20ItemFormatter.cs @@ -0,0 +1,196 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using Microsoft.ServiceModel.Syndication.Resources; + using System; + using System.Diagnostics.CodeAnalysis; + using System.Runtime.CompilerServices; + using System.Threading.Tasks; + using System.Xml; + using System.Xml.Schema; + using System.Xml.Serialization; + + + [XmlRoot(ElementName = Rss20Constants.ItemTag, Namespace = Rss20Constants.Rss20Namespace)] + public class Rss20ItemFormatter : SyndicationItemFormatter + { + private Rss20FeedFormatter _feedSerializer; + private Type _itemType; + private bool _preserveAttributeExtensions; + private bool _preserveElementExtensions; + private bool _serializeExtensionsAsAtom; + + public Rss20ItemFormatter() + : this(typeof(SyndicationItem)) + { + } + + public Rss20ItemFormatter(Type itemTypeToCreate) + : base() + { + if (itemTypeToCreate == null) + { + throw new ArgumentNullException(nameof(itemTypeToCreate)); + } + if (!typeof(SyndicationItem).IsAssignableFrom(itemTypeToCreate)) + { + throw new ArgumentException(string.Format(SR.InvalidObjectTypePassed, nameof(itemTypeToCreate), nameof(SyndicationItem))); + } + _feedSerializer = new Rss20FeedFormatter(); + _feedSerializer.PreserveAttributeExtensions = _preserveAttributeExtensions = true; + _feedSerializer.PreserveElementExtensions = _preserveElementExtensions = true; + _feedSerializer.SerializeExtensionsAsAtom = _serializeExtensionsAsAtom = true; + _itemType = itemTypeToCreate; + } + + public Rss20ItemFormatter(SyndicationItem itemToWrite) + : this(itemToWrite, true) + { + } + + public Rss20ItemFormatter(SyndicationItem itemToWrite, bool serializeExtensionsAsAtom) + : base(itemToWrite) + { + // No need to check that the parameter passed is valid - it is checked by the c'tor of the base class + _feedSerializer = new Rss20FeedFormatter(); + _feedSerializer.PreserveAttributeExtensions = _preserveAttributeExtensions = true; + _feedSerializer.PreserveElementExtensions = _preserveElementExtensions = true; + _feedSerializer.SerializeExtensionsAsAtom = _serializeExtensionsAsAtom = serializeExtensionsAsAtom; + _itemType = itemToWrite.GetType(); + } + + public bool PreserveAttributeExtensions + { + get { return _preserveAttributeExtensions; } + set + { + _preserveAttributeExtensions = value; + _feedSerializer.PreserveAttributeExtensions = value; + } + } + + public bool PreserveElementExtensions + { + get { return _preserveElementExtensions; } + set + { + _preserveElementExtensions = value; + _feedSerializer.PreserveElementExtensions = value; + } + } + + public bool SerializeExtensionsAsAtom + { + get { return _serializeExtensionsAsAtom; } + set + { + _serializeExtensionsAsAtom = value; + _feedSerializer.SerializeExtensionsAsAtom = value; + } + } + + public override string Version + { + get { return SyndicationVersions.Rss20; } + } + + protected Type ItemType + { + get + { + return _itemType; + } + } + + public override bool CanRead(XmlReader reader) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + + return reader.IsStartElement(Rss20Constants.ItemTag, Rss20Constants.Rss20Namespace); + } + + + async Task WriteXml(XmlWriter writer) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + await WriteItem(writer); + } + + public override Task ReadFromAsync(XmlReader reader) + { + if (!CanRead(reader)) + { + throw new XmlException(string.Format(SR.UnknownItemXml, reader.LocalName, reader.NamespaceURI)); + } + + return ReadItemAsync(XmlReaderWrapper.CreateFromReader(reader)); + } + + public override async Task WriteToAsync(XmlWriter writer) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + + writer = XmlWriterWrapper.CreateFromWriter(writer); + + await writer.WriteStartElementAsync(Rss20Constants.ItemTag, Rss20Constants.Rss20Namespace); + await WriteItem(writer); + await writer.WriteEndElementAsync(); + } + + protected override SyndicationItem CreateItemInstance() + { + return SyndicationItemFormatter.CreateItemInstance(_itemType); + } + + private Task ReadItemAsync(XmlReaderWrapper reader) + { + SetItem(CreateItemInstance()); + return _feedSerializer.ReadItemFromAsync(XmlReaderWrapper.CreateFromReader(XmlDictionaryReader.CreateDictionaryReader(reader)), this.Item); + } + + private Task WriteItem(XmlWriter writer) + { + if (this.Item == null) + { + throw new InvalidOperationException(SR.ItemFormatterDoesNotHaveItem); + } + XmlDictionaryWriter w = XmlDictionaryWriter.CreateDictionaryWriter(writer); + return _feedSerializer.WriteItemContentsAsync(w, this.Item); + } + } + + [XmlRoot(ElementName = Rss20Constants.ItemTag, Namespace = Rss20Constants.Rss20Namespace)] + public class Rss20ItemFormatter : Rss20ItemFormatter + where TSyndicationItem : SyndicationItem, new() + { + public Rss20ItemFormatter() + : base(typeof(TSyndicationItem)) + { + } + public Rss20ItemFormatter(TSyndicationItem itemToWrite) + : base(itemToWrite) + { + } + public Rss20ItemFormatter(TSyndicationItem itemToWrite, bool serializeExtensionsAsAtom) + : base(itemToWrite, serializeExtensionsAsAtom) + { + } + + protected override SyndicationItem CreateItemInstance() + { + return new TSyndicationItem(); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/ServiceDocument.cs b/src/System.ServiceModel.Syndication/src/ServiceDocument.cs new file mode 100644 index 000000000000..d630a18e8687 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/ServiceDocument.cs @@ -0,0 +1,124 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Collections.Generic; + using System.Collections.ObjectModel; + using System.Runtime.CompilerServices; + using System.Threading.Tasks; + using System.Xml; + + public class ServiceDocument : IExtensibleSyndicationObject + { + private Uri _baseUri; + private ExtensibleSyndicationObject _extensions = new ExtensibleSyndicationObject(); + private string _language; + private Collection _workspaces; + + public ServiceDocument() : this(null) + { + } + + public ServiceDocument(IEnumerable workspaces) + { + if (workspaces != null) + { + _workspaces = new NullNotAllowedCollection(); + foreach (Workspace workspace in workspaces) + { + _workspaces.Add(workspace); + } + } + } + + public Dictionary AttributeExtensions + { + get { return _extensions.AttributeExtensions; } + } + + public Uri BaseUri + { + get { return _baseUri; } + set { _baseUri = value; } + } + + public SyndicationElementExtensionCollection ElementExtensions + { + get { return _extensions.ElementExtensions; } + } + + public string Language + { + get { return _language; } + set { _language = value; } + } + + public Collection Workspaces + { + get + { + if (_workspaces == null) + { + _workspaces = new NullNotAllowedCollection(); + } + return _workspaces; + } + } + + public static async Task LoadAsync(XmlReader reader) + where TServiceDocument : ServiceDocument, new() + { + AtomPub10ServiceDocumentFormatter formatter = new AtomPub10ServiceDocumentFormatter(); + await formatter.ReadFromAsync(reader); + return (TServiceDocument)(object)formatter.Document; + } + + public ServiceDocumentFormatter GetFormatter() + { + return new AtomPub10ServiceDocumentFormatter(this); + } + + public Task Save(XmlWriter writer) + { + return new AtomPub10ServiceDocumentFormatter(this).WriteToAsync(writer); + } + + protected internal virtual Workspace CreateWorkspace() + { + return new Workspace(); + } + + protected internal virtual bool TryParseAttribute(string name, string ns, string value, string version) + { + return false; + } + + protected internal virtual bool TryParseElement(XmlReader reader, string version) + { + return false; + } + + protected internal virtual Task WriteAttributeExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteAttributeExtensionsAsync(writer); + } + + protected internal virtual Task WriteElementExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteElementExtensionsAsync(writer); + } + + internal void LoadElementExtensions(XmlReaderWrapper readerOverUnparsedExtensions, int maxExtensionSize) + { + _extensions.LoadElementExtensions(readerOverUnparsedExtensions, maxExtensionSize); + } + + internal void LoadElementExtensions(XmlBuffer buffer) + { + _extensions.LoadElementExtensions(buffer); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/ServiceDocumentFormatter.cs b/src/System.ServiceModel.Syndication/src/ServiceDocumentFormatter.cs new file mode 100644 index 000000000000..b08318047c3c --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/ServiceDocumentFormatter.cs @@ -0,0 +1,329 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.Serialization; + using System.Threading.Tasks; + using System.Xml; + + [DataContract] + public abstract class ServiceDocumentFormatter + { + private ServiceDocument _document; + + protected ServiceDocumentFormatter() + { + } + protected ServiceDocumentFormatter(ServiceDocument documentToWrite) + { + if (documentToWrite == null) + { + throw new ArgumentNullException(nameof(documentToWrite)); + } + _document = documentToWrite; + } + + public ServiceDocument Document + { + get { return _document; } + } + + public abstract string Version + { get; } + + public abstract Task CanReadAsync(XmlReader reader); + public abstract Task ReadFromAsync(XmlReader reader); + public abstract Task WriteToAsync(XmlWriter writer); + + internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, CategoriesDocument categories) + { + if (categories == null) + { + throw new ArgumentNullException(nameof(categories)); + } + Atom10FeedFormatter.CloseBuffer(buffer, writer); + categories.LoadElementExtensions(buffer); + } + + internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, ResourceCollectionInfo collection) + { + if (collection == null) + { + throw new ArgumentNullException(nameof(collection)); + } + Atom10FeedFormatter.CloseBuffer(buffer, writer); + collection.LoadElementExtensions(buffer); + } + + internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, Workspace workspace) + { + if (workspace == null) + { + throw new ArgumentNullException(nameof(workspace)); + } + Atom10FeedFormatter.CloseBuffer(buffer, writer); + workspace.LoadElementExtensions(buffer); + } + + internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, ServiceDocument document) + { + if (document == null) + { + throw new ArgumentNullException(nameof(document)); + } + Atom10FeedFormatter.CloseBuffer(buffer, writer); + document.LoadElementExtensions(buffer); + } + + protected static SyndicationCategory CreateCategory(InlineCategoriesDocument inlineCategories) + { + if (inlineCategories == null) + { + throw new ArgumentNullException(nameof(inlineCategories)); + } + return inlineCategories.CreateCategory(); + } + + protected static ResourceCollectionInfo CreateCollection(Workspace workspace) + { + if (workspace == null) + { + throw new ArgumentNullException(nameof(workspace)); + } + return workspace.CreateResourceCollection(); + } + + protected static InlineCategoriesDocument CreateInlineCategories(ResourceCollectionInfo collection) + { + return collection.CreateInlineCategoriesDocument(); + } + + protected static ReferencedCategoriesDocument CreateReferencedCategories(ResourceCollectionInfo collection) + { + return collection.CreateReferencedCategoriesDocument(); + } + + protected static Workspace CreateWorkspace(ServiceDocument document) + { + if (document == null) + { + throw new ArgumentNullException(nameof(document)); + } + return document.CreateWorkspace(); + } + + protected static void LoadElementExtensions(XmlReader reader, CategoriesDocument categories, int maxExtensionSize) + { + if (categories == null) + { + throw new ArgumentNullException(nameof(categories)); + } + + categories.LoadElementExtensions(XmlReaderWrapper.CreateFromReader(reader), maxExtensionSize); + } + + protected static void LoadElementExtensions(XmlReader reader, ResourceCollectionInfo collection, int maxExtensionSize) + { + if (collection == null) + { + throw new ArgumentNullException(nameof(collection)); + } + + collection.LoadElementExtensions(XmlReaderWrapper.CreateFromReader(reader), maxExtensionSize); + } + + protected static void LoadElementExtensions(XmlReader reader, Workspace workspace, int maxExtensionSize) + { + if (workspace == null) + { + throw new ArgumentNullException(nameof(workspace)); + } + + workspace.LoadElementExtensions(XmlReaderWrapper.CreateFromReader(reader), maxExtensionSize); + } + + protected static void LoadElementExtensions(XmlReader reader, ServiceDocument document, int maxExtensionSize) + { + if (document == null) + { + throw new ArgumentNullException(nameof(document)); + } + + document.LoadElementExtensions(XmlReaderWrapper.CreateFromReader(reader), maxExtensionSize); + } + + protected static bool TryParseAttribute(string name, string ns, string value, ServiceDocument document, string version) + { + if (document == null) + { + throw new ArgumentNullException(nameof(document)); + } + + return document.TryParseAttribute(name, ns, value, version); + } + + protected static bool TryParseAttribute(string name, string ns, string value, ResourceCollectionInfo collection, string version) + { + if (collection == null) + { + throw new ArgumentNullException(nameof(collection)); + } + + return collection.TryParseAttribute(name, ns, value, version); + } + + protected static bool TryParseAttribute(string name, string ns, string value, CategoriesDocument categories, string version) + { + if (categories == null) + { + throw new ArgumentNullException(nameof(categories)); + } + + return categories.TryParseAttribute(name, ns, value, version); + } + + protected static bool TryParseAttribute(string name, string ns, string value, Workspace workspace, string version) + { + if (workspace == null) + { + throw new ArgumentNullException(nameof(workspace)); + } + + return workspace.TryParseAttribute(name, ns, value, version); + } + + protected static bool TryParseElement(XmlReader reader, ResourceCollectionInfo collection, string version) + { + if (collection == null) + { + throw new ArgumentNullException(nameof(collection)); + } + + return collection.TryParseElement(XmlReaderWrapper.CreateFromReader(reader), version); + } + + protected static bool TryParseElement(XmlReader reader, ServiceDocument document, string version) + { + if (document == null) + { + throw new ArgumentNullException(nameof(document)); + } + + return document.TryParseElement(XmlReaderWrapper.CreateFromReader(reader), version); + } + + protected static bool TryParseElement(XmlReader reader, Workspace workspace, string version) + { + if (workspace == null) + { + throw new ArgumentNullException(nameof(workspace)); + } + + return workspace.TryParseElement(XmlReaderWrapper.CreateFromReader(reader), version); + } + + protected static bool TryParseElement(XmlReader reader, CategoriesDocument categories, string version) + { + if (categories == null) + { + throw new ArgumentNullException(nameof(categories)); + } + + return categories.TryParseElement(XmlReaderWrapper.CreateFromReader(reader), version); + } + + protected static void WriteAttributeExtensions(XmlWriter writer, ServiceDocument document, string version) + { + if (document == null) + { + throw new ArgumentNullException(nameof(document)); + } + + document.WriteAttributeExtensionsAsync(writer, version); + } + + protected static void WriteAttributeExtensions(XmlWriter writer, Workspace workspace, string version) + { + if (workspace == null) + { + throw new ArgumentNullException(nameof(workspace)); + } + + workspace.WriteAttributeExtensions(writer, version); + } + + protected static Task WriteAttributeExtensionsAsync(XmlWriter writer, ResourceCollectionInfo collection, string version) + { + if (collection == null) + { + throw new ArgumentNullException(nameof(collection)); + } + + return collection.WriteAttributeExtensionsAsync(writer, version); + } + + protected static Task WriteAttributeExtensionsAsync(XmlWriter writer, CategoriesDocument categories, string version) + { + if (categories == null) + { + throw new ArgumentNullException(nameof(categories)); + } + + return categories.WriteAttributeExtensionsAsync(writer, version); + } + + protected static Task WriteElementExtensionsAsync(XmlWriter writer, ServiceDocument document, string version) + { + if (document == null) + { + throw new ArgumentNullException(nameof(document)); + } + + return document.WriteElementExtensionsAsync(writer, version); + } + + protected static Task WriteElementExtensionsAsync(XmlWriter writer, Workspace workspace, string version) + { + if (workspace == null) + { + throw new ArgumentNullException(nameof(workspace)); + } + + return workspace.WriteElementExtensionsAsync(writer, version); + } + + protected static Task WriteElementExtensionsAsync(XmlWriter writer, ResourceCollectionInfo collection, string version) + { + if (collection == null) + { + throw new ArgumentNullException(nameof(collection)); + } + + return collection.WriteElementExtensionsAsync(writer, version); + } + + protected static Task WriteElementExtensionsAsync(XmlWriter writer, CategoriesDocument categories, string version) + { + if (categories == null) + { + throw new ArgumentNullException(nameof(categories)); + } + + return categories.WriteElementExtensionsAsync(writer, version); + } + + protected virtual ServiceDocument CreateDocumentInstance() + { + return new ServiceDocument(); + } + + protected virtual void SetDocument(ServiceDocument document) + { + _document = document; + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/SyndicationCategory.cs b/src/System.ServiceModel.Syndication/src/SyndicationCategory.cs new file mode 100644 index 000000000000..109ab332f957 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/SyndicationCategory.cs @@ -0,0 +1,113 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Collections.Generic; + using System.Runtime.CompilerServices; + using System.Threading.Tasks; + using System.Xml; + + // NOTE: This class implements Clone so if you add any members, please update the copy ctor + public class SyndicationCategory : IExtensibleSyndicationObject + { + private ExtensibleSyndicationObject _extensions = new ExtensibleSyndicationObject(); + private string _label; + private string _name; + private string _scheme; + + public SyndicationCategory() + : this((string)null) + { + } + + public SyndicationCategory(string name) + : this(name, null, null) + { + } + + public SyndicationCategory(string name, string scheme, string label) + { + _name = name; + _scheme = scheme; + _label = label; + } + + protected SyndicationCategory(SyndicationCategory source) + { + if (source == null) + { + throw new ArgumentNullException(nameof(source)); + } + _label = source._label; + _name = source._name; + _scheme = source._scheme; + _extensions = source._extensions.Clone(); + } + + public Dictionary AttributeExtensions + { + get { return _extensions.AttributeExtensions; } + } + + public SyndicationElementExtensionCollection ElementExtensions + { + get { return _extensions.ElementExtensions; } + } + + public string Label + { + get { return _label; } + set { _label = value; } + } + + public string Name + { + get { return _name; } + set { _name = value; } + } + + public string Scheme + { + get { return _scheme; } + set { _scheme = value; } + } + + public virtual SyndicationCategory Clone() + { + return new SyndicationCategory(this); + } + + protected internal virtual bool TryParseAttribute(string name, string ns, string value, string version) + { + return false; + } + + protected internal virtual bool TryParseElement(XmlReader reader, string version) + { + return false; + } + + protected internal virtual Task WriteAttributeExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteAttributeExtensionsAsync(writer); + } + + protected internal virtual Task WriteElementExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteElementExtensionsAsync(writer); + } + + internal void LoadElementExtensions(XmlReader readerOverUnparsedExtensions, int maxExtensionSize) + { + _extensions.LoadElementExtensions(readerOverUnparsedExtensions, maxExtensionSize); + } + + internal void LoadElementExtensions(XmlBuffer buffer) + { + _extensions.LoadElementExtensions(buffer); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/SyndicationContent.cs b/src/System.ServiceModel.Syndication/src/SyndicationContent.cs new file mode 100644 index 000000000000..7ec0e8c1b103 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/SyndicationContent.cs @@ -0,0 +1,139 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using Microsoft.ServiceModel.Syndication.Resources; + using System; + using System.Collections.Generic; + using System.Runtime.CompilerServices; + using System.Runtime.Serialization; + using System.Threading.Tasks; + using System.Xml; + using System.Xml.Serialization; + + public abstract class SyndicationContent + { + private Dictionary _attributeExtensions; + + protected SyndicationContent() + { + } + + protected SyndicationContent(SyndicationContent source) + { + CopyAttributeExtensions(source); + } + + public Dictionary AttributeExtensions + { + get + { + if (_attributeExtensions == null) + { + _attributeExtensions = new Dictionary(); + } + return _attributeExtensions; + } + } + + public abstract string Type + { + get; + } + + public static TextSyndicationContent CreateHtmlContent(string content) + { + return new TextSyndicationContent(content, TextSyndicationContentKind.Html); + } + + public static TextSyndicationContent CreatePlaintextContent(string content) + { + return new TextSyndicationContent(content); + } + + public static UrlSyndicationContent CreateUrlContent(Uri url, string mediaType) + { + return new UrlSyndicationContent(url, mediaType); + } + + public static TextSyndicationContent CreateXhtmlContent(string content) + { + return new TextSyndicationContent(content, TextSyndicationContentKind.XHtml); + } + + public static XmlSyndicationContent CreateXmlContent(object dataContractObject) + { + return new XmlSyndicationContent(Atom10Constants.XmlMediaType, dataContractObject, (DataContractSerializer)null); + } + + public static XmlSyndicationContent CreateXmlContent(object dataContractObject, XmlObjectSerializer dataContractSerializer) + { + return new XmlSyndicationContent(Atom10Constants.XmlMediaType, dataContractObject, dataContractSerializer); + } + + public static XmlSyndicationContent CreateXmlContent(XmlReader XmlReaderWrapper) + { + return new XmlSyndicationContent(XmlReaderWrapper); + } + + public static XmlSyndicationContent CreateXmlContent(object xmlSerializerObject, XmlSerializer serializer) + { + return new XmlSyndicationContent(Atom10Constants.XmlMediaType, xmlSerializerObject, serializer); + } + + public abstract SyndicationContent Clone(); + + public async Task WriteToAsync(XmlWriter writer, string outerElementName, string outerElementNamespace) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + if (string.IsNullOrEmpty(outerElementName)) + { + throw new ArgumentException(SR.OuterElementNameNotSpecified); + } + + writer = XmlWriterWrapper.CreateFromWriter(writer); + + await writer.WriteStartElementAsync(outerElementName, outerElementNamespace); + await writer.WriteAttributeStringAsync(Atom10Constants.TypeTag, string.Empty, this.Type); + if (_attributeExtensions != null) + { + foreach (XmlQualifiedName key in _attributeExtensions.Keys) + { + if (key.Name == Atom10Constants.TypeTag && key.Namespace == string.Empty) + { + continue; + } + string attrValue; + if (_attributeExtensions.TryGetValue(key, out attrValue)) + { + await writer.WriteAttributeStringAsync(key.Name, key.Namespace, attrValue); + } + } + } + WriteContentsTo(writer); + await writer.WriteEndElementAsync(); + } + + internal void CopyAttributeExtensions(SyndicationContent source) + { + if (source == null) + { + throw new ArgumentNullException(nameof(source)); + } + if (source._attributeExtensions != null) + { + foreach (XmlQualifiedName key in source._attributeExtensions.Keys) + { + this.AttributeExtensions.Add(key, source._attributeExtensions[key]); + } + } + } + + protected abstract void WriteContentsTo(XmlWriter writer); + } +} diff --git a/src/System.ServiceModel.Syndication/src/SyndicationElementExtension.cs b/src/System.ServiceModel.Syndication/src/SyndicationElementExtension.cs new file mode 100644 index 000000000000..c893a854a552 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/SyndicationElementExtension.cs @@ -0,0 +1,349 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using Microsoft.ServiceModel.Syndication.Resources; + using System; + using System.Diagnostics; + using System.IO; + using System.Runtime.CompilerServices; + using System.Runtime.Serialization; + using System.Threading.Tasks; + using System.Xml; + using System.Xml.Serialization; + + public class SyndicationElementExtension + { + private XmlBuffer _buffer; + private int _bufferElementIndex; + // extensionData and extensionDataWriter are only present on the send side + private object _extensionData; + private ExtensionDataWriter _extensionDataWriter; + private string _outerName; + private string _outerNamespace; + + public SyndicationElementExtension(XmlReader reader) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + SyndicationFeedFormatter.MoveToStartElement(reader); + _outerName = reader.LocalName; + _outerNamespace = reader.NamespaceURI; + _buffer = new XmlBuffer(int.MaxValue); + using (XmlDictionaryWriter writer = _buffer.OpenSection(XmlDictionaryReaderQuotas.Max)) + { + writer.WriteStartElement(Rss20Constants.ExtensionWrapperTag); + writer.WriteNode(reader, false); + writer.WriteEndElement(); + } + _buffer.CloseSection(); + _buffer.Close(); + _bufferElementIndex = 0; + } + + public SyndicationElementExtension(object dataContractExtension) + : this(dataContractExtension, (XmlObjectSerializer)null) + { + } + + public SyndicationElementExtension(object dataContractExtension, XmlObjectSerializer dataContractSerializer) + : this(null, null, dataContractExtension, dataContractSerializer) + { + } + + public SyndicationElementExtension(string outerName, string outerNamespace, object dataContractExtension) + : this(outerName, outerNamespace, dataContractExtension, null) + { + } + + public SyndicationElementExtension(string outerName, string outerNamespace, object dataContractExtension, XmlObjectSerializer dataContractSerializer) + { + if (dataContractExtension == null) + { + throw new ArgumentNullException(nameof(dataContractExtension)); + } + if (outerName == string.Empty) + { + throw new ArgumentNullException(SR.OuterNameOfElementExtensionEmpty); + } + if (dataContractSerializer == null) + { + dataContractSerializer = new DataContractSerializer(dataContractExtension.GetType()); + } + _outerName = outerName; + _outerNamespace = outerNamespace; + _extensionData = dataContractExtension; + _extensionDataWriter = new ExtensionDataWriter(_extensionData, dataContractSerializer, _outerName, _outerNamespace); + } + + public SyndicationElementExtension(object xmlSerializerExtension, XmlSerializer serializer) + { + if (xmlSerializerExtension == null) + { + throw new ArgumentNullException(nameof(xmlSerializerExtension)); + } + if (serializer == null) + { + serializer = new XmlSerializer(xmlSerializerExtension.GetType()); + } + _extensionData = xmlSerializerExtension; + _extensionDataWriter = new ExtensionDataWriter(_extensionData, serializer); + } + + internal SyndicationElementExtension(XmlBuffer buffer, int bufferElementIndex, string outerName, string outerNamespace) + { + _buffer = buffer; + _bufferElementIndex = bufferElementIndex; + _outerName = outerName; + _outerNamespace = outerNamespace; + } + + public string OuterName + { + get + { + if (_outerName == null) + { + EnsureOuterNameAndNs(); + } + return _outerName; + } + } + + public string OuterNamespace + { + get + { + if (_outerName == null) + { + EnsureOuterNameAndNs(); + } + return _outerNamespace; + } + } + + public Task GetObject() + { + return GetObject(new DataContractSerializer(typeof(TExtension))); + } + + public async Task GetObject(XmlObjectSerializer serializer) + { + if (serializer == null) + { + throw new ArgumentNullException(nameof(serializer)); + } + if (_extensionData != null && typeof(TExtension).IsAssignableFrom(_extensionData.GetType())) + { + return (TExtension)_extensionData; + } + + using (XmlReader reader = await GetReaderAsync()) + { + return (TExtension)serializer.ReadObject(reader, false); + } + } + + public async Task GetObject(XmlSerializer serializer) + { + if (serializer == null) + { + throw new ArgumentNullException(nameof(serializer)); + } + if (_extensionData != null && typeof(TExtension).IsAssignableFrom(_extensionData.GetType())) + { + return (TExtension)_extensionData; + } + + using (XmlReader reader = await GetReaderAsync()) + { + return (TExtension)serializer.Deserialize(reader); + } + } + + public async Task GetReaderAsync() + { + await this.EnsureBuffer(); + XmlReaderWrapper reader = XmlReaderWrapper.CreateFromReader(_buffer.GetReader(0)); + int index = 0; + reader.ReadStartElement(Rss20Constants.ExtensionWrapperTag); + while (reader.IsStartElement()) + { + if (index == _bufferElementIndex) + { + break; + } + ++index; + + await reader.SkipAsync(); + } + + return reader; + } + + //public Task GetReader() + //{ + // return GetReaderAsync(); + //} + + public async Task WriteToAsync(XmlWriter writer) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + if (_extensionDataWriter != null) + { + _extensionDataWriter.WriteToAsync(writer); + } + else + { + writer = XmlWriterWrapper.CreateFromWriter(writer); + using (XmlReader reader = await GetReaderAsync()) + { + await writer.WriteNodeAsync(reader, false); + } + } + } + + private async Task EnsureBuffer() + { + if (_buffer == null) + { + _buffer = new XmlBuffer(int.MaxValue); + using (XmlDictionaryWriter writer = _buffer.OpenSection(XmlDictionaryReaderQuotas.Max)) + { + writer.WriteStartElement(Rss20Constants.ExtensionWrapperTag); + await this.WriteToAsync(writer); + writer.WriteEndElement(); + } + _buffer.CloseSection(); + _buffer.Close(); + _bufferElementIndex = 0; + } + } + + private void EnsureOuterNameAndNs() + { + Debug.Assert(_extensionDataWriter != null, "outer name is null only for datacontract and xmlserializer cases"); + _extensionDataWriter.ComputeOuterNameAndNs(out _outerName, out _outerNamespace); + } + + // this class holds the extension data and the associated serializer (either DataContractSerializer or XmlSerializer but not both) + private class ExtensionDataWriter + { + private readonly XmlObjectSerializer _dataContractSerializer; + private readonly object _extensionData; + private readonly string _outerName; + private readonly string _outerNamespace; + private readonly XmlSerializer _xmlSerializer; + + public ExtensionDataWriter(object extensionData, XmlObjectSerializer dataContractSerializer, string outerName, string outerNamespace) + { + Debug.Assert(extensionData != null && dataContractSerializer != null, "null check"); + + _dataContractSerializer = dataContractSerializer; + _extensionData = extensionData; + _outerName = outerName; + _outerNamespace = outerNamespace; + } + + public ExtensionDataWriter(object extensionData, XmlSerializer serializer) + { + Debug.Assert(extensionData != null && serializer != null, "null check"); + _xmlSerializer = serializer; + _extensionData = extensionData; + } + + public void WriteToAsync(XmlWriter writer) + { + if (_xmlSerializer != null) + { + Debug.Assert((_dataContractSerializer == null && _outerName == null && _outerNamespace == null), "Xml serializer cannot have outer name, ns"); + _xmlSerializer.Serialize(writer, _extensionData); + } + else + { + Debug.Assert(_xmlSerializer == null, "Xml serializer cannot be configured"); + writer = XmlWriterWrapper.CreateFromWriter(writer); + if (_outerName != null) + { + writer.WriteStartElementAsync(_outerName, _outerNamespace); + _dataContractSerializer.WriteObjectContent(writer, _extensionData); + writer.WriteEndElementAsync(); + } + else + { + _dataContractSerializer.WriteObject(writer, _extensionData); + } + } + } + + internal void ComputeOuterNameAndNs(out string name, out string ns) + { + if (_outerName != null) + { + Debug.Assert(_xmlSerializer == null, "outer name is not null for data contract extension only"); + name = _outerName; + ns = _outerNamespace; + } + else if (_dataContractSerializer != null) + { + Debug.Assert(_xmlSerializer == null, "only one of xmlserializer or datacontract serializer can be present"); + XsdDataContractExporter dcExporter = new XsdDataContractExporter(); + XmlQualifiedName qName = dcExporter.GetRootElementName(_extensionData.GetType()); + if (qName != null) + { + name = qName.Name; + ns = qName.Namespace; + } + else + { + // this can happen if an IXmlSerializable type is specified with IsAny=true + ReadOuterNameAndNs(out name, out ns); + } + } + else + { + Debug.Assert(_dataContractSerializer == null, "only one of xmlserializer or datacontract serializer can be present"); + XmlReflectionImporter importer = new XmlReflectionImporter(); + XmlTypeMapping typeMapping = importer.ImportTypeMapping(_extensionData.GetType()); + if (typeMapping != null && !string.IsNullOrEmpty(typeMapping.ElementName)) + { + name = typeMapping.ElementName; + ns = typeMapping.Namespace; + } + else + { + // this can happen if an IXmlSerializable type is specified with IsAny=true + ReadOuterNameAndNs(out name, out ns); + } + } + } + + internal void ReadOuterNameAndNs(out string name, out string ns) + { + using (MemoryStream stream = new MemoryStream()) + { + using (XmlWriter writer = XmlWriter.Create(stream)) + { + this.WriteToAsync(writer); + } + + stream.Seek(0, SeekOrigin.Begin); + + using (XmlReader reader = XmlReader.Create(stream)) + { + SyndicationFeedFormatter.MoveToStartElement(reader); + name = reader.LocalName; + ns = reader.NamespaceURI; + } + } + } + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/SyndicationElementExtensionCollection.cs b/src/System.ServiceModel.Syndication/src/SyndicationElementExtensionCollection.cs new file mode 100644 index 000000000000..8b9c6c0fbe11 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/SyndicationElementExtensionCollection.cs @@ -0,0 +1,278 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using Microsoft.ServiceModel.Syndication.Resources; + using System; + using System.Collections.ObjectModel; + using System.Diagnostics; + using System.Runtime.CompilerServices; + using System.Runtime.Serialization; + using System.Threading.Tasks; + using System.Xml; + using System.Xml.Serialization; + + // sealed because the ctor results in a call to the virtual InsertItem method + public sealed class SyndicationElementExtensionCollection : Collection + { + private XmlBuffer _buffer; + private bool _initialized; + + internal SyndicationElementExtensionCollection() + : this((XmlBuffer)null) + { + } + + internal SyndicationElementExtensionCollection(XmlBuffer buffer) + : base() + { + _buffer = buffer; + if (_buffer != null) + { + PopulateElements(); + } + _initialized = true; + } + + internal SyndicationElementExtensionCollection(SyndicationElementExtensionCollection source) + : base() + { + _buffer = source._buffer; + for (int i = 0; i < source.Items.Count; ++i) + { + base.Add(source.Items[i]); + } + _initialized = true; + } + + public void Add(object extension) + { + if (extension is SyndicationElementExtension) + { + base.Add((SyndicationElementExtension)extension); + } + else + { + this.Add(extension, (DataContractSerializer)null); + } + } + + public void Add(string outerName, string outerNamespace, object dataContractExtension) + { + this.Add(outerName, outerNamespace, dataContractExtension, null); + } + + public void Add(object dataContractExtension, DataContractSerializer serializer) + { + this.Add(null, null, dataContractExtension, serializer); + } + + public void Add(string outerName, string outerNamespace, object dataContractExtension, XmlObjectSerializer dataContractSerializer) + { + if (dataContractExtension == null) + { + throw new ArgumentNullException(nameof(dataContractExtension)); + } + if (dataContractSerializer == null) + { + dataContractSerializer = new DataContractSerializer(dataContractExtension.GetType()); + } + base.Add(new SyndicationElementExtension(outerName, outerNamespace, dataContractExtension, dataContractSerializer)); + } + + public void Add(object xmlSerializerExtension, XmlSerializer serializer) + { + if (xmlSerializerExtension == null) + { + throw new ArgumentNullException(nameof(xmlSerializerExtension)); + } + if (serializer == null) + { + serializer = new XmlSerializer(xmlSerializerExtension.GetType()); + } + base.Add(new SyndicationElementExtension(xmlSerializerExtension, serializer)); + } + + public void Add(XmlReader reader) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + base.Add(new SyndicationElementExtension(reader)); + } + + public async Task GetReaderAtElementExtensions() + { + XmlBuffer extensionsBuffer = await GetOrCreateBufferOverExtensions(); + XmlReader reader = extensionsBuffer.GetReader(0); + reader.ReadStartElement(); + return reader; + } + + public Task> ReadElementExtensions(string extensionName, string extensionNamespace) + { + return ReadElementExtensions(extensionName, extensionNamespace, new DataContractSerializer(typeof(TExtension))); + } + + public Task> ReadElementExtensions(string extensionName, string extensionNamespace, XmlObjectSerializer serializer) + { + if (serializer == null) + { + throw new ArgumentNullException(nameof(serializer)); + } + return ReadExtensions(extensionName, extensionNamespace, serializer, null); + } + + public Task> ReadElementExtensions(string extensionName, string extensionNamespace, XmlSerializer serializer) + { + if (serializer == null) + { + throw new ArgumentNullException(nameof(serializer)); + } + return ReadExtensions(extensionName, extensionNamespace, null, serializer); + } + + internal async Task WriteToAsync(XmlWriter writer) + { + if (_buffer != null) + { + using (XmlDictionaryReader reader = _buffer.GetReader(0)) + { + reader.ReadStartElement(); + while (reader.IsStartElement()) + { + await writer.WriteNodeAsync(reader, false); + } + } + } + else + { + for (int i = 0; i < this.Items.Count; ++i) + { + await this.Items[i].WriteToAsync(writer); + } + } + } + + protected override void ClearItems() + { + base.ClearItems(); + // clear the cached buffer if the operation is happening outside the constructor + if (_initialized) + { + _buffer = null; + } + } + + protected override void InsertItem(int index, SyndicationElementExtension item) + { + if (item == null) + { + throw new ArgumentNullException(nameof(item)); + } + base.InsertItem(index, item); + // clear the cached buffer if the operation is happening outside the constructor + if (_initialized) + { + _buffer = null; + } + } + + protected override void RemoveItem(int index) + { + base.RemoveItem(index); + // clear the cached buffer if the operation is happening outside the constructor + if (_initialized) + { + _buffer = null; + } + } + + protected override void SetItem(int index, SyndicationElementExtension item) + { + if (item == null) + { + throw new ArgumentNullException(nameof(item)); + } + base.SetItem(index, item); + // clear the cached buffer if the operation is happening outside the constructor + if (_initialized) + { + _buffer = null; + } + } + + private async Task GetOrCreateBufferOverExtensions() + { + if (_buffer != null) + { + return _buffer; + } + XmlBuffer newBuffer = new XmlBuffer(int.MaxValue); + using (XmlWriter writer = newBuffer.OpenSection(XmlDictionaryReaderQuotas.Max)) + { + writer.WriteStartElement(Rss20Constants.ExtensionWrapperTag); + for (int i = 0; i < this.Count; ++i) + { + await this[i].WriteToAsync(writer); + } + writer.WriteEndElement(); + } + newBuffer.CloseSection(); + newBuffer.Close(); + _buffer = newBuffer; + return newBuffer; + } + + private void PopulateElements() + { + using (XmlDictionaryReader reader = _buffer.GetReader(0)) + { + reader.ReadStartElement(); + int index = 0; + while (reader.IsStartElement()) + { + base.Add(new SyndicationElementExtension(_buffer, index, reader.LocalName, reader.NamespaceURI)); + reader.Skip(); + ++index; + } + } + } + + private async Task> ReadExtensions(string extensionName, string extensionNamespace, XmlObjectSerializer dcSerializer, XmlSerializer xmlSerializer) + { + if (string.IsNullOrEmpty(extensionName)) + { + throw new ArgumentNullException(SR.ExtensionNameNotSpecified); + } + Debug.Assert((dcSerializer == null) != (xmlSerializer == null), "exactly one serializer should be supplied"); + // normalize the null and empty namespace + if (extensionNamespace == null) + { + extensionNamespace = string.Empty; + } + + Collection results = new Collection(); + for (int i = 0; i < this.Count; ++i) + { + if (extensionName != this[i].OuterName || extensionNamespace != this[i].OuterNamespace) + { + continue; + } + + if (dcSerializer != null) + { + results.Add(await this[i].GetObject(dcSerializer)); + } + else + { + results.Add(await this[i].GetObject(xmlSerializer)); + } + } + return results; + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/SyndicationElementExtensionKindHelper.cs b/src/System.ServiceModel.Syndication/src/SyndicationElementExtensionKindHelper.cs new file mode 100644 index 000000000000..0f5382d8f98e --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/SyndicationElementExtensionKindHelper.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + internal static class SyndicationElementExtensionKindHelper + { + internal static bool IsDefined(SyndicationElementExtensionKind value) + { + return (value == SyndicationElementExtensionKind.DataContract || + value == SyndicationElementExtensionKind.XmlElement || + value == SyndicationElementExtensionKind.XmlSerializer); + } + + internal enum SyndicationElementExtensionKind + { + DataContract, + XmlElement, + XmlSerializer + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/SyndicationFeed.cs b/src/System.ServiceModel.Syndication/src/SyndicationFeed.cs new file mode 100644 index 000000000000..727a52fe341f --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/SyndicationFeed.cs @@ -0,0 +1,503 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using Microsoft.ServiceModel; + using Microsoft.ServiceModel.Syndication.Resources; + using System; + using System.Collections.Generic; + using System.Collections.ObjectModel; + using System.Runtime.CompilerServices; + using System.Threading; + using System.Threading.Tasks; + using System.Xml; + + + // NOTE: This class implements Clone so if you add any members, please update the copy ctor + public class SyndicationFeed : IExtensibleSyndicationObject + { + private Collection _authors; + private Uri _baseUri; + private Collection _categories; + private Collection _contributors; + private TextSyndicationContent _copyright; + private TextSyndicationContent _description; + private ExtensibleSyndicationObject _extensions = new ExtensibleSyndicationObject(); + private string _generator; + private string _id; + + private Uri _imageUrl; + private TextSyndicationContent _imageTitle; + private Uri _imageLink; + + private IEnumerable _items; + private string _language; + private DateTimeOffset _lastUpdatedTime; + private Collection _links; + private TextSyndicationContent _title; + + // optional RSS tags + private SyndicationLink _documentation; + private int _timeToLive; + private Collection _skipHours; + private Collection _skipDays; + private SyndicationTextInput _textInput; + private Uri _iconImage; + + public Uri IconImage + { + get + { + return _iconImage; + } + set + { + if (value == null) + throw new ArgumentNullException(nameof(value)); + _iconImage = value; + } + } + + public SyndicationTextInput TextInput + { + get + { + return _textInput; + } + set + { + if (value == null) + throw new ArgumentNullException(nameof(value)); + _textInput = value; + } + } + + public SyndicationLink Documentation + { + get + { + return _documentation; + } + set + { + _documentation = value; + } + } + + public int TimeToLive + { + get { + return _timeToLive; + } + set + { + _timeToLive = value; + } + } + + public Collection SkipHours + { + get + { + if (_skipHours == null) + _skipHours = new Collection(); + return _skipHours; + } + } + + public Collection SkipDays + { + get + { + if (_skipDays == null) + _skipDays = new Collection(); + return _skipDays; + } + } + + //====================================== + + public SyndicationFeed() + : this((IEnumerable)null) + { + } + + public SyndicationFeed(IEnumerable items) + : this(null, null, null, items) + { + } + + public SyndicationFeed(string title, string description, Uri feedAlternateLink) + : this(title, description, feedAlternateLink, null) + { + } + + public SyndicationFeed(string title, string description, Uri feedAlternateLink, IEnumerable items) + : this(title, description, feedAlternateLink, null, DateTimeOffset.MinValue, items) + { + } + + public SyndicationFeed(string title, string description, Uri feedAlternateLink, string id, DateTimeOffset lastUpdatedTime) + : this(title, description, feedAlternateLink, id, lastUpdatedTime, null) + { + } + + public SyndicationFeed(string title, string description, Uri feedAlternateLink, string id, DateTimeOffset lastUpdatedTime, IEnumerable items) + { + if (title != null) + { + _title = new TextSyndicationContent(title); + } + if (description != null) + { + _description = new TextSyndicationContent(description); + } + if (feedAlternateLink != null) + { + this.Links.Add(SyndicationLink.CreateAlternateLink(feedAlternateLink)); + } + _id = id; + _lastUpdatedTime = lastUpdatedTime; + _items = items; + } + + protected SyndicationFeed(SyndicationFeed source, bool cloneItems) + { + if (source == null) + { + throw new ArgumentNullException(nameof(source)); + } + _authors = FeedUtils.ClonePersons(source._authors); + _categories = FeedUtils.CloneCategories(source._categories); + _contributors = FeedUtils.ClonePersons(source._contributors); + _copyright = FeedUtils.CloneTextContent(source._copyright); + _description = FeedUtils.CloneTextContent(source._description); + _extensions = source._extensions.Clone(); + _generator = source._generator; + _id = source._id; + _imageUrl = source._imageUrl; + _language = source._language; + _lastUpdatedTime = source._lastUpdatedTime; + _links = FeedUtils.CloneLinks(source._links); + _title = FeedUtils.CloneTextContent(source._title); + _baseUri = source._baseUri; + IList srcList = source._items as IList; + if (srcList != null) + { + Collection tmp = new NullNotAllowedCollection(); + for (int i = 0; i < srcList.Count; ++i) + { + tmp.Add((cloneItems) ? srcList[i].Clone() : srcList[i]); + } + _items = tmp; + } + else + { + if (cloneItems) + { + throw new InvalidOperationException(SR.UnbufferedItemsCannotBeCloned); + } + _items = source._items; + } + } + + public Dictionary AttributeExtensions + { + get { return _extensions.AttributeExtensions; } + } + + public Collection Authors + { + get + { + if (_authors == null) + { + _authors = new NullNotAllowedCollection(); + } + return _authors; + } + } + + + public Uri BaseUri + { + get { return _baseUri; } + set { _baseUri = value; } + } + + public Collection Categories + { + get + { + if (_categories == null) + { + _categories = new NullNotAllowedCollection(); + } + return _categories; + } + } + + public Collection Contributors + { + get + { + if (_contributors == null) + { + _contributors = new NullNotAllowedCollection(); + } + return _contributors; + } + } + + public TextSyndicationContent Copyright + { + get { return _copyright; } + set { _copyright = value; } + } + + public TextSyndicationContent Description + { + get { return _description; } + set { _description = value; } + } + + public SyndicationElementExtensionCollection ElementExtensions + { + get { return _extensions.ElementExtensions; } + } + + public string Generator + { + get { return _generator; } + set { _generator = value; } + } + + public string Id + { + get { return _id; } + set { _id = value; } + } + + public Uri ImageUrl + { + get { return _imageUrl; } + set { _imageUrl = value; } + } + + public TextSyndicationContent ImageTitle { + get { return _imageTitle; } + set { _imageTitle = value; } + } + + public Uri ImageLink { + get { return _imageLink; } + set { _imageLink = value; } + } + + public IEnumerable Items + { + get + { + if (_items == null) + { + _items = new NullNotAllowedCollection(); + } + return _items; + } + set + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + _items = value; + } + } + + public string Language + { + get { return _language; } + set { _language = value; } + } + + public DateTimeOffset LastUpdatedTime + { + get { return _lastUpdatedTime; } + set { _lastUpdatedTime = value; } + } + + public Collection Links + { + get + { + if (_links == null) + { + _links = new NullNotAllowedCollection(); + } + return _links; + } + } + + public TextSyndicationContent Title + { + get { return _title; } + set { _title = value; } + } + + //// Custom Parsing + public static async Task LoadAsync(XmlReader reader, Rss20FeedFormatter formatter, CancellationToken ct) + { + return await LoadAsync(reader, formatter, new Atom10FeedFormatter(), ct); + } + + public static async Task LoadAsync(XmlReader reader, Atom10FeedFormatter formatter, CancellationToken ct) + { + return await LoadAsync(reader, new Rss20FeedFormatter(), formatter, ct); + } + + public static async Task LoadAsync(XmlReader reader, Rss20FeedFormatter Rssformatter, Atom10FeedFormatter Atomformatter, CancellationToken ct) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + + XmlReaderWrapper wrappedReader = XmlReaderWrapper.CreateFromReader(reader); + + Atom10FeedFormatter atomSerializer = Atomformatter; + if (atomSerializer.CanRead(wrappedReader)) + { + await atomSerializer.ReadFromAsync(wrappedReader, new CancellationToken()); + return atomSerializer.Feed; + } + Rss20FeedFormatter rssSerializer = Rssformatter; + if (rssSerializer.CanRead(wrappedReader)) + { + await rssSerializer.ReadFromAsync(wrappedReader, new CancellationToken()); + return rssSerializer.Feed; + } + throw new XmlException(string.Format(SR.UnknownFeedXml, wrappedReader.LocalName, wrappedReader.NamespaceURI)); + } + + //================================= + + public static SyndicationFeed Load(XmlReader reader) + { + return Load(reader); + } + + public static TSyndicationFeed Load(XmlReader reader) + where TSyndicationFeed : SyndicationFeed, new() + { + CancellationToken ct = new CancellationToken(); + return LoadAsync(reader,ct).GetAwaiter().GetResult(); + } + + public static async Task LoadAsync(XmlReader reader, CancellationToken ct) + { + return await LoadAsync(reader, ct); + } + + public static async Task LoadAsync(XmlReader reader, CancellationToken ct) + where TSyndicationFeed : SyndicationFeed, new() + { + Atom10FeedFormatter atomSerializer = new Atom10FeedFormatter(); + if (atomSerializer.CanRead(reader)) + { + await atomSerializer.ReadFromAsync(reader, ct); + return atomSerializer.Feed as TSyndicationFeed; + } + + Rss20FeedFormatter rssSerializer = new Rss20FeedFormatter(); + if (rssSerializer.CanRead(reader)) + { + await rssSerializer.ReadFromAsync(reader, ct); + return rssSerializer.Feed as TSyndicationFeed; + } + + throw new XmlException(string.Format(SR.UnknownFeedXml, reader.LocalName, reader.NamespaceURI)); + } + + public virtual SyndicationFeed Clone(bool cloneItems) + { + return new SyndicationFeed(this, cloneItems); + } + + public Atom10FeedFormatter GetAtom10Formatter() + { + return new Atom10FeedFormatter(this); + } + + public Rss20FeedFormatter GetRss20Formatter() + { + return GetRss20Formatter(true); + } + + public Rss20FeedFormatter GetRss20Formatter(bool serializeExtensionsAsAtom) + { + return new Rss20FeedFormatter(this, serializeExtensionsAsAtom); + } + + public Task SaveAsAtom10Async(XmlWriter writer, CancellationToken ct) + { + return GetAtom10Formatter().WriteToAsync(writer, ct); + } + + public Task SaveAsRss20Async(XmlWriter writer, CancellationToken ct) + { + return GetRss20Formatter().WriteToAsync(writer, ct); + } + + protected internal virtual SyndicationCategory CreateCategory() + { + return new SyndicationCategory(); + } + + protected internal virtual SyndicationItem CreateItem() + { + return new SyndicationItem(); + } + + protected internal virtual SyndicationLink CreateLink() + { + return new SyndicationLink(); + } + + protected internal virtual SyndicationPerson CreatePerson() + { + return new SyndicationPerson(); + } + + protected internal virtual bool TryParseAttribute(string name, string ns, string value, string version) + { + return false; + } + + protected internal virtual bool TryParseElement(XmlReader reader, string version) + { + return false; + } + + protected internal virtual Task WriteAttributeExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteAttributeExtensionsAsync(writer); + } + + protected internal virtual Task WriteElementExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteElementExtensionsAsync(writer); + } + + internal void LoadElementExtensions(XmlReader readerOverUnparsedExtensions, int maxExtensionSize) + { + _extensions.LoadElementExtensions(readerOverUnparsedExtensions, maxExtensionSize); + } + + internal void LoadElementExtensions(XmlBuffer buffer) + { + _extensions.LoadElementExtensions(buffer); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/SyndicationFeedFormatter.cs b/src/System.ServiceModel.Syndication/src/SyndicationFeedFormatter.cs new file mode 100644 index 000000000000..79d431d48343 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/SyndicationFeedFormatter.cs @@ -0,0 +1,556 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// DEBUG!!! #if disabled statements + +namespace Microsoft.ServiceModel.Syndication +{ + using Microsoft.ServiceModel.Syndication.Resources; + using System; + using System.Globalization; + using System.Runtime.Serialization; + using System.Threading; + using System.Threading.Tasks; + using System.Xml; + + [DataContract] + public abstract class SyndicationFeedFormatter + { + private SyndicationFeed _feed; + + protected SyndicationFeedFormatter() + { + _feed = null; + } + + protected SyndicationFeedFormatter(SyndicationFeed feedToWrite) + { + if (feedToWrite == null) + { + throw new ArgumentNullException(nameof(feedToWrite)); + } + _feed = feedToWrite; + } + + public SyndicationFeed Feed + { + get + { + return _feed; + } + } + + public abstract string Version { get; } + + public abstract bool CanRead(XmlReader reader); + + public abstract Task ReadFromAsync(XmlReader reader, CancellationToken ct); + + public override string ToString() + { + return string.Format(CultureInfo.CurrentCulture, "{0}, SyndicationVersion={1}", this.GetType(), this.Version); + } + + public abstract Task WriteToAsync(XmlWriter writer, CancellationToken ct); + + internal static protected SyndicationCategory CreateCategory(SyndicationFeed feed) + { + if (feed == null) + { + throw new ArgumentNullException(nameof(feed)); + } + return GetNonNullValue(feed.CreateCategory(), SR.FeedCreatedNullCategory); + } + + internal static protected SyndicationCategory CreateCategory(SyndicationItem item) + { + if (item == null) + { + throw new ArgumentNullException(nameof(item)); + } + return GetNonNullValue(item.CreateCategory(), SR.ItemCreatedNullCategory); + } + + internal static protected SyndicationItem CreateItem(SyndicationFeed feed) + { + if (feed == null) + { + throw new ArgumentNullException(nameof(feed)); + } + return GetNonNullValue(feed.CreateItem(), SR.FeedCreatedNullItem); + } + + internal static protected SyndicationLink CreateLink(SyndicationFeed feed) + { + if (feed == null) + { + throw new ArgumentNullException(nameof(feed)); + } + return GetNonNullValue(feed.CreateLink(), SR.FeedCreatedNullPerson); + } + + internal static protected SyndicationLink CreateLink(SyndicationItem item) + { + if (item == null) + { + throw new ArgumentNullException(nameof(item)); + } + return GetNonNullValue(item.CreateLink(), SR.ItemCreatedNullPerson); + } + + internal static protected SyndicationPerson CreatePerson(SyndicationFeed feed) + { + if (feed == null) + { + throw new ArgumentNullException(nameof(feed)); + } + return GetNonNullValue(feed.CreatePerson(), SR.FeedCreatedNullPerson); + } + + internal static protected SyndicationPerson CreatePerson(SyndicationItem item) + { + if (item == null) + { + throw new ArgumentNullException(nameof(item)); + } + return GetNonNullValue(item.CreatePerson(), SR.ItemCreatedNullPerson); + } + + internal static protected void LoadElementExtensions(XmlReader reader, SyndicationFeed feed, int maxExtensionSize) + { + if (feed == null) + { + throw new ArgumentNullException(nameof(feed)); + } + feed.LoadElementExtensions(reader, maxExtensionSize); + } + + internal static protected void LoadElementExtensions(XmlReader reader, SyndicationItem item, int maxExtensionSize) + { + if (item == null) + { + throw new ArgumentNullException(nameof(item)); + } + item.LoadElementExtensions(reader, maxExtensionSize); + } + + internal static protected void LoadElementExtensions(XmlReader reader, SyndicationCategory category, int maxExtensionSize) + { + if (category == null) + { + throw new ArgumentNullException(nameof(category)); + } + category.LoadElementExtensions(reader, maxExtensionSize); + } + + internal static protected void LoadElementExtensions(XmlReader reader, SyndicationLink link, int maxExtensionSize) + { + if (link == null) + { + throw new ArgumentNullException(nameof(link)); + } + link.LoadElementExtensions(reader, maxExtensionSize); + } + + internal static protected void LoadElementExtensions(XmlReader reader, SyndicationPerson person, int maxExtensionSize) + { + if (person == null) + { + throw new ArgumentNullException(nameof(person)); + } + person.LoadElementExtensions(reader, maxExtensionSize); + } + + internal static protected bool TryParseAttribute(string name, string ns, string value, SyndicationFeed feed, string version) + { + if (feed == null) + { + throw new ArgumentNullException(nameof(feed)); + } + + if (FeedUtils.IsXmlns(name, ns)) + { + return true; + } + + return feed.TryParseAttribute(name, ns, value, version); + } + + internal static protected bool TryParseAttribute(string name, string ns, string value, SyndicationItem item, string version) + { + if (item == null) + { + throw new ArgumentNullException(nameof(item)); + } + if (FeedUtils.IsXmlns(name, ns)) + { + return true; + } + return item.TryParseAttribute(name, ns, value, version); + } + + internal static protected bool TryParseAttribute(string name, string ns, string value, SyndicationCategory category, string version) + { + if (category == null) + { + throw new ArgumentNullException(nameof(category)); + } + if (FeedUtils.IsXmlns(name, ns)) + { + return true; + } + return category.TryParseAttribute(name, ns, value, version); + } + + internal static protected bool TryParseAttribute(string name, string ns, string value, SyndicationLink link, string version) + { + if (link == null) + { + throw new ArgumentNullException(nameof(link)); + } + if (FeedUtils.IsXmlns(name, ns)) + { + return true; + } + return link.TryParseAttribute(name, ns, value, version); + } + + internal static protected bool TryParseAttribute(string name, string ns, string value, SyndicationPerson person, string version) + { + if (person == null) + { + throw new ArgumentNullException(nameof(person)); + } + if (FeedUtils.IsXmlns(name, ns)) + { + return true; + } + return person.TryParseAttribute(name, ns, value, version); + } + + internal static protected bool TryParseContent(XmlReader reader, SyndicationItem item, string contentType, string version, out SyndicationContent content) + { + return item.TryParseContent(reader, contentType, version, out content); + } + + internal static protected bool TryParseElement(XmlReader reader, SyndicationFeed feed, string version) + { + if (feed == null) + { + throw new ArgumentNullException(nameof(feed)); + } + + return feed.TryParseElement(reader, version); + } + + internal static protected bool TryParseElement(XmlReader reader, SyndicationItem item, string version) + { + if (item == null) + { + throw new ArgumentNullException(nameof(item)); + } + return item.TryParseElement(reader, version); + } + + internal static protected bool TryParseElement(XmlReader reader, SyndicationCategory category, string version) + { + if (category == null) + { + throw new ArgumentNullException(nameof(category)); + } + return category.TryParseElement(reader, version); + } + + internal static protected bool TryParseElement(XmlReader reader, SyndicationLink link, string version) + { + if (link == null) + { + throw new ArgumentNullException(nameof(link)); + } + return link.TryParseElement(reader, version); + } + + internal static protected bool TryParseElement(XmlReader reader, SyndicationPerson person, string version) + { + if (person == null) + { + throw new ArgumentNullException(nameof(person)); + } + return person.TryParseElement(reader, version); + } + + internal static protected async Task WriteAttributeExtensionsAsync(XmlWriter writer, SyndicationFeed feed, string version) + { + if (feed == null) + { + throw new ArgumentNullException(nameof(feed)); + } + await feed.WriteAttributeExtensionsAsync(writer, version); + } + + internal static protected Task WriteAttributeExtensionsAsync(XmlWriter writer, SyndicationItem item, string version) + { + if (item == null) + { + throw new ArgumentNullException(nameof(item)); + } + return item.WriteAttributeExtensionsAsync(writer, version); + } + + internal static protected Task WriteAttributeExtensionsAsync(XmlWriter writer, SyndicationCategory category, string version) + { + if (category == null) + { + throw new ArgumentNullException(nameof(category)); + } + return category.WriteAttributeExtensionsAsync(writer, version); + } + + internal static protected Task WriteAttributeExtensions(XmlWriter writer, SyndicationLink link, string version) + { + if (link == null) + { + throw new ArgumentNullException(nameof(link)); + } + return link.WriteAttributeExtensionsAsync(writer, version); + } + + internal static protected Task WriteAttributeExtensionsAsync(XmlWriter writer, SyndicationPerson person, string version) + { + if (person == null) + { + throw new ArgumentNullException(nameof(person)); + } + return person.WriteAttributeExtensionsAsync(writer, version); + } + + internal static protected Task WriteElementExtensionsAsync(XmlWriter writer, SyndicationFeed feed, string version) + { + if (feed == null) + { + throw new ArgumentNullException(nameof(feed)); + } + return feed.WriteElementExtensionsAsync(writer, version); + } + + internal static protected Task WriteElementExtensionsAsync(XmlWriter writer, SyndicationItem item, string version) + { + if (item == null) + { + throw new ArgumentNullException(nameof(item)); + } + return item.WriteElementExtensionsAsync(writer, version); + } + + internal static protected Task WriteElementExtensionsAsync(XmlWriter writer, SyndicationCategory category, string version) + { + if (category == null) + { + throw new ArgumentNullException(nameof(category)); + } + return category.WriteElementExtensionsAsync(writer, version); + } + + internal static protected Task WriteElementExtensionsAsync(XmlWriter writer, SyndicationLink link, string version) + { + if (link == null) + { + throw new ArgumentNullException(nameof(link)); + } + return link.WriteElementExtensionsAsync(writer, version); + } + + internal static protected Task WriteElementExtensionsAsync(XmlWriter writer, SyndicationPerson person, string version) + { + if (person == null) + { + throw new ArgumentNullException(nameof(person)); + } + + return person.WriteElementExtensionsAsync(writer, version); + } + + internal protected virtual void SetFeed(SyndicationFeed feed) { + _feed = feed ?? throw new ArgumentNullException(nameof(feed)); + } + + internal static void CloseBuffer(XmlBuffer buffer, XmlDictionaryWriter extWriter) + { + + if (buffer == null) + { + return; + } + extWriter.WriteEndElement(); + buffer.CloseSection(); + buffer.Close(); + } + + internal static async Task> CreateBufferIfRequiredAndWriteNodeAsync(XmlBuffer buffer, XmlDictionaryWriter extWriter, XmlReader reader, int maxExtensionSize) + { + if (buffer == null) + { + buffer = new XmlBuffer(maxExtensionSize); + extWriter = buffer.OpenSection(XmlDictionaryReaderQuotas.Max); + extWriter.WriteStartElement(Rss20Constants.ExtensionWrapperTag); + } + + XmlDictionaryReader dictionaryReader = reader as XmlDictionaryReader; + if (dictionaryReader != null) + { + // Reimplementing WriteNode for XmlDictionaryWriter asynchronously depends on multiple internal methods + // so isn't feasible to reimplement here. As the primary scenario will be usage with an XmlReader which + // isn't an XmlDictionaryReader, deferring to the synchronous implementation is a reasonable fallback. + extWriter.WriteNode(reader, false); + } + else + { + await extWriter.WriteNodeAsync(reader, false); + } + + return Tuple.Create(buffer, extWriter); + } + + internal static SyndicationFeed CreateFeedInstance(Type feedType) + { + if (feedType.Equals(typeof(SyndicationFeed))) + { + return new SyndicationFeed(); + } + else + { + return (SyndicationFeed)Activator.CreateInstance(feedType); + } + } + + internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, SyndicationFeed feed) + { + if (feed == null) + { + throw new ArgumentNullException(nameof(feed)); + } + + CloseBuffer(buffer, writer); + feed.LoadElementExtensions(buffer); + } + + internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, SyndicationItem item) + { + + if (item == null) + { + throw new ArgumentNullException(nameof(item)); + } + CloseBuffer(buffer, writer); + item.LoadElementExtensions(buffer); + } + + internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, SyndicationCategory category) + { + if (category == null) + { + throw new ArgumentNullException(nameof(category)); + } + + CloseBuffer(buffer, writer); + category.LoadElementExtensions(buffer); + } + + internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, SyndicationLink link) + { + if (link == null) + { + throw new ArgumentNullException(nameof(link)); + } + + CloseBuffer(buffer, writer); + link.LoadElementExtensions(buffer); + } + + internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, SyndicationPerson person) + { + if (person == null) + { + throw new ArgumentNullException(nameof(person)); + } + + CloseBuffer(buffer, writer); + person.LoadElementExtensions(buffer); + } + + internal static async Task MoveToStartElementAsync(XmlReaderWrapper reader) + { + if (!await reader.IsStartElementAsync()) + { + XmlExceptionHelper.ThrowStartElementExpected(XmlDictionaryReader.CreateDictionaryReader(reader)); + } + } + + internal static void MoveToStartElement(XmlReader reader) + { + if (!reader.IsStartElement()) + { + XmlExceptionHelper.ThrowStartElementExpected(XmlDictionaryReader.CreateDictionaryReader(reader)); + } + } + + + protected abstract SyndicationFeed CreateFeedInstance(); + + private static T GetNonNullValue(T value, string errorMsg) + { + return value; + } + + private static class XmlExceptionHelper + { + private static void ThrowXmlException(XmlDictionaryReader reader, string res, string arg1) + { + string s = string.Format(res, arg1); + IXmlLineInfo lineInfo = reader as IXmlLineInfo; + if (lineInfo != null && lineInfo.HasLineInfo()) + { + s += " " + string.Format(SR.XmlLineInfo, lineInfo.LineNumber, lineInfo.LinePosition); + } + + throw new XmlException(s); + } + + private static string GetName(string prefix, string localName) + { + if (prefix.Length == 0) + return localName; + else + return string.Concat(prefix, ":", localName); + } + + private static string GetWhatWasFound(XmlDictionaryReader reader) + { + if (reader.EOF) + return SR.XmlFoundEndOfFile; + switch (reader.NodeType) + { + case XmlNodeType.Element: + return string.Format(SR.XmlFoundElement, GetName(reader.Prefix, reader.LocalName), reader.NamespaceURI); + case XmlNodeType.EndElement: + return string.Format(SR.XmlFoundEndElement, GetName(reader.Prefix, reader.LocalName), reader.NamespaceURI); + case XmlNodeType.Text: + case XmlNodeType.Whitespace: + case XmlNodeType.SignificantWhitespace: + return string.Format(SR.XmlFoundText, reader.Value); + case XmlNodeType.Comment: + return string.Format(SR.XmlFoundComment, reader.Value); + case XmlNodeType.CDATA: + return string.Format(SR.XmlFoundCData, reader.Value); + } + return string.Format(SR.XmlFoundNodeType, reader.NodeType); + } + + static public void ThrowStartElementExpected(XmlDictionaryReader reader) + { + ThrowXmlException(reader, SR.XmlStartElementExpected, GetWhatWasFound(reader)); + } + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/SyndicationItem.cs b/src/System.ServiceModel.Syndication/src/SyndicationItem.cs new file mode 100644 index 000000000000..a9041fa1a33e --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/SyndicationItem.cs @@ -0,0 +1,319 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using Microsoft.ServiceModel.Syndication.Resources; + using System; + using System.Collections.Generic; + using System.Collections.ObjectModel; + using System.Threading.Tasks; + using System.Xml; + + // NOTE: This class implements Clone so if you add any members, please update the copy ctor + public class SyndicationItem : IExtensibleSyndicationObject + { + private Collection _authors; + private Uri _baseUri; + private Collection _categories; + private SyndicationContent _content; + private Collection _contributors; + private TextSyndicationContent _copyright; + private ExtensibleSyndicationObject _extensions = new ExtensibleSyndicationObject(); + private string _id; + private DateTimeOffset _lastUpdatedTime; + private Collection _links; + private DateTimeOffset _publishDate; + private SyndicationFeed _sourceFeed; + private TextSyndicationContent _summary; + private TextSyndicationContent _title; + + public SyndicationItem() + : this(null, null, null) + { + } + + public SyndicationItem(string title, string content, Uri itemAlternateLink) + : this(title, content, itemAlternateLink, null, DateTimeOffset.MinValue) + { + } + + public SyndicationItem(string title, string content, Uri itemAlternateLink, string id, DateTimeOffset lastUpdatedTime) + : this(title, (content != null) ? new TextSyndicationContent(content) : null, itemAlternateLink, id, lastUpdatedTime) + { + } + + public SyndicationItem(string title, SyndicationContent content, Uri itemAlternateLink, string id, DateTimeOffset lastUpdatedTime) + { + if (title != null) + { + this.Title = new TextSyndicationContent(title); + } + + _content = content; + if (itemAlternateLink != null) + { + this.Links.Add(SyndicationLink.CreateAlternateLink(itemAlternateLink)); + } + _id = id; + _lastUpdatedTime = lastUpdatedTime; + } + + protected SyndicationItem(SyndicationItem source) + { + if (source == null) + { + throw new ArgumentNullException(nameof(source)); + } + _extensions = source._extensions.Clone(); + _authors = FeedUtils.ClonePersons(source._authors); + _categories = FeedUtils.CloneCategories(source._categories); + _content = (source._content != null) ? source._content.Clone() : null; + _contributors = FeedUtils.ClonePersons(source._contributors); + _copyright = FeedUtils.CloneTextContent(source._copyright); + _id = source._id; + _lastUpdatedTime = source._lastUpdatedTime; + _links = FeedUtils.CloneLinks(source._links); + _publishDate = source._publishDate; + if (source.SourceFeed != null) + { + _sourceFeed = source._sourceFeed.Clone(false); + _sourceFeed.Items = new Collection(); + } + _summary = FeedUtils.CloneTextContent(source._summary); + _baseUri = source._baseUri; + _title = FeedUtils.CloneTextContent(source._title); + } + + public Dictionary AttributeExtensions + { + get { return _extensions.AttributeExtensions; } + } + + public Collection Authors + { + get + { + if (_authors == null) + { + _authors = new NullNotAllowedCollection(); + } + return _authors; + } + } + + public Uri BaseUri + { + get { return _baseUri; } + set { _baseUri = value; } + } + + public Collection Categories + { + get + { + if (_categories == null) + { + _categories = new NullNotAllowedCollection(); + } + return _categories; + } + } + + public SyndicationContent Content + { + get { return _content; } + set { _content = value; } + } + + public Collection Contributors + { + get + { + if (_contributors == null) + { + _contributors = new NullNotAllowedCollection(); + } + return _contributors; + } + } + + public TextSyndicationContent Copyright + { + get { return _copyright; } + set { _copyright = value; } + } + + public SyndicationElementExtensionCollection ElementExtensions + { + get { return _extensions.ElementExtensions; } + } + + public string Id + { + get { return _id; } + set { _id = value; } + } + + public DateTimeOffset LastUpdatedTime + { + get { return _lastUpdatedTime; } + set { _lastUpdatedTime = value; } + } + + public Collection Links + { + get + { + if (_links == null) + { + _links = new NullNotAllowedCollection(); + } + return _links; + } + } + + public DateTimeOffset PublishDate + { + get { return _publishDate; } + set { _publishDate = value; } + } + + public SyndicationFeed SourceFeed + { + get { return _sourceFeed; } + set { _sourceFeed = value; } + } + + public TextSyndicationContent Summary + { + get { return _summary; } + set { _summary = value; } + } + + public TextSyndicationContent Title + { + get { return _title; } + set { _title = value; } + } + + public static Task LoadAsync(XmlReader reader) + { + return LoadAsync(reader); + } + + public static async Task LoadAsync(XmlReader reader) + where TSyndicationItem : SyndicationItem, new() + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + + Rss20ItemFormatter rssSerializer = new Rss20ItemFormatter(); + + if (rssSerializer.CanRead(reader)) + { + await rssSerializer.ReadFromAsync(reader); + return rssSerializer.Item as TSyndicationItem; + } + + throw new XmlException(string.Format(SR.UnknownItemXml, reader.LocalName, reader.NamespaceURI)); + } + + + public void AddPermalink(Uri permalink) + { + if (permalink == null) + { + throw new ArgumentNullException(nameof(permalink)); + } + this.Id = permalink.AbsoluteUri; + this.Links.Add(SyndicationLink.CreateAlternateLink(permalink)); + } + + public virtual SyndicationItem Clone() + { + return new SyndicationItem(this); + } + + public Atom10ItemFormatter GetAtom10Formatter() + { + return new Atom10ItemFormatter(this); + } + + public Rss20ItemFormatter GetRss20Formatter() + { + return GetRss20Formatter(true); + } + + public Rss20ItemFormatter GetRss20Formatter(bool serializeExtensionsAsAtom) + { + return new Rss20ItemFormatter(this, serializeExtensionsAsAtom); + } + + public Task SaveAsAtom10(XmlWriter writer) + { + return GetAtom10Formatter().WriteToAsync(writer); + } + + public Task SaveAsRss20(XmlWriter writer) + { + return GetRss20Formatter().WriteToAsync(writer); + } + + protected internal virtual SyndicationCategory CreateCategory() + { + return new SyndicationCategory(); + } + + protected internal virtual SyndicationLink CreateLink() + { + return new SyndicationLink(); + } + + protected internal virtual SyndicationPerson CreatePerson() + { + return new SyndicationPerson(); + } + + protected internal virtual bool TryParseAttribute(string name, string ns, string value, string version) + { + return false; + } + + protected internal virtual bool TryParseContent(XmlReader reader, string contentType, string version, out SyndicationContent content) + { + content = null; + return false; + } + + protected internal virtual bool TryParseElement(XmlReader reader, string version) + { + return false; + } + + protected internal virtual Task WriteAttributeExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteAttributeExtensionsAsync(writer); + } + + protected internal virtual Task WriteElementExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteElementExtensionsAsync(writer); + } + + internal void LoadElementExtensions(XmlReader readerOverUnparsedExtensions, int maxExtensionSize) + { + _extensions.LoadElementExtensions(readerOverUnparsedExtensions, maxExtensionSize); + } + + internal void LoadElementExtensions(XmlBuffer buffer) + { + _extensions.LoadElementExtensions(buffer); + } + } +} + + diff --git a/src/System.ServiceModel.Syndication/src/SyndicationItemFormatter.cs b/src/System.ServiceModel.Syndication/src/SyndicationItemFormatter.cs new file mode 100644 index 000000000000..1a25cf59846a --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/SyndicationItemFormatter.cs @@ -0,0 +1,220 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Globalization; + using System.Runtime.CompilerServices; + using System.Runtime.Serialization; + using System.Threading.Tasks; + using System.Xml; + + [DataContract] + public abstract class SyndicationItemFormatter + { + private SyndicationItem _item; + + protected SyndicationItemFormatter() + { + _item = null; + } + + protected SyndicationItemFormatter(SyndicationItem itemToWrite) + { + if (itemToWrite == null) + { + throw new ArgumentNullException(nameof(itemToWrite)); + } + _item = itemToWrite; + } + + public SyndicationItem Item + { + get + { + return _item; + } + } + + public abstract String Version + { get; } + + public abstract bool CanRead(XmlReader reader); + + public abstract Task ReadFromAsync(XmlReader reader); + + public override string ToString() + { + return string.Format(CultureInfo.CurrentCulture, "{0}, SyndicationVersion={1}", this.GetType(), this.Version); + } + + public abstract Task WriteToAsync(XmlWriter writer); + + internal protected virtual void SetItem(SyndicationItem item) + { + if (item == null) + { + throw new ArgumentNullException(nameof(item)); + } + _item = item; + } + + internal static SyndicationItem CreateItemInstance(Type itemType) + { + if (itemType.Equals(typeof(SyndicationItem))) + { + return new SyndicationItem(); + } + else + { + return (SyndicationItem)Activator.CreateInstance(itemType); + } + } + + internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, SyndicationItem item) + { + SyndicationFeedFormatter.LoadElementExtensions(buffer, writer, item); + } + + internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, SyndicationCategory category) + { + SyndicationFeedFormatter.LoadElementExtensions(buffer, writer, category); + } + + internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, SyndicationLink link) + { + SyndicationFeedFormatter.LoadElementExtensions(buffer, writer, link); + } + + internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, SyndicationPerson person) + { + SyndicationFeedFormatter.LoadElementExtensions(buffer, writer, person); + } + + protected static SyndicationCategory CreateCategory(SyndicationItem item) + { + return SyndicationFeedFormatter.CreateCategory(item); + } + + protected static SyndicationLink CreateLink(SyndicationItem item) + { + return SyndicationFeedFormatter.CreateLink(item); + } + + protected static SyndicationPerson CreatePerson(SyndicationItem item) + { + return SyndicationFeedFormatter.CreatePerson(item); + } + + protected static void LoadElementExtensions(XmlReader reader, SyndicationItem item, int maxExtensionSize) + { + SyndicationFeedFormatter.LoadElementExtensions(reader, item, maxExtensionSize); + } + + protected static void LoadElementExtensions(XmlReader reader, SyndicationCategory category, int maxExtensionSize) + { + SyndicationFeedFormatter.LoadElementExtensions(reader, category, maxExtensionSize); + } + + protected static void LoadElementExtensions(XmlReader reader, SyndicationLink link, int maxExtensionSize) + { + SyndicationFeedFormatter.LoadElementExtensions(reader, link, maxExtensionSize); + } + + protected static void LoadElementExtensions(XmlReader reader, SyndicationPerson person, int maxExtensionSize) + { + SyndicationFeedFormatter.LoadElementExtensions(reader, person, maxExtensionSize); + } + + protected static bool TryParseAttribute(string name, string ns, string value, SyndicationItem item, string version) + { + return SyndicationFeedFormatter.TryParseAttribute(name, ns, value, item, version); + } + + protected static bool TryParseAttribute(string name, string ns, string value, SyndicationCategory category, string version) + { + return SyndicationFeedFormatter.TryParseAttribute(name, ns, value, category, version); + } + + protected static bool TryParseAttribute(string name, string ns, string value, SyndicationLink link, string version) + { + return SyndicationFeedFormatter.TryParseAttribute(name, ns, value, link, version); + } + + protected static bool TryParseAttribute(string name, string ns, string value, SyndicationPerson person, string version) + { + return SyndicationFeedFormatter.TryParseAttribute(name, ns, value, person, version); + } + + + protected static bool TryParseContent(XmlReader reader, SyndicationItem item, string contentType, string version, out SyndicationContent content) + { + return SyndicationFeedFormatter.TryParseContent(reader, item, contentType, version, out content); + } + + + protected static bool TryParseElement(XmlReader reader, SyndicationItem item, string version) + { + return SyndicationFeedFormatter.TryParseElement(reader, item, version); + } + + protected static bool TryParseElement(XmlReader reader, SyndicationCategory category, string version) + { + return SyndicationFeedFormatter.TryParseElement(reader, category, version); + } + + protected static bool TryParseElement(XmlReader reader, SyndicationLink link, string version) + { + return SyndicationFeedFormatter.TryParseElement(reader, link, version); + } + + protected static bool TryParseElement(XmlReader reader, SyndicationPerson person, string version) + { + return SyndicationFeedFormatter.TryParseElement(reader, person, version); + } + + protected static async Task WriteAttributeExtensionsAsync(XmlWriter writer, SyndicationItem item, string version) + { + await SyndicationFeedFormatter.WriteAttributeExtensionsAsync(writer, item, version); + } + + protected static async Task WriteAttributeExtensionsAsync(XmlWriter writer, SyndicationCategory category, string version) + { + await SyndicationFeedFormatter.WriteAttributeExtensionsAsync(writer, category, version); + } + + protected static async Task WriteAttributeExtensionsAsync(XmlWriter writer, SyndicationLink link, string version) + { + await SyndicationFeedFormatter.WriteAttributeExtensions(writer, link, version); + } + + protected static async Task WriteAttributeExtensionsAsync(XmlWriter writer, SyndicationPerson person, string version) + { + await SyndicationFeedFormatter.WriteAttributeExtensionsAsync(writer, person, version); + } + + protected static async Task WriteElementExtensionsAsync(XmlWriter writer, SyndicationItem item, string version) + { + await SyndicationFeedFormatter.WriteElementExtensionsAsync(writer, item, version); + } + + protected abstract SyndicationItem CreateItemInstance(); + + protected Task WriteElementExtensionsAsync(XmlWriter writer, SyndicationCategory category, string version) + { + return SyndicationFeedFormatter.WriteElementExtensionsAsync(writer, category, version); + } + + protected Task WriteElementExtensionsAsync(XmlWriter writer, SyndicationLink link, string version) + { + return SyndicationFeedFormatter.WriteElementExtensionsAsync(writer, link, version); + } + + protected Task WriteElementExtensionsAsync(XmlWriter writer, SyndicationPerson person, string version) + { + return SyndicationFeedFormatter.WriteElementExtensionsAsync(writer, person, version); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/SyndicationLink.cs b/src/System.ServiceModel.Syndication/src/SyndicationLink.cs new file mode 100644 index 000000000000..aef875d360ac --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/SyndicationLink.cs @@ -0,0 +1,199 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Collections.Generic; + using System.Runtime.CompilerServices; + using System.Threading.Tasks; + using System.Xml; + + // NOTE: This class implements Clone so if you add any members, please update the copy ctor + public class SyndicationLink : IExtensibleSyndicationObject + { + private Uri _baseUri; + private ExtensibleSyndicationObject _extensions = new ExtensibleSyndicationObject(); + private long _length; + private string _mediaType; + private string _relationshipType; + private string _title; + private Uri _uri; + + public SyndicationLink(Uri uri) + : this(uri, null, null, null, 0) + { + } + + public SyndicationLink(Uri uri, string relationshipType, string title, string mediaType, long length) + { + if (length < 0) + { + throw new ArgumentOutOfRangeException(nameof(length)); + } + _baseUri = null; + _uri = uri; + _title = title; + _relationshipType = relationshipType; + _mediaType = mediaType; + _length = length; + } + + public SyndicationLink() + : this(null, null, null, null, 0) + { + } + + protected SyndicationLink(SyndicationLink source) + { + if (source == null) + { + throw new ArgumentNullException(nameof(source)); + } + _length = source._length; + _mediaType = source._mediaType; + _relationshipType = source._relationshipType; + _title = source._title; + _baseUri = source._baseUri; + _uri = source._uri; + _extensions = source._extensions.Clone(); + } + + public Dictionary AttributeExtensions + { + get { return _extensions.AttributeExtensions; } + } + + public Uri BaseUri + { + get { return _baseUri; } + set { _baseUri = value; } + } + + public SyndicationElementExtensionCollection ElementExtensions + { + get { return _extensions.ElementExtensions; } + } + + public long Length + { + get { return _length; } + set + { + if (value < 0) + { + throw new ArgumentOutOfRangeException(nameof(value)); + } + _length = value; + } + } + + public string MediaType + { + get { return _mediaType; } + set { _mediaType = value; } + } + + public string RelationshipType + { + get { return _relationshipType; } + set { _relationshipType = value; } + } + + public string Title + { + get { return _title; } + set { _title = value; } + } + + public Uri Uri + { + get { return _uri; } + set { _uri = value; } + } + + public static SyndicationLink CreateAlternateLink(Uri uri) + { + return CreateAlternateLink(uri, null); + } + + public static SyndicationLink CreateAlternateLink(Uri uri, string mediaType) + { + return new SyndicationLink(uri, Atom10Constants.AlternateTag, null, mediaType, 0); + } + + public static SyndicationLink CreateMediaEnclosureLink(Uri uri, string mediaType, long length) + { + return new SyndicationLink(uri, Rss20Constants.EnclosureTag, null, mediaType, length); + } + + public static SyndicationLink CreateSelfLink(Uri uri) + { + return CreateSelfLink(uri, null); + } + + public static SyndicationLink CreateSelfLink(Uri uri, string mediaType) + { + return new SyndicationLink(uri, Atom10Constants.SelfTag, null, mediaType, 0); + } + + public virtual SyndicationLink Clone() + { + return new SyndicationLink(this); + } + + public Uri GetAbsoluteUri() + { + if (_uri != null) + { + if (_uri.IsAbsoluteUri) + { + return _uri; + } + else if (_baseUri != null) + { + return new Uri(_baseUri, _uri); + } + else + { + return null; + } + } + else + { + return null; + } + } + + protected internal virtual bool TryParseAttribute(string name, string ns, string value, string version) + { + return false; + } + + protected internal virtual bool TryParseElement(XmlReader reader, string version) + { + return false; + } + + protected internal virtual Task WriteAttributeExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteAttributeExtensionsAsync(writer); + } + + protected internal virtual Task WriteElementExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteElementExtensionsAsync(writer); + } + + internal void LoadElementExtensions(XmlReader readerOverUnparsedExtensions, int maxExtensionSize) + { + _extensions.LoadElementExtensions(readerOverUnparsedExtensions, maxExtensionSize); + } + + internal void LoadElementExtensions(XmlBuffer buffer) + { + _extensions.LoadElementExtensions(buffer); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/SyndicationPerson.cs b/src/System.ServiceModel.Syndication/src/SyndicationPerson.cs new file mode 100644 index 000000000000..7b90984555b9 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/SyndicationPerson.cs @@ -0,0 +1,116 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; + using System.Runtime.CompilerServices; + using System.Threading.Tasks; + using System.Xml; + + // NOTE: This class implements Clone so if you add any members, please update the copy ctor + public class SyndicationPerson : IExtensibleSyndicationObject + { + private string _email; + private ExtensibleSyndicationObject _extensions = new ExtensibleSyndicationObject(); + private string _name; + private string _uri; + + public SyndicationPerson() + : this((string)null) + { + } + + public SyndicationPerson(string email) + : this(email, null, null) + { + } + + [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "2#", Justification = "The Uri represents a unique category and not a network location")] + public SyndicationPerson(string email, string name, string uri) + { + _name = name; + _email = email; + _uri = uri; + } + + protected SyndicationPerson(SyndicationPerson source) + { + if (source == null) + { + throw new ArgumentNullException(nameof(source)); + } + _email = source._email; + _name = source._name; + _uri = source._uri; + _extensions = source._extensions.Clone(); + } + + public Dictionary AttributeExtensions + { + get { return _extensions.AttributeExtensions; } + } + + public SyndicationElementExtensionCollection ElementExtensions + { + get { return _extensions.ElementExtensions; } + } + + public string Email + { + get { return _email; } + set { _email = value; } + } + + public string Name + { + get { return _name; } + set { _name = value; } + } + + [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings", Scope = "property", Justification = "The Uri represents a unique category and not a network location")] + public string Uri + { + get { return _uri; } + set { _uri = value; } + } + + public virtual SyndicationPerson Clone() + { + return new SyndicationPerson(this); + } + + protected internal virtual bool TryParseAttribute(string name, string ns, string value, string version) + { + return false; + } + + protected internal virtual bool TryParseElement(XmlReader reader, string version) + { + return false; + } + + protected internal virtual Task WriteAttributeExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteAttributeExtensionsAsync(writer); + } + + protected internal virtual Task WriteElementExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteElementExtensionsAsync(writer); + } + + internal void LoadElementExtensions(XmlReader readerOverUnparsedExtensions, int maxExtensionSize) + { + _extensions.LoadElementExtensions(readerOverUnparsedExtensions, maxExtensionSize); + } + + internal void LoadElementExtensions(XmlBuffer buffer) + { + _extensions.LoadElementExtensions(buffer); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/SyndicationVersions.cs b/src/System.ServiceModel.Syndication/src/SyndicationVersions.cs new file mode 100644 index 000000000000..168f0466e015 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/SyndicationVersions.cs @@ -0,0 +1,14 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System.Runtime.CompilerServices; + + public static class SyndicationVersions + { + public const string Atom10 = "Atom10"; + public const string Rss20 = "Rss20"; + } +} diff --git a/src/System.ServiceModel.Syndication/src/System/ServiceModel/Channels/UriGenerator.cs b/src/System.ServiceModel.Syndication/src/System/ServiceModel/Channels/UriGenerator.cs new file mode 100644 index 000000000000..fc2f4774f9b3 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/System/ServiceModel/Channels/UriGenerator.cs @@ -0,0 +1,45 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.ServiceModel.Channels +{ + using System.Threading; + using System.Globalization; + using Microsoft.ServiceModel; + using Microsoft.ServiceModel.Syndication.Resources; + + internal class UriGenerator + { + private long _id; + private string _prefix; + + public UriGenerator() + : this("uuid") + { + } + + public UriGenerator(string scheme) + : this(scheme, ";") + { + } + + public UriGenerator(string scheme, string delimiter) + { + if (scheme == null) + throw new ArgumentException("scheme"); + //throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("scheme")); + + if (scheme.Length == 0) + throw new ArgumentException(string.Format(SR.UriGeneratorSchemeMustNotBeEmpty, "scheme")); + + _prefix = string.Concat(scheme, ":", Guid.NewGuid().ToString(), delimiter, "id="); + } + + public string Next() + { + long nextId = Interlocked.Increment(ref _id); + return _prefix + nextId.ToString(CultureInfo.InvariantCulture); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/TextSyndicationContent.cs b/src/System.ServiceModel.Syndication/src/TextSyndicationContent.cs new file mode 100644 index 000000000000..1c7d02735643 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/TextSyndicationContent.cs @@ -0,0 +1,81 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Runtime.CompilerServices; + using System.Xml; + + // NOTE: This class implements Clone so if you add any members, please update the copy ctor + public class TextSyndicationContent : SyndicationContent + { + private string _text; + private TextSyndicationContentKind _textKind; + + public TextSyndicationContent(string text) : this(text, TextSyndicationContentKind.Plaintext) + { + } + + public TextSyndicationContent(string text, TextSyndicationContentKind textKind) + { + if (!TextSyndicationContentKindHelper.IsDefined(textKind)) + { + throw new ArgumentOutOfRangeException(nameof(textKind)); + } + _text = text; + _textKind = textKind; + } + + protected TextSyndicationContent(TextSyndicationContent source) + : base(source) + { + if (source == null) + { + throw new ArgumentNullException(nameof(source)); + } + _text = source._text; + _textKind = source._textKind; + } + + public string Text + { + get { return _text; } + } + + public override string Type + { + get + { + switch (_textKind) + { + case TextSyndicationContentKind.Html: + return Atom10Constants.HtmlType; + case TextSyndicationContentKind.XHtml: + return Atom10Constants.XHtmlType; + default: + return Atom10Constants.PlaintextType; + } + } + } + + public override SyndicationContent Clone() + { + return new TextSyndicationContent(this); + } + + protected override void WriteContentsTo(XmlWriter writer) + { + string val = _text ?? string.Empty; + if (_textKind == TextSyndicationContentKind.XHtml) + { + writer.WriteRaw(val); + } + else + { + writer.WriteString(val); + } + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/TextSyndicationContentKind.cs b/src/System.ServiceModel.Syndication/src/TextSyndicationContentKind.cs new file mode 100644 index 000000000000..5a1513b5bc8b --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/TextSyndicationContentKind.cs @@ -0,0 +1,15 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System.Runtime.CompilerServices; + + public enum TextSyndicationContentKind + { + Plaintext, + Html, + XHtml + } +} diff --git a/src/System.ServiceModel.Syndication/src/TextSyndicationContentKindHelper.cs b/src/System.ServiceModel.Syndication/src/TextSyndicationContentKindHelper.cs new file mode 100644 index 000000000000..af5cb9f2bb5d --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/TextSyndicationContentKindHelper.cs @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + internal static class TextSyndicationContentKindHelper + { + public static bool IsDefined(TextSyndicationContentKind kind) + { + return (kind == TextSyndicationContentKind.Plaintext + || kind == TextSyndicationContentKind.Html + || kind == TextSyndicationContentKind.XHtml); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/UrlSyndicationContent.cs b/src/System.ServiceModel.Syndication/src/UrlSyndicationContent.cs new file mode 100644 index 000000000000..a76af8caa168 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/UrlSyndicationContent.cs @@ -0,0 +1,58 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Runtime.CompilerServices; + using System.Xml; + + // NOTE: This class implements Clone so if you add any members, please update the copy ctor + public class UrlSyndicationContent : SyndicationContent + { + private string _mediaType; + private Uri _url; + + public UrlSyndicationContent(Uri url, string mediaType) : base() + { + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + _url = url; + _mediaType = mediaType; + } + + protected UrlSyndicationContent(UrlSyndicationContent source) + : base(source) + { + if (source == null) + { + throw new ArgumentNullException(nameof(source)); + } + _url = source._url; + _mediaType = source._mediaType; + } + + public override string Type + { + get { return _mediaType; } + } + + public Uri Url + { + get { return _url; } + } + + public override SyndicationContent Clone() + { + return new UrlSyndicationContent(this); + } + + protected override void WriteContentsTo(XmlWriter writer) + { + writer.WriteAttributeString(Atom10Constants.SourceTag, string.Empty, FeedUtils.GetUriString(_url)); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/Workspace.cs b/src/System.ServiceModel.Syndication/src/Workspace.cs new file mode 100644 index 000000000000..e5f9f70e846d --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/Workspace.cs @@ -0,0 +1,118 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Collections.Generic; + using System.Collections.ObjectModel; + using System.Runtime.CompilerServices; + using System.Threading.Tasks; + using System.Xml; + + public class Workspace : IExtensibleSyndicationObject + { + private Uri _baseUri; + private Collection _collections; + private ExtensibleSyndicationObject _extensions = new ExtensibleSyndicationObject(); + private TextSyndicationContent _title; + + public Workspace() + { + } + + public Workspace(string title, IEnumerable collections) + : this((title != null) ? new TextSyndicationContent(title) : null, collections) + { + } + + public Workspace(TextSyndicationContent title, IEnumerable collections) + { + _title = title; + if (collections != null) + { + _collections = new NullNotAllowedCollection(); + foreach (ResourceCollectionInfo collection in collections) + { + _collections.Add(collection); + } + } + } + + public Dictionary AttributeExtensions + { + get + { + return _extensions.AttributeExtensions; + } + } + + public Uri BaseUri + { + get { return _baseUri; } + set { _baseUri = value; } + } + + public Collection Collections + { + get + { + if (_collections == null) + { + _collections = new NullNotAllowedCollection(); + } + return _collections; + } + } + + public SyndicationElementExtensionCollection ElementExtensions + { + get + { + return _extensions.ElementExtensions; + } + } + + public TextSyndicationContent Title + { + get { return _title; } + set { _title = value; } + } + + protected internal virtual ResourceCollectionInfo CreateResourceCollection() + { + return new ResourceCollectionInfo(); + } + + protected internal virtual bool TryParseAttribute(string name, string ns, string value, string version) + { + return false; + } + + protected internal virtual bool TryParseElement(XmlReader reader, string version) + { + return false; + } + + protected internal virtual Task WriteAttributeExtensions(XmlWriter writer, string version) + { + return _extensions.WriteAttributeExtensionsAsync(writer); + } + + protected internal virtual Task WriteElementExtensionsAsync(XmlWriter writer, string version) + { + return _extensions.WriteElementExtensionsAsync(writer); + } + + internal void LoadElementExtensions(XmlReaderWrapper readerOverUnparsedExtensions, int maxExtensionSize) + { + _extensions.LoadElementExtensions(readerOverUnparsedExtensions, maxExtensionSize); + } + + internal void LoadElementExtensions(XmlBuffer buffer) + { + _extensions.LoadElementExtensions(buffer); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/XmlBuffer.cs b/src/System.ServiceModel.Syndication/src/XmlBuffer.cs new file mode 100644 index 000000000000..e37423d5cb74 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/XmlBuffer.cs @@ -0,0 +1,152 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel +{ + using Microsoft.ServiceModel.Syndication.Resources; + using System; + using System.Collections.Generic; + using System.IO; + using System.Xml; + + internal class XmlBuffer + { + private List
_sections; + private byte[] _buffer; + private int _offset; + private BufferedStream _stream; + private BufferState _bufferState; + private XmlDictionaryWriter _writer; + private XmlDictionaryReaderQuotas _quotas; + + private enum BufferState + { + Created, + Writing, + Reading, + } + + private struct Section + { + private int _offset; + private int _size; + private XmlDictionaryReaderQuotas _quotas; + + public Section(int offset, int size, XmlDictionaryReaderQuotas quotas) + { + _offset = offset; + _size = size; + _quotas = quotas; + } + + public int Offset + { + get { return _offset; } + } + + public int Size + { + get { return _size; } + } + + public XmlDictionaryReaderQuotas Quotas + { + get { return _quotas; } + } + } + + public XmlBuffer(int maxBufferSize) + { + if (maxBufferSize < 0) + throw new ArgumentOutOfRangeException(nameof(maxBufferSize), maxBufferSize, SR.ValueMustBeNonNegative); + + int initialBufferSize = Math.Min(512, maxBufferSize); + _stream = new BufferedStream(new MemoryStream(), initialBufferSize); + _sections = new List
(1); + } + + public int BufferSize + { + get + { + return _buffer.Length; + } + } + + public int SectionCount + { + get { return _sections.Count; } + } + + public XmlDictionaryWriter OpenSection(XmlDictionaryReaderQuotas quotas) + { + if (_bufferState != BufferState.Created) + throw CreateInvalidStateException(); + _bufferState = BufferState.Writing; + _quotas = new XmlDictionaryReaderQuotas(); + quotas.CopyTo(_quotas); + + _writer = XmlDictionaryWriter.CreateBinaryWriter(_stream, null, null, false); + + return _writer; + } + + public void CloseSection() + { + if (_bufferState != BufferState.Writing) + throw CreateInvalidStateException(); + _writer.Close(); + _bufferState = BufferState.Created; + + int size = (int)_stream.Length - _offset; + _sections.Add(new Section(_offset, size, _quotas)); + _offset += size; + } + + public void Close() + { + if (_bufferState != BufferState.Created) + throw CreateInvalidStateException(); + _bufferState = BufferState.Reading; + _buffer = new byte[_stream.Length]; + _stream.Position = 0; + _stream.Read(_buffer, 0, _buffer.Length); + + _writer = null; + _stream = null; + } + + private Exception CreateInvalidStateException() + { + return new InvalidOperationException(SR.XmlBufferInInvalidState); + } + + + public XmlDictionaryReader GetReader(int sectionIndex) + { + if (_bufferState != BufferState.Reading) + throw CreateInvalidStateException(); + Section section = _sections[sectionIndex]; + XmlDictionaryReader reader = XmlDictionaryReader.CreateBinaryReader(_buffer, section.Offset, section.Size, null, section.Quotas, null, null); + + reader.MoveToContent(); + return reader; + } + + public void WriteTo(int sectionIndex, XmlWriter writer) + { + if (_bufferState != BufferState.Reading) + throw CreateInvalidStateException(); + XmlDictionaryReader reader = GetReader(sectionIndex); + try + { + writer.WriteNode(reader, false); + } + finally + { + reader.Close(); + } + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/XmlReaderWrapper.cs b/src/System.ServiceModel.Syndication/src/XmlReaderWrapper.cs new file mode 100644 index 000000000000..5227559d38ca --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/XmlReaderWrapper.cs @@ -0,0 +1,550 @@ +using Microsoft.ServiceModel.Syndication.Resources; +using System; +using System.Diagnostics; +using System.Threading.Tasks; +using System.Xml; + +namespace Microsoft.ServiceModel.Syndication +{ + internal class XmlReaderWrapper : XmlReader + { + private XmlReader reader; + + private Func> getValueFunc; + private Func> moveToContentFunc; + private Func skipFunc; + private Func> readFunc; + private Func> readInnerXmlFunc; + + private XmlReaderWrapper(XmlReader reader) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + + this.reader = reader; + + if (this.reader.Settings.Async) + { + InitAsync(); + } + else + { + Init(); + } + } + + public static XmlReaderWrapper CreateFromReader(XmlReader reader) + { + XmlReaderWrapper wrappedReader = reader as XmlReaderWrapper; + return wrappedReader != null ? wrappedReader : new XmlReaderWrapper(reader); + } + + private void InitAsync() + { + this.getValueFunc = new Func>((thisPtr) => { return thisPtr.reader.GetValueAsync(); }); + this.moveToContentFunc = new Func>((thisPtr) => { return thisPtr.reader.MoveToContentAsync(); }); + this.skipFunc = new Func((thisPtr) => { return thisPtr.reader.SkipAsync(); }); + this.readFunc = new Func>((thisPtr) => { return thisPtr.reader.ReadAsync(); }); + this.readInnerXmlFunc = new Func>((thisPtr) => { return thisPtr.reader.ReadInnerXmlAsync(); }); + } + + private void Init() + { + this.getValueFunc = new Func>((thisPtr) => { return Task.FromResult(thisPtr.reader.Value); }); + this.moveToContentFunc = new Func>((thisPtr) => { return Task.FromResult(this.reader.MoveToContent()); }); + this.skipFunc = new Func((thisPtr) => { this.reader.Skip(); return Task.CompletedTask; }); + this.readFunc = new Func>((thisPtr) => { return Task.FromResult(this.reader.Read()); }); + this.readInnerXmlFunc = new Func>((thisPtr) => { return Task.FromResult(this.reader.ReadInnerXml()); }); + } + + public override XmlNodeType NodeType + { + get + { + return this.reader.NodeType; + } + } + + public override string LocalName + { + get + { + return this.reader.LocalName; + } + } + + public override string NamespaceURI + { + get + { + return this.reader.NamespaceURI; + } + } + + public override string Prefix + { + get + { + return this.reader.Prefix; + } + } + + public override string Value + { + get + { + return this.reader.Value; + } + } + + public override int Depth + { + get + { + return this.reader.Depth; + } + } + + public override string BaseURI + { + get + { + return this.reader.BaseURI; + } + } + + public override bool IsEmptyElement + { + get + { + return this.reader.IsEmptyElement; + } + } + + public override int AttributeCount + { + get + { + return this.reader.AttributeCount; + } + } + + public override bool EOF + { + get + { + return this.reader.EOF; + } + } + + public override ReadState ReadState + { + get + { + return this.reader.ReadState; + } + } + + public override XmlNameTable NameTable + { + get + { + return this.reader.NameTable; + } + } + + public override string GetAttribute(string name) + { + return this.reader.GetAttribute(name); + } + + public override string GetAttribute(string name, string namespaceURI) + { + return this.reader.GetAttribute(name, namespaceURI); + } + + public override string GetAttribute(int i) + { + return this.reader.GetAttribute(i); + } + + public override string LookupNamespace(string prefix) + { + return this.reader.LookupNamespace(prefix); + } + + public override bool MoveToAttribute(string name) + { + return this.reader.MoveToAttribute(name); + } + + public override bool MoveToAttribute(string name, string ns) + { + return this.reader.MoveToAttribute(name, ns); + } + + public override bool MoveToElement() + { + return this.reader.MoveToElement(); + } + + public override bool MoveToFirstAttribute() + { + return this.reader.MoveToFirstAttribute(); + } + + public override bool MoveToNextAttribute() + { + return this.reader.MoveToNextAttribute(); + } + + public override bool Read() + { + return this.reader.Read(); + } + + public override bool ReadAttributeValue() + { + return this.reader.ReadAttributeValue(); + } + + public override void ResolveEntity() + { + this.reader.ResolveEntity(); + } + + public override Task GetValueAsync() + { + return this.getValueFunc(this); + } + + public override Task MoveToContentAsync() + { + return this.moveToContentFunc(this); + } + + public override Task SkipAsync() + { + return this.skipFunc(this); + } + + public override Task ReadAsync() + { + return this.readFunc(this); + } + + public override Task ReadInnerXmlAsync() + { + return readInnerXmlFunc(this); + } + + public static async Task WriteNodeAsync(XmlDictionaryWriter writer, XmlReader reader, bool defattr) + { + char[] writeNodeBuffer = null; + const int WriteNodeBufferSize = 1024; + + if (null == reader) + { + throw new ArgumentNullException(nameof(reader)); + } + + bool canReadChunk = reader.CanReadValueChunk; + int d = reader.NodeType == XmlNodeType.None ? -1 : reader.Depth; + do + { + switch (reader.NodeType) + { + case XmlNodeType.Element: + writer.WriteStartElement(reader.Prefix, reader.LocalName, reader.NamespaceURI); + writer.WriteAttributes(reader, defattr); + if (reader.IsEmptyElement) + { + writer.WriteEndElement(); + break; + } + break; + case XmlNodeType.Text: + if (canReadChunk) + { + if (writeNodeBuffer == null) + { + writeNodeBuffer = new char[WriteNodeBufferSize]; + } + int read; + while ((read = reader.ReadValueChunk(writeNodeBuffer, 0, WriteNodeBufferSize)) > 0) + { + writer.WriteChars(writeNodeBuffer, 0, read); + } + } + else + { + writer.WriteString(await reader.GetValueAsync()); + } + break; + + case XmlNodeType.Whitespace: + case XmlNodeType.SignificantWhitespace: + writer.WriteWhitespace(await reader.GetValueAsync()); + break; + + case XmlNodeType.CDATA: + writer.WriteCData(await reader.GetValueAsync()); + break; + + case XmlNodeType.EntityReference: + writer.WriteEntityRef(reader.Name); + break; + + case XmlNodeType.XmlDeclaration: + case XmlNodeType.ProcessingInstruction: + writer.WriteProcessingInstruction(reader.Name, await reader.GetValueAsync()); + break; + + case XmlNodeType.DocumentType: + writer.WriteDocType(reader.Name, reader.GetAttribute("PUBLIC"), reader.GetAttribute("SYSTEM"), await reader.GetValueAsync()); + break; + + case XmlNodeType.Comment: + writer.WriteComment(await reader.GetValueAsync()); + break; + + case XmlNodeType.EndElement: + writer.WriteFullEndElement(); + break; + } + } while (await reader.ReadAsync() && (d < reader.Depth || (d == reader.Depth && reader.NodeType == XmlNodeType.EndElement))); + } + } + + internal static class XmlReaderExtensions + { + static private uint IsTextualNodeBitmap = 0x6018; // 00 0110 0000 0001 1000 + + public static async Task ReadStartElementAsync(this XmlReader reader) + { + if (await reader.MoveToContentAsync() != XmlNodeType.Element) + { + throw new InvalidOperationException(reader.NodeType.ToString() + " is an invalid XmlNodeType"); + } + + await reader.ReadAsync(); + } + + public static async Task ReadElementStringAsync(this XmlReader reader) + { + string result = string.Empty; + + if (await reader.MoveToContentAsync() != XmlNodeType.Element) + { + //throw new XmlException(Res.Xml_InvalidNodeType, this.NodeType.ToString(), this as IXmlLineInfo); + throw new InvalidOperationException(reader.NodeType.ToString() + " is an invalid XmlNodeType"); + } + if (!reader.IsEmptyElement) + { + await reader.ReadAsync(); + result = reader.ReadString(); + if (reader.NodeType != XmlNodeType.EndElement) + { + throw new XmlException(); + throw new XmlException(reader.NodeType.ToString() + " is an invalid XmlNodeType"); + //throw new XmlException(Res.Xml_UnexpectedNodeInSimpleContent, new string[] { this.NodeType.ToString(), "ReadElementString" }, this as IXmlLineInfo); + } + await reader.ReadAsync(); + } + else + { + await reader.ReadAsync(); + } + return result; + + } + + public static async Task ReadStringAsync(this XmlReader reader) + { + if (reader.ReadState != ReadState.Interactive) + { + return string.Empty; + } + reader.MoveToElement(); + if (reader.NodeType == XmlNodeType.Element) + { + if (reader.IsEmptyElement) + { + return string.Empty; + } + else if (!await reader.ReadAsync()) + { + throw new XmlException(reader.NodeType.ToString() + " is an invalid XmlNodeType"); + //throw new InvalidOperationException(Res.GetString(Res.Xml_InvalidOperation)); + } + if (reader.NodeType == XmlNodeType.EndElement) + { + return string.Empty; + } + } + string result = string.Empty; + while (IsTextualNode(reader.NodeType)) + { + result += await reader.GetValueAsync(); + if (!await reader.ReadAsync()) + { + break; + } + } + return result; + + } + + static internal bool IsTextualNode(XmlNodeType nodeType) + { +#if DEBUG + // This code verifies IsTextualNodeBitmap mapping of XmlNodeType to a bool specifying + // whether the node is 'textual' = Text, CDATA, Whitespace or SignificantWhitespace. + Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.None))); + Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Element))); + Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Attribute))); + Debug.Assert(0 != (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Text))); + Debug.Assert(0 != (IsTextualNodeBitmap & (1 << (int)XmlNodeType.CDATA))); + Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.EntityReference))); + Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Entity))); + Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.ProcessingInstruction))); + Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Comment))); + Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Document))); + Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.DocumentType))); + Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.DocumentFragment))); + Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Notation))); + Debug.Assert(0 != (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Whitespace))); + Debug.Assert(0 != (IsTextualNodeBitmap & (1 << (int)XmlNodeType.SignificantWhitespace))); + Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.EndElement))); + Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.EndEntity))); + Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.XmlDeclaration))); +#endif + return 0 != (IsTextualNodeBitmap & (1 << (int)nodeType)); + } + + public static async Task ReadEndElementAsync(this XmlReader reader) + { + if (await reader.MoveToContentAsync() != XmlNodeType.EndElement) + { + throw new XmlException(reader.NodeType.ToString() + " is an invalid XmlNodeType"); + //throw new XmlException(Res.Xml_InvalidNodeType, this.NodeType.ToString(), this as IXmlLineInfo); + } + await reader.ReadAsync(); + } + + public static async Task ReadStartElementAsync(this XmlReader reader, string localname, string ns) + { + if (await reader.MoveToContentAsync() != XmlNodeType.Element) + { + //throw new XmlException(Res.Xml_InvalidNodeType, this.NodeType.ToString(), this as IXmlLineInfo); + throw new XmlException(reader.NodeType.ToString() + " is an invalid XmlNodeType"); + } + if (reader.LocalName == localname && reader.NamespaceURI == ns) + { + await reader.ReadAsync(); + } + else + { + throw new XmlException(reader.NodeType.ToString() + " is an invalid XmlNodeType"); + //throw new XmlException(Res.Xml_ElementNotFoundNs, new string[2] { localname, ns }, this as IXmlLineInfo); + } + + } + + public static async Task IsStartElementAsync(this XmlReader reader) + { + return await reader.MoveToContentAsync() == XmlNodeType.Element; + } + + public static async Task IsStartElementAsync(this XmlReader reader, string localname, string ns) + { + return (await reader.MoveToContentAsync() == XmlNodeType.Element) && (reader.LocalName == localname && reader.NamespaceURI == ns); + } + + private static async Task ReadStartElementAsync(this XmlReader reader, string name) + { + if (await reader.MoveToContentAsync() != XmlNodeType.Element) + { + throw new InvalidOperationException(reader.NodeType.ToString() + " is an invalid XmlNodeType"); + } + if (reader.Name == name) + { + await reader.ReadAsync(); + } + else + { + throw new InvalidOperationException("name doesn’t match"); + } + } + + private static async Task IsStartElementAsync(this XmlReader reader, string name) + { + return await reader.MoveToContentAsync() == XmlNodeType.Element && reader.Name == name; + } + + private static async Task ReadElementStringAsync(this XmlReader reader, string name) + { + string result = string.Empty; + + if (await reader.MoveToContentAsync() != XmlNodeType.Element) + { + throw new XmlException("InvalidNodeType"); + } + if (reader.Name != name) + { + throw new XmlException("ElementNotFound"); + } + + if (!reader.IsEmptyElement) + { + result = await ReadStringAsync(reader); + + if (reader.NodeType != XmlNodeType.EndElement) + { + throw new XmlException("InvalidNodeType"); + } + await reader.ReadAsync(); + } + else + { + await reader.ReadAsync(); + } + return result; + } + + private static async Task ReadElementStringAsync(XmlReader reader, string localname, string ns) + { + string result = string.Empty; + + if (await reader.MoveToContentAsync() != XmlNodeType.Element) + { + throw new XmlException("InvalidNodeType"); + } + + if (reader.LocalName != localname || reader.NamespaceURI != ns) + { + throw new XmlException("ElementNotFound"); + } + + if (!reader.IsEmptyElement) + { + result = await ReadStringAsync(reader); + + if (reader.NodeType != XmlNodeType.EndElement) + { + throw new XmlException("InvalidNodeType"); + } + await reader.ReadAsync(); + } + else + { + await reader.ReadAsync(); + } + return result; + } + + } + +} diff --git a/src/System.ServiceModel.Syndication/src/XmlSyndicationContent.cs b/src/System.ServiceModel.Syndication/src/XmlSyndicationContent.cs new file mode 100644 index 000000000000..45965af6a26b --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/XmlSyndicationContent.cs @@ -0,0 +1,210 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ServiceModel.Syndication +{ + using System; + using System.Diagnostics; + using System.Runtime.CompilerServices; + using System.Runtime.Serialization; + using System.Threading.Tasks; + using System.Xml; + using System.Xml.Serialization; + + public class XmlSyndicationContent : SyndicationContent + { + private XmlBuffer _contentBuffer; + private SyndicationElementExtension _extension; + private string _type; + + // Saves the element in the reader to the buffer (attributes preserved) + // Type is populated from type attribute on reader + // Reader must be positioned at an element + public XmlSyndicationContent(XmlReader reader) + { + if (reader == null) + { + throw new ArgumentNullException(nameof(reader)); + } + SyndicationFeedFormatter.MoveToStartElement(reader); + if (reader.HasAttributes) + { + while (reader.MoveToNextAttribute()) + { + string name = reader.LocalName; + string ns = reader.NamespaceURI; + string value = reader.Value; + if (name == Atom10Constants.TypeTag && ns == string.Empty) + { + _type = value; + } + else if (!FeedUtils.IsXmlns(name, ns)) + { + base.AttributeExtensions.Add(new XmlQualifiedName(name, ns), value); + } + } + reader.MoveToElement(); + } + _type = string.IsNullOrEmpty(_type) ? Atom10Constants.XmlMediaType : _type; + _contentBuffer = new XmlBuffer(int.MaxValue); + using (XmlDictionaryWriter writer = _contentBuffer.OpenSection(XmlDictionaryReaderQuotas.Max)) + { + writer.WriteNode(reader, false); + } + _contentBuffer.CloseSection(); + _contentBuffer.Close(); + } + + public XmlSyndicationContent(string type, object dataContractExtension, XmlObjectSerializer dataContractSerializer) + { + _type = string.IsNullOrEmpty(type) ? Atom10Constants.XmlMediaType : type; + _extension = new SyndicationElementExtension(dataContractExtension, dataContractSerializer); + } + + public XmlSyndicationContent(string type, object xmlSerializerExtension, XmlSerializer serializer) + { + _type = string.IsNullOrEmpty(type) ? Atom10Constants.XmlMediaType : type; + _extension = new SyndicationElementExtension(xmlSerializerExtension, serializer); + } + + public XmlSyndicationContent(string type, SyndicationElementExtension extension) + { + if (extension == null) + { + throw new ArgumentNullException(nameof(extension)); + } + _type = string.IsNullOrEmpty(type) ? Atom10Constants.XmlMediaType : type; + _extension = extension; + } + + protected XmlSyndicationContent(XmlSyndicationContent source) + : base(source) + { + if (source == null) + { + throw new ArgumentNullException(nameof(source)); + } + _contentBuffer = source._contentBuffer; + _extension = source._extension; + _type = source._type; + } + + public SyndicationElementExtension Extension + { + get + { + return _extension; + } + } + + public override string Type + { + get { return _type; } + } + + public override SyndicationContent Clone() + { + return new XmlSyndicationContent(this); + } + + public async Task GetReaderAtContent() + { + await EnsureContentBufferAsync(); + return _contentBuffer.GetReader(0); + } + + public Task ReadContent() + { + return ReadContent((DataContractSerializer)null); + } + + public async Task ReadContent(XmlObjectSerializer dataContractSerializer) + { + if (dataContractSerializer == null) + { + dataContractSerializer = new DataContractSerializer(typeof(TContent)); + } + if (_extension != null) + { + return await _extension.GetObject(dataContractSerializer); + } + else + { + Debug.Assert(_contentBuffer != null, "contentBuffer cannot be null"); + using (XmlDictionaryReader reader = _contentBuffer.GetReader(0)) + { + // skip past the content element + reader.ReadStartElement(); + return (TContent)dataContractSerializer.ReadObject(reader, false); + } + } + } + + public Task ReadContent(XmlSerializer serializer) + { + if (serializer == null) + { + serializer = new XmlSerializer(typeof(TContent)); + } + if (_extension != null) + { + return _extension.GetObject(serializer); + } + else + { + Debug.Assert(_contentBuffer != null, "contentBuffer cannot be null"); + using (XmlDictionaryReader reader = _contentBuffer.GetReader(0)) + { + // skip past the content element + reader.ReadStartElement(); + return Task.FromResult((TContent)serializer.Deserialize(reader)); + //return (TContent)serializer.Deserialize(reader); + } + } + } + + // does not write start element or type attribute, writes other attributes and rest of content + protected override void WriteContentsTo(XmlWriter writer) + { + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + if (_extension != null) + { + _extension.WriteToAsync(writer).GetAwaiter().GetResult(); + } + else if (_contentBuffer != null) + { + using (XmlDictionaryReader reader = _contentBuffer.GetReader(0)) + { + reader.MoveToStartElement(); + if (!reader.IsEmptyElement) + { + reader.ReadStartElement(); + while (reader.Depth >= 1 && reader.ReadState == ReadState.Interactive) + { + writer.WriteNode(reader, false); + } + } + } + } + } + + private async Task EnsureContentBufferAsync() + { + if (_contentBuffer == null) + { + XmlBuffer tmp = new XmlBuffer(int.MaxValue); + using (XmlDictionaryWriter writer = tmp.OpenSection(XmlDictionaryReaderQuotas.Max)) + { + await this.WriteToAsync(writer, Atom10Constants.ContentTag, Atom10Constants.Atom10Namespace); + } + tmp.CloseSection(); + tmp.Close(); + _contentBuffer = tmp; + } + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/XmlWriterWrapper.cs b/src/System.ServiceModel.Syndication/src/XmlWriterWrapper.cs new file mode 100644 index 000000000000..975c34960753 --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/XmlWriterWrapper.cs @@ -0,0 +1,268 @@ +using System; +using System.Threading.Tasks; +using System.Xml; + +namespace Microsoft.ServiceModel.Syndication +{ + internal class XmlWriterWrapper : XmlWriter + { + + private XmlWriter writer; + + private Func writeStringFunc; + private Func writeStartElementFunc2; + private Func writeEndElementFunc; + private Func writeAttributeStringFunc2; + private Func writeAttributeStringFunc3; + private Func writeAttributeStringFunc4; + private Func WriteNodeFunc; + + + private void InitAsync() + { + this.writeStringFunc = new Func((thisPtr, text) => { return thisPtr.writer.WriteStringAsync(text); }); + this.writeStartElementFunc2 = new Func((thisPtr, localName, ns) => { return this.writer.WriteStartElementAsync("", localName, ns); }); + this.writeEndElementFunc = new Func((thisPtr) => { return thisPtr.writer.WriteEndElementAsync(); }); + this.writeAttributeStringFunc2 = new Func((thisPtr, localname, value) => { return thisPtr.writer.WriteAttributeStringAsync("", localname, "", value); }); + this.writeAttributeStringFunc3 = new Func((thisPtr, localName, ns, value) => { return thisPtr.writer.WriteAttributeStringAsync("", localName, ns, value); }); + this.writeAttributeStringFunc4 = new Func((thisPtr, prefix, localName, ns, value) => { return thisPtr.writer.WriteAttributeStringAsync(prefix, localName, ns, value); }); + this.WriteNodeFunc = new Func((thisPtr, reader, defattr) => { return thisPtr.writer.WriteNodeAsync(reader, defattr); }); + } + + private void Init() + { + this.writeStringFunc = new Func((thisPtr, text) => { thisPtr.writer.WriteString(text); return Task.CompletedTask; }); + this.writeStartElementFunc2 = new Func((thisPtr, localName, ns) => { this.writer.WriteStartElement(localName, ns); return Task.CompletedTask; }); + this.writeEndElementFunc = new Func((thisPtr) => { thisPtr.writer.WriteEndElement(); return Task.CompletedTask; }); + this.writeAttributeStringFunc2 = new Func((thisPtr, localname, value) => { thisPtr.writer.WriteAttributeString("", localname, "", value); return Task.CompletedTask; }); + this.writeAttributeStringFunc3 = new Func((thisPtr, localName, ns, value) => { thisPtr.writer.WriteAttributeString(localName, ns, value); return Task.CompletedTask; }); + this.writeAttributeStringFunc4 = new Func((thisPtr, prefix, localName, ns, value) => { thisPtr.writer.WriteAttributeString(prefix, localName, ns, value); return Task.CompletedTask; }); + this.WriteNodeFunc = new Func((thisPtr, reader, defattr) => { thisPtr.writer.WriteNode(reader, defattr); return Task.CompletedTask; }); + } + + public static XmlWriter CreateFromWriter(XmlWriter writer) + { + if (writer is XmlWriterWrapper || writer.Settings.Async) + { + return writer; + } + + return new XmlWriterWrapper(writer); + } + + + public XmlWriterWrapper(XmlWriter writer) + { + if (writer == null) + throw new ArgumentNullException(nameof(writer)); + + this.writer = writer; + + if (this.writer.Settings.Async) + { + InitAsync(); + } + else + { + Init(); + } + } + + // wrapper methods + + public override Task WriteNodeAsync(XmlReader reader, bool defattr) + { + return WriteNodeFunc(this, reader, defattr); + } + + public override Task WriteStringAsync(string text) + { + return writeStringFunc(this, text); + } + + public override Task WriteStartElementAsync(string prefix, string localName, string ns) + { + writer.WriteStartElement(prefix, localName, ns); + return Task.CompletedTask; + } + + public override Task WriteEndElementAsync() + { + return writeEndElementFunc(this); + } + + public override Task WriteAttributesAsync(XmlReader reader, bool defattr) + { + writer.WriteAttributes(reader, defattr); + return Task.CompletedTask; + } + + // inherited methods + public override WriteState WriteState + { + get + { + return this.writer.WriteState; + } + } + + public override void Flush() + { + this.writer.Flush(); + } + + public override string LookupPrefix(string ns) + { + return this.writer.LookupPrefix(ns); + } + + public override void WriteBase64(byte[] buffer, int index, int count) + { + this.writer.WriteBase64(buffer, index, count); + } + + public override void WriteCData(string text) + { + this.writer.WriteCData(text); + } + + public override void WriteCharEntity(char ch) + { + this.writer.WriteCharEntity(ch); + } + + public override void WriteChars(char[] buffer, int index, int count) + { + this.writer.WriteChars(buffer, index, count); + } + + public override void WriteComment(string text) + { + this.writer.WriteComment(text); + } + + public override void WriteDocType(string name, string pubid, string sysid, string subset) + { + this.writer.WriteDocType(name, pubid, sysid, subset); + } + + public override void WriteEndAttribute() + { + this.writer.WriteEndAttribute(); + } + + public override void WriteEndDocument() + { + this.writer.WriteEndDocument(); + } + + public override void WriteEndElement() + { + this.writer.WriteEndElement(); + } + + public override void WriteEntityRef(string name) + { + this.writer.WriteEntityRef(name); + } + + public override void WriteFullEndElement() + { + this.writer.WriteFullEndElement(); + } + + public override void WriteProcessingInstruction(string name, string text) + { + this.writer.WriteProcessingInstruction(name, text); + } + + public override void WriteRaw(char[] buffer, int index, int count) + { + this.writer.WriteRaw(buffer, index, count); + } + + public override void WriteRaw(string data) + { + this.writer.WriteRaw(data); + } + + public override void WriteStartAttribute(string prefix, string localName, string ns) + { + this.writer.WriteStartAttribute(prefix, localName, ns); + } + + public override void WriteStartDocument() + { + this.writer.WriteStartDocument(); + } + + public override void WriteStartDocument(bool standalone) + { + this.writer.WriteStartDocument(standalone); + } + + public override void WriteStartElement(string prefix, string localName, string ns) + { + this.writer.WriteStartElement(prefix, localName, ns); + } + + public override void WriteString(string text) + { + this.writer.WriteString(text); + } + + public override void WriteSurrogateCharEntity(char lowChar, char highChar) + { + this.writer.WriteSurrogateCharEntity(lowChar, highChar); + } + + public override void WriteWhitespace(string ws) + { + this.writer.WriteWhitespace(ws); + } + } + + internal static class XmlWriterExtensions + { + public static Task WriteStartElementAsync(this XmlWriter writer, string localName) + { + return writer.WriteStartElementAsync(null, localName, (string)null); + } + + public static Task WriteStartElementAsync(this XmlWriter writer, string localName, string ns) + { + return writer.WriteStartElementAsync(null, localName, ns); + } + + public static Task WriteElementStringAsync(this XmlWriter writer, string localName, string value) + { + return writer.WriteElementStringAsync(null, localName, null, value); + } + + public static Task WriteElementStringAsync(this XmlWriter writer, string localName, string ns, string value) + { + return writer.WriteElementStringAsync(null, localName, ns, value); + } + + public static Task WriteAttributeStringAsync(this XmlWriter writer, string localName, string ns, string value) + { + return writer.InternalWriteAttributeStringAsync(null, localName, ns, value); + } + + public static Task WriteAttributeStringAsync(this XmlWriter writer, string localName, string value) + { + return writer.InternalWriteAttributeStringAsync(null, localName, null, value); + } + + public static Task InternalWriteAttributeStringAsync(this XmlWriter writer, string prefix, string localName, string ns, string value) + { + if (writer is XmlWriterWrapper) + { + writer.WriteAttributeString(prefix, localName, ns, value); + return Task.CompletedTask; + } + + return writer.WriteAttributeStringAsync(prefix, localName, ns, value); + } + } +} diff --git a/src/System.ServiceModel.Syndication/src/csprojForCodeFormatter.txt b/src/System.ServiceModel.Syndication/src/csprojForCodeFormatter.txt new file mode 100644 index 000000000000..f84ba94ff52b --- /dev/null +++ b/src/System.ServiceModel.Syndication/src/csprojForCodeFormatter.txt @@ -0,0 +1,27 @@ + + + + + + netcoreapp2.0 + false + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/System.ServiceModel.Syndication/tests/BasicScenarioTests.cs b/src/System.ServiceModel.Syndication/tests/BasicScenarioTests.cs new file mode 100644 index 000000000000..ccb2bec3e354 --- /dev/null +++ b/src/System.ServiceModel.Syndication/tests/BasicScenarioTests.cs @@ -0,0 +1,711 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + + +namespace Microsoft.ServiceModel.Syndication.Tests +{ + using System; + using System.Collections.Generic; + using System.Text; + using Xunit; + using Microsoft.ServiceModel.Syndication; + using System.Xml; + using System.IO; + using System.Threading.Tasks; + using System.Threading; + + public static class BasicScenarioTests + { + + [Fact] + public static void SyndicationFeed_CreateNewFeed() + { + + string filePath = "FirstFeedEver.xml"; + + try + { + // *** SETUP *** \\ + SyndicationFeed sf = new SyndicationFeed("First feed on .net core ever!!", "This is the first feed on .net core ever!", new Uri("https://github.com/dotnet/wcf")); + Assert.True(sf != null); + + XmlWriter xmlw = XmlWriter.Create(filePath); + Rss20FeedFormatter rssf = new Rss20FeedFormatter(sf); + + // *** EXECUTE *** \\ + CancellationToken ct = new CancellationToken(); + rssf.WriteToAsync(xmlw, ct).GetAwaiter().GetResult(); + xmlw.Close(); + + // *** VALIDATE *** \\ + Assert.True(File.Exists(filePath)); + } + finally + { + // *** CLEANUP *** \\ + File.Delete(filePath); + } + } + + [Fact] + public static void SyndicationFeed_Load_Write_RSS_Feed() + { + string path = "SyndicationFeed-Load-Write.xml"; + + try + { + // *** SETUP *** \\\ + XmlReader xmlr = XmlReader.Create(@"TestFeeds\SimpleRssFeed.xml"); + SyndicationFeed sf = SyndicationFeed.Load(xmlr); + Assert.True(sf != null); + CancellationToken ct = new CancellationToken(); + + // *** EXECUTE *** \\ + //Write the same feed that was read. + XmlWriter xmlw = XmlWriter.Create(path); + Rss20FeedFormatter atomFeed = new Rss20FeedFormatter(sf); + atomFeed.WriteToAsync(xmlw, ct).GetAwaiter().GetResult(); + xmlw.Close(); + + // *** VALIDATE *** \\ + Assert.True(File.Exists(path)); + } + finally + { + // *** CLEANUP *** \\ + File.Delete(path); + } + } + + [Fact] + public static void SyndicationFeed_Load_Write_RSS_Feed_Async() + { + string path = "SyndicationFeed-Load-Write-Async.xml"; + + try + { + // *** SETUP *** \\\ + XmlReaderSettings settingsReader = new XmlReaderSettings(); + settingsReader.Async = true; + XmlReader xmlr = XmlReader.Create(@"TestFeeds\RssSpecExample.xml",settingsReader); + SyndicationFeed sf; + Task < SyndicationFeed > rss = null; + CancellationToken ct = new CancellationToken(); + rss = SyndicationFeed.LoadAsync(xmlr, ct); + + Task.WhenAll(rss); + sf = rss.Result; + Assert.True(sf != null); + + // *** EXECUTE *** \\ + //Write the same feed that was read. + XmlWriterSettings settingsWriter = new XmlWriterSettings(); + settingsWriter.Async = true; + XmlWriter xmlw = XmlWriter.Create(path,settingsWriter); + Rss20FeedFormatter atomFeed = new Rss20FeedFormatter(sf); + Task write = atomFeed.WriteToAsync(xmlw, ct); + + Task.WhenAll(write); + + xmlw.Close(); + + // *** VALIDATE *** \\ + Assert.True(File.Exists(path)); + } + finally + { + // *** CLEANUP *** \\ + //File.Delete(path); + } + } + + [Fact] + public static void SyndicationFeed_Load_Write_Atom_Feed() + { + string path = "SyndicationFeed-Load-Write-Atom.xml"; + + try + { + // *** SETUP *** \\\ + XmlReaderSettings setting = new XmlReaderSettings(); + setting.Async = true; + XmlReader xmlr = XmlReader.Create(@"TestFeeds\SimpleAtomFeed.xml",setting); + SyndicationFeed sf = SyndicationFeed.Load(xmlr); + Assert.True(sf != null); + CancellationToken ct = new CancellationToken(); + + // *** EXECUTE *** \\ + //Write the same feed that was read. + XmlWriter xmlw = XmlWriter.Create(path); + Atom10FeedFormatter atomFeed = new Atom10FeedFormatter(sf); + atomFeed.WriteToAsync(xmlw,ct).GetAwaiter().GetResult(); + xmlw.Close(); + + // *** VALIDATE *** \\ + Assert.True(File.Exists(path)); + } + finally + { + // *** CLEANUP *** \\ + File.Delete(path); + } + } + + [Fact] + public static void SyndicationFeed_Load_Write_Atom_Feed_Async() + { + string path = "SyndicationFeed-Load-Write-Atom-Async.xml"; + + try + { + // *** SETUP *** \\\ + XmlReaderSettings readerSettings = new XmlReaderSettings(); + readerSettings.Async = true; + XmlReader xmlr = XmlReader.Create(@"TestFeeds\atom_spec_example.xml", readerSettings); + CancellationToken ct = new CancellationToken(); + Task rss = SyndicationFeed.LoadAsync(xmlr,ct); + SyndicationFeed sf = rss.Result; + Assert.True(sf != null); + + // *** EXECUTE *** \\ + //Write the same feed that was read. + XmlWriterSettings writerSettings = new XmlWriterSettings(); + writerSettings.Async = true; + + XmlWriter xmlw = XmlWriter.Create(path,writerSettings); + Atom10FeedFormatter atomFeed = new Atom10FeedFormatter(sf); + Task write = atomFeed.WriteToAsync(xmlw,ct); + + Task.WhenAll(write); + xmlw.Close(); + + // *** VALIDATE *** \\ + Assert.True(File.Exists(path)); + } + finally + { + // *** CLEANUP *** \\ + //File.Delete(path); + } + } + + [Fact] + public static void SyndicationFeed_Write_RSS_Atom() + { + string RssPath = "RssFeedWriteTest.xml"; + string AtomPath = "AtomFeedWriteTest.xml"; + + try + { + // *** SETUP *** \\ + SyndicationFeed feed = new SyndicationFeed("Contoso News", "
Most recent news from Contoso
", new Uri("http://www.Contoso.com/news"), "123FeedID", DateTime.Now); + CancellationToken ct = new CancellationToken(); + + //Add an author + SyndicationPerson author = new SyndicationPerson("jerry@Contoso.com"); + feed.Authors.Add(author); + + //Create item + SyndicationItem item1 = new SyndicationItem("SyndicationFeed released for .net Core", "A lot of text describing the release of .net core feature", new Uri("http://Contoso.com/news/path")); + + //Add item to feed + List feedList = new List { item1 }; + feed.Items = feedList; + feed.ElementExtensions.Add("CustomElement", "", "asd"); + + //add an image + feed.ImageUrl = new Uri("http://2.bp.blogspot.com/-NA5Jb-64eUg/URx8CSdcj_I/AAAAAAAAAUo/eCx0irI0rq0/s1600/bg_Contoso_logo3-20120824073001907469-620x349.jpg"); + //feed.ImageTitle = new TextSyndicationContent("Titulo loco"); + + feed.BaseUri = new Uri("http://mypage.com"); + Console.WriteLine(feed.BaseUri); + + // Write to XML > rss + + XmlWriterSettings settings = new XmlWriterSettings(); + settings.Async = true; + + XmlWriter xmlwRss = XmlWriter.Create(RssPath,settings); + Rss20FeedFormatter rssff = new Rss20FeedFormatter(feed); + + // Write to XML > atom + + XmlWriter xmlwAtom = XmlWriter.Create(AtomPath); + Atom10FeedFormatter atomf = new Atom10FeedFormatter(feed); + + + // *** EXECUTE *** \\ + Task rss = rssff.WriteToAsync(xmlwRss,ct); + Task.WaitAll(rss); + + xmlwRss.Close(); + + atomf.WriteToAsync(xmlwAtom,ct).GetAwaiter().GetResult(); ; + xmlwAtom.Close(); + + // *** ASSERT *** \\ + Assert.True(File.Exists(RssPath)); + Assert.True(File.Exists(AtomPath)); + } + finally + { + // *** CLEANUP *** \\ + File.Delete(RssPath); + File.Delete(AtomPath); + } + } + + [Fact] + public static void SyndicationFeed_RSS20_Load_customImageDataInFeed() + { + // *** SETUP *** \\ + XmlReader reader = XmlReader.Create(@"TestFeeds\RssFeedWithCustomImageName.xml"); + + // *** EXECUTE *** \\ + SyndicationFeed sf = SyndicationFeed.Load(reader); + + // *** ASSERT *** \\ + Assert.True("The title is not the same to the original one" == sf.ImageTitle.Text); + Assert.True(sf.ImageLink.AbsoluteUri != sf.Links[0].GetAbsoluteUri().AbsoluteUri); + + // *** CLEANUP *** \\ + reader.Close(); + } + + [Fact] + public static void SyndicationFeed_RSS20_Write_customImageDataInFeed() + { + // *** SETUP *** \\ + SyndicationFeed sf = new SyndicationFeed(); + string feedTitle = "Feed title"; + string imageTitle = "Image title"; + string resultPath = "Rss20CustomImageDataFeedWritten.xml"; + + sf.Title = new TextSyndicationContent(feedTitle); + sf.ImageTitle = new TextSyndicationContent(imageTitle); + sf.ImageLink = new Uri("http://myimage.com"); + sf.ImageUrl = new Uri("http://www.myownimagesrc.com"); + XmlWriter writer = XmlWriter.Create(resultPath); + Rss20FeedFormatter rssff = sf.GetRss20Formatter(); + CancellationToken ct = new CancellationToken(); + + try + { + // *** EXECUTE *** \\ + rssff.WriteToAsync(writer,ct).GetAwaiter().GetResult(); ; + writer.Close(); + + // *** ASSERT *** \\ + Assert.True(File.Exists(resultPath)); + + } + finally + { + // *** CLEANUP *** \\ + File.Delete(resultPath); + } + } + + [Fact] + public static async Task SyndicationFeed_LoadAsync_Rss() { + + // *** SETUP *** \\ + XmlReaderSettings setting = new XmlReaderSettings(); + setting.Async = true; + XmlReader reader = null; + Task rss = null; + CancellationToken ct = new CancellationToken(); + + try + { + // *** EXECUTE *** \\ + reader = XmlReader.Create(@"TestFeeds\rssSpecExample.xml", setting); + rss = SyndicationFeed.LoadAsync(reader,ct); + await Task.WhenAll(rss); + + // *** ASSERT *** \\ + } + finally + { + // *** CLEANUP *** \\ + Assert.True(rss.Result.Items != null); + reader.Close(); + } + } + + [Fact] + public static async Task SyndicationFeed_LoadAsync_Atom() + { + + // *** SETUP *** \\ + XmlReaderSettings setting = new XmlReaderSettings(); + setting.Async = true; + XmlReader reader = null; + CancellationToken ct = new CancellationToken(); + + try + { + reader = XmlReader.Create(@"TestFeeds\atom_spec_example.xml", setting); + // *** EXECUTE *** \\ + Task atom = SyndicationFeed.LoadAsync(reader,ct); + await Task.WhenAll(atom); + // *** ASSERT *** \\ + Assert.True(atom.Result.Items != null); + } + finally + { + // *** CLEANUP *** \\ + reader.Close(); + } + } + + [Fact] + public static void SyndicationFeed_Rss_TestDisjointItems() + { + // *** SETUP *** \\ + XmlReader reader = XmlReader.Create(@"TestFeeds\RssDisjointItems.xml"); + + try + { + // *** EXECUTE *** \\ + SyndicationFeed sf = SyndicationFeed.Load(reader); + + // *** ASSERT *** \\ + int count = 0; + foreach (var item in sf.Items) + { + count++; + } + + Assert.True(count == 2); + } + catch + { + // *** CLEANUP *** \\ + reader.Close(); + } + } + + + [Fact] + public static void SyndicationFeed_Atom_TestDisjointItems() + { + // *** SETUP *** \\ + XmlReader reader = XmlReader.Create(@"TestFeeds\AtomDisjointItems.xml"); + + try + { + // *** EXECUTE *** \\ + SyndicationFeed sf = SyndicationFeed.Load(reader); + + // *** ASSERT *** \\ + int count = 0; + foreach (var item in sf.Items) + { + count++; + } + + Assert.True(count == 2); + } + finally + { + // *** CLEANUP *** \\ + reader.Close(); + } + } + + [Fact] + public static async Task SyndicationFeed_RSS_Optional_Documentation() + { + // *** SETUP *** \\ + XmlReaderSettings setting = new XmlReaderSettings(); + setting.Async = true; + XmlReader reader = null; + Task rss = null; + CancellationToken ct = new CancellationToken(); + + try + { + // *** EXECUTE *** \\ + reader = XmlReader.Create(@"TestFeeds\rssSpecExample.xml", setting); + rss = SyndicationFeed.LoadAsync(reader,ct); + await Task.WhenAll(rss); + + // *** ASSERT *** \\ + Assert.True(rss.Result.Documentation.GetAbsoluteUri().ToString() == "http://blogs.law.harvard.edu/tech/rss"); + } + finally + { + // *** CLEANUP *** \\ + Assert.True(rss.Result.Items != null); + reader.Close(); + } + } + + [Fact] + public static async Task SyndicationFeed_RSS_Optional_TimeToLiveTag() + { + // *** SETUP *** \\ + XmlReaderSettings setting = new XmlReaderSettings(); + setting.Async = true; + XmlReader reader = null; + Task rss = null; + CancellationToken ct = new CancellationToken(); + + try + { + // *** EXECUTE *** \\ + reader = XmlReader.Create(@"TestFeeds\rssSpecExample.xml", setting); + rss = SyndicationFeed.LoadAsync(reader, ct); + await Task.WhenAll(rss); + + // *** ASSERT *** \\ + Assert.True(rss.Result.TimeToLive == 60); + } + finally + { + // *** CLEANUP *** \\ + Assert.True(rss.Result.Items != null); + reader.Close(); + } + } + + [Fact] + public static async Task SyndicationFeed_RSS_Optional_SkipHours() + { + // *** SETUP *** \\ + XmlReaderSettings setting = new XmlReaderSettings(); + setting.Async = true; + XmlReader reader = null; + Task rss = null; + CancellationToken ct = new CancellationToken(); + + try + { + // *** EXECUTE *** \\ + reader = XmlReader.Create(@"TestFeeds\rssSpecExample.xml", setting); + rss = SyndicationFeed.LoadAsync(reader, ct); + await Task.WhenAll(rss); + + // *** ASSERT *** \\ + Assert.True(rss.Result.SkipHours.Count == 3); + } + finally + { + // *** CLEANUP *** \\ + Assert.True(rss.Result.Items != null); + reader.Close(); + } + } + + [Fact] + public static async Task SyndicationFeed_RSS_Optional_SkipDays() + { + // *** SETUP *** \\ + XmlReaderSettings setting = new XmlReaderSettings(); + setting.Async = true; + XmlReader reader = null; + Task rss = null; + CancellationToken ct = new CancellationToken(); + + try + { + // *** EXECUTE *** \\ + reader = XmlReader.Create(@"TestFeeds\rssSpecExample.xml", setting); + rss = SyndicationFeed.LoadAsync(reader, ct); + await Task.WhenAll(rss); + + // *** ASSERT *** \\ + Assert.True(rss.Result.SkipDays.Count == 2); + Assert.True(rss.Result.SkipDays[0] == "Saturday"); + Assert.True(rss.Result.SkipDays[1] == "Sunday"); + } + finally + { + // *** CLEANUP *** \\ + Assert.True(rss.Result.Items != null); + reader.Close(); + } + } + + [Fact] + public static async Task SyndicationFeed_RSS_Optional_TextInput() + { + // *** SETUP *** \\ + XmlReaderSettings setting = new XmlReaderSettings(); + setting.Async = true; + XmlReader reader = null; + Task rss = null; + CancellationToken ct = new CancellationToken(); + + try + { + // *** EXECUTE *** \\ + reader = XmlReader.Create(@"TestFeeds\rssSpecExample.xml", setting); + rss = SyndicationFeed.LoadAsync(reader, ct); + await Task.WhenAll(rss); + + // *** ASSERT *** \\ + Assert.True(rss.Result.TextInput.Description == "Search Online"); + Assert.True(rss.Result.TextInput.title == "Search"); + Assert.True(rss.Result.TextInput.name == "input Name"); + Assert.True(rss.Result.TextInput.link.GetAbsoluteUri().ToString() == "http://www.contoso.no/search?"); + } + finally + { + // *** CLEANUP *** \\ + Assert.True(rss.Result.Items != null); + reader.Close(); + } + } + + [Fact] + public static async Task SyndicationFeed__Atom_Optional_Icon() + { + + // *** SETUP *** \\ + XmlReaderSettings setting = new XmlReaderSettings(); + setting.Async = true; + XmlReader reader = null; + CancellationToken ct = new CancellationToken(); + + try + { + reader = XmlReader.Create(@"TestFeeds\atom_spec_example.xml", setting); + // *** EXECUTE *** \\ + Task atom = SyndicationFeed.LoadAsync(reader, ct); + await Task.WhenAll(atom); + // *** ASSERT *** \\ + Assert.True(atom.Result.IconImage.AbsoluteUri == "https://avatars0.githubusercontent.com/u/9141961"); + } + finally + { + // *** CLEANUP *** \\ + reader.Close(); + } + } + + [Fact] + public static void SyndicationFeed_Rss_TestCustomParsing() + { + // *** SETUP *** \\ + Rss20FeedFormatter rssformatter = new Rss20FeedFormatter(); + + rssformatter.StringParser = (val, name, ns) => + { + Assert.False(string.IsNullOrEmpty(name)); + switch (name) + { + case "ttl": + case "hour": + return "5"; + case "link": + case "image": + case "url": + return "http://customparsedlink.com"; + case "title": + return "new title"; + default: + return "Custom Text"; + } + }; + + XmlReader reader = XmlReader.Create(@"TestFeeds\rssSpecExample.xml"); + CancellationToken ct = new CancellationToken(); + + // *** EXECUTE *** \\ + Task task = SyndicationFeed.LoadAsync(reader,rssformatter,ct); + Task.WhenAll(task); + SyndicationFeed res = task.Result; + + // *** ASSERT *** \\ + Assert.True(res.Title.Text == "new title"); + foreach(int hour in res.SkipHours) + { + Assert.True(hour == 5); + } + } + + [Fact] + public static void SyndicationFeed_Atom_TestCustomParsing() + { + // *** SETUP *** \\ + Atom10FeedFormatter atomformatter = new Atom10FeedFormatter(); + + atomformatter.stringParser = (val, name, ns) => + { + Assert.False(string.IsNullOrEmpty(name)); + switch (name) + { + case Atom10Constants.IdTag: + return "No id!"; + case Atom10Constants.NameTag: + return "new name"; + case Atom10Constants.TitleTag: + return "new title"; + default: + return "Custom Text"; + } + }; + + XmlReader reader = XmlReader.Create(@"TestFeeds\atom_spec_example.xml"); + CancellationToken ct = new CancellationToken(); + + // *** EXECUTE *** \\ + Task task = SyndicationFeed.LoadAsync(reader, atomformatter, ct); + Task.WhenAll(task); + SyndicationFeed res = task.Result; + + // *** ASSERT *** \\ + Assert.True(res.Id == "No id!"); + Assert.True(res.Title.Text == "new title"); + } + + [Fact] + public static void SyndicationFeed_Rss_TestWrongSkipDays() + { + // *** SETUP *** \\ + Rss20FeedFormatter rssformatter = new Rss20FeedFormatter(); + + XmlReader reader = XmlReader.Create(@"TestFeeds\rssSpecExampleWrongSkipDays.xml"); + CancellationToken ct = new CancellationToken(); + + // *** EXECUTE *** \\ + Task task = SyndicationFeed.LoadAsync(reader,ct); + Task.WhenAll(task); + SyndicationFeed res = task.Result; + + // *** ASSERT *** \\ + Assert.True(res.SkipDays.Count == 2); + Assert.True(res.SkipDays[0] == "Saturday"); + Assert.True(res.SkipDays[1] == "Sunday"); + } + + [Fact] + public static void SyndicationFeed_Rss_WrongDateFormat() + { + // *** SETUP *** \\ + Rss20FeedFormatter rssformatter = new Rss20FeedFormatter(); + + XmlReader reader = XmlReader.Create(@"TestFeeds\rssSpecExampleWrongDateFormat.xml"); + CancellationToken ct = new CancellationToken(); + + // *** EXECUTE *** \\ + Task task = SyndicationFeed.LoadAsync(reader, ct); + Task.WhenAll(task); + SyndicationFeed res = task.Result; + + // *** ASSERT *** \\ + Assert.True(!res.LastUpdatedTime.Equals(new DateTimeOffset())); + } + + } +} + +#if TagsForTests +// *** SETUP *** \\ +// *** EXECUTE *** \\ +// *** ASSERT *** \\ +// *** CLEANUP *** \\ +#endif \ No newline at end of file diff --git a/src/System.ServiceModel.Syndication/tests/Microsoft.ServiceModel.Syndication.Tests.csproj.disabled b/src/System.ServiceModel.Syndication/tests/Microsoft.ServiceModel.Syndication.Tests.csproj.disabled new file mode 100644 index 000000000000..f98c13285778 --- /dev/null +++ b/src/System.ServiceModel.Syndication/tests/Microsoft.ServiceModel.Syndication.Tests.csproj.disabled @@ -0,0 +1,35 @@ + + + + netcoreapp2.0 + false + + + + + + + + + + + + + + + + + + + PreserveNewest + + + + + + Always + + + + + diff --git a/src/System.ServiceModel.Syndication/tests/TestFeeds/AtomDisjointItems.xml b/src/System.ServiceModel.Syndication/tests/TestFeeds/AtomDisjointItems.xml new file mode 100644 index 000000000000..00c432b7306b --- /dev/null +++ b/src/System.ServiceModel.Syndication/tests/TestFeeds/AtomDisjointItems.xml @@ -0,0 +1,81 @@ + + + dive into mark + + A <em>lot</em> of effort + went into making this effortless + + 2005-07-31T12:29:29Z + tag:example.org,2003:3 + + + Copyright (c) 2003, Mark Pilgrim + + Example Toolkit + + + Atom draft-07 snapshot + + + tag:example.org,2003:3.2397 + 2005-07-31T12:29:29Z + 2003-12-13T08:29:29-04:00 + + Mark Pilgrim + http://example.org/ + f8dy@example.com + + + Sam Ruby + + + Joe Gregorio + + +
+

+ [Update: The Atom draft is finished.] +

+
+
+
+ + + Jerry + + + + Atom draft-07 snapshot + + + tag:example.org,2003:3.2397 + 2005-07-31T12:29:29Z + 2003-12-13T08:29:29-04:00 + + Mark Pilgrim + http://example.org/ + f8dy@example.com + + + Sam Ruby + + + Joe Gregorio + + +
+

+ [Update: The Atom draft is finished.] +

+
+
+
+
diff --git a/src/System.ServiceModel.Syndication/tests/TestFeeds/RssDisjointItems.xml b/src/System.ServiceModel.Syndication/tests/TestFeeds/RssDisjointItems.xml new file mode 100644 index 000000000000..ae78e43fa40e --- /dev/null +++ b/src/System.ServiceModel.Syndication/tests/TestFeeds/RssDisjointItems.xml @@ -0,0 +1,38 @@ + + + + Contoso News + http://www.Contoso.com/news + <div>Most recent news from Contoso</div> + en-us + Mon, 19 Jun 2017 11:52:39 -0700 + jerry@Contoso.com + Newspaperts + SyndicationFeed Feature + + Mon, 19 Jun 2017 11:52:39 -0700 + + http://2.bp.blogspot.com/-NA5Jb-64eUg/URx8CSdcj_I/AAAAAAAAAUo/eCx0irI0rq0/s1600/bg_Contoso_logo3-20120824073001907469-620x349.jpg + The title is not the same to the original one + http://www.contoso.com/notnews + + 123FeedID + + http://Contoso.com/news/path + SyndicationFeed released for .net Core + A lot of text describing the release of .net core feature + Contoso Item author + Item Category + Mon, 19 Jun 2017 11:52:39 -0700 + + asd + + http://Contoso.com/news/path + SyndicationFeed released for .net Core + A lot of text describing the release of .net core feature + Contoso Item author + Item Category + Mon, 19 Jun 2017 11:52:39 -0700 + + + \ No newline at end of file diff --git a/src/System.ServiceModel.Syndication/tests/TestFeeds/RssFeedWithCustomImageName.xml b/src/System.ServiceModel.Syndication/tests/TestFeeds/RssFeedWithCustomImageName.xml new file mode 100644 index 000000000000..4b5b96f529ed --- /dev/null +++ b/src/System.ServiceModel.Syndication/tests/TestFeeds/RssFeedWithCustomImageName.xml @@ -0,0 +1,30 @@ + + + + Contoso News + http://www.Contoso.com/news + <div>Most recent news from Contoso</div> + en-us + Mon, 19 Jun 2017 11:52:39 -0700 + jerry@Contoso.com + Newspaperts + SyndicationFeed Feature + + Mon, 19 Jun 2017 11:52:39 -0700 + + http://2.bp.blogspot.com/-NA5Jb-64eUg/URx8CSdcj_I/AAAAAAAAAUo/eCx0irI0rq0/s1600/bg_Contoso_logo3-20120824073001907469-620x349.jpg + The title is not the same to the original one + http://www.contoso.com/notnews + + 123FeedID + asd + + http://Contoso.com/news/path + SyndicationFeed released for .net Core + A lot of text describing the release of .net core feature + Contoso Item author + Item Category + Mon, 19 Jun 2017 11:52:39 -0700 + + + \ No newline at end of file diff --git a/src/System.ServiceModel.Syndication/tests/TestFeeds/SimpleAtomFeed.xml b/src/System.ServiceModel.Syndication/tests/TestFeeds/SimpleAtomFeed.xml new file mode 100644 index 000000000000..824f2ba47bee --- /dev/null +++ b/src/System.ServiceModel.Syndication/tests/TestFeeds/SimpleAtomFeed.xml @@ -0,0 +1,20 @@ + + + Contoso News + <div>Most recent news from Contoso</div> + 123FeedID + 2017-06-26T14:41:43-07:00 + http://2.bp.blogspot.com/-NA5Jb-64eUg/URx8CSdcj_I/AAAAAAAAAUo/eCx0irI0rq0/s1600/bg_Contoso_logo3-20120824073001907469-620x349.jpg + + jerry@Contoso.com + + + asd + + uuid:71d91f91-f5f9-4175-9065-4b7cb357fc4d;id=1 + SyndicationFeed released for .net Core + 2017-06-26T21:41:43Z + + A lot of text describing the release of .net core feature + + \ No newline at end of file diff --git a/src/System.ServiceModel.Syndication/tests/TestFeeds/SimpleRssFeed.xml b/src/System.ServiceModel.Syndication/tests/TestFeeds/SimpleRssFeed.xml new file mode 100644 index 000000000000..1b69a3fd7b47 --- /dev/null +++ b/src/System.ServiceModel.Syndication/tests/TestFeeds/SimpleRssFeed.xml @@ -0,0 +1,29 @@ + + + + Contoso News + http://www.Contoso.com/news + <div>Most recent news from Contoso</div> + en-us + Mon, 19 Jun 2017 11:52:39 -0700 + jerry@Contoso.com + Newspaperts + SyndicationFeed Feature + Mon, 19 Jun 2017 11:52:39 -0700 + + http://2.bp.blogspot.com/-NA5Jb-64eUg/URx8CSdcj_I/AAAAAAAAAUo/eCx0irI0rq0/s1600/bg_Contoso_logo3-20120824073001907469-620x349.jpg + The title is not the same to the original one + http://www.contoso.com/notnews + + 123FeedID + asd + + http://Contoso.com/news/path + SyndicationFeed released for .net Core + A lot of text describing the release of .net core feature + Contoso Item author + Item Category + Mon, 19 Jun 2017 11:52:39 -0700 + + + \ No newline at end of file diff --git a/src/System.ServiceModel.Syndication/tests/TestFeeds/atom_spec_example.xml b/src/System.ServiceModel.Syndication/tests/TestFeeds/atom_spec_example.xml new file mode 100644 index 000000000000..4efadc6568cf --- /dev/null +++ b/src/System.ServiceModel.Syndication/tests/TestFeeds/atom_spec_example.xml @@ -0,0 +1,48 @@ + + + dive into mark + https://avatars0.githubusercontent.com/u/9141961 + + A <em>lot</em> of effort + went into making this effortless + + 2005-07-31T12:29:29Z + tag:example.org,2003:3 + + + Copyright (c) 2003, Mark Pilgrim + + Example Toolkit + + + Atom draft-07 snapshot + + + tag:example.org,2003:3.2397 + 2005-07-31T12:29:29Z + 2003-12-13T08:29:29-04:00 + + Mark Pilgrim + http://example.org/ + f8dy@example.com + + + Sam Ruby + + + Joe Gregorio + + +
+

+ [Update: The Atom draft is finished.] +

+
+
+
+
diff --git a/src/System.ServiceModel.Syndication/tests/TestFeeds/example_feed_xml_atom.xml b/src/System.ServiceModel.Syndication/tests/TestFeeds/example_feed_xml_atom.xml new file mode 100644 index 000000000000..8c412bf2d85a --- /dev/null +++ b/src/System.ServiceModel.Syndication/tests/TestFeeds/example_feed_xml_atom.xml @@ -0,0 +1,187 @@ + + + Example - Online Store + + 2011-07-11T12:00:00Z + + + + + TV_123456 + LG 22LB4510 - 22" LED TV - 1080p (FullHD) + Attractively styled and boasting stunning picture quality, the LG 22LB4510 - 22" LED TV - 1080p (FullHD) is an excellent television/monitor. The LG 22LB4510 - 22" LED TV - 1080p (FullHD) sports a widescreen 1080p panel, perfect for watching movies in their original format, whilst also providing plenty of working space for your other applications. + http://www.example.com/electronics/tv/22LB4510.html + http://images.example.com/TV_123456.png + used + in stock + 159.00 USD + + US + Standard + 14.95 USD + + + + 71919219405200 + LG + 22LB4510/US + + + Electronics > Video > Televisions > Flat Panel Televisions + Consumer Electronics > TVs > Flat Panel TVs + + + + + + DVD-0564738 + + + + + new + in stock + 11.99 USD + + US + Express Mail + 3.80 USD + + + + 88392916560500 + BBC + + + DVDs & Videos]]> + + + TV Series > Fantasy Drama]]> + + + + + + PFM654321 + Dior Capture XP Ultimate Wrinkle Correction Creme 1.7 oz + Dior Capture XP Ultimate Wrinkle Correction Creme 1.7 oz reinvents anti-wrinkle care by protecting and relaunching skin cell activity to encourage faster, healthier regeneration. + http://www.example.com/perfumes/product?Dior%20Capture%20R6080%20XP + http://images.example.com/PFM654321_1.jpg + new + in stock + 99 USD + + US + Standard Rate + 4.95 USD + + + US + Next Day + 8.50 USD + + + + 3348901056069 + Dior + + + Health & Beauty > Personal Care > Cosmetics > Skin Care > Lotion + Health & Beauty > Personal Care > Cosmetics > Skin Care > Anti-Aging Skin Care Kits + http://images.example.com/PFM654321_2.jpg + http://images.example.com/PFM654321_3.jpg + + + + + + CLO-29473856-1 + Roma Cotton Rich Bootcut Jeans - Size 8 Standard + A smart pair of bootcut jeans in stretch cotton. + http://www.example.com/clothing/women/Roma-Cotton-Bootcut-Jeans/?extid=CLO-29473856 + http://images.example.com/CLO-29473856-front.jpg + new + out of stock + 29.50 USD + + + Apparel & Accessories > Clothing > Pants > Jeans + M&S + Female + Adult + Navy + 8 Standard + + + CLO-29473856 + + + B003J5F5EY + Women's Clothing > Jeans > Bootcut Jeans + http://images.example.com/CLO-29473856-side.jpg + http://images.example.com/CLO-29473856-back.jpg + + + + + + CLO-29473856-2 + Roma Cotton Rich Bootcut Jeans - Size 8 Tall + A smart pair of bootcut jeans in stretch cotton. + http://www.example.com/clothing/women/Roma-Cotton-Bootcut-Jeans/?extid=CLO-29473856 + http://images.example.com/CLO-29473856-front.jpg + new + in stock + 29.50 USD + + + Apparel & Accessories > Clothing > Pants > Jeans + M&S + Female + Adult + Navy + 8 Tall + + + CLO-29473856 + + + B003J5F5EY + Women's Clothing > Jeans > Bootcut Jeans + http://images.example.com/CLO-29473856-side.jpg + http://images.example.com/CLO-29473856-back.jpg + + + + + + CLO-1029384 + Tenn Cool Flow Ladies Long Sleeved Cycle Jersey + A ladies' cycling jersey designed for the serious cyclist, tailored to fit a feminine frame. This sporty, vibrant red, black and white jersey is constructed of a special polyester weave that is extremely effective at drawing moisture away from your body, helping to keep you dry. With an elasticised, gripping waist, it will stay in place for the duration of your cycle, and won't creep up like many other products. It has two elasticised rear pockets and the sleeves are elasticated to prevent creep-up. + http://www.example.com/clothing/sports/product?id=CLO1029384&src=gshopping&popup=false + http://images.example.com/CLO-1029384.jpg + new + in stock + 33.99 USD + + US + Standard Free Shipping + 0 USD + + + + Tenn Cool + Apparel & Accessories > Clothing > Activewear > Bicycle Activewear > Bicycle Jerseys + Female + Adult + Black/Red/White + M + + + 25.49 USD + 2011-09-01T16:00-08:00/2011-09-03T16:00-08:00 + + + 5060155240282 + + \ No newline at end of file diff --git a/src/System.ServiceModel.Syndication/tests/TestFeeds/rssSpecExample.xml b/src/System.ServiceModel.Syndication/tests/TestFeeds/rssSpecExample.xml new file mode 100644 index 000000000000..8be629d90d8c --- /dev/null +++ b/src/System.ServiceModel.Syndication/tests/TestFeeds/rssSpecExample.xml @@ -0,0 +1,69 @@ + + + + Liftoff News + http://liftoff.msfc.nasa.gov/ + Liftoff to Space Exploration. + en-us + Tue, 10 Jun 2003 09:41:01 GMT + http://blogs.law.harvard.edu/tech/rss + Weblog Editor 2.0 + editor@example.com + TestingFeeds + Contoso Rights. + 60 + + 1 + 2 + 3 + + + Saturday + Sunday + + + + Search Online + Search + asdasdasdasdasd + http://www.contoso.no/search? + input Name + + + + http://2.bp.blogspot.com/-NA5Jb-64eUg/URx8CSdcj_I/AAAAAAAAAUo/eCx0irI0rq0/s1600/bg_Contoso_logo3-20120824073001907469-620x349.jpg + The title is not the same to the original one + http://www.contoso.com/notnews + + + Star City + http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp + + How do Americans get ready to work with Russians aboard the International Space Station? They take a crash course in culture, language and protocol at Russia's Star City. + + Tue, 03 Jun 2003 09:39:21 GMT + http://liftoff.msfc.nasa.gov/2003/06/03.html#item573 + + + + Sky watchers in Europe, Asia, and parts of Alaska and Canada will experience a partial eclipse of the Sun on Saturday, May 31st. + + Fri, 30 May 2003 11:06:42 GMT + http://liftoff.msfc.nasa.gov/2003/05/30.html#item572 + + + The Engine That Does More + http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp + Before man travels to Mars, NASA hopes to design new engines that will let us fly through the Solar System more quickly. The proposed VASIMR engine would do that. + Tue, 27 May 2003 08:37:32 GMT + http://liftoff.msfc.nasa.gov/2003/05/27.html#item571 + + + Astronauts' Dirty Laundry + http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp + Compared to earlier spacecraft, the International Space Station has many luxuries, but laundry facilities are not one of them. Instead, astronauts have other options. + Tue, 20 May 2003 08:56:02 GMT + http://liftoff.msfc.nasa.gov/2003/05/20.html#item570 + + + \ No newline at end of file diff --git a/src/System.ServiceModel.Syndication/tests/TestFeeds/rssSpecExampleWrongDateFormat.xml b/src/System.ServiceModel.Syndication/tests/TestFeeds/rssSpecExampleWrongDateFormat.xml new file mode 100644 index 000000000000..5a0febe7c42e --- /dev/null +++ b/src/System.ServiceModel.Syndication/tests/TestFeeds/rssSpecExampleWrongDateFormat.xml @@ -0,0 +1,69 @@ + + + + Liftoff News + http://liftoff.msfc.nasa.gov/ + Liftoff to Space Exploration. + en-us + Tue, 23 August 2016 16:08:00 EDT + http://blogs.law.harvard.edu/tech/rss + Weblog Editor 2.0 + editor@example.com + TestingFeeds + Contoso Rights. + 60 + + 1 + 2 + 3 + + + Saturday + Sunday + + + + Search Online + Search + asdasdasdasdasd + http://www.contoso.no/search? + input Name + + + + http://2.bp.blogspot.com/-NA5Jb-64eUg/URx8CSdcj_I/AAAAAAAAAUo/eCx0irI0rq0/s1600/bg_Contoso_logo3-20120824073001907469-620x349.jpg + The title is not the same to the original one + http://www.contoso.com/notnews + + + Star City + http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp + + How do Americans get ready to work with Russians aboard the International Space Station? They take a crash course in culture, language and protocol at Russia's Star City. + + Tue, 03 Jun 2003 09:39:21 GMT + http://liftoff.msfc.nasa.gov/2003/06/03.html#item573 + + + + Sky watchers in Europe, Asia, and parts of Alaska and Canada will experience a partial eclipse of the Sun on Saturday, May 31st. + + Thu, 16 Oct 08 14:23:26 -0700 + http://liftoff.msfc.nasa.gov/2003/05/30.html#item572 + + + The Engine That Does More + http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp + Before man travels to Mars, NASA hopes to design new engines that will let us fly through the Solar System more quickly. The proposed VASIMR engine would do that. + Tue, 27 May 2003 08:37:32 GMTtttt + http://liftoff.msfc.nasa.gov/2003/05/27.html#item571 + + + Astronauts' Dirty Laundry + http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp + Compared to earlier spacecraft, the International Space Station has many luxuries, but laundry facilities are not one of them. Instead, astronauts have other options. + Tue, 20 May 2003 08:56:02 GMT + http://liftoff.msfc.nasa.gov/2003/05/20.html#item570 + + + \ No newline at end of file diff --git a/src/System.ServiceModel.Syndication/tests/TestFeeds/rssSpecExampleWrongSkipDays.xml b/src/System.ServiceModel.Syndication/tests/TestFeeds/rssSpecExampleWrongSkipDays.xml new file mode 100644 index 000000000000..bbfd75b6738b --- /dev/null +++ b/src/System.ServiceModel.Syndication/tests/TestFeeds/rssSpecExampleWrongSkipDays.xml @@ -0,0 +1,70 @@ + + + + Liftoff News + http://liftoff.msfc.nasa.gov/ + Liftoff to Space Exploration. + en-us + Tue, 10 Jun 2003 09:41:01 GMT + http://blogs.law.harvard.edu/tech/rss + Weblog Editor 2.0 + editor@example.com + TestingFeeds + Contoso Rights. + 60 + + 1 + 2 + 3 + + + Saturday + Sunday + tomorrow + + + + Search Online + Search + asdasdasdasdasd + http://www.contoso.no/search? + input Name + + + + http://2.bp.blogspot.com/-NA5Jb-64eUg/URx8CSdcj_I/AAAAAAAAAUo/eCx0irI0rq0/s1600/bg_Contoso_logo3-20120824073001907469-620x349.jpg + The title is not the same to the original one + http://www.contoso.com/notnews + + + Star City + http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp + + How do Americans get ready to work with Russians aboard the International Space Station? They take a crash course in culture, language and protocol at Russia's Star City. + + Tue, 03 Jun 2003 09:39:21 GMT + http://liftoff.msfc.nasa.gov/2003/06/03.html#item573 + + + + Sky watchers in Europe, Asia, and parts of Alaska and Canada will experience a partial eclipse of the Sun on Saturday, May 31st. + + Fri, 30 May 2003 11:06:42 GMT + http://liftoff.msfc.nasa.gov/2003/05/30.html#item572 + + + The Engine That Does More + http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp + Before man travels to Mars, NASA hopes to design new engines that will let us fly through the Solar System more quickly. The proposed VASIMR engine would do that. + Tue, 27 May 2003 08:37:32 GMT + http://liftoff.msfc.nasa.gov/2003/05/27.html#item571 + + + Astronauts' Dirty Laundry + http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp + Compared to earlier spacecraft, the International Space Station has many luxuries, but laundry facilities are not one of them. Instead, astronauts have other options. + Tue, 20 May 2003 08:56:02 GMT + http://liftoff.msfc.nasa.gov/2003/05/20.html#item570 + + + \ No newline at end of file diff --git a/src/System.ServiceProcess.ServiceController/tests/ServiceBaseTests.cs b/src/System.ServiceProcess.ServiceController/tests/ServiceBaseTests.cs index daf0ccc49e1b..96fd00329527 100644 --- a/src/System.ServiceProcess.ServiceController/tests/ServiceBaseTests.cs +++ b/src/System.ServiceProcess.ServiceController/tests/ServiceBaseTests.cs @@ -21,6 +21,8 @@ public class ServiceBaseTests : IDisposable private static readonly Lazy s_isElevated = new Lazy(() => AdminHelpers.IsProcessElevated()); protected static bool IsProcessElevated => s_isElevated.Value; + private bool _disposed; + public ServiceBaseTests() { _testService = new TestServiceProvider(); @@ -174,7 +176,11 @@ public void TestOnContinueBeforePause() public void Dispose() { - _testService.DeleteTestServices(); + if (!_disposed) + { + _testService.DeleteTestServices(); + _disposed = true; + } } } } diff --git a/src/System.ServiceProcess.ServiceController/tests/ServiceControllerTests.cs b/src/System.ServiceProcess.ServiceController/tests/ServiceControllerTests.cs index 2511ca5e1817..11978dfe0676 100644 --- a/src/System.ServiceProcess.ServiceController/tests/ServiceControllerTests.cs +++ b/src/System.ServiceProcess.ServiceController/tests/ServiceControllerTests.cs @@ -19,6 +19,7 @@ public class ServiceControllerTests : IDisposable protected static bool IsProcessElevated => s_isElevated.Value; private const int ExpectedDependentServiceCount = 3; + private bool _disposed; public ServiceControllerTests() { @@ -190,7 +191,11 @@ public void ServicesStartMode() public void Dispose() { - _testService.DeleteTestServices(); + if (!_disposed) + { + _testService.DeleteTestServices(); + _disposed = true; + } } private static ServiceController AssertHasDependent(ServiceController controller, string serviceName, string displayName) diff --git a/src/System.ServiceProcess.ServiceController/tests/System.ServiceProcess.ServiceController.TestService/TestServiceInstaller.cs b/src/System.ServiceProcess.ServiceController/tests/System.ServiceProcess.ServiceController.TestService/TestServiceInstaller.cs index 9bd9c128073a..878f560386a0 100644 --- a/src/System.ServiceProcess.ServiceController/tests/System.ServiceProcess.ServiceController.TestService/TestServiceInstaller.cs +++ b/src/System.ServiceProcess.ServiceController/tests/System.ServiceProcess.ServiceController.TestService/TestServiceInstaller.cs @@ -14,6 +14,8 @@ public class TestServiceInstaller { public const string LocalServiceName = "NT AUTHORITY\\LocalService"; + private string _removalStack; + public TestServiceInstaller() { } @@ -128,6 +130,19 @@ public unsafe void Install() public void RemoveService() { + if (ServiceName == null) + throw new InvalidOperationException($"Already removed service at stack ${_removalStack}"); + + // Store the stack for logging in case we're called twice + try + { + throw new Exception(); + } + catch (Exception e) + { + _removalStack = e.StackTrace; + } + // Stop the service using (ServiceController svc = new ServiceController(ServiceName)) { @@ -161,6 +176,8 @@ public void RemoveService() Interop.Advapi32.CloseServiceHandle(serviceManagerHandle); } + + ServiceName = null; } } -} +} \ No newline at end of file diff --git a/src/System.Threading.Tasks.Dataflow/src/Internal/ProducerConsumerQueues.cs b/src/System.Threading.Tasks.Dataflow/src/Internal/ProducerConsumerQueues.cs index d14fd60cec6a..44b10b3dc83f 100644 --- a/src/System.Threading.Tasks.Dataflow/src/Internal/ProducerConsumerQueues.cs +++ b/src/System.Threading.Tasks.Dataflow/src/Internal/ProducerConsumerQueues.cs @@ -551,7 +551,7 @@ static class PaddingHelpers } /// Padding structure used to minimize false sharing in SingleProducerSingleConsumerQueue{T}. - [StructLayout(LayoutKind.Explicit, Size = PaddingHelpers.CACHE_LINE_SIZE - sizeof(Int32))] // Based on common case of 64-byte cache lines + [StructLayout(LayoutKind.Explicit, Size = PaddingHelpers.CACHE_LINE_SIZE - sizeof(Int32))] struct PaddingFor32 { } diff --git a/src/System.Threading.Tasks.Extensions/tests/AsyncValueTaskMethodBuilderTests.cs b/src/System.Threading.Tasks.Extensions/tests/AsyncValueTaskMethodBuilderTests.cs index 66b1986c2a19..94827c91b5d2 100644 --- a/src/System.Threading.Tasks.Extensions/tests/AsyncValueTaskMethodBuilderTests.cs +++ b/src/System.Threading.Tasks.Extensions/tests/AsyncValueTaskMethodBuilderTests.cs @@ -119,7 +119,6 @@ public void SetStateMachine_InvalidArgument_ThrowsException() { AsyncValueTaskMethodBuilder b = ValueTask.CreateAsyncMethodBuilder(); AssertExtensions.Throws("stateMachine", () => b.SetStateMachine(null)); - b.SetStateMachine(new DelegateStateMachine()); } [Fact]