/// <summary> /// Gets the name of the result type differentiating promises from normal types. For promises it returns the type of the promised value instead of the promises type itself. /// </summary> protected string GetActualMethodReturnType(Type type, SerializeFlag flag) { if (!type.IsGenericType) { return(GetGenericTypeName(type, flag)); } if (GrainInterfaceData.IsTaskType(type)) { Type[] genericArguments = type.GetGenericArguments(); if (genericArguments.Length == 1) { return(GetGenericTypeName(genericArguments[0], flag)); } var errorMsg = String.Format("Unexpected number of arguments {0} for generic type {1} used as a return type. Only Type<T> are supported as generic return types of grain methods.", genericArguments.Length, type); ConsoleText.WriteError(errorMsg); throw new ApplicationException(errorMsg); } return(GetGenericTypeName(type, flag)); }
public static extern int hb_buffer_serialize_glyphs(IntPtr buffer, int start, int end, IntPtr buf, int buf_size, out int buf_consumed, IntPtr font, SerializeFormat format, SerializeFlag flags);
/// <summary> /// Get the name string for generic type /// </summary> private string GetGenericTypeName(Type type, SerializeFlag flag = SerializeFlag.NoSerialize, bool includeImpl = true) { return(GetGenericTypeName(type, RecordReferencedNamespaceAndAssembly, t => flag != SerializeFlag.NoSerialize && IsDeclaredHere(type) && includeImpl)); }
protected CodeTypeReference GetReturnTypeReference(Type type, SerializeFlag flag) { return(type == typeof(void) ? new CodeTypeReference(typeof(void)) : new CodeTypeReference(GetGenericTypeName(type, flag))); }
/// <summary> /// Get the name string for generic type /// </summary> private string GetGenericTypeName(Type type, SerializeFlag flag = SerializeFlag.NoSerialize, bool includeImpl = true) { return GetGenericTypeName(type, RecordReferencedNamespaceAndAssembly, t => flag != SerializeFlag.NoSerialize && IsDeclaredHere(type) && includeImpl); }
protected CodeTypeReference GetReturnTypeReference(Type type, SerializeFlag flag) { return type == typeof(void) ? new CodeTypeReference(typeof(void)) : new CodeTypeReference(GetGenericTypeName(type, flag)); }
/// <summary> /// Gets the name of the result type differentiating promises from normal types. For promises it returns the type of the promised value instead of the promises type itself. /// </summary> protected string GetActualMethodReturnType(Type type, SerializeFlag flag) { if (!type.IsGenericType) return GetGenericTypeName(type, flag); if (GrainInterfaceData.IsTaskType(type)) { Type[] genericArguments = type.GetGenericArguments(); if (genericArguments.Length == 1) return GetGenericTypeName(genericArguments[0], flag); var errorMsg = String.Format("Unexpected number of arguments {0} for generic type {1} used as a return type. Only Type<T> are supported as generic return types of grain methods.", genericArguments.Length, type); ReportError(errorMsg); throw new ApplicationException(errorMsg); } return GetGenericTypeName(type, flag); }
public ReservedMethod(byte argCount, SerializeFlag serializeFlag, byte syncLevel, AcpiMethodImpl impl) : base(argCount, serializeFlag, syncLevel) { this.impl = impl; }
public BytecodeMethod(byte argCount, SerializeFlag serializeFlag, byte syncLevel, byte[] unparsedTermList) : base(argCount, serializeFlag, syncLevel) { this.unparsedTermList = unparsedTermList; this.body = null; }
public Method(byte argCount, SerializeFlag serializeFlag, byte syncLevel) { this.argCount = argCount; this.serializeFlag = serializeFlag; this.syncLevel = syncLevel; }