KlusterKite  0.0.0
A framework to create scalable and redundant services based on awesome Akka.Net project.
KlusterKite.API.Attributes.PublishToApiAttribute Class Reference

Marks properties and methods as publishable to GraphQL api More...

Inheritance diagram for KlusterKite.API.Attributes.PublishToApiAttribute:
KlusterKite.API.Attributes.ApiDescriptionAttribute KlusterKite.API.Attributes.DeclareFieldAttribute KlusterKite.API.Attributes.DeclareMutationAttribute KlusterKite.API.Attributes.DeclareConnectionAttribute

Static Public Member Functions

static string GetMemberName (MemberInfo memberInfo)
 Gets the declared member name More...
 
- Static Public Member Functions inherited from KlusterKite.API.Attributes.ApiDescriptionAttribute
static Type CheckType (Type type, Type typeToCheck)
 Checks the interface implementation More...
 
static string GetParameterName (ParameterInfo parameter)
 Creates name for the method parameter More...
 
static string GetTypeName (Type type)
 Creates name for the type More...
 
static string ToCamelCase (string name)
 Converts string to camel case More...
 

Protected Member Functions

 PublishToApiAttribute ()
 Initializes a new instance of the PublishToApiAttribute class. More...
 
 PublishToApiAttribute (string description)
 Initializes a new instance of the PublishToApiAttribute class. More...
 

Properties

Type ReturnType [get, set]
 Gets or sets the return type to be described for an api More...
 
- Properties inherited from KlusterKite.API.Attributes.ApiDescriptionAttribute
string Description [get, set]
 Gets or sets the description to publish More...
 
string Name [get, set]
 Gets or sets the published property / method name More...
 

Additional Inherited Members

- Public Member Functions inherited from KlusterKite.API.Attributes.ApiDescriptionAttribute
 ApiDescriptionAttribute ()
 Initializes a new instance of the ApiDescriptionAttribute class. More...
 
 ApiDescriptionAttribute (string description)
 Initializes a new instance of the ApiDescriptionAttribute class. More...
 
string GetName (MemberInfo member)
 Creates name for the type field More...
 
string GetName (Type type)
 Creates name for the type More...
 

Detailed Description

Marks properties and methods as publishable to GraphQL api

Method arguments of types RequestContext and ApiRequest will be provided with values automatically from request context

Definition at line 22 of file PublishToApiAttribute.cs.

Constructor & Destructor Documentation

◆ PublishToApiAttribute() [1/2]

KlusterKite.API.Attributes.PublishToApiAttribute.PublishToApiAttribute ( )
protected

Initializes a new instance of the PublishToApiAttribute class.

Definition at line 27 of file PublishToApiAttribute.cs.

◆ PublishToApiAttribute() [2/2]

KlusterKite.API.Attributes.PublishToApiAttribute.PublishToApiAttribute ( string  description)
protected

Initializes a new instance of the PublishToApiAttribute class.

Parameters
descriptionThe description.

Definition at line 37 of file PublishToApiAttribute.cs.

Member Function Documentation

◆ GetMemberName()

static string KlusterKite.API.Attributes.PublishToApiAttribute.GetMemberName ( MemberInfo  memberInfo)
static

Gets the declared member name

Parameters
memberInfoThe member
Returns
The member name

Definition at line 61 of file PublishToApiAttribute.cs.

Property Documentation

◆ ReturnType

Type KlusterKite.API.Attributes.PublishToApiAttribute.ReturnType
getset

Gets or sets the return type to be described for an api

In case the return type is defined it is assumed that this property / method is forwarding (some other api provider will resolve it's value). Depending expected return type this should return: For scalar values this should be Newtonsoft.Json.Linq.JValue or Task<TResult> with Newtonsoft.Json.Linq.JValue as TResult For complex objects values this should be Newtonsoft.Json.Linq.JObject or Task<TResult> with Newtonsoft.Json.Linq.JObject as TResult For array values this should be Newtonsoft.Json.Linq.JArray or Task<TResult> with Newtonsoft.Json.Linq.JArray as TResult For connection values this should be Newtonsoft.Json.Linq.JObject or Task<TResult> with Newtonsoft.Json.Linq.JObject as TResult. It is expected for JObjects for connections, that they contains exactly two properties - "count" as Newtonsoft.Json.Linq.JValue and "items" as Newtonsoft.Json.Linq.JArray

Definition at line 54 of file PublishToApiAttribute.cs.


The documentation for this class was generated from the following file: