public LogicalMethodInfo (LogicalTypeInfo typeInfo, MethodInfo method) { _typeInfo = typeInfo; _methodInfo = method; _wma = (WebMethodAttribute) Attribute.GetCustomAttribute (method, typeof (WebMethodAttribute)); _sma = (ScriptMethodAttribute) Attribute.GetCustomAttribute (method, typeof (ScriptMethodAttribute)); if (_sma == null) _sma = ScriptMethodAttribute.Default; _params = MethodInfo.GetParameters (); if (HasParameters) { _paramMap = new Dictionary<string, int> (_params.Length, StringComparer.Ordinal); for (int i = 0; i < _params.Length; i++) _paramMap.Add(_params[i].Name, i); } if (ScriptMethod.ResponseFormat == ResponseFormat.Xml && MethodInfo.ReturnType != typeof (void)) { Type retType = MethodInfo.ReturnType; if (Type.GetTypeCode (retType) != TypeCode.String || ScriptMethod.XmlSerializeString) _xmlSer = new XmlSerializer (retType); } }
public LogicalMethodInfo(LogicalTypeInfo typeInfo, MethodInfo method) { _typeInfo = typeInfo; _methodInfo = method; _wma = (WebMethodAttribute)Attribute.GetCustomAttribute(method, typeof(WebMethodAttribute)); _sma = (ScriptMethodAttribute)Attribute.GetCustomAttribute(method, typeof(ScriptMethodAttribute)); if (_sma == null) { _sma = ScriptMethodAttribute.Default; } _params = MethodInfo.GetParameters(); if (HasParameters) { _paramMap = new Dictionary <string, int> (_params.Length, StringComparer.Ordinal); for (int i = 0; i < _params.Length; i++) { _paramMap.Add(_params[i].Name, i); } } if (ScriptMethod.ResponseFormat == ResponseFormat.Xml && MethodInfo.ReturnType != typeof(void)) { Type retType = MethodInfo.ReturnType; if (Type.GetTypeCode(retType) != TypeCode.String || ScriptMethod.XmlSerializeString) { _xmlSer = new XmlSerializer(retType); } } }
protected LogicalMethodInfo (LogicalTypeInfo typeInfo, MethodInfo method) { _methodInfo = method; _params = MethodInfo.GetParameters (); if (HasParameters) { _paramMap = new Dictionary<string, int> (_params.Length, StringComparer.Ordinal); for (int i = 0; i < _params.Length; i++) _paramMap.Add(_params[i].Name, i); } }
protected LogicalMethodInfo(LogicalTypeInfo typeInfo, MethodInfo method) { _methodInfo = method; _params = MethodInfo.GetParameters(); _typeInfo = typeInfo; if (HasParameters) { _paramMap = new Dictionary <string, int> (_params.Length, StringComparer.Ordinal); for (int i = 0; i < _params.Length; i++) { _paramMap.Add(_params[i].Name, i); } } }
static internal LogicalTypeInfo GetLogicalTypeInfo(Type t, string filePath) { Hashtable type_to_manager = _type_to_logical_type; LogicalTypeInfo tm = (LogicalTypeInfo)type_to_manager [t]; if (tm != null) { return(tm); } tm = CreateTypeInfo(t, filePath); type_to_manager [t] = tm; return(tm); }
private RestHandler(HttpContext context, Type type, string filePath) { LogicalTypeInfo logicalTypeInfo = LogicalTypeInfo.GetLogicalTypeInfo(type, filePath); HttpRequest request = context.Request; string methodName = request.PathInfo.Substring(1); if (logicalTypeInfo == null || String.IsNullOrEmpty(methodName)) { ThrowInvalidOperationException(methodName); } _logicalMethodInfo = logicalTypeInfo [methodName]; if (_logicalMethodInfo == null) { ThrowInvalidOperationException(methodName); } }
public AsmxLogicalMethodInfo(LogicalTypeInfo typeInfo, MethodInfo method) : base(typeInfo, method) { _typeInfo = typeInfo; _wma = (WebMethodAttribute)Attribute.GetCustomAttribute(method, typeof(WebMethodAttribute)); _sma = (ScriptMethodAttribute)Attribute.GetCustomAttribute(method, typeof(ScriptMethodAttribute)); if (_sma == null) { _sma = ScriptMethodAttribute.Default; } if (ScriptMethod.ResponseFormat == ResponseFormat.Xml && MethodInfo.ReturnType != typeof(void)) { Type retType = MethodInfo.ReturnType; if (Type.GetTypeCode(retType) != TypeCode.String || ScriptMethod.XmlSerializeString) { _xmlSer = new XmlSerializer(retType); } } }
public WcfLogicalMethodInfo (LogicalTypeInfo typeInfo, OperationDescription od) : base (typeInfo, od.SyncMethod) { this.od = od; }
public AsmxLogicalMethodInfo (LogicalTypeInfo typeInfo, MethodInfo method) : base (typeInfo, method) { _typeInfo = typeInfo; _wma = (WebMethodAttribute) Attribute.GetCustomAttribute (method, typeof (WebMethodAttribute)); _sma = (ScriptMethodAttribute) Attribute.GetCustomAttribute (method, typeof (ScriptMethodAttribute)); if (_sma == null) _sma = ScriptMethodAttribute.Default; if (ScriptMethod.ResponseFormat == ResponseFormat.Xml && MethodInfo.ReturnType != typeof (void)) { Type retType = MethodInfo.ReturnType; if (Type.GetTypeCode (retType) != TypeCode.String || ScriptMethod.XmlSerializeString) _xmlSer = new XmlSerializer (retType); } }
public WcfLogicalMethodInfo(LogicalTypeInfo typeInfo, OperationDescription od) : base(typeInfo, od.SyncMethod) { this.od = od; }
public static string GetClientProxyScript(Type type, string path, bool debug) { return(LogicalTypeInfo.GetLogicalTypeInfo(type, path).Proxy); }
public ClientProxyHandler (Type type, string filePath) { _type = type; _logicalTypeInfo = LogicalTypeInfo.GetLogicalTypeInfo (type, filePath); }
public ClientProxyHandler(Type type, string filePath) { _type = type; _logicalTypeInfo = LogicalTypeInfo.GetLogicalTypeInfo(type, filePath); }
static internal LogicalTypeInfo GetLogicalTypeInfo (Type t, string filePath) { Hashtable type_to_manager = _type_to_logical_type; LogicalTypeInfo tm = (LogicalTypeInfo) type_to_manager [t]; if (tm != null) return tm; tm = new LogicalTypeInfo (t, filePath); type_to_manager [t] = tm; return tm; }