public static OdcmEnum OdcmEnum(Action <OdcmEnum> config = null) { var retVal = new OdcmEnum(Any.CSharpIdentifier(), Any.EmptyOdcmNamespace()); retVal.UnderlyingType = Any.EnumUnderlyingType(); if (config != null) { config(retVal); } return(retVal); }
public static OdcmMethod OdcmMethod(Action <OdcmMethod> config = null) { var retVal = new OdcmMethod(Any.CSharpIdentifier(), Any.EmptyOdcmNamespace()); retVal.Verbs = EnumValue <OdcmAllowedVerbs>(); retVal.Parameters.AddRange( Any.Sequence(s => new OdcmParameter(Any.CSharpIdentifier()) { Type = Any.PrimitiveOdcmType() }, Any.Int(0, 3))); if (config != null) { config(retVal); } return(retVal); }
public static OdcmMethod OdcmMethodGet(Action <OdcmMethod> config = null) { var retVal = new OdcmMethod(Any.CSharpIdentifier(), Any.EmptyOdcmNamespace()); retVal.Verbs = OdcmAllowedVerbs.Get; retVal.Parameters.AddRange( Any.Sequence( s => new OdcmParameter(Any.CSharpIdentifier()) { Type = Any.PrimitiveOdcmType(), CallingConvention = OdcmCallingConvention.InHttpRequestUri }, Any.Int(1, 3))); if (config != null) { config(retVal); } return(retVal); }