当前位置: 首页>>代码示例>>C#>>正文


C# DynamicServices.DynamicService类代码示例

本文整理汇总了C#中Dev2.DynamicServices.DynamicService的典型用法代码示例。如果您正苦于以下问题:C# DynamicService类的具体用法?C# DynamicService怎么用?C# DynamicService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DynamicService类属于Dev2.DynamicServices命名空间,在下文中一共展示了DynamicService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateServiceEntry

        public DynamicService CreateServiceEntry()
        {
            DynamicService newDs = new DynamicService { Name = HandlesType(), DataListSpecification = new StringBuilder("<DataList><OldCategory ColumnIODirection=\"Input\"/><NewCategory ColumnIODirection=\"Input\"/><ResourceType ColumnIODirection=\"Input\"/><Dev2System.ManagmentServicePayload ColumnIODirection=\"Both\"></Dev2System.ManagmentServicePayload></DataList>") };
            ServiceAction sa = new ServiceAction { Name = HandlesType(), ActionType = enActionType.InvokeManagementDynamicService, SourceMethod = HandlesType() };
            newDs.Actions.Add(sa);

            return newDs;
        }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:8,代码来源:RenameCategoryResource.cs

示例2: CreateServiceEntry

        public DynamicService CreateServiceEntry()
        {
            var findResourcesByIdAction = new ServiceAction { Name = HandlesType(), SourceMethod = HandlesType(), ActionType = enActionType.InvokeManagementDynamicService };

            var findResourcesByIdService = new DynamicService { Name = HandlesType(), DataListSpecification = new StringBuilder("<DataList><GuidCsv ColumnIODirection=\"Input\"/><ResourceType ColumnIODirection=\"Input\"/><Dev2System.ManagmentServicePayload ColumnIODirection=\"Both\"></Dev2System.ManagmentServicePayload></DataList>") };
            findResourcesByIdService.Actions.Add(findResourcesByIdAction);

            return findResourcesByIdService;
        }
开发者ID:Robin--,项目名称:Warewolf,代码行数:9,代码来源:FindResourcesByID.cs

示例3: CreateServiceEntry

        public DynamicService CreateServiceEntry()
        {
            var getLatestAction = new ServiceAction { Name = HandlesType(), ActionType = enActionType.InvokeManagementDynamicService, SourceMethod = HandlesType() };

            var getLatestService = new DynamicService { Name = HandlesType(), DataListSpecification = new StringBuilder("<DataList><EditedItemsXml ColumnIODirection=\"Input\"/><Dev2System.ManagmentServicePayload ColumnIODirection=\"Both\"></Dev2System.ManagmentServicePayload></DataList>") };
            getLatestService.Actions.Add(getLatestAction);

            return getLatestService;
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:9,代码来源:GetLatest.cs

示例4: CreateServiceEntry

        public DynamicService CreateServiceEntry()
        {
            DynamicService findNetworkComputersService = new DynamicService { Name = HandlesType(), DataListSpecification = new StringBuilder("<DataList><Dev2System.ManagmentServicePayload ColumnIODirection=\"Both\"></Dev2System.ManagmentServicePayload></DataList>") };

            ServiceAction findNetworkComputersAction = new ServiceAction { Name = HandlesType(), ActionType = enActionType.InvokeManagementDynamicService, SourceMethod = HandlesType() };

            findNetworkComputersService.Actions.Add(findNetworkComputersAction);

            return findNetworkComputersService;
        }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:10,代码来源:FindNetworkComputers.cs

示例5: CreateServiceEntry

        public DynamicService CreateServiceEntry()
        {
            DynamicService getScheduledResourcesService = new DynamicService { Name = HandlesType(), DataListSpecification = new StringBuilder("<DataList></DataList>") };

            ServiceAction getScheduledResourcesAction = new ServiceAction { Name = HandlesType(), ActionType = enActionType.InvokeManagementDynamicService, SourceName = HandlesType(), SourceMethod = HandlesType() };

            getScheduledResourcesService.Actions.Add(getScheduledResourcesAction);

            return getScheduledResourcesService;
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:10,代码来源:GetScheduledResources.cs

示例6: CreateServiceEntry

        public DynamicService CreateServiceEntry()
        {
            DynamicService deployResourceDynamicService = new DynamicService { Name = HandlesType(), DataListSpecification = new StringBuilder("<DataList><ResourceDefinition ColumnIODirection=\"Input\"/><Roles ColumnIODirection=\"Input\"/><Dev2System.ManagmentServicePayload ColumnIODirection=\"Both\"></Dev2System.ManagmentServicePayload></DataList>") };

            ServiceAction deployResourceServiceAction = new ServiceAction { Name = HandlesType(), ActionType = enActionType.InvokeManagementDynamicService, SourceMethod = HandlesType() };

            deployResourceDynamicService.Actions.Add(deployResourceServiceAction);

            return deployResourceDynamicService;
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:10,代码来源:DeployResource.cs

示例7: CreateServiceEntry

        public DynamicService CreateServiceEntry()
        {
            var findServices = new DynamicService { Name = HandlesType(), DataListSpecification = new StringBuilder("<DataList><itemToAdd ColumnIODirection=\"Input\"/><Dev2System.ManagmentServicePayload ColumnIODirection=\"Both\"></Dev2System.ManagmentServicePayload></DataList>") };

            var fetchItemsAction = new ServiceAction { Name = HandlesType(), ActionType = enActionType.InvokeManagementDynamicService, SourceMethod = HandlesType() };

            findServices.Actions.Add(fetchItemsAction);

            return findServices;
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:10,代码来源:AddFolderService.cs

示例8: CreateServiceEntry

        public DynamicService CreateServiceEntry()
        {
            DynamicService newDs = new DynamicService();
            newDs.Name = HandlesType();
            newDs.DataListSpecification = "<DataList><Roles/><ResourceXml/><Dev2System.ManagmentServicePayload ColumnIODirection=\"Both\"></Dev2System.ManagmentServicePayload></DataList>";
            ServiceAction sa = new ServiceAction();
            sa.Name = HandlesType();
            sa.ActionType = enActionType.InvokeManagementDynamicService;
            sa.SourceMethod = HandlesType();
            newDs.Actions.Add(sa);

            return newDs;
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:13,代码来源:TerminateExecution.cs

示例9: ManagementServiceResource

 public ManagementServiceResource(DynamicService service)
 {
     if(service == null)
     {
         throw new ArgumentNullException("service");
     }
     Service = service;
     ResourceID = service.ID == Guid.Empty ? Guid.NewGuid() : service.ID;
     ResourceName = service.Name;
     ResourceType = ResourceType.ReservedService;
     ResourcePath = service.Name;
     DataList = service.DataListSpecification;
 }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:13,代码来源:ManagementServiceResource.cs

示例10: CreateServiceEntry

        public DynamicService CreateServiceEntry()
        {
            DynamicService ds = new DynamicService {Name = HandlesType()};

            ServiceAction action = new ServiceAction
                {
                    Name = HandlesType(),
                    SourceMethod = HandlesType(),
                    ActionType = enActionType.InvokeManagementDynamicService,
                    DataListSpecification = new StringBuilder("<DataList><Dev2System.ManagmentServicePayload ColumnIODirection=\"Both\"></Dev2System.ManagmentServicePayload></DataList>")
                };

            ds.Actions.Add(action);

            return ds;
        }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:16,代码来源:Ping.cs

示例11: CreateServiceEntry

        public DynamicService CreateServiceEntry()
        {
            var dynamicService = new DynamicService
            {
                Name = HandlesType(),
                DataListSpecification = new StringBuilder("<DataList><LoggingSettings ColumnIODirection=\"Input\"></LoggingSettings><Result/><Dev2System.ManagmentServicePayload ColumnIODirection=\"Both\"></Dev2System.ManagmentServicePayload></DataList>")
            };

            var serviceAction = new ServiceAction
            {
                Name = HandlesType(),
                ActionType = enActionType.InvokeManagementDynamicService,
                SourceMethod = HandlesType()
            };

            dynamicService.Actions.Add(serviceAction);

            return dynamicService;
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:19,代码来源:LoggingSettingsWrite.cs

示例12: CreateServiceEntry

        public DynamicService CreateServiceEntry()
        {
            DynamicService pluginMetaDataService = new DynamicService { Name = HandlesType(), DataListSpecification = new StringBuilder("<DataList><AssemblyLocation ColumnIODirection=\"Input\"/><ProtectionLevel ColumnIODirection=\"Input\"/><NameSpace ColumnIODirection=\"Input\"/><MethodName ColumnIODirection=\"Input\"/><Dev2System.ManagmentServicePayload ColumnIODirection=\"Both\"></Dev2System.ManagmentServicePayload></DataList>") };

            ServiceAction pluginMetaDataAction = new ServiceAction { Name = HandlesType(), SourceMethod = HandlesType(), ActionType = enActionType.InvokeManagementDynamicService };

            pluginMetaDataService.Actions.Add(pluginMetaDataAction);

            return pluginMetaDataService;
        }
开发者ID:ndubul,项目名称:Chillas,代码行数:10,代码来源:PluginRegistry.cs

示例13: CreateServiceEntry

        public DynamicService CreateServiceEntry()
        {
            var checkPermissionsService = new DynamicService
            {
                Name = HandlesType(),
                DataListSpecification = new StringBuilder("<DataList><FilePath ColumnIODirection=\"Input\"><Username ColumnIODirection=\"Input\"/><Password ColumnIODirection=\"Input\"/><Dev2System.ManagmentServicePayload ColumnIODirection=\"Both\"></Dev2System.ManagmentServicePayload></DataList>")
            };

            var checkPermissionsServiceAction = new ServiceAction
            {
                Name = HandlesType(),
                ActionType = enActionType.InvokeManagementDynamicService,
                SourceMethod = HandlesType()
            };

            checkPermissionsService.Actions.Add(checkPermissionsServiceAction);

            return checkPermissionsService;
        }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:19,代码来源:CheckPermissions.cs

示例14: Invoke

        public Guid Invoke(DynamicService service, dynamic xmlRequest, Guid dataListId, out ErrorResultTO errors)
        {
            //dynamic result = new UnlimitedObject();
            //dynamic forwardResult = new UnlimitedObject();
            var allErrors = new ErrorResultTO();
            errors = new ErrorResultTO();

            if(service == null)
            {
                allErrors.AddError("Dynamic Service not found exception");
                return GlobalConstants.NullDataListID;
            }

            string dataList = service.DataListSpecification;


            // PBI : 5376 Amendedment for DataList Server
            Guid result = GlobalConstants.NullDataListID;
            string data = xmlRequest.XmlString.Trim();
            byte[] incomingData = Encoding.UTF8.GetBytes(data);
            Guid serviceDataId;


            var performDataListInMerge = false;

            if(dataList != string.Empty)
            {
                serviceDataId = SvrCompiler.ConvertTo(null, DataListFormat.CreateFormat(GlobalConstants._XML),
                                                       incomingData, dataList, out errors);
                errors = new ErrorResultTO(); // re-set to avoid carring

                // PBI : 5376
                // If dataListID == NullID, create a new list and set it as the current ID
                // Else, create a new list, union the old data into the new and continue on ;)
                if(dataListId != GlobalConstants.NullDataListID)
                {
                    serviceDataId = SvrCompiler.Merge(null, serviceDataId, dataListId, enDataListMergeTypes.Union,
                                                       enTranslationDepth.Data, false, out errors);
                }
                else
                {
                    performDataListInMerge = true;
                }
            }
            else
            {
                serviceDataId = SvrCompiler.CloneDataList(dataListId, out errors);
                performDataListInMerge = true;
            }

            if (errors.HasErrors())
            {
                allErrors.MergeErrors(errors);
            }
            IDSFDataObject dataObject = new DsfDataObject(xmlRequest.XmlString, serviceDataId);
            dataObject.DataList = dataList;

            if(performDataListInMerge)
            {
                SvrCompiler.ConditionalMerge(null, DataListMergeFrequency.Always, serviceDataId,
                                              dataObject.DatalistInMergeID,
                                              DataListMergeFrequency.Always, dataObject.DatalistInMergeType,
                                              dataObject.DatalistInMergeDepth);
            }

            // TODO  : Reset the AmbientDataList to this ID?

            // Fetch data for Input binding...
            DataListTranslatedPayloadTO tmpData = null;
            dynamic inputBinding = null;

            // End PBI Amendments

            foreach(ServiceAction serviceAction in service.Actions)
            {
                //TraceWriter.WriteTrace(_managementChannel, string.Format("Validating the inputs of Service '{0}'", service.Name), Resources.TraceMessageType_Message);
                foreach(ServiceActionInput sai in serviceAction.ServiceActionInputs)
                {
                    //Assigning the input the value from the callers request data
                    //TraceWriter.WriteTrace(_managementChannel, string.Format("Discovered input '{0}'", sai.Name), Resources.TraceMessageType_Message);
                    if(sai.CascadeSource)
                    {
                        TraceWriter.WriteTrace(_managementChannel, string.Format("Input '{0}' is cascaded", sai.Name),
                                               Resources.TraceMessageType_Message);
                        //This is a cascaded input so retrieve the value from the
                        //previous actions response
                        //sai.Value = forwardResult.GetValue(sai.Name);
                    }
                    else
                    {
                        if(tmpData == null)
                        {
                            tmpData = SvrCompiler.ConvertFrom(null, serviceDataId, enTranslationDepth.Data,
                                                               DataListFormat.CreateFormat(GlobalConstants._XML),
                                                               out errors);

                            if(!DataListUtil.isNullADL(tmpData.FetchAsString()))
                            {
                                inputBinding = new UnlimitedObject(tmpData.FetchAsString());
                            }
//.........这里部分代码省略.........
开发者ID:Robin--,项目名称:Warewolf,代码行数:101,代码来源:DynamicServicesInvoker.cs

示例15: Switch

        public dynamic Switch(ServiceAction serviceAction, dynamic xmlRequest, Guid dataListID)
        {
            dynamic result = new UnlimitedObject();

            DynamicService anonymousService = new DynamicService();
            if(!string.IsNullOrEmpty(serviceAction.Cases.DataElementValue))
            {
                List<ServiceAction> anonymousServiceActions;

                IEnumerable<ServiceActionCase> caseMatch =
                    serviceAction.Cases.Cases.Where(c => Regex.IsMatch(serviceAction.Cases.DataElementValue, c.Regex));
                // ReSharper disable ConvertIfStatementToConditionalTernaryExpression
                // ReSharper disable PossibleMultipleEnumeration
                if(caseMatch.Any())
                // ReSharper restore PossibleMultipleEnumeration
                // ReSharper restore ConvertIfStatementToConditionalTernaryExpression
                {
                // ReSharper disable PossibleMultipleEnumeration
                    anonymousServiceActions = caseMatch.First().Actions;
                // ReSharper restore PossibleMultipleEnumeration
                }
                else
                {
                    anonymousServiceActions = serviceAction.Cases.DefaultCase.Actions;
                }


                anonymousService.Name = string.Format("serviceOf{0}", serviceAction.Name);
                anonymousService.Actions = anonymousServiceActions;

                IDynamicServicesInvoker invoker = new DynamicServicesInvoker();
                ErrorResultTO errors;
                result = invoker.Invoke(anonymousService, xmlRequest, dataListID, out errors);
            }

            return result;
        }
开发者ID:Robin--,项目名称:Warewolf,代码行数:37,代码来源:DynamicServicesInvoker.cs


注:本文中的Dev2.DynamicServices.DynamicService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。