/// <summary> /// When the SOAP extension is accessed for the first time, the XML Web /// service method it is applied to is accessed to store the file /// name passed in, using the corresponding SoapExtensionAttribute. /// </summary> /// <param name="methodInfo">The method being called.</param> /// <param name="attribute">Decorating attribute for the method.</param> /// <returns>An initializer object.</returns> /// <exception cref="ArgumentNullException">Thrown if /// <paramref name="methodInfo"/> is null.</exception> public override object GetInitializer(LogicalMethodInfo methodInfo, SoapExtensionAttribute attribute) { if (methodInfo == null) { throw new ArgumentNullException("methodInfo"); } return methodInfo.DeclaringType; }
internal SoapReflectedExtension(Type type, SoapExtensionAttribute attribute, int priority) { if (priority < 0) { throw new ArgumentException(Res.GetString("WebConfigInvalidExtensionPriority", new object[] { priority }), "priority"); } this.type = type; this.attribute = attribute; this.priority = priority; }
internal SoapReflectedExtension(Type type, SoapExtensionAttribute attribute, int priority) { if (priority < 0) { throw new ArgumentException(Res.GetString("WebConfigInvalidExtensionPriority", new object[] { priority }), "priority"); } this.type = type; this.attribute = attribute; this.priority = priority; }
internal static SoapExtensionRuntimeConfig[] GetMethodExtensions(LogicalMethodInfo method) { object[] ats = method.GetCustomAttributes(typeof(SoapExtensionAttribute)); SoapExtensionRuntimeConfig[] exts = new SoapExtensionRuntimeConfig [ats.Length]; int[] priorities = new int[ats.Length]; for (int n = 0; n < ats.Length; n++) { SoapExtensionAttribute at = (SoapExtensionAttribute)ats[n]; SoapExtensionRuntimeConfig econf = new SoapExtensionRuntimeConfig(); econf.Type = at.ExtensionType; priorities [n] = at.Priority; SoapExtension ext = (SoapExtension)Activator.CreateInstance(econf.Type); econf.InitializationInfo = ext.GetInitializer(method, at); exts [n] = econf; } Array.Sort(priorities, exts); return(exts); }
public override object GetInitializer(LogicalMethodInfo methodInfo, SoapExtensionAttribute attribute) { return null; }
/// <summary> /// 在Xml Web Service第一次运行的时候,一次性的将通过TraceExtensionAttribute传递进来的 /// 保存日志信息的文件名初始化 /// </summary> /// <param name="methodInfo">应用 SOAP 扩展的 XML Web services 方法的特定函数原型</param> /// <param name="attribute">应用于 XML Web services 方法的 SoapExtensionAttribute</param> /// <returns>SOAP 扩展将对其进行初始化以用于缓存</returns> public override object GetInitializer(LogicalMethodInfo methodInfo, SoapExtensionAttribute attribute) { return ((SoapTraceExtensionAttribute)attribute).ExtensionType; }
public override object GetInitializer(System.Web.Services.Protocols.LogicalMethodInfo methodInfo, System.Web.Services.Protocols.SoapExtensionAttribute attribute) { return(""); }
public abstract object GetInitializer (LogicalMethodInfo methodInfo, SoapExtensionAttribute attribute);
internal SoapReflectedExtension(Type type, SoapExtensionAttribute attribute) : this(type, attribute, attribute.Priority) { }
/// <summary> /// When the SOAP extension is accessed for the first time, the XML Web service method it is applied to /// is accessed to store the file name passed in, using the corresponding SoapExtensionAttribute. /// </summary> /// <param name="serviceType">A <see cref="Type"/> obejct.</param> /// <param name="attribute">A <see cref="SoapExtensionAttribute"/> object.</param> /// <returns>An <see cref="object"/> obejct.</returns> public override object GetInitializer(LogicalMethodInfo methodInfo, SoapExtensionAttribute attribute) { // keep = ((SharedCacheSoapExtensionAttribute)attribute).CacheInSecond; return attribute; }
public override object GetInitializer( LogicalMethodInfo methodInfo, SoapExtensionAttribute attribute) { return ((ReverserExtensionAttribute) attribute).Filename; }
public abstract object GetInitializer(LogicalMethodInfo methodInfo, SoapExtensionAttribute attribute);
internal SoapReflectedExtension(Type type, SoapExtensionAttribute attribute) : this(type, attribute, attribute.Priority) { }
/// <summary> /// Allows the SdmxSoapValidator soap extension to initialise the <see cref="InitializerValueObject"/> and <see cref="SchemaCache"/> /// This GetInitializer overload is called from applying <see cref="SdmxSoapValidatorAttribute"/> to Web Methods /// <seealso cref="System.Web.Services.Protocols.SoapExtension.GetInitializer(System.Web.Services.Protocols.LogicalMethodInfo, System.Web.Services.Protocols.SoapExtensionAttribute)"/> /// </summary> /// <param name="methodInfo"> /// A <see cref="System.Web.Services.Protocols.LogicalMethodInfo"/> representing the specific function prototype for the XML Web service method to which the SOAP extension is applied. /// </param> /// <param name="attribute"> /// The <see cref="SdmxSoapValidatorAttribute"/> applied to the XML Web service method. /// </param> /// <returns> /// The <see cref="InitializerValueObject"/> object /// </returns> public override object GetInitializer(LogicalMethodInfo methodInfo, SoapExtensionAttribute attribute) { return this.GetInitiliaserCommon(methodInfo.MethodInfo.ReflectedType, methodInfo.Name); }
public override object GetInitializer(LogicalMethodInfo methodInfo, SoapExtensionAttribute attribute) { //return ((TraceExtensionAttribute)attribute).Filename; return null; }