/* **************************************************************************** * * Copyright (c) Microsoft Corporation. * * This source code is subject to terms and conditions of the Microsoft Public License. A * copy of the license can be found in the License.html file at the root of this distribution. If * you cannot locate the Microsoft Public License, please send an email to * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound * by the terms of the Microsoft Public License. * * You must not remove this notice, or any other, from this software. * * * ***************************************************************************/ using System; using Microsoft; #if CODEPLEX_40 namespace System.Dynamic { #else namespace Microsoft.Scripting { #endif #if true internal static partial class Strings { private static string FormatString(string format, params object[] args) { return string.Format(System.Globalization.CultureInfo.CurrentCulture, format, args); } } #region Generated Com Exception Factory // *** BEGIN GENERATED CODE *** // generated by function: gen_expr_factory_com from: generate_exception_factory.py /// /// Strongly-typed and parameterized string factory. /// internal static partial class Strings { /// /// A string like "Invalid argument value" /// internal static string InvalidArgumentValue { get { return "Invalid argument value"; } } /// /// A string like "COM object is expected." /// internal static string ComObjectExpected { get { return "COM object is expected."; } } /// /// A string like "Cannot perform call." /// internal static string CannotCall { get { return "Cannot perform call."; } } /// /// A string like "COM object does not support events." /// internal static string COMObjectDoesNotSupportEvents { get { return "COM object does not support events."; } } /// /// A string like "COM object does not support specified source interface." /// internal static string COMObjectDoesNotSupportSourceInterface { get { return "COM object does not support specified source interface."; } } /// /// A string like "Marshal.SetComObjectData failed." /// internal static string SetComObjectDataFailed { get { return "Marshal.SetComObjectData failed."; } } /// /// A string like "This method exists only to keep the compiler happy." /// internal static string MethodShouldNotBeCalled { get { return "This method exists only to keep the compiler happy."; } } /// /// A string like "Unexpected VarEnum {0}." /// internal static string UnexpectedVarEnum(object p0) { return FormatString("Unexpected VarEnum {0}.", p0); } /// /// A string like "Error while invoking {0}." /// internal static string DispBadParamCount(object p0) { return FormatString("Error while invoking {0}.", p0); } /// /// A string like "Error while invoking {0}." /// internal static string DispMemberNotFound(object p0) { return FormatString("Error while invoking {0}.", p0); } /// /// A string like "Error while invoking {0}. Named arguments are not supported." /// internal static string DispNoNamedArgs(object p0) { return FormatString("Error while invoking {0}. Named arguments are not supported.", p0); } /// /// A string like "Error while invoking {0}." /// internal static string DispOverflow(object p0) { return FormatString("Error while invoking {0}.", p0); } /// /// A string like "Could not convert argument {0} for call to {1}." /// internal static string DispTypeMismatch(object p0, object p1) { return FormatString("Could not convert argument {0} for call to {1}.", p0, p1); } /// /// A string like "Error while invoking {0}. A required parameter was omitted." /// internal static string DispParamNotOptional(object p0) { return FormatString("Error while invoking {0}. A required parameter was omitted.", p0); } /// /// A string like "ResolveComReference.CannotRetrieveTypeInformation." /// internal static string CannotRetrieveTypeInformation { get { return "ResolveComReference.CannotRetrieveTypeInformation."; } } /// /// A string like "IDispatch::GetIDsOfNames behaved unexpectedly for {0}." /// internal static string GetIDsOfNamesInvalid(object p0) { return FormatString("IDispatch::GetIDsOfNames behaved unexpectedly for {0}.", p0); } /// /// A string like "Attempting to wrap an unsupported enum type." /// internal static string UnsupportedEnumType { get { return "Attempting to wrap an unsupported enum type."; } } /// /// A string like "Attempting to pass an event handler of an unsupported type." /// internal static string UnsupportedHandlerType { get { return "Attempting to pass an event handler of an unsupported type."; } } /// /// A string like "Could not get dispatch ID for {0} (error: {1})." /// internal static string CouldNotGetDispId(object p0, object p1) { return FormatString("Could not get dispatch ID for {0} (error: {1}).", p0, p1); } /// /// A string like "There are valid conversions from {0} to {1}." /// internal static string AmbiguousConversion(object p0, object p1) { return FormatString("There are valid conversions from {0} to {1}.", p0, p1); } /// /// A string like "Variant.GetAccessor cannot handle {0}." /// internal static string VariantGetAccessorNYI(object p0) { return FormatString("Variant.GetAccessor cannot handle {0}.", p0); } } /// /// Strongly-typed and parameterized exception factory. /// internal static partial class Error { /// /// ArgumentException with message like "COM object does not support events." /// internal static Exception COMObjectDoesNotSupportEvents() { return new ArgumentException(Strings.COMObjectDoesNotSupportEvents); } /// /// ArgumentException with message like "COM object does not support specified source interface." /// internal static Exception COMObjectDoesNotSupportSourceInterface() { return new ArgumentException(Strings.COMObjectDoesNotSupportSourceInterface); } /// /// InvalidOperationException with message like "Marshal.SetComObjectData failed." /// internal static Exception SetComObjectDataFailed() { return new InvalidOperationException(Strings.SetComObjectDataFailed); } /// /// InvalidOperationException with message like "This method exists only to keep the compiler happy." /// internal static Exception MethodShouldNotBeCalled() { return new InvalidOperationException(Strings.MethodShouldNotBeCalled); } /// /// InvalidOperationException with message like "Unexpected VarEnum {0}." /// internal static Exception UnexpectedVarEnum(object p0) { return new InvalidOperationException(Strings.UnexpectedVarEnum(p0)); } /// /// System.Reflection.TargetParameterCountException with message like "Error while invoking {0}." /// internal static Exception DispBadParamCount(object p0) { return new System.Reflection.TargetParameterCountException(Strings.DispBadParamCount(p0)); } /// /// MissingMemberException with message like "Error while invoking {0}." /// internal static Exception DispMemberNotFound(object p0) { return new MissingMemberException(Strings.DispMemberNotFound(p0)); } /// /// ArgumentException with message like "Error while invoking {0}. Named arguments are not supported." /// internal static Exception DispNoNamedArgs(object p0) { return new ArgumentException(Strings.DispNoNamedArgs(p0)); } /// /// OverflowException with message like "Error while invoking {0}." /// internal static Exception DispOverflow(object p0) { return new OverflowException(Strings.DispOverflow(p0)); } /// /// ArgumentException with message like "Could not convert argument {0} for call to {1}." /// internal static Exception DispTypeMismatch(object p0, object p1) { return new ArgumentException(Strings.DispTypeMismatch(p0, p1)); } /// /// ArgumentException with message like "Error while invoking {0}. A required parameter was omitted." /// internal static Exception DispParamNotOptional(object p0) { return new ArgumentException(Strings.DispParamNotOptional(p0)); } /// /// InvalidOperationException with message like "ResolveComReference.CannotRetrieveTypeInformation." /// internal static Exception CannotRetrieveTypeInformation() { return new InvalidOperationException(Strings.CannotRetrieveTypeInformation); } /// /// ArgumentException with message like "IDispatch::GetIDsOfNames behaved unexpectedly for {0}." /// internal static Exception GetIDsOfNamesInvalid(object p0) { return new ArgumentException(Strings.GetIDsOfNamesInvalid(p0)); } /// /// InvalidOperationException with message like "Attempting to wrap an unsupported enum type." /// internal static Exception UnsupportedEnumType() { return new InvalidOperationException(Strings.UnsupportedEnumType); } /// /// InvalidOperationException with message like "Attempting to pass an event handler of an unsupported type." /// internal static Exception UnsupportedHandlerType() { return new InvalidOperationException(Strings.UnsupportedHandlerType); } /// /// MissingMemberException with message like "Could not get dispatch ID for {0} (error: {1})." /// internal static Exception CouldNotGetDispId(object p0, object p1) { return new MissingMemberException(Strings.CouldNotGetDispId(p0, p1)); } /// /// System.Reflection.AmbiguousMatchException with message like "There are valid conversions from {0} to {1}." /// internal static Exception AmbiguousConversion(object p0, object p1) { return new System.Reflection.AmbiguousMatchException(Strings.AmbiguousConversion(p0, p1)); } /// /// NotImplementedException with message like "Variant.GetAccessor cannot handle {0}." /// internal static Exception VariantGetAccessorNYI(object p0) { return new NotImplementedException(Strings.VariantGetAccessorNYI(p0)); } } // *** END GENERATED CODE *** #endregion #endif }