Esempio n. 1
0
        public object Any(TypesSwift request)
        {
            request.BaseUrl = GetBaseUrl(request.BaseUrl);

            var typesConfig = NativeTypesMetadata.GetConfig(request);

            //Include SS types by removing ServiceStack namespaces
            if (typesConfig.AddServiceStackTypes)
            {
                typesConfig.IgnoreTypesInNamespaces = new List <string>();
            }

            ExportMissingSystemTypes(typesConfig);

            var metadataTypes = NativeTypesMetadata.GetMetadataTypes(Request, typesConfig);

            metadataTypes.Types.RemoveAll(x => x.Name == "Service");

            try
            {
                var swift = new SwiftGenerator(typesConfig).GetCode(metadataTypes, base.Request);
                return(swift);
            }
            catch (System.Exception)
            {
                throw;
            }
        }
Esempio n. 2
0
        public object Any(TypesSwift request)
        {
            request.BaseUrl = GetBaseUrl(request.BaseUrl);

            var typesConfig = NativeTypesMetadata.GetConfig(request);

            //Include SS types by removing ServiceStack namespaces
            if (typesConfig.AddServiceStackTypes)
            {
                typesConfig.IgnoreTypesInNamespaces = new List <string>();
            }

            ExportMissingSystemTypes(typesConfig);

            //Swift doesn't support generic protocols (requires Type modification)
            typesConfig.ExportTypes.Remove(typeof(ICreateDb <>));
            typesConfig.ExportTypes.Remove(typeof(IUpdateDb <>));
            typesConfig.ExportTypes.Remove(typeof(IPatchDb <>));
            typesConfig.ExportTypes.Remove(typeof(IDeleteDb <>));
            typesConfig.ExportTypes.Remove(typeof(ISaveDb <>));

            var metadataTypes = NativeTypesMetadata.GetMetadataTypes(Request, typesConfig);

            metadataTypes.Types.RemoveAll(x => x.Name == "Service");

            try
            {
                var swift = new SwiftGenerator(typesConfig).GetCode(metadataTypes, base.Request);
                return(swift);
            }
            catch (System.Exception)
            {
                throw;
            }
        }
Esempio n. 3
0
        public object Any(TypesSwift request)
        {
            if (request.BaseUrl == null)
            {
                request.BaseUrl = Request.GetBaseUrl();
            }

            var typesConfig   = NativeTypesMetadata.GetConfig(request);
            var metadataTypes = NativeTypesMetadata.GetMetadataTypes(Request, typesConfig);
            var swift         = new SwiftGenerator(typesConfig).GetCode(metadataTypes, base.Request);

            return(swift);
        }
Esempio n. 4
0
        public object Any(TypesSwift request)
        {
            if (request.BaseUrl == null)
                request.BaseUrl = Request.GetBaseUrl();

            var typesConfig = NativeTypesMetadata.GetConfig(request);

            //Include SS types by removing ServiceStack namespaces
            if (typesConfig.AddServiceStackTypes)
                typesConfig.IgnoreTypesInNamespaces = new List<string>();

            var metadataTypes = NativeTypesMetadata.GetMetadataTypes(Request, typesConfig);

            metadataTypes.Types.RemoveAll(x => x.Name == "Service");

            try
            {
                var swift = new SwiftGenerator(typesConfig).GetCode(metadataTypes, base.Request);
                return swift;
            }
            catch (System.Exception)
            {
                throw;
            }
        }
Esempio n. 5
0
        public object Any(TypesSwift request)
        {
            if (request.BaseUrl == null)
                request.BaseUrl = Request.GetBaseUrl();

            var typesConfig = NativeTypesMetadata.GetConfig(request);
            var metadataTypes = NativeTypesMetadata.GetMetadataTypes(Request, typesConfig);
            var swift = new SwiftGenerator(typesConfig).GetCode(metadataTypes, base.Request);
            return swift;
        }