Скачать презентацию
Идет загрузка презентации. Пожалуйста, подождите
Презентация была опубликована 11 лет назад пользователемВалерий Выгодский
2 Microsoft TechDayshttp:// Ефимцева Наталия Partner Technologies Consultant
3 Microsoft TechDayshttp:// Полностью переработанная WF Runtime WorkflowServiceHost WorkflowControlEndpoint Активности SendReply ReceiveReply Корреляция Явная (request-reply correlation) На основе контекста (context correlation) На основе SOAP сообщения (content based)
4 Microsoft TechDayshttp:// WCF 4.0
5 WorkflowServiceHost host = new WorkflowServiceHost("HelloWorld.xamlx", new Uri(" host.AddDefaultEndpoints(); host.Description.Behaviors.Add( new ServiceMetadataBehavior{ HttpGetEnabled = true }); host.Open();
6 WorkflowServiceHost host = new WorkflowServiceHost("HelloWorld.xamlx", new Uri(" host.AddDefaultEndpoints(); WorkflowControlEndpoint wce = new WorkflowControlEndpoint( new NetNamedPipeBinding(),new EndpointAddress("net.pipe://localhost/helloworld/WCF")); host.AddServiceEndpoint(wce); host.Open(); IWorkflowCreation creationClient = new ChannelFactory ( creationEndpoint.Binding, creationEndpoint.Address).CreateChannel(); Guid instanceId = creationClient.CreateSuspended(null); WorkflowControlClient controlClient = new WorkflowControlClient(controlEndpoint); controlClient.Unsuspend(instanceId);
7 Variable Item = new Variable (); Variable OrderHandle = new Variable (); Receive StartOrder = new Receive { CanCreateInstance = true, ServiceContractName = OrderContractName, OperationName = "StartOrder" }; SendReply ReplyToStartOrder = new SendReply { Request = StartOrder, CorrelationInitializers = { new ContextCorrelationInitializer { CorrelationHandle = OrderHandle } };
8 Microsoft TechDayshttp:// WCF REST Starter Kit WCF WebHttp Service Кэширование (IIS/WAS) Динамический определение формата XML, JSON, ATOM, бинарный и т.п. Поддержка ASP.NET Routing Поддержка JSONP для AJAX сервисов Автоматическое создание help-страницы
9 Microsoft TechDayshttp:// WCF 4.0 WCF 4.0 Источник:
10 [WebGet(UriTemplate = "Users/{userName}")] public User GetUser(string userName) { } [WebInvoke(UriTemplate = "Tasks/{id}", Method = "PUT")] public Task UpdateTask(string id, Task task) { }
13 if (user == null) { throw new WebFaultException ( string.Format("There is no user with the userName '{0}'.", userName), HttpStatusCode.NotFound); }
14 private void RegisterRoutes(RouteCollection routes) { routes.Add(new ServiceRoute("Customers", new WebServiceHostFactory(), typeof(Service))); }
15 [AspNetCacheProfile("CacheFor60Seconds")] [WebGet(UriTemplate=XmlItemTemplate)] public Counter GetItemInXml() { return HandleGet(); }
16 Microsoft TechDayshttp:// © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Еще похожие презентации в нашем архиве:
© 2024 MyShared Inc.
All rights reserved.