Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }