Beispiel #1
0
 public ActionMetadata(MethodInfo action, ParameterMetadata[] parameters, Type resultType)
 {
     Action                    = action;
     Parameters                = new ReadOnlyCollection <ParameterMetadata>(parameters);
     ResultType                = resultType;
     Timeout                   = TimeSpan.Zero;
     IsAsynchronous            = typeof(Task).GetTypeInfo().IsAssignableFrom(action.ReturnType.GetTypeInfo());
     NormalizedName            = BoltFramework.NormalizeActionName(Name.AsReadOnlySpan()).ConvertToString();
     HasSerializableParameters = Parameters.Any(p => p.IsSerializable);
     CancellationTokenIndex    = GetCancellationTokenIndex();
 }