using System;
using System.Collections.Generic;
using System.Text;
namespace Edge.Core.UniversalApi
{
///
/// On Class indicates it's an Event declaration.
/// NOTE: specify 'EventDataType' for better Api doc generation.
/// On Method indicates it's a Service declaration.
/// NOTE: target Method must has return type of Task.
///
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = true)]
public class UniversalApiAttribute : Attribute
{
public string Name { get; set; }
///
/// ignore this api expose to outside
///
public bool IgnoreApi { get; set; }
public string Description { get; set; }
///
/// A sample Json data that match the API's input parameters declartion, the caller can use this sample to start a API call.
/// it's provided to help the caller to test or understand the api.
///
public string InputParametersExampleJson { get; set; }
///
/// indicates this Api is an event api, and the event will raise data with this type.
///
public Type EventDataType { get; set; }
/////
///// like method parameter
/////
//public Type ServiceInputDataType { get; set; }
/////
///// like method return data.
/////
//public Type ServiceOutputDataType { get; set; }
}
}