예제 #1
0
파일: Any.Odcm.cs 프로젝트: tonycrider/Vipr
        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);
        }
예제 #2
0
파일: Any.Odcm.cs 프로젝트: tonycrider/Vipr
        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);
        }
예제 #3
0
파일: Any.Odcm.cs 프로젝트: tonycrider/Vipr
        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);
        }