public O OnExcuting <I, O>(I o, ParamKind _PKind = ParamKind.Send, MethodKind _Kind = MethodKind.GET) where I : SMSReqBase where O : SMSResBase { try { return(("SMPUrl".ConfigValue() + "/" + _PKind + "?" + o.EntityToKeyValue(false)).Get().ToEntity <O>()); } catch (Exception ex) { LogModule.Info("SMP异常:" + ex); throw new Exception(ex.Message); } }
public static ParamInfo ParamInfo(string name, Type type = null, ParamKind kind = ParamKind.Input) { if (type == null) { type = typeof(object); } return(new ParamInfo { Name = name, DataType = type, Kind = kind }); }
public void SetSig(IntPtr sig, ref int idx, Token context) { CustomMod.ReadCustomMods(sig, ref idx); CorElementType b = (CorElementType)Decoder.ReadByte(sig, idx); if (b == CorElementType.TYPEDBYREF) { idx++; this.kind = ParamKind.TypedByRef; } else if (b == CorElementType.VOID) { idx++; this.kind = ParamKind.Void; } else { this.kind = ParamKind.Type; if (b == CorElementType.BYREF) { idx++; this.byRef = true; } this.type = new Type(sig, ref idx, context); if (this.type.IsGenericInstance) { throw new System.ArgumentException ("Unsupported generic instance as parameter"); } } // Mode_Out and by ref parameters are not supported. Raise an error in those cases. if ((this.Mode == ParamMode.Mode_Out) || (this.byRef)) { throw new ArgumentException ("Mode Out or ByRef parameters are not handled"); } }
public static bool IsNormal(this ParamKind kind) => kind == ParamKind.NormalParam || kind == ParamKind.NormalArray || kind == ParamKind.NormalCommand;
public ParamInfo(int index, ParamKind kind, Type paramType, Type underlyingType) { Index = index; Kind = kind; ParameterType = paramType; UnderlyingType = underlyingType; }
public ParamInfo(ParameterInfo param, ParamKind kind, bool optional) { Param = param; Kind = kind; Optional = optional; }
internal Param(ParamKind kind) { this.kind = kind; }