├── Rehosted_WF_Workflow Studio for WF 4.5 ├── description │ ├── Combined.css │ └── b79636be-b088-48b5-8a8d-c21645d26d2fCombined.css └── C# │ ├── Properties │ ├── Settings.settings │ └── Settings.Designer.cs │ ├── App.xaml │ ├── ViewModel │ ├── WorkflowTypes.cs │ ├── ContentTypes.cs │ └── ViewModelBase.cs │ ├── Execution │ ├── IWorkflowDebugger.cs │ ├── IWorkflowRunner.cs │ ├── SourceLocationDebugItem.cs │ └── TrackingEventArgs.cs │ ├── WorkflowStudio.sln │ ├── Views │ └── ValidationErrorsUserControl.xaml.cs │ └── Utilities │ ├── DispatcherService.cs │ └── ExceptionHelper.cs ├── AppFabric ├── SQL │ ├── SubmitClaims.cmd │ ├── SubmitClaims.ps1 │ ├── Create_ContosoSQLObjects.sql │ └── Create_ContosoDB_Full_W_Data.sql ├── Solution │ ├── Claims.Web │ │ └── Claims.Web │ │ │ ├── Global.asax │ │ │ ├── Package │ │ │ ├── Claims.Web.zip │ │ │ ├── Claims.Web.SetParameters.xml │ │ │ └── Claims.Web.SourceManifest.xml │ │ │ ├── Views │ │ │ ├── Home │ │ │ │ ├── About.aspx │ │ │ │ └── Index.aspx │ │ │ ├── Shared │ │ │ │ ├── LogOnUserControl.ascx │ │ │ │ ├── Error.aspx │ │ │ │ └── Site.Master │ │ │ ├── Claims │ │ │ │ └── NotFound.aspx │ │ │ ├── Account │ │ │ │ └── ChangePasswordSuccess.aspx │ │ │ └── Web.config │ │ │ ├── packages.config │ │ │ ├── Service References │ │ │ ├── Appraisal.WCF.Proxy │ │ │ │ └── AppraisalService.disco │ │ │ └── ProcessClaim.WF │ │ │ │ ├── ProcessClaimService.disco │ │ │ │ └── ProcessClaimService2.xsd │ │ │ ├── Controllers │ │ │ ├── HomeController.cs │ │ │ └── ControllerHelper.cs │ │ │ ├── Properties │ │ │ ├── DataSources │ │ │ │ └── BusinessEntities.Claim.datasource │ │ │ └── AssemblyInfo.cs │ │ │ ├── Helpers │ │ │ └── PaginatedList.cs │ │ │ ├── Web.Debug.config │ │ │ ├── Models │ │ │ └── ClaimFormViewModel.cs │ │ │ └── Web.Release.config │ ├── Contoso.Services │ │ ├── BillingService.WCF │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ ├── BillingService.svc │ │ │ └── Web.config │ │ ├── AppraisalService.WCF │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ └── Web.config │ │ └── CarRentalService.WCF │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ ├── CarRentalService.svc │ │ │ └── Web.config │ ├── Contoso.Assets │ │ ├── BusinessEntities │ │ │ ├── app.config │ │ │ ├── PhoneValidator.cs │ │ │ └── Properties │ │ │ │ └── Settings.settings │ │ └── WorkflowActivities │ │ │ ├── Service References │ │ │ ├── BillingService │ │ │ │ ├── BillingService.disco │ │ │ │ └── BillingService1.xsd │ │ │ ├── AppraisalService │ │ │ │ └── AppraisalService.disco │ │ │ └── CarRentalService │ │ │ │ ├── CarRentalService.disco │ │ │ │ └── CarRentalService.xsd │ │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ └── Contoso.Workflows │ │ └── ProcessClaimService │ │ └── Properties │ │ └── AssemblyInfo.cs └── WebSites │ ├── Contoso.Claims.Web │ ├── Claims.Web │ │ ├── Global.asax │ │ └── Views │ │ │ ├── Shared │ │ │ ├── LogOnUserControl.ascx │ │ │ ├── Error.aspx │ │ │ └── Site.Master │ │ │ ├── Home │ │ │ ├── About.aspx │ │ │ └── Index.aspx │ │ │ ├── Claims │ │ │ └── NotFound.aspx │ │ │ ├── Account │ │ │ └── ChangePasswordSuccess.aspx │ │ │ └── Web.config │ └── web.config │ └── Contoso.Claims.Services │ ├── CarRentalService.WCF │ ├── CarRentalService.svc │ └── Web.config │ ├── BillingService.WCF │ ├── BillingService.svc │ └── Web.config │ └── AppraisalService.WCF │ └── Web.config ├── PROWF40.CH17.DesignerHost ├── Images │ ├── cubes.png │ └── blucrm.png ├── App.config ├── Properties │ ├── Settings.settings │ └── Settings.Designer.cs ├── App.xaml ├── App.xaml.cs └── ValidationErrorService.cs ├── MVVM.Packpub.Northwind.Data ├── packages.config ├── NorthwindEntitiesModel.cs ├── NorthwindEntitiesModel.Designer.cs ├── Order_Details.cs ├── NorthwindEntitiesModel.edmx.diagram ├── Products.cs ├── Customer.cs ├── App.Config ├── NorthwindEntitiesModel.Context.cs └── Order.cs ├── MVVM-Packpub.Northwind.Service ├── packages.config ├── Product.cs ├── OrderDetails.cs ├── ICustomer.cs ├── Order.cs └── Customer.cs ├── MVVM.Packpub.Northwind.ViewModel.Tests └── packages.config ├── MVVM.Packpub.Northwind.Application ├── packages.config ├── IEntityTranslator.cs ├── IUIDataProvider.cs ├── RepositoryRegistry.cs ├── Service References │ └── CustomerService │ │ └── MVVM.Packpub.Northwind.Application.CustomerService.Customer.datasource ├── DataMapper.cs ├── Command.cs └── App.config ├── Mvc.Wwf.Membership.Registration.Activities ├── packages.config ├── RegistrationCommand.cs ├── SmtpClientWrapper.cs ├── ITemplateInfo.cs ├── IRegistrationVerification.cs ├── ITemplateReader.cs ├── ITemplateCache.cs ├── TemplateInfo.cs ├── RegistrationConstants.cs ├── MailTemplate.cs ├── RemoveMembership.cs ├── IMembershipService.cs ├── ApproveMembership.cs ├── TemplateReader.cs ├── PromoteRegistrationValues.cs ├── WaitForCommand.cs └── UrlHelperExtensions.cs ├── MVVM.Packpub.OrderEntry.UI.WPF ├── App.config ├── Skins │ └── MainSkin.xaml ├── Properties │ ├── Settings.settings │ └── Settings.Designer.cs ├── MainWindow.xaml ├── App.xaml ├── App.xaml.cs ├── OrderView.xaml.cs ├── MainWindow.xaml.cs └── ViewModel │ └── MainViewModel.cs ├── PROWF40.CH08.Host.Com.BookMark.ActivityLibrary ├── CH15 │ ├── Activities designer │ │ ├── CalculatorHS.png │ │ ├── MyWhileDesigner.xaml.cs │ │ ├── CalcShippingDesigner.xaml.cs │ │ └── Metadata.cs │ └── Activities │ │ ├── MyWhile.cs │ │ └── CalcShipping.cs ├── GetString.cs └── CH13 │ ├── ExternalUpdate.cs │ └── ExternalVoid.cs ├── PROWF45.CH06.Version.Update.MoviesRental.WPF.Host ├── App.config ├── Properties │ ├── Settings.settings │ └── Settings.Designer.cs ├── App.xaml └── App.xaml.cs ├── BeginWF40.Extension.LeadResponse ├── Properties │ ├── Settings.settings │ └── Settings.Designer.cs ├── App.xaml ├── App.xaml.cs ├── App.config ├── CompleteAssignment.cs ├── ApplicationInterface.cs └── CreateAssignment.cs ├── MVVM.Packpub.Northwind.UI.WPF ├── Properties │ ├── Settings.settings │ └── Settings.Designer.cs ├── ATool.xaml ├── BTool.xaml ├── EnterCustomerInformaitonBookmark.cs ├── Service References │ └── CustomerService │ │ ├── MVVM.Packpub.Northwind.UI.WPF.CustomerService.Customer.datasource │ │ └── service.xsd ├── ATool.xaml.cs ├── BTool.xaml.cs ├── Orders.xaml.cs ├── OrderDetails.xaml.cs ├── CustomerDetails.xaml.cs ├── App.xaml ├── Skins │ └── MainSkin.xaml ├── App.xaml.cs └── BootStrapper.cs ├── BeginWF40.Comunication.WPF.LibReserv ├── Properties │ ├── Settings.settings │ └── Settings.Designer.cs ├── App.xaml ├── App.xaml.cs ├── App.config ├── ClientService.cs ├── WaitForInput.cs └── ApplicationInterface.cs ├── BeginWF40.PassArgoment.OrderProcess ├── App.config └── lookupItems.cs ├── PROWF45.CH11.WCF.WORKFLOW.SERVICE ├── Web.Debug.config ├── Web.Release.config ├── activities │ ├── HireCandidate.cs │ └── ProvideFeedbackToCandidate.cs └── model │ └── JobApplication.cs ├── BeginWF40.Comunication.BookInventory ├── Web.Debug.config ├── Web.Release.config ├── Web.config └── PerformLookupParameter.cs ├── PROWF45.CH06.VERSIONING.UPDATE.WORKFLOW ├── Web.Debug.config ├── Web.Release.config └── Model │ └── TeachingApplication.cs ├── PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE ├── Properties │ ├── Settings.settings │ └── Settings.Designer.cs ├── Service References │ └── JobPostingService │ │ ├── wfJobApplicationService.disco │ │ ├── PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE.JobPostingService.ApplyForJobResponse.datasource │ │ ├── PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE.JobPostingService.GetJobApplicationStatusResponse.datasource │ │ └── PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE.JobPostingService.GetJobApplicationStatusResponse1.datasource ├── Program.cs └── App.config ├── BeginWF40.Comunication.LibReservation ├── App1.config └── App.config ├── BeginWF40.Extension.LeadGenerator ├── App.xaml ├── App.xaml.cs ├── App.config ├── WaitForInput.cs ├── ApplicationInterface.cs ├── Properties │ └── Settings.settings └── Extensions │ └── CommentExtension.cs ├── MVVM.Packpub.Northwind.ViewModel ├── IOrderDetailsViewModelFactory.cs ├── ICustomerDetailsViewModelFactory.cs ├── IOrdersViewModelFactory.cs ├── IOrderViewModelFactory.cs ├── IToolManager.cs ├── App.config ├── RepositoryRegistry.cs ├── OrderDetailsViewModelFactory.cs ├── OrdersViewModelFactory.cs ├── CustomerDetailsViewModelFactory.cs ├── OrderViewModelFactory.cs ├── OrdersViewModel.cs ├── OrderDetailsViewModel.cs ├── ToolViewModel.cs └── ViewModelLocator.cs ├── MVVM.Packpub.OrderEntry.Workflow.Interface └── IOrder.cs ├── BeginWF40.Comunication.BookLkp.Client ├── Service References │ ├── ServiceReference1 │ │ ├── BookInventoryParameter.disco │ │ ├── endpointConfigurationNameResolver.svcinfo │ │ ├── BookInventoryParameter2.xsd │ │ ├── configuration.svcinfo │ │ └── BookInventoryParameter1.xsd │ └── ServiceReference2 │ │ ├── BookInventoryParameter.disco │ │ ├── endpointConfigurationNameResolver.svcinfo │ │ ├── BookInventoryParameter2.xsd │ │ ├── configuration.svcinfo │ │ └── BookInventoryParameter1.xsd ├── App.config └── Program.cs ├── PROWF40.CH13.AdventureWorksAccess ├── app.config └── Properties │ └── Settings.settings ├── PROWF40.CH08.Host.Com.Console.BookmarkCalculator └── App.config ├── PROWF45.CH06.Verion.Update.MoviesRental.Activities ├── ProcessCreditCard.cs └── WaitForResponse.cs └── MVVM.Packpub.Northwind.Model ├── ModelBase.cs └── Product.cs /Rehosted_WF_Workflow Studio for WF 4.5/description/Combined.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AppFabric/SQL/SubmitClaims.cmd: -------------------------------------------------------------------------------- 1 | sqlps h:\projects\appfabric\contoso\sql\SubmitClaims.ps1 %1 %2 2 | pause -------------------------------------------------------------------------------- /Rehosted_WF_Workflow Studio for WF 4.5/description/b79636be-b088-48b5-8a8d-c21645d26d2fCombined.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AppFabric/SQL/SubmitClaims.ps1: -------------------------------------------------------------------------------- 1 | foreach( $Arg in $Args ) 2 | { 3 | invoke-sqlcmd -query "exec SubmitClaim $Arg" -database ContosoDB 4 | } 5 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Claims.Web.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /AppFabric/SQL/Create_ContosoSQLObjects.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcoq/WorkflowFoundation.40.45.Development/HEAD/AppFabric/SQL/Create_ContosoSQLObjects.sql -------------------------------------------------------------------------------- /AppFabric/WebSites/Contoso.Claims.Web/Claims.Web/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Claims.Web.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /PROWF40.CH17.DesignerHost/Images/cubes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcoq/WorkflowFoundation.40.45.Development/HEAD/PROWF40.CH17.DesignerHost/Images/cubes.png -------------------------------------------------------------------------------- /PROWF40.CH17.DesignerHost/Images/blucrm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcoq/WorkflowFoundation.40.45.Development/HEAD/PROWF40.CH17.DesignerHost/Images/blucrm.png -------------------------------------------------------------------------------- /AppFabric/SQL/Create_ContosoDB_Full_W_Data.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcoq/WorkflowFoundation.40.45.Development/HEAD/AppFabric/SQL/Create_ContosoDB_Full_W_Data.sql -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Data/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /MVVM-Packpub.Northwind.Service/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel.Tests/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Application/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Package/Claims.Web.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcoq/WorkflowFoundation.40.45.Development/HEAD/AppFabric/Solution/Claims.Web/Claims.Web/Package/Claims.Web.zip -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /PROWF40.CH17.DesignerHost/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /MVVM.Packpub.OrderEntry.UI.WPF/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /MVVM.Packpub.OrderEntry.UI.WPF/Skins/MainSkin.xaml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/RegistrationCommand.cs: -------------------------------------------------------------------------------- 1 | namespace Mvc.Wwf.Membership.Registration.Activities 2 | { 3 | public enum RegistrationCommand 4 | { 5 | SendMail, 6 | Confirm, 7 | Cancel, 8 | } 9 | } -------------------------------------------------------------------------------- /PROWF40.CH08.Host.Com.BookMark.ActivityLibrary/CH15/Activities designer/CalculatorHS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcoq/WorkflowFoundation.40.45.Development/HEAD/PROWF40.CH08.Host.Com.BookMark.ActivityLibrary/CH15/Activities designer/CalculatorHS.png -------------------------------------------------------------------------------- /PROWF45.CH06.Version.Update.MoviesRental.WPF.Host/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PROWF40.CH17.DesignerHost/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /BeginWF40.Extension.LeadResponse/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MVVM.Packpub.OrderEntry.UI.WPF/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.WPF.LibReserv/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /BeginWF40.PassArgoment.OrderProcess/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Rehosted_WF_Workflow Studio for WF 4.5/C#/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /PROWF45.CH06.Version.Update.MoviesRental.WPF.Host/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /PROWF45.CH11.WCF.WORKFLOW.SERVICE/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookInventory/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PROWF45.CH06.VERSIONING.UPDATE.WORKFLOW/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Rehosted_WF_Workflow Studio for WF 4.5/C#/App.xaml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Services/BillingService.WCF/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Services/AppraisalService.WCF/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Services/CarRentalService.WCF/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/SmtpClientWrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Mvc.Wwf.Membership.Registration.Activities 2 | { 3 | using System.Net.Mail; 4 | 5 | /// 6 | /// Wrapper class for SmtpClient 7 | /// 8 | public class SmtpClientWrapper : SmtpClient, ISmtpClient 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /MVVM.Packpub.OrderEntry.UI.WPF/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PROWF40.CH17.DesignerHost/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /MVVM.Packpub.OrderEntry.UI.WPF/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.LibReservation/App1.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /BeginWF40.Extension.LeadGenerator/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BeginWF40.Extension.LeadResponse/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/ITemplateInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Mvc.Wwf.Membership.Registration.Activities 2 | { 3 | using System; 4 | 5 | public interface ITemplateInfo 6 | { 7 | bool Exists { get; set; } 8 | 9 | DateTime LastWriteTime { get; set; } 10 | 11 | string Path { get; set; } 12 | 13 | string Template { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /BeginWF40.Comunication.WPF.LibReserv/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/IRegistrationVerification.cs: -------------------------------------------------------------------------------- 1 | namespace Mvc.Wwf.Membership.Registration.Activities 2 | { 3 | using System; 4 | 5 | public interface IRegistrationVerification 6 | where T : class 7 | { 8 | #region Public Methods and Operators 9 | 10 | Guid VerifyRegistration(RegistrationData data); 11 | 12 | #endregion 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel/IOrderDetailsViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MVVM.Packpub.Northwind.ViewModel 8 | { 9 | public interface IOrderDetailsViewModelFactory 10 | { 11 | OrderDetailsViewModel CreateInstance( OrderViewModel order); 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel/ICustomerDetailsViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MVVM.Packpub.Northwind.ViewModel 8 | { 9 | public interface ICustomerDetailsViewModelFactory 10 | { 11 | CustomerDetailsViewModel CreateInstance(string customerID); 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookInventory/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /PROWF45.CH06.Version.Update.MoviesRental.WPF.Host/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PROWF45.CH11.WCF.WORKFLOW.SERVICE/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /PROWF45.CH06.VERSIONING.UPDATE.WORKFLOW/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel/IOrdersViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using MVVM.Packpub.Northwind.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MVVM.Packpub.Northwind.ViewModel 9 | { 10 | public interface IOrdersViewModelFactory 11 | { 12 | OrdersViewModel CreateInstance(Customer customer); 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Services/AppraisalService.WCF/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Services/BillingService.WCF/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Services/CarRentalService.WCF/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel/IOrderViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using MVVM.Packpub.Northwind.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MVVM.Packpub.Northwind.ViewModel 9 | { 10 | public interface IOrderViewModelFactory 11 | { 12 | OrderViewModel CreateInstance(Order order, Customer customer); 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /PROWF40.CH17.DesignerHost/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace PROWF40.CH17.DesignerHost 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /MVVM.Packpub.OrderEntry.UI.WPF/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace MVVM.Packpub.OrderEntry.UI.WPF 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /MVVM.Packpub.OrderEntry.Workflow.Interface/IOrder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MVVM.Packpub.OrderEntry.Workflow.Interface 8 | { 9 | public interface IOrder 10 | { 11 | string CustomerName { get; set; } 12 | string ProductName { get; set; } 13 | string ProductQuantity { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /BeginWF40.Extension.LeadGenerator/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace BeginWF40.Extension.LeadGenerator 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /BeginWF40.Extension.LeadResponse/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace BeginWF40.Extension.LeadResponse 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/ITemplateReader.cs: -------------------------------------------------------------------------------- 1 | namespace Mvc.Wwf.Membership.Registration.Activities 2 | { 3 | using System.Text; 4 | 5 | public interface ITemplateReader 6 | { 7 | #region Public Methods and Operators 8 | 9 | ITemplateInfo GetTemplateInfo(string path); 10 | 11 | string Read(string path); 12 | 13 | string Read(string path, Encoding encoding); 14 | 15 | #endregion 16 | } 17 | } -------------------------------------------------------------------------------- /BeginWF40.Comunication.WPF.LibReserv/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace BeginWF40.Comunication.WPF.LibReserv 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/ITemplateCache.cs: -------------------------------------------------------------------------------- 1 | namespace Mvc.Wwf.Membership.Registration.Activities 2 | { 3 | using System.Text; 4 | 5 | public interface ITemplateCache 6 | { 7 | #region Public Methods and Operators 8 | 9 | void Clear(); 10 | 11 | bool Contains(string path); 12 | 13 | string Get(string path); 14 | 15 | string Get(string path, Encoding encoding); 16 | 17 | #endregion 18 | } 19 | } -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Views/Home/About.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | About Us 5 | 6 | 7 | 8 |

About

9 |

10 | Put content here. 11 |

12 |
13 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Views/Shared/LogOnUserControl.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> 2 | <% 3 | if (Request.IsAuthenticated) { 4 | %> 5 | Welcome <%= Html.Encode(Page.User.Identity.Name) %>! 6 | [ <%= Html.ActionLink("Log Off", "LogOff", "Account") %> ] 7 | <% 8 | } 9 | else { 10 | %> 11 | [ <%= Html.ActionLink("Log On", "LogOn", "Account") %> ] 12 | <% 13 | } 14 | %> 15 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /AppFabric/WebSites/Contoso.Claims.Web/Claims.Web/Views/Shared/LogOnUserControl.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> 2 | <% 3 | if (Request.IsAuthenticated) { 4 | %> 5 | Welcome <%= Html.Encode(Page.User.Identity.Name) %>! 6 | [ <%= Html.ActionLink("Log Off", "LogOff", "Account") %> ] 7 | <% 8 | } 9 | else { 10 | %> 11 | [ <%= Html.ActionLink("Log On", "LogOn", "Account") %> ] 12 | <% 13 | } 14 | %> 15 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Assets/BusinessEntities/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /AppFabric/WebSites/Contoso.Claims.Web/Claims.Web/Views/Home/About.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | About Us 5 | 6 | 7 | 8 |

About

9 |

10 | Put content here. 11 |

12 |
13 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookLkp.Client/Service References/ServiceReference1/BookInventoryParameter.disco: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookLkp.Client/Service References/ServiceReference2/BookInventoryParameter.disco: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /PROWF45.CH06.Version.Update.MoviesRental.WPF.Host/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace PROWF45.CH06.Version.Update.MoviesRental.WPF.Host 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE/Service References/JobPostingService/wfJobApplicationService.disco: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Assets/WorkflowActivities/Service References/BillingService/BillingService.disco: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.WPF.LibReserv/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Data/NorthwindEntitiesModel.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/TemplateInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Mvc.Wwf.Membership.Registration.Activities 2 | { 3 | using System; 4 | 5 | public class TemplateInfo : ITemplateInfo 6 | { 7 | #region Public Properties 8 | 9 | public bool Exists { get; set; } 10 | 11 | public DateTime LastWriteTime { get; set; } 12 | 13 | public string Path { get; set; } 14 | 15 | public string Template { get; set; } 16 | 17 | #endregion 18 | } 19 | } -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Service References/Appraisal.WCF.Proxy/AppraisalService.disco: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.LibReservation/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /MVVM-Packpub.Northwind.Service/Product.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MVVM.Packpub.Northwind.Service 9 | { 10 | [DataContract] 11 | public class Product 12 | { 13 | [DataMember] 14 | public int ProductID { get; set; } 15 | [DataMember] 16 | public string ProductName { get; set; } 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Assets/WorkflowActivities/Service References/AppraisalService/AppraisalService.disco: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Assets/WorkflowActivities/Service References/CarRentalService/CarRentalService.disco: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /PROWF40.CH13.AdventureWorksAccess/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Service References/ProcessClaim.WF/ProcessClaimService.disco: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Views/Shared/Error.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | Error 5 | 6 | 7 | 8 |

9 | Sorry, an error occurred while processing your request. 10 |

11 |
12 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Views/Claims/NotFound.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | Claim Not Found 5 | 6 | 7 | 8 | 9 |

Claim Not Found

10 | 11 |

Sorry, but the claim you have requested doesn't exist or was deleted.

12 |
13 | -------------------------------------------------------------------------------- /AppFabric/WebSites/Contoso.Claims.Web/Claims.Web/Views/Shared/Error.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | Error 5 | 6 | 7 | 8 |

9 | Sorry, an error occurred while processing your request. 10 |

11 |
12 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Application/IEntityTranslator.cs: -------------------------------------------------------------------------------- 1 | using MVVM.Packpub.Northwind.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MVVM.Packpub.Northwind.Application 9 | { 10 | public interface IEntityTranslator where M : ModelBase 11 | { 12 | M CreateModel(D dto); 13 | M UpdateModel(M model, D dto); 14 | D CreateDto(M model); 15 | D UpdateDto(D dto, M model); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /AppFabric/WebSites/Contoso.Claims.Web/Claims.Web/Views/Claims/NotFound.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | Claim Not Found 5 | 6 | 7 | 8 | 9 |

Claim Not Found

10 | 11 |

Sorry, but the claim you have requested doesn't exist or was deleted.

12 |
13 | -------------------------------------------------------------------------------- /BeginWF40.Extension.LeadResponse/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.WPF.LibReserv/ClientService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ServiceModel; 3 | 4 | namespace LibraryReservation 5 | { 6 | public class ClientService : ILibraryReservation 7 | { 8 | public void RequestBook(ReservationRequest request) 9 | { 10 | ApplicationInterface.RequestBook(request); 11 | } 12 | 13 | public void RespondToRequest(ReservationResponse response) 14 | { 15 | ApplicationInterface.RespondToRequest(response); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Package/Claims.Web.SetParameters.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/RegistrationConstants.cs: -------------------------------------------------------------------------------- 1 | namespace Mvc.Wwf.Membership.Registration.Activities 2 | { 3 | public static class RegistrationConstants 4 | { 5 | #region Constants and Fields 6 | 7 | public static readonly string Cancel = RegistrationCommand.Cancel.ToString(); 8 | 9 | public static readonly string Confirm = RegistrationCommand.Confirm.ToString(); 10 | 11 | public static readonly string SendMail = RegistrationCommand.SendMail.ToString(); 12 | 13 | #endregion 14 | } 15 | } -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Views/Account/ChangePasswordSuccess.aspx: -------------------------------------------------------------------------------- 1 | <%@Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | Change Password 5 | 6 | 7 | 8 |

Change Password

9 |

10 | Your password has been changed successfully. 11 |

12 |
13 | -------------------------------------------------------------------------------- /AppFabric/WebSites/Contoso.Claims.Web/Claims.Web/Views/Account/ChangePasswordSuccess.aspx: -------------------------------------------------------------------------------- 1 | <%@Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | Change Password 5 | 6 | 7 | 8 |

Change Password

9 |

10 | Your password has been changed successfully. 11 |

12 |
13 | -------------------------------------------------------------------------------- /BeginWF40.Extension.LeadGenerator/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /MVVM-Packpub.Northwind.Service/OrderDetails.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MVVM.Packpub.Northwind.Service 9 | { 10 | [DataContract] 11 | public class OrderDetails 12 | { 13 | [DataMember] 14 | public Product Product { get; set; } 15 | [DataMember] 16 | public int Quantity { get; set; } 17 | [DataMember] 18 | public decimal UnitPrice { get; set; } 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/MailTemplate.cs: -------------------------------------------------------------------------------- 1 | namespace Mvc.Wwf.Membership.Registration.Activities 2 | { 3 | using System; 4 | 5 | internal class MailTemplate 6 | { 7 | #region Constructors and Destructors 8 | 9 | internal MailTemplate(DateTime dateTime) 10 | { 11 | this.LastWrite = dateTime; 12 | } 13 | 14 | #endregion 15 | 16 | #region Properties 17 | 18 | internal DateTime LastWrite { get; set; } 19 | 20 | internal string Template { get; set; } 21 | 22 | #endregion 23 | } 24 | } -------------------------------------------------------------------------------- /PROWF45.CH06.VERSIONING.UPDATE.WORKFLOW/Model/TeachingApplication.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Web; 6 | 7 | namespace PROWF45.CH06.VERSIONING.UPDATE.WORKFLOW.Model 8 | { 9 | [DataContract] 10 | public class TeachingApplication 11 | { 12 | [DataMember] 13 | public string FirstName { get; set; } 14 | [DataMember] 15 | public string LastName { get; set; } 16 | [DataMember] 17 | public int YearsOfExperience { get; set; } 18 | 19 | } 20 | } -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Package/Claims.Web.SourceManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /MVVM-Packpub.Northwind.Service/ICustomer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.ServiceModel; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MVVM.Packpub.Northwind.Service 9 | { 10 | [ServiceContract] 11 | public interface ICustomerService 12 | { 13 | [OperationContract] 14 | IList GetCustomers(); 15 | [OperationContract] 16 | Customer GetCustomer(string customerID); 17 | [OperationContract] 18 | void Update(Customer customer); 19 | 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/RemoveMembership.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Activities; 6 | 7 | namespace Mvc.Wwf.Membership.Registration.Activities 8 | { 9 | using System.Web.Security; 10 | 11 | public sealed class RemoveMembership : CodeActivity 12 | { 13 | public InArgument Text { get; set; } 14 | 15 | protected override void Execute(CodeActivityContext context) 16 | { 17 | Membership.DeleteUser(Text.Get(context)); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /PROWF40.CH08.Host.Com.Console.BookmarkCalculator/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Views/Home/Index.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | Contoso Insurance Claims Processing Application 5 | 6 | 7 | 8 |

<%= Html.Encode(ViewData["Message"]) %>

9 | <%= Html.ActionLink("The Claims Queue", "Index", "Claims") %> 10 | 11 |
12 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/ATool.xaml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/BTool.xaml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /AppFabric/WebSites/Contoso.Claims.Web/Claims.Web/Views/Home/Index.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | Contoso Insurance Claims Processing Application 5 | 6 | 7 | 8 |

<%= Html.Encode(ViewData["Message"]) %>

9 | <%= Html.ActionLink("The Claims Queue", "Index", "Claims") %> 10 | 11 |
12 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace Claims.Web.Controllers 8 | { 9 | [HandleError] 10 | public class HomeController : Controller 11 | { 12 | public ActionResult Index() 13 | { 14 | ViewData["Message"] = "Welcome to Contoso Insurance Claims Processing Application!"; 15 | 16 | return View(); 17 | } 18 | 19 | public ActionResult About() 20 | { 21 | return View(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Application/IUIDataProvider.cs: -------------------------------------------------------------------------------- 1 | //MVVM.Packpub.Northwind.Data; 2 | //using MVVM.Packpub.Northwind.Application; 3 | //using MVVM.Packpub.Northwind.Application.CustomerService; 4 | using MVVM.Packpub.Northwind.Model; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | 11 | namespace MVVM.Packpub.Northwind.Application 12 | { 13 | public interface IUIDataProvider 14 | { 15 | IList GetCustomers(); 16 | Customer GetCustomer(string customerID); 17 | void Update(Customer customer); 18 | 19 | 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel/IToolManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MVVM.Packpub.Northwind.ViewModel 9 | { 10 | public interface IToolManager 11 | { 12 | ObservableCollectionTools { get; set; } 13 | void OpenTool(Func predicate,Func toolFactory) where T : ToolViewModel; 14 | void OpenCustomerDetails(string customerId); 15 | void OpenOrderDetails(OrderViewModel order); 16 | void CloseTool(ToolViewModel tool); 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Form1()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Properties/DataSources/BusinessEntities.Claim.datasource: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | BusinessEntities.Claim, BusinessEntities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/EnterCustomerInformaitonBookmark.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Activities; 6 | 7 | namespace MVVM.Packpub.Northwind.UI.WPF 8 | { 9 | 10 | public sealed class EnterCustomerInformaitonBookmark : NativeActivity 11 | { 12 | protected override bool CanInduceIdle 13 | { 14 | get 15 | { 16 | return true; 17 | } 18 | } 19 | 20 | protected override void Execute(NativeActivityContext context) 21 | { 22 | context.CreateBookmark("EnterCustomerInformation"); 23 | } 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /PROWF45.CH11.WCF.WORKFLOW.SERVICE/activities/HireCandidate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Activities; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Exercise1.Core; 8 | 9 | namespace Exercise1.CustomActvities 10 | { 11 | public class HireCandidate:CodeActivity 12 | { 13 | [RequiredArgument] 14 | public InArgument ApplicationStatus { get; set; } 15 | 16 | protected override void Execute(CodeActivityContext context) 17 | { 18 | var status = context.GetValue(ApplicationStatus); 19 | //Custom logic for creating a new employee 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Controllers/ControllerHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Mvc.Ajax; 7 | using Claims.Web.Models; 8 | using BusinessEntities; 9 | 10 | namespace Claims.Web.Controllers 11 | { 12 | public static class ControllerHelper 13 | { 14 | public static void AddRuleViolations(this ModelStateDictionary modelState, IEnumerable errors) 15 | { 16 | foreach (RuleViolation issue in errors) 17 | { 18 | modelState.AddModelError(issue.PropertyName, issue.ErrorMessage); 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookLkp.Client/Service References/ServiceReference1/endpointConfigurationNameResolver.svcinfo: -------------------------------------------------------------------------------- 1 | BasicHttpBinding_Book -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Assets/BusinessEntities/PhoneValidator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Text.RegularExpressions; 6 | 7 | namespace BusinessEntities 8 | { 9 | public class PhoneValidator 10 | { 11 | static Regex countryRegex = new Regex("^[2-9]\\d{2}-\\d{3}-\\d{4}$"); 12 | 13 | public static bool IsValidNumber(string phoneNumber) 14 | { 15 | return countryRegex.IsMatch(phoneNumber); 16 | } 17 | 18 | public static bool IsValidCoordinate(string coord) 19 | { 20 | float result; 21 | return float.TryParse(coord, out result); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookLkp.Client/Service References/ServiceReference2/endpointConfigurationNameResolver.svcinfo: -------------------------------------------------------------------------------- 1 | BasicHttpBinding_Book1 -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Application/RepositoryRegistry.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using StructureMap; 7 | using StructureMap.Configuration.DSL; 8 | using MVVM.Packpub.Northwind.Application.CustomerService; 9 | 10 | namespace MVVM.Packpub.Northwind.Application 11 | { 12 | public class RepositoryRegistry : Registry 13 | 14 | { 15 | public RepositoryRegistry() 16 | { 17 | For() 18 | .Singleton(); 19 | For() 20 | .Singleton() 21 | .Use(() => new CustomerServiceClient()); 22 | } 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /MVVM.Packpub.OrderEntry.UI.WPF/OrderView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Windows.Data; 8 | using System.Windows.Documents; 9 | using System.Windows.Input; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Imaging; 12 | using System.Windows.Shapes; 13 | 14 | namespace MVVMApp_WFBasedBusinessRules 15 | { 16 | /// 17 | /// Interaction logic for OrderView.xaml 18 | /// 19 | public partial class OrderView : Window 20 | { 21 | public OrderView() 22 | { 23 | InitializeComponent(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel/RepositoryRegistry.cs: -------------------------------------------------------------------------------- 1 | using StructureMap.Configuration.DSL; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MVVM.Packpub.Northwind.ViewModel 9 | { 10 | public class RepositoryRegistry : Registry 11 | { 12 | public RepositoryRegistry() 13 | { 14 | For() 15 | .Singleton(); 16 | For() 17 | .Singleton(); 18 | For() 19 | .Singleton(); 20 | For() 21 | .Singleton(); 22 | } 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /MVVM-Packpub.Northwind.Service/Order.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MVVM.Packpub.Northwind.Service 9 | { 10 | [DataContract] 11 | public class Order 12 | { 13 | [DataMember] 14 | public int OrderID { get; set; } 15 | [DataMember] 16 | public DateTime? OrderDate { get; set; } 17 | [DataMember] 18 | public DateTime? ShippedDate { get; set; } 19 | [DataMember] 20 | public decimal? Freight { get; set; } 21 | [DataMember] 22 | public IEnumerable OrderDetails { get; set; } 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Rehosted_WF_Workflow Studio for WF 4.5/C#/ViewModel/WorkflowTypes.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 6 | // 7 | //----------------------------------------------------------------------- 8 | namespace Microsoft.Consulting.WorkflowStudio.ViewModel 9 | { 10 | public enum WorkflowTypes 11 | { 12 | Activity, 13 | WorkflowService 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Services/CarRentalService.WCF/CarRentalService.svc: -------------------------------------------------------------------------------- 1 | <%@ ServiceHost Language="C#" Debug="true" Service="CarRentalService.WCF.CarRentalService" %> 2 | 3 | namespace CarRentalService.WCF 4 | { 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Runtime.Serialization; 9 | using System.ServiceModel; 10 | using System.Text; 11 | 12 | [ServiceContract] 13 | public class CarRentalService 14 | { 15 | [OperationContract] 16 | public string FindRentalCar(int claimId) 17 | { 18 | Console.WriteLine("Rental car has been successfully reserved for the claim ID: {0}.", claimId); 19 | return "A rental car has been reserved."; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/Service References/CustomerService/MVVM.Packpub.Northwind.UI.WPF.CustomerService.Customer.datasource: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | MVVM.Packpub.Northwind.UI.WPF.CustomerService.Customer, Service References.CustomerService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /AppFabric/WebSites/Contoso.Claims.Services/CarRentalService.WCF/CarRentalService.svc: -------------------------------------------------------------------------------- 1 | <%@ ServiceHost Language="C#" Debug="true" Service="CarRentalService.WCF.CarRentalService" %> 2 | 3 | namespace CarRentalService.WCF 4 | { 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Runtime.Serialization; 9 | using System.ServiceModel; 10 | using System.Text; 11 | 12 | [ServiceContract] 13 | public class CarRentalService 14 | { 15 | [OperationContract] 16 | public string FindRentalCar(int claimId) 17 | { 18 | Console.WriteLine("Rental car has been successfully reserved for the claim ID: {0}.", claimId); 19 | return "A rental car has been reserved."; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/ATool.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace MVVM.Packpub.Northwind.UI.WPF 17 | { 18 | /// 19 | /// Interaction logic for ATool.xaml 20 | /// 21 | public partial class ATool : UserControl 22 | { 23 | public ATool() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/BTool.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace MVVM.Packpub.Northwind.UI.WPF 17 | { 18 | /// 19 | /// Interaction logic for BTool.xaml 20 | /// 21 | public partial class BTool : UserControl 22 | { 23 | public BTool() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/Orders.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace MVVM.Packpub.Northwind.UI.WPF 17 | { 18 | /// 19 | /// Interaction logic for Orders.xaml 20 | /// 21 | public partial class Orders : UserControl 22 | { 23 | public Orders() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Assets/WorkflowActivities/Service References/BillingService/BillingService1.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Application/Service References/CustomerService/MVVM.Packpub.Northwind.Application.CustomerService.Customer.datasource: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | MVVM.Packpub.Northwind.Application.CustomerService.Customer, Service References.CustomerService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Assets/WorkflowActivities/Service References/CarRentalService/CarRentalService.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /MVVM.Packpub.OrderEntry.UI.WPF/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace MVVM.Packpub.OrderEntry.UI.WPF 17 | { 18 | /// 19 | /// Interaction logic for MainWindow.xaml 20 | /// 21 | public partial class MainWindow : Window 22 | { 23 | public MainWindow() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/OrderDetails.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace MVVM.Packpub.Northwind.UI.WPF 17 | { 18 | /// 19 | /// Interaction logic for OrderDetails.xaml 20 | /// 21 | public partial class OrderDetails : UserControl 22 | { 23 | public OrderDetails() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /PROWF40.CH08.Host.Com.BookMark.ActivityLibrary/CH15/Activities designer/MyWhileDesigner.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Windows.Data; 8 | using System.Windows.Documents; 9 | using System.Windows.Input; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Imaging; 12 | using System.Windows.Navigation; 13 | using System.Windows.Shapes; 14 | 15 | namespace PROWF40.CH08.Host.Com.BookMark.ActivityLibrary.CH15.Activities_designer 16 | { 17 | // Interaction logic for MyWhileDesigner.xaml 18 | public partial class MyWhileDesigner 19 | { 20 | public MyWhileDesigner() 21 | { 22 | InitializeComponent(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /PROWF40.CH08.Host.Com.BookMark.ActivityLibrary/CH15/Activities/MyWhile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Activities; 6 | using System.ComponentModel; 7 | using PROWF40.CH08.Host.Com.BookMark.ActivityLibrary.CH15.Activities_designer; 8 | 9 | namespace PROWF40.CH08.Host.Com.BookMark.ActivityLibrary.CH15.Activities 10 | { 11 | 12 | [Designer(typeof(MyWhileDesigner))] 13 | public sealed class MyWhile : NativeActivity 14 | { 15 | [Browsable(false)] 16 | public Activity Body { get; set; } 17 | public Activity Condition { get; set; } 18 | protected override void Execute(NativeActivityContext context) 19 | { 20 | throw new NotImplementedException(); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /PROWF45.CH06.Verion.Update.MoviesRental.Activities/ProcessCreditCard.cs: -------------------------------------------------------------------------------- 1 | using PROWF45.CH06.Verion.Update.MoviesRental.Activities.Model; 2 | using System; 3 | using System.Activities; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace PROWF45.CH06.Verion.Update.MoviesRental.Activities 10 | { 11 | public class RunCreditCard : CodeActivity 12 | { 13 | [RequiredArgument] 14 | public InArgument inCreditCard { get; set; } 15 | protected override CreditCard Execute(CodeActivityContext context) 16 | { 17 | var ccWithTransNo = inCreditCard.Get(context); 18 | ccWithTransNo.TransactionNumber = 1542514612; 19 | return ccWithTransNo; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/CustomerDetails.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace MVVM.Packpub.Northwind.UI.WPF 17 | { 18 | /// 19 | /// Interaction logic for CustomerDetails.xaml 20 | /// 21 | public partial class CustomerDetails : UserControl 22 | { 23 | public CustomerDetails() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Rehosted_WF_Workflow Studio for WF 4.5/C#/Execution/IWorkflowDebugger.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 6 | // 7 | //----------------------------------------------------------------------- 8 | namespace Microsoft.Consulting.WorkflowStudio.Execution 9 | { 10 | using System.Windows; 11 | 12 | public interface IWorkflowDebugger : IWorkflowRunner 13 | { 14 | UIElement GetDebugView(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel/OrderDetailsViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using StructureMap; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MVVM.Packpub.Northwind.ViewModel 9 | { 10 | public class OrderDetailsViewModelFactory : IOrderDetailsViewModelFactory 11 | { 12 | private readonly IContainer _container; 13 | public OrderDetailsViewModelFactory( IContainer container) 14 | { 15 | _container = container; 16 | } 17 | public OrderDetailsViewModel CreateInstance(OrderViewModel order) 18 | { 19 | return _container 20 | .With("order") 21 | .EqualTo(order) 22 | .GetInstance(); 23 | } 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /PROWF40.CH08.Host.Com.BookMark.ActivityLibrary/CH15/Activities designer/CalcShippingDesigner.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Windows.Data; 8 | using System.Windows.Documents; 9 | using System.Windows.Input; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Imaging; 12 | using System.Windows.Navigation; 13 | using System.Windows.Shapes; 14 | 15 | namespace PROWF40.CH08.Host.Com.BookMark.ActivityLibrary.CH15.Activities_designer 16 | { 17 | // Interaction logic for CalcShippingDesigner.xaml 18 | public partial class CalcShippingDesigner 19 | { 20 | public CalcShippingDesigner() 21 | { 22 | InitializeComponent(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Rehosted_WF_Workflow Studio for WF 4.5/C#/Execution/IWorkflowRunner.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 6 | // 7 | //----------------------------------------------------------------------- 8 | namespace Microsoft.Consulting.WorkflowStudio.Execution 9 | { 10 | public interface IWorkflowRunner 11 | { 12 | bool IsRunning { get; } 13 | 14 | void Abort(); 15 | 16 | void Run(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel/OrdersViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using MVVM.Packpub.Northwind.Model; 2 | using StructureMap; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace MVVM.Packpub.Northwind.ViewModel 10 | { 11 | public class OrdersViewModelFactory : IOrdersViewModelFactory 12 | { 13 | private readonly IContainer _container; 14 | public OrdersViewModelFactory (Container container) 15 | { 16 | _container = container; 17 | } 18 | public OrdersViewModel CreateInstance(Customer customer) 19 | { 20 | return _container 21 | .With("model") 22 | .EqualTo(customer) 23 | .GetInstance(); 24 | } 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /PROWF45.CH11.WCF.WORKFLOW.SERVICE/activities/ProvideFeedbackToCandidate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Activities; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Exercise1.CustomActvities 9 | { 10 | public class ProvideFeedbackToCandidate:CodeActivity 11 | { 12 | [RequiredArgument] 13 | public InArgument MessageToCandidate { get; set; } 14 | [RequiredArgument] 15 | public InArgument EmailAddress { get; set; } 16 | 17 | protected override void Execute(CodeActivityContext context) 18 | { 19 | var message = context.GetValue(MessageToCandidate); 20 | var address = context.GetValue(EmailAddress); 21 | //Custom logic for creating a new employee 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Services/BillingService.WCF/BillingService.svc: -------------------------------------------------------------------------------- 1 | <%@ ServiceHost Language="C#" Debug="true" Service="BillingService.WCF.BillingService" %> 2 | 3 | namespace BillingService.WCF 4 | { 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Text; 9 | using System.ServiceModel; 10 | using BusinessEntities; 11 | 12 | [ServiceContract] 13 | public class BillingService 14 | { 15 | ClaimRepository claimRepository = new ClaimRepository(); 16 | 17 | [OperationContract] 18 | public string ProcessClaim(int claimId) 19 | { 20 | Claim claim = claimRepository.GetClaim(claimId); 21 | if (claim != null) 22 | return "Complete"; 23 | else 24 | return "Error"; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Rehosted_WF_Workflow Studio for WF 4.5/C#/ViewModel/ContentTypes.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 6 | // 7 | //----------------------------------------------------------------------- 8 | namespace Microsoft.Consulting.WorkflowStudio.ViewModel 9 | { 10 | public enum ContentTypes 11 | { 12 | PropertyInspector, 13 | Toolbox, 14 | Errors, 15 | Debug, 16 | Output, 17 | Outline 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /PROWF40.CH08.Host.Com.BookMark.ActivityLibrary/CH15/Activities designer/Metadata.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Activities; 6 | using System.Activities.Presentation.Metadata; 7 | using PROWF40.CH08.Host.Com.BookMark.ActivityLibrary.CH15.Activities; 8 | using System.ComponentModel; 9 | 10 | namespace PROWF40.CH08.Host.Com.BookMark.ActivityLibrary.CH15.Activities_designer 11 | { 12 | 13 | public class Metadata : IRegisterMetadata 14 | { 15 | public void Register() 16 | { 17 | AttributeTableBuilder atb = new AttributeTableBuilder(); 18 | atb.AddCustomAttributes(typeof(CalcShipping),new DesignerAttribute(typeof(CalcShippingDesigner))); 19 | MetadataStore.AddAttributeTable(atb.CreateTable()); 20 | } 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE/Service References/JobPostingService/PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE.JobPostingService.ApplyForJobResponse.datasource: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE.JobPostingService.ApplyForJobResponse, Service References.JobPostingService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /AppFabric/WebSites/Contoso.Claims.Services/BillingService.WCF/BillingService.svc: -------------------------------------------------------------------------------- 1 | <%@ ServiceHost Language="C#" Debug="true" Service="BillingService.WCF.BillingService" %> 2 | 3 | namespace BillingService.WCF 4 | { 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Text; 9 | using System.ServiceModel; 10 | using BusinessEntities; 11 | 12 | [ServiceContract] 13 | public class BillingService 14 | { 15 | ClaimRepository claimRepository = new ClaimRepository(); 16 | 17 | [OperationContract] 18 | public string ProcessClaim(int claimId) 19 | { 20 | Claim claim = claimRepository.GetClaim(claimId); 21 | if (claim != null) 22 | return "Complete"; 23 | else 24 | return "Error"; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Application/DataMapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Service = MVVM.Packpub.Northwind.Application.CustomerService; 7 | 8 | namespace MVVM.Packpub.Northwind.Application 9 | { 10 | public static class DataMapper 11 | { 12 | public static Model.Customer Update(this Model.Customer model, Service.Customer dto) 13 | { 14 | model.CustomerID = dto.CustomerID; 15 | model.CompanyName = dto.CompanyName; 16 | model.ContactName = dto.CompanyName; 17 | model.Address = dto.Address; 18 | model.Region = dto.Region; 19 | model.Country = dto.Region; 20 | model.PostalCode = dto.PostalCode; 21 | return model; 22 | } 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel/CustomerDetailsViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using StructureMap; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MVVM.Packpub.Northwind.ViewModel 9 | { 10 | public class CustomerDetailsViewModelFactory : ICustomerDetailsViewModelFactory 11 | { 12 | private readonly IContainer _container; 13 | 14 | public CustomerDetailsViewModelFactory(IContainer container) 15 | { 16 | _container = container; 17 | 18 | } 19 | 20 | 21 | public CustomerDetailsViewModel CreateInstance(string customerID) 22 | { 23 | return _container 24 | .With("customerID") 25 | .EqualTo(customerID) 26 | .GetInstance(); 27 | } 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/IMembershipService.cs: -------------------------------------------------------------------------------- 1 | namespace Mvc.Wwf.Membership.Registration.Activities 2 | { 3 | using System.Web.Security; 4 | 5 | public interface IMembershipService 6 | { 7 | #region Public Methods and Operators 8 | 9 | void Approve(string userName); 10 | 11 | void CreateUser( 12 | string userName, 13 | string password, 14 | string email, 15 | string passwordQuestion, 16 | string passwordAnswer, 17 | bool isApproved, 18 | object providerUserKey, 19 | out MembershipCreateStatus status); 20 | 21 | void Delete(string userName); 22 | 23 | MembershipUser GetUser(string name, bool userIsOnline); 24 | 25 | bool ValidateUser(string userName, string password); 26 | 27 | #endregion 28 | } 29 | } -------------------------------------------------------------------------------- /PROWF40.CH08.Host.Com.BookMark.ActivityLibrary/CH15/Activities/CalcShipping.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Activities; 6 | using System.ComponentModel; 7 | using PROWF40.CH08.Host.Com.BookMark.ActivityLibrary.CH15.Activities_designer; 8 | 9 | namespace PROWF40.CH08.Host.Com.BookMark.ActivityLibrary.CH15.Activities 10 | { 11 | 12 | [Designer(typeof(CalcShippingDesigner))] 13 | public sealed class CalcShipping : CodeActivity 14 | { 15 | public InArgument Weight { get; set; } 16 | public InArgument OrderTotal { get; set; } 17 | public InArgument ShipVia { get; set; } 18 | protected override Decimal Execute(CodeActivityContext context) 19 | { 20 | throw new NotImplementedException(); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE/Service References/JobPostingService/PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE.JobPostingService.GetJobApplicationStatusResponse.datasource: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE.JobPostingService.GetJobApplicationStatusResponse, Service References.JobPostingService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE/Service References/JobPostingService/PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE.JobPostingService.GetJobApplicationStatusResponse1.datasource: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE.JobPostingService.GetJobApplicationStatusResponse1, Service References.JobPostingService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.WPF.LibReserv/WaitForInput.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Activities; 3 | 4 | namespace LibraryReservation 5 | { 6 | public sealed class WaitForInput : NativeActivity 7 | { 8 | public WaitForInput() 9 | : base() 10 | { 11 | } 12 | 13 | public string BookmarkName { get; set; } 14 | public OutArgument Input { get; set; } 15 | 16 | protected override void Execute(NativeActivityContext context) 17 | { 18 | context.CreateBookmark(BookmarkName, 19 | new BookmarkCallback(this.Continue)); 20 | } 21 | 22 | void Continue(NativeActivityContext context, Bookmark bookmark, 23 | object obj) 24 | { 25 | Input.Set(context, (T)obj); 26 | } 27 | 28 | protected override bool CanInduceIdle { get { return true; } } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Data/NorthwindEntitiesModel.Designer.cs: -------------------------------------------------------------------------------- 1 | // T4 code generation is enabled for model 'C:\Worksapce\repos\dot.net development\WorkflowFoundation.40.45.Development\MVVM.Packpub.Northwind.Data\NorthwindEntitiesModel.edmx'. 2 | // To enable legacy code generation, change the value of the 'Code Generation Strategy' designer 3 | // property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model 4 | // is open in the designer. 5 | 6 | // If no context and entity classes have been generated, it may be because you created an empty model but 7 | // have not yet chosen which version of Entity Framework to use. To generate a context class and entity 8 | // classes for your model, open the model in the designer, right-click on the designer surface, and 9 | // select 'Update Model from Database...', 'Generate Database from Model...', or 'Add Code Generation 10 | // Item...'. -------------------------------------------------------------------------------- /PROWF40.CH08.Host.Com.BookMark.ActivityLibrary/GetString.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Activities; 6 | 7 | namespace PROWF40.CH08.Host.Com.BookMark.ActivityLibrary 8 | { 9 | 10 | public sealed class GetString : NativeActivity 11 | { 12 | protected override void Execute(NativeActivityContext context) 13 | { 14 | context.CreateBookmark("GetString", Resumed); 15 | } 16 | 17 | private void Resumed(NativeActivityContext context,Bookmark bookmark, object value) 18 | { 19 | if (value != null && value is String) 20 | { 21 | Result.Set(context, value as String); 22 | } 23 | } 24 | 25 | protected override bool CanInduceIdle 26 | { 27 | get { return true; } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Data/Order_Details.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace MVVM.Packpub.Northwind.Data 11 | { 12 | using System; 13 | using System.Collections.Generic; 14 | 15 | public partial class Order_Details 16 | { 17 | public int OrderID { get; set; } 18 | public int ProductID { get; set; } 19 | public decimal UnitPrice { get; set; } 20 | public short Quantity { get; set; } 21 | public float Discount { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /AppFabric/WebSites/Contoso.Claims.Web/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/ApproveMembership.cs: -------------------------------------------------------------------------------- 1 | namespace Mvc.Wwf.Membership.Registration.Activities 2 | { 3 | using System; 4 | using System.Activities; 5 | using System.Web.Security; 6 | 7 | public sealed class ApproveMembership : CodeActivity 8 | { 9 | #region Public Properties 10 | 11 | [RequiredArgument] 12 | public InArgument UserName { get; set; } 13 | 14 | #endregion 15 | 16 | #region Methods 17 | 18 | protected override void Execute(CodeActivityContext context) 19 | { 20 | var user = Membership.GetUser(this.UserName.Get(context)); 21 | if (user == null) 22 | { 23 | throw new InvalidOperationException("Cannot find user"); 24 | } 25 | 26 | user.IsApproved = true; 27 | Membership.UpdateUser(user); 28 | } 29 | 30 | #endregion 31 | } 32 | } -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/TemplateReader.cs: -------------------------------------------------------------------------------- 1 | namespace Mvc.Wwf.Membership.Registration.Activities 2 | { 3 | using System.IO; 4 | using System.Text; 5 | 6 | public class TemplateReader : ITemplateReader 7 | { 8 | #region Public Methods and Operators 9 | 10 | public ITemplateInfo GetTemplateInfo(string path) 11 | { 12 | var fileInfo = new FileInfo(path); 13 | return new TemplateInfo 14 | { Exists = fileInfo.Exists, LastWriteTime = fileInfo.LastWriteTime, Path = Path.GetFullPath(path) }; 15 | } 16 | 17 | public string Read(string path) 18 | { 19 | return Read(path, null); 20 | } 21 | 22 | public string Read(string path, Encoding encoding) 23 | { 24 | return encoding != null ? File.ReadAllText(path, encoding) : File.ReadAllText(path); 25 | } 26 | 27 | #endregion 28 | } 29 | } -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel/OrderViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using MVVM.Packpub.Northwind.Model; 2 | using StructureMap; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace MVVM.Packpub.Northwind.ViewModel 10 | { 11 | public class OrderViewModelFactory : IOrderViewModelFactory 12 | { 13 | private readonly IContainer _container; 14 | 15 | public OrderViewModelFactory( 16 | IContainer container) 17 | { 18 | _container = container; 19 | } 20 | 21 | public OrderViewModel CreateInstance(Order order, Customer customer) 22 | { 23 | return _container 24 | .With("order") 25 | .EqualTo(order) 26 | .With("customer") 27 | .EqualTo(customer) 28 | .GetInstance(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /BeginWF40.Extension.LeadGenerator/WaitForInput.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Activities; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace LeadGenerator 9 | { 10 | public class WaitForInput : NativeActivity 11 | 12 | { 13 | public WaitForInput() 14 | : base() 15 | { 16 | } 17 | public string BookmarkName { get; set; } 18 | public OutArgument Input { get; set; } 19 | protected override void Execute(NativeActivityContext context) 20 | { 21 | context.CreateBookmark(BookmarkName, new BookmarkCallback(this.Continue)); 22 | } 23 | void Continue(NativeActivityContext context, Bookmark bookmark, object obj) 24 | { 25 | Input.Set(context, (T)obj); 26 | } 27 | protected override bool CanInduceIdle { get { return true; } } 28 | 29 | 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Rehosted_WF_Workflow Studio for WF 4.5/C#/WorkflowStudio.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkflowStudio", "WorkflowStudio.csproj", "{7CCB48D6-7CCA-4893-B1E1-A143129E0963}" 5 | EndProject 6 | Global 7 | 8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 9 | Debug|x86 = Debug|x86 10 | Release|x86 = Release|x86 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {7CCB48D6-7CCA-4893-B1E1-A143129E0963}.Debug|x86.ActiveCfg = Debug|x86 14 | {7CCB48D6-7CCA-4893-B1E1-A143129E0963}.Debug|x86.Build.0 = Debug|x86 15 | {7CCB48D6-7CCA-4893-B1E1-A143129E0963}.Release|x86.ActiveCfg = Release|x86 16 | {7CCB48D6-7CCA-4893-B1E1-A143129E0963}.Release|x86.Build.0 = Release|x86 17 | EndGlobalSection 18 | GlobalSection(SolutionProperties) = preSolution 19 | HideSolutionNode = FALSE 20 | EndGlobalSection 21 | EndGlobal 22 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel/OrdersViewModel.cs: -------------------------------------------------------------------------------- 1 | using GalaSoft.MvvmLight; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Collections.ObjectModel; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace MVVM.Packpub.Northwind.ViewModel 10 | { 11 | public class OrdersViewModel : ViewModelBase 12 | { 13 | public ObservableCollection Orders { get; set; } 14 | 15 | public OrdersViewModel(IEnumerable orders) 16 | { 17 | Orders = new ObservableCollection( 18 | orders.Select(o => new OrderViewModel(o))); 19 | } 20 | 21 | public OrdersViewModel(Model.Customer model, IToolManager toolManager, IOrderViewModelFactory orderViewModelFactory) 22 | 23 | { 24 | Orders = new ObservableCollection(model.Orders.Select(o => orderViewModelFactory.CreateInstance(o, model))); 25 | } 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Services/BillingService.WCF/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Services/CarRentalService.WCF/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Services/AppraisalService.WCF/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /AppFabric/WebSites/Contoso.Claims.Services/BillingService.WCF/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /AppFabric/WebSites/Contoso.Claims.Services/AppraisalService.WCF/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /AppFabric/WebSites/Contoso.Claims.Services/CarRentalService.WCF/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /BeginWF40.Extension.LeadResponse/CompleteAssignment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Activities; 3 | using LeadGenerator; 4 | 5 | namespace LeadResponse 6 | { 7 | /*****************************************************/ 8 | // This custom activity completes an Assignment. 9 | /*****************************************************/ 10 | public sealed class CompleteAssignment : CodeActivity 11 | { 12 | public InOutArgument Assignment { get; set; } 13 | 14 | protected override void Execute(CodeActivityContext context) 15 | { 16 | Assignment a = Assignment.Get(context); 17 | a.Status = "Completed"; 18 | a.DateCompleted = DateTime.Now; 19 | 20 | PersistAssignment persist = context.GetExtension(); 21 | persist.AddAssignment(context.WorkflowInstanceId, a, "Update"); 22 | 23 | // Store the request in the OutArgument 24 | Assignment.Set(context, a); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /PROWF40.CH08.Host.Com.BookMark.ActivityLibrary/CH13/ExternalUpdate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Activities; 6 | using PROWF40.CH13.AdventureWorksAccess; 7 | 8 | namespace PROWF40.CH08.Host.Com.BookMark.ActivityLibrary.CH13 9 | { 10 | 11 | public sealed class ExternalUpdate : CodeActivity 12 | { 13 | public InArgument SalesOrderId { get; set; } 14 | public InArgument> OrderDetail { get; set; } 15 | protected override void Execute(CodeActivityContext context) 16 | { 17 | String operation = "record new sale"; 18 | Console.WriteLine("Order Id {0}: Notifying external system to {1}",SalesOrderId.Get(context), operation); 19 | foreach (SalesOrderDetail detail in OrderDetail.Get(context)) 20 | { 21 | Console.WriteLine("Product {0}: {1}", detail.ProductID, operation); 22 | } 23 | } 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Service References/ProcessClaim.WF/ProcessClaimService2.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /BeginWF40.Extension.LeadGenerator/ApplicationInterface.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Activities; 7 | using BeginWF40.Extension.LeadGenerator; 8 | 9 | namespace LeadGenerator 10 | { 11 | public static class ApplicationInterface 12 | { 13 | public static AddLead _app { get; set; } 14 | public static void AddEvent(String status) 15 | { 16 | if (_app != null) 17 | { 18 | new ListBoxTextWriter(_app.GetEventListBox()).WriteLine(status); 19 | } 20 | } 21 | 22 | public static void NewLead(Lead l) 23 | { 24 | if (_app != null) 25 | _app.AddNewLead(l); 26 | } 27 | 28 | public static void UpdateLead(Lead l) 29 | { 30 | if (_app != null) 31 | _app.lstLeads.Dispatcher.BeginInvoke(new Action(() => _app.UpdateLead(l))); 32 | } 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Rehosted_WF_Workflow Studio for WF 4.5/C#/Execution/SourceLocationDebugItem.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 6 | // 7 | //----------------------------------------------------------------------- 8 | namespace Microsoft.Consulting.WorkflowStudio.Execution 9 | { 10 | using System; 11 | 12 | public class SourceLocationDebugItem 13 | { 14 | public int StepCount { get; set; } 15 | 16 | public string ActivityName { get; set; } 17 | 18 | public string Id { get; set; } 19 | 20 | public string State { get; set; } 21 | 22 | public Guid InstanceId { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Rehosted_WF_Workflow Studio for WF 4.5/C#/Views/ValidationErrorsUserControl.xaml.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 6 | // 7 | //----------------------------------------------------------------------- 8 | 9 | namespace Microsoft.Consulting.WorkflowStudio.Views 10 | { 11 | using System.Windows.Controls; 12 | 13 | /// 14 | /// Interaction logic for ValidationErrorsUserControl.xaml 15 | /// 16 | public partial class ValidationErrorsUserControl : UserControl 17 | { 18 | public ValidationErrorsUserControl() 19 | { 20 | InitializeComponent(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Assets/BusinessEntities/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <?xml version="1.0" encoding="utf-16"?> 7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 8 | <ConnectionString>Data Source=(local);Initial Catalog=ContosoDB;Integrated Security=True</ConnectionString> 9 | <ProviderName>System.Data.SqlClient</ProviderName> 10 | </SerializableConnectionString> 11 | Data Source=(local);Initial Catalog=ContosoDB;Integrated Security=True 12 | 13 | 14 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Model/ModelBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.ComponentModel; 7 | using System.Diagnostics; 8 | namespace MVVM.Packpub.Northwind.Model 9 | { 10 | public class ModelBase : INotifyPropertyChanged 11 | { 12 | public event PropertyChangedEventHandler PropertyChanged = delegate { }; 13 | public void RaisePropertyChanged(string propertyName) 14 | { 15 | VerifyPropertyName(propertyName); 16 | PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 17 | } 18 | [DebuggerStepThrough] 19 | [Conditional("DEBUG")] 20 | private void VerifyPropertyName(string propertyName) 21 | { 22 | if (TypeDescriptor.GetProperties(this)[propertyName] == null) 23 | throw new InvalidOperationException( 24 | "Property " + propertyName + 25 | " wasn't found in " 26 | + GetType().Name + "."); 27 | } 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookLkp.Client/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /MVVM-Packpub.Northwind.Service/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MVVM.Packpub.Northwind.Service 9 | { 10 | 11 | [DataContract] 12 | public class Customer 13 | { 14 | [DataMember] 15 | public string CustomerID { get; set; } 16 | [DataMember] 17 | public string CompanyName { get; set; } 18 | [DataMember] 19 | public string ContactName { get; set; } 20 | [DataMember] 21 | public string Address { get; set; } 22 | [DataMember] 23 | public string City { get; set; } 24 | [DataMember] 25 | public string Region { get; set; } 26 | [DataMember] 27 | public string PostalCode { get; set; } 28 | [DataMember] 29 | public string Country { get; set; } 30 | [DataMember] 31 | public string Phone { get; set; } 32 | [DataMember] 33 | public IEnumerable Orders { get; set; } 34 | 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /PROWF40.CH13.AdventureWorksAccess/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <?xml version="1.0" encoding="utf-16"?> 7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 8 | <ConnectionString>Data Source=(LocalDB)\v11.0;Initial Catalog=AdventureWorks2012;Integrated Security=True</ConnectionString> 9 | <ProviderName>System.Data.SqlClient</ProviderName> 10 | </SerializableConnectionString> 11 | Data Source=(LocalDB)\v11.0;Initial Catalog=AdventureWorks2012;Integrated Security=True 12 | 13 | 14 | -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/PromoteRegistrationValues.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Activities; 6 | 7 | namespace Mvc.Wwf.Membership.Registration.Activities 8 | { 9 | 10 | public sealed class PromoteRegistrationValues : CodeActivity 11 | { 12 | [RequiredArgument] 13 | public InArgument Email { get; set; } 14 | 15 | [RequiredArgument] 16 | public InArgument UserName { get; set; } 17 | 18 | protected override void CacheMetadata(CodeActivityMetadata metadata) 19 | { 20 | metadata.RequireExtension(); 21 | base.CacheMetadata(metadata); 22 | } 23 | 24 | protected override void Execute(CodeActivityContext context) 25 | { 26 | var regParticipant = context.GetExtension(); 27 | 28 | regParticipant.UserName = this.UserName.Get(context); 29 | regParticipant.Email = this.Email.Get(context); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /BeginWF40.Extension.LeadGenerator/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <?xml version="1.0" encoding="utf-16"?> 7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 8 | <ConnectionString>Data Source=(LocalDB)\v11.0;Initial Catalog=BeginWF40_Persistence_Chap11;Integrated Security=True</ConnectionString> 9 | <ProviderName>System.Data.SqlClient</ProviderName> 10 | </SerializableConnectionString> 11 | Data Source=(LocalDB)\v11.0;Initial Catalog=BeginWF40_Persistence_Chap11;Integrated Security=True 12 | 13 | 14 | -------------------------------------------------------------------------------- /PROWF40.CH17.DesignerHost/ValidationErrorService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Activities.Presentation.Validation; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Controls; 8 | 9 | namespace PROWF40.CH17.DesignerHost 10 | { 11 | public class ValidationErrorService : IValidationErrorService 12 | 13 | { 14 | private ListBox lb; 15 | public ValidationErrorService(ListBox listBox) 16 | { 17 | lb = listBox; 18 | } 19 | public void ShowValidationErrors(IList errors) 20 | { 21 | lb.Items.Clear(); 22 | foreach (ValidationErrorInfo error in errors) 23 | { 24 | if (String.IsNullOrEmpty(error.PropertyName)) 25 | { 26 | lb.Items.Add(error.Message); 27 | } 28 | else 29 | { 30 | lb.Items.Add(String.Format("{0}: {1}",error.PropertyName,error.Message)); 31 | } 32 | } 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/Skins/MainSkin.xaml: -------------------------------------------------------------------------------- 1 | 5 | #FF145E9D 6 | 7 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.WPF.LibReserv/ApplicationInterface.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Controls; 3 | using System.Activities; 4 | using BeginWF40.Comunication.WPF.LibReserv; 5 | 6 | namespace LibraryReservation 7 | { 8 | public static class ApplicationInterface 9 | { 10 | public static MainWindow _app { get; set; } 11 | 12 | public static void AddEvent(String status) 13 | { 14 | if (_app != null) 15 | { 16 | new ListBoxTextWriter(_app.GetEventListBox()).WriteLine(status); 17 | } 18 | } 19 | 20 | public static void RequestBook(ReservationRequest request) 21 | { 22 | if (_app != null) 23 | _app.RequestBook(request); 24 | } 25 | 26 | public static void RespondToRequest(ReservationResponse response) 27 | { 28 | if (_app != null) 29 | _app.RespondToRequest(response); 30 | } 31 | 32 | public static void NewRequest(ReservationRequest request) 33 | { 34 | if (_app != null) 35 | _app.AddNewRequest(request); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /PROWF45.CH06.Verion.Update.MoviesRental.Activities/WaitForResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Activities; 6 | 7 | namespace PROWF45.CH06.Verion.Update.MoviesRental.Activities 8 | { 9 | 10 | public sealed class WaitForResponse : NativeActivity 11 | { 12 | public WaitForResponse() 13 | : base() 14 | { 15 | 16 | } 17 | 18 | public string ResponseName { get; set; } 19 | 20 | protected override bool CanInduceIdle 21 | { //override when the custom activity is allowed to make he workflow go idle 22 | get 23 | { 24 | return true; 25 | } 26 | } 27 | 28 | protected override void Execute(NativeActivityContext context) 29 | { 30 | context.CreateBookmark(this.ResponseName, new BookmarkCallback(this.ReceivedResponse)); 31 | } 32 | 33 | void ReceivedResponse(NativeActivityContext context, Bookmark bookmark, object obj) 34 | { 35 | this.Result.Set(context, (TResult)obj); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Data/NorthwindEntitiesModel.edmx.diagram: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Application/Command.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Input; 7 | 8 | namespace MVVM.Packpub.Northwind.Application 9 | { 10 | public class Command : ICommand 11 | { 12 | private readonly Action _execute; 13 | private readonly Func _canExecute; 14 | public Command(Action execute): this(execute, null) 15 | { } 16 | public Command(Action execute,Func canExecute) 17 | { 18 | _execute = execute; 19 | _canExecute = canExecute; 20 | } 21 | public void Execute(object parameter) 22 | { 23 | _execute(parameter); 24 | } 25 | 26 | public bool CanExecute(object parameter) 27 | { 28 | return (_canExecute == null) || _canExecute(parameter); 29 | } 30 | public event EventHandler CanExecuteChanged = delegate { }; 31 | public void RaiseCanExecuteChanged() 32 | { 33 | CanExecuteChanged(this, new EventArgs()); 34 | } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Rehosted_WF_Workflow Studio for WF 4.5/C#/Utilities/DispatcherService.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 6 | // 7 | //----------------------------------------------------------------------- 8 | namespace Microsoft.Consulting.WorkflowStudio.Utilities 9 | { 10 | using System; 11 | using System.Windows.Threading; 12 | 13 | public static class DispatcherService 14 | { 15 | public static Dispatcher DispatchObject { get; set; } 16 | 17 | public static void Dispatch(Action action) 18 | { 19 | if (DispatchObject == null || DispatchObject.CheckAccess()) 20 | { 21 | action(); 22 | } 23 | else 24 | { 25 | DispatchObject.Invoke(action); 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Model/Product.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MVVM.Packpub.Northwind.Model 8 | { 9 | public class Product : ModelBase 10 | { 11 | public const string ProductIDPropertyName = "ProductID"; 12 | private int _productID; 13 | public int ProductID 14 | { 15 | get { return _productID; } 16 | set 17 | { 18 | if (_productID == value) 19 | return; 20 | _productID = value; 21 | RaisePropertyChanged(ProductIDPropertyName); 22 | } 23 | } 24 | 25 | public const string ProductNamePropertyName = "ProductName"; 26 | private string _productName; 27 | public string ProductName 28 | { 29 | get { return _productName; } 30 | set 31 | { 32 | if (_productName == value) 33 | return; 34 | _productName = value; 35 | RaisePropertyChanged(ProductNamePropertyName); 36 | } 37 | } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookLkp.Client/Service References/ServiceReference1/BookInventoryParameter2.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookLkp.Client/Service References/ServiceReference2/BookInventoryParameter2.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.WPF.LibReserv/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18444 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace LibraryReservation.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Data/Products.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace MVVM.Packpub.Northwind.Data 11 | { 12 | using System; 13 | using System.Collections.Generic; 14 | 15 | public partial class Products 16 | { 17 | public int ProductID { get; set; } 18 | public string ProductName { get; set; } 19 | public Nullable SupplierID { get; set; } 20 | public Nullable CategoryID { get; set; } 21 | public string QuantityPerUnit { get; set; } 22 | public Nullable UnitPrice { get; set; } 23 | public Nullable UnitsInStock { get; set; } 24 | public Nullable UnitsOnOrder { get; set; } 25 | public Nullable ReorderLevel { get; set; } 26 | public bool Discontinued { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /PROWF40.CH08.Host.Com.BookMark.ActivityLibrary/CH13/ExternalVoid.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Activities; 6 | using PROWF40.CH13.AdventureWorksAccess; 7 | 8 | namespace PROWF40.CH08.Host.Com.BookMark.ActivityLibrary.CH13 9 | { 10 | 11 | public sealed class ExternalVoid : CodeActivity 12 | { 13 | public InArgument SalesOrderId { get; set; } 14 | public InArgument> OrderDetail { get; set; } 15 | 16 | 17 | // If your activity returns a value, derive from CodeActivity 18 | // and return the value from the Execute method. 19 | protected override void Execute(CodeActivityContext context) 20 | { 21 | String operation = "void previous sale"; 22 | Console.WriteLine( 23 | "Order Id {0}: Notifying external system to {1}", 24 | SalesOrderId.Get(context), operation); 25 | foreach (SalesOrderDetail detail in OrderDetail.Get(context)) 26 | { 27 | Console.WriteLine("Product {0}: {1}", 28 | detail.ProductID, operation); 29 | } 30 | 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Helpers/PaginatedList.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace Claims.Web.Helpers 7 | { 8 | public class PaginatedList : List 9 | { 10 | public int PageIndex { get; private set; } 11 | public int PageSize { get; private set; } 12 | public int TotalCount { get; private set; } 13 | public int TotalPages { get; private set; } 14 | 15 | public PaginatedList(IQueryable source, int pageIndex, int pageSize) { 16 | PageIndex = pageIndex; 17 | PageSize = pageSize; 18 | TotalCount = source.Count(); 19 | TotalPages = (int)Math.Ceiling(TotalCount / (double)PageSize); 20 | this.AddRange(source.Skip(PageIndex * PageSize).Take(PageSize)); 21 | } 22 | 23 | 24 | public bool HasPreviousPage 25 | { 26 | get 27 | { 28 | return (PageIndex > 0); 29 | } 30 | } 31 | public bool HasNextPage 32 | { 33 | get 34 | { 35 | return (PageIndex + 1 < TotalPages); 36 | } 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /PROWF40.CH17.DesignerHost/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18444 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PROWF40.CH17.DesignerHost.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Data/Customer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace MVVM.Packpub.Northwind.Data 11 | { 12 | using System; 13 | using System.Collections.Generic; 14 | 15 | public partial class Customer 16 | { 17 | public string CustomerID { get; set; } 18 | public string CompanyName { get; set; } 19 | public string ContactName { get; set; } 20 | public string ContactTitle { get; set; } 21 | public string Address { get; set; } 22 | public string City { get; set; } 23 | public string Region { get; set; } 24 | public string PostalCode { get; set; } 25 | public string Country { get; set; } 26 | public string Phone { get; set; } 27 | public string Fax { get; set; } 28 | public int Id { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Rehosted_WF_Workflow Studio for WF 4.5/C#/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.17929 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Microsoft.Consulting.WorkflowStudio.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18444 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace MVVM.Packpub.Northwind.UI.WPF.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /MVVM.Packpub.OrderEntry.UI.WPF/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18444 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace MVVM.Packpub.OrderEntry.UI.WPF.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /BeginWF40.Extension.LeadResponse/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18444 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace BeginWF40.Extension.LeadResponse.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel/OrderDetailsViewModel.cs: -------------------------------------------------------------------------------- 1 | using GalaSoft.MvvmLight.Command; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Input; 8 | 9 | namespace MVVM.Packpub.Northwind.ViewModel 10 | { 11 | public class OrderDetailsViewModel : ToolViewModel 12 | { 13 | private readonly IToolManager _toolManager; 14 | public ICustomerDetailsViewModelFactory 15 | CustomerDetailsFactory { get; set; } 16 | public OrderViewModel Order { get; set; } 17 | 18 | public ICommand ShowCustomerDetailsCommand 19 | { 20 | get 21 | { 22 | return new RelayCommand(() => 23 | _toolManager.OpenCustomerDetails( 24 | Order.Customer.CustomerID)); 25 | } 26 | 27 | } 28 | 29 | public OrderDetailsViewModel(OrderViewModel order,IToolManager toolManager) 30 | : base(toolManager) 31 | { 32 | _toolManager = toolManager; 33 | Order = order; 34 | DisplayName = Order.Customer.CompanyName 35 | + ": " + Order.Model.OrderID.ToString(); 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18444 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PROWF45.CH11.WCF.WORKFLOW.CLIENT.SERVICE.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /PROWF45.CH06.Version.Update.MoviesRental.WPF.Host/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18444 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PROWF45.CH06.Version.Update.MoviesRental.WPF.Host.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Rehosted_WF_Workflow Studio for WF 4.5/C#/Execution/TrackingEventArgs.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 6 | // 7 | //----------------------------------------------------------------------- 8 | 9 | namespace Microsoft.Consulting.WorkflowStudio.Execution 10 | { 11 | using System; 12 | using System.Activities; 13 | using System.Activities.Tracking; 14 | 15 | public class TrackingEventArgs : EventArgs 16 | { 17 | public TrackingEventArgs(TrackingRecord trackingRecord, TimeSpan timeout, Activity activity) 18 | { 19 | this.Record = trackingRecord; 20 | this.Timeout = timeout; 21 | this.Activity = activity; 22 | } 23 | 24 | public TrackingRecord Record { get; set; } 25 | 26 | public TimeSpan Timeout { get; set; } 27 | 28 | public Activity Activity { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/WaitForCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Activities; 6 | 7 | namespace Mvc.Wwf.Membership.Registration.Activities 8 | { 9 | 10 | public sealed class WaitForCommand : NativeActivity 11 | { 12 | // Define an activity input argument of type string 13 | public InArgument Command { get; set; } 14 | 15 | /// 16 | /// When implemented in a derived class, runs the activity’s execution logic. 17 | /// 18 | /// The execution context in which the activity executes. 19 | protected override void Execute(NativeActivityContext context) 20 | { 21 | context.CreateBookmark(this.Command.Get(context).ToString(), (activityContext, bookmark, value) => activityContext.SetValue(this.Result, value)); 22 | 23 | } 24 | 25 | /// 26 | /// Gets a value indicating whether CanInduceIdle. 27 | /// 28 | protected override bool CanInduceIdle 29 | { 30 | get 31 | { 32 | return true; 33 | } 34 | } 35 | 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Data/App.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.IO; 6 | using System.Linq; 7 | using System.Threading.Tasks; 8 | using System.Windows; 9 | 10 | namespace MVVM.Packpub.Northwind.UI.WPF 11 | { 12 | /// 13 | /// Interaction logic for App.xaml 14 | /// 15 | public partial class App : Application 16 | { 17 | protected override void OnStartup(StartupEventArgs e) 18 | { 19 | AppDomain.CurrentDomain.SetData("DataDirectory",GetDataDirectory()); 20 | base.OnStartup(e); 21 | } 22 | private string GetDataDirectory() 23 | { 24 | string solutionDirectory 25 | = Directory.GetParent( 26 | Directory.GetCurrentDirectory()) 27 | .Parent.Parent.FullName; 28 | string dataDirectory 29 | = Path.Combine(solutionDirectory, 30 | "MVVM.Packpub.Northwind.Data"); 31 | if (!Directory.Exists(dataDirectory)) 32 | throw new InvalidOperationException( 33 | "Unable to locate data directory."); 34 | return dataDirectory; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Rehosted_WF_Workflow Studio for WF 4.5/C#/Utilities/ExceptionHelper.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 6 | // 7 | //----------------------------------------------------------------------- 8 | namespace Microsoft.Consulting.WorkflowStudio.Utilities 9 | { 10 | using System; 11 | using System.Text; 12 | 13 | public class ExceptionHelper 14 | { 15 | public static string FormatStackTrace(Exception exception) 16 | { 17 | StringBuilder sb = new StringBuilder(); 18 | sb.Append(exception.Message); 19 | sb.Append(exception.StackTrace); 20 | 21 | if (exception.InnerException != null) 22 | { 23 | return sb.Append(FormatStackTrace(exception.InnerException)).ToString(); 24 | } 25 | else 26 | { 27 | return sb.ToString(); 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /BeginWF40.Extension.LeadResponse/ApplicationInterface.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Windows.Controls; 4 | using System.Activities; 5 | using BeginWF40.Extension.LeadResponse; 6 | 7 | namespace LeadResponse 8 | { 9 | public static class ApplicationInterface 10 | { 11 | public static FollowUpLead _app { get; set; } 12 | 13 | public static void AddAssignment(LeadGenerator.Assignment a) 14 | { 15 | if (_app != null) 16 | _app.lstLeads.Dispatcher.BeginInvoke 17 | (new Action(() => _app.AddAssignment(a))); 18 | } 19 | 20 | public static void UpdateAssignment(LeadGenerator.Assignment a) 21 | { 22 | if (_app != null) 23 | _app.lstLeads.Dispatcher.BeginInvoke 24 | (new Action(() => _app.UpdateAssignment(a))); 25 | } 26 | 27 | public static TextWriter GetStatusWriter() 28 | { 29 | if (_app != null) 30 | return new ListBoxTextWriter(_app.GetEventListBox()); 31 | else 32 | return null; 33 | } 34 | 35 | public static void AddEvent(String status) 36 | { 37 | if (_app != null) 38 | { 39 | GetStatusWriter().WriteLine(status); 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Data/NorthwindEntitiesModel.Context.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace MVVM.Packpub.Northwind.Data 11 | { 12 | using System; 13 | using System.Data.Entity; 14 | using System.Data.Entity.Infrastructure; 15 | 16 | public partial class NWindEntities : DbContext 17 | { 18 | public NWindEntities() 19 | : base("name=NWindEntities") 20 | { 21 | } 22 | 23 | protected override void OnModelCreating(DbModelBuilder modelBuilder) 24 | { 25 | throw new UnintentionalCodeFirstException(); 26 | } 27 | 28 | public virtual DbSet Employees { get; set; } 29 | public virtual DbSet Order_Details { get; set; } 30 | public virtual DbSet Orders { get; set; } 31 | public virtual DbSet Products { get; set; } 32 | public virtual DbSet Customers { get; set; } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /BeginWF40.Extension.LeadGenerator/Extensions/CommentExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Activities.Persistence; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Xml.Linq; 8 | 9 | namespace LeadGenerator.Extensions 10 | { 11 | public class CommentExtension : PersistenceParticipant 12 | { 13 | private string _comments = ""; 14 | public string Comments { get { return _comments; } } 15 | internal void AddComment(string s) 16 | { 17 | if (_comments.Length > 1) 18 | _comments += "\r\n"; 19 | this._comments += s; 20 | } 21 | protected override void CollectValues(out IDictionary readWriteValues, out IDictionary writeOnlyValues) 22 | { 23 | readWriteValues = new Dictionary(1) 24 | { 25 | { "Comment", this._comments } 26 | }; 27 | writeOnlyValues = null; 28 | } 29 | protected override void PublishValues 30 | (IDictionary readWriteValues) 31 | { 32 | object loadedData; 33 | if (readWriteValues.TryGetValue("Comment", out loadedData)) 34 | { 35 | this._comments = (string)loadedData; 36 | } 37 | } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /Mvc.Wwf.Membership.Registration.Activities/UrlHelperExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Mvc.Wwf.Membership.Registration.Activities 2 | { 3 | using System; 4 | using System.Web.Mvc; 5 | 6 | public static class UrlHelperExtensions 7 | { 8 | #region Public Methods and Operators 9 | 10 | public static string FullyQualifiedAction(this UrlHelper urlHelper, string actionName, string controllerName) 11 | { 12 | return FullyQualify( 13 | urlHelper.RequestContext.HttpContext.Request.Url, urlHelper.Action(actionName, controllerName)); 14 | } 15 | 16 | public static string FullyQualifiedAction(this UrlHelper urlHelper, string actionName) 17 | { 18 | return FullyQualify(urlHelper.RequestContext.HttpContext.Request.Url, urlHelper.Action(actionName)); 19 | } 20 | 21 | public static string FullyQualifiedContent(this UrlHelper urlHelper, string contentPath) 22 | { 23 | return FullyQualify(urlHelper.RequestContext.HttpContext.Request.Url, urlHelper.Content(contentPath)); 24 | } 25 | 26 | #endregion 27 | 28 | #region Methods 29 | 30 | private static string FullyQualify(Uri requestUri, string uri) 31 | { 32 | return new UriBuilder(requestUri.Scheme, requestUri.Host, requestUri.Port, uri).Uri.ToString(); 33 | } 34 | 35 | #endregion 36 | } 37 | } -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Application/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookInventory/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.Data/Order.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace MVVM.Packpub.Northwind.Data 11 | { 12 | using System; 13 | using System.Collections.Generic; 14 | 15 | public partial class Order 16 | { 17 | public int OrderID { get; set; } 18 | public string CustomerID { get; set; } 19 | public Nullable EmployeeID { get; set; } 20 | public Nullable OrderDate { get; set; } 21 | public Nullable RequiredDate { get; set; } 22 | public Nullable ShippedDate { get; set; } 23 | public Nullable ShipVia { get; set; } 24 | public Nullable Freight { get; set; } 25 | public string ShipName { get; set; } 26 | public string ShipAddress { get; set; } 27 | public string ShipCity { get; set; } 28 | public string ShipRegion { get; set; } 29 | public string ShipPostalCode { get; set; } 30 | public string ShipCountry { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Rehosted_WF_Workflow Studio for WF 4.5/C#/ViewModel/ViewModelBase.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 5 | // INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 6 | // 7 | //----------------------------------------------------------------------- 8 | namespace Microsoft.Consulting.WorkflowStudio.ViewModel 9 | { 10 | using System; 11 | using System.ComponentModel; 12 | 13 | public abstract class ViewModelBase : INotifyPropertyChanged, IDisposable 14 | { 15 | public event PropertyChangedEventHandler PropertyChanged; 16 | 17 | public void Dispose() 18 | { 19 | this.OnDispose(); 20 | } 21 | 22 | protected virtual void OnPropertyChanged(string propertyName) 23 | { 24 | PropertyChangedEventHandler handler = this.PropertyChanged; 25 | if (handler != null) 26 | { 27 | var e = new PropertyChangedEventArgs(propertyName); 28 | handler(this, e); 29 | } 30 | } 31 | 32 | protected virtual void OnDispose() 33 | { 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Assets/WorkflowActivities/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyCompany("MSIT")] 9 | [assembly: AssemblyProduct("WorkflowActivities")] 10 | [assembly: AssemblyCopyright("Copyright © MSIT 2008")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | 19 | // The following GUID is for the ID of the typelib if this project is exposed to COM 20 | [assembly: Guid("80d10ba4-7e98-48f2-8294-92f9d74e05b3")] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Views/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 16 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /AppFabric/Solution/Contoso.Workflows/ProcessClaimService/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyCompany("Microsoft")] 9 | [assembly: AssemblyProduct("ProcessClaimService")] 10 | [assembly: AssemblyCopyright("Copyright © Microsoft 2010")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("83173fe0-7548-4ca4-85d1-33fa7cceea28")] 20 | 21 | // Version information for an assembly consists of the following four values: 22 | // 23 | // Major Version 24 | // Minor Version 25 | // Build Number 26 | // Revision 27 | // 28 | // You can specify all the values or you can default the Revision and Build Numbers 29 | // by using the '*' as shown below: 30 | // [assembly: AssemblyVersion("1.0.*")] 31 | [assembly: AssemblyVersion("1.0.0.0")] 32 | [assembly: AssemblyFileVersion("1.0.0.0")] 33 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/Service References/CustomerService/service.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Models/ClaimFormViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Mvc.Ajax; 7 | using Claims.Web.Models; 8 | using BusinessEntities; 9 | 10 | namespace Claims.Web.Models 11 | { 12 | public class ClaimFormViewModel 13 | { 14 | //Properties 15 | public Claim Claim { get; private set; } 16 | public SelectList States { get; private set; } 17 | 18 | //Constructor 19 | public ClaimFormViewModel(Claim claim) 20 | { 21 | Claim = claim; 22 | States = new SelectList(USStates, claim.Accidents.State); 23 | } 24 | 25 | 26 | public static IEnumerable USStates 27 | { 28 | get 29 | { 30 | return new List() { "AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FL", 31 | "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", 32 | "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", 33 | "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", 34 | "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", 35 | "WY"}; 36 | } 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookLkp.Client/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Activities; 4 | using System.Activities.Statements; 5 | using System.Collections.Generic; 6 | using BeginWF40.Comunication.BookLkp.Client.ServiceReference2; 7 | 8 | namespace BeginWF40.Comunication.BookLkp.Client 9 | { 10 | 11 | class Program 12 | { 13 | static void Main(string[] args) 14 | { 15 | // create dictionary with input arguments for the workflow 16 | IDictionary input = new Dictionary 17 | { 18 | { "argAuthor" , "Margaret Mitchell" }, 19 | { "argTitle" , "Gone with the Wind" }, 20 | { "argISBN" , "1234567890123" } 21 | }; 22 | // execute the workflow 23 | IDictionary output = WorkflowInvoker.Invoke(new Workflow1(), input); 24 | BookInfo[] l = output["argBookList"] as BookInfo[]; 25 | if (l != null) 26 | { 27 | foreach (BookInfo i in l) 28 | { 29 | Console.WriteLine("{0}: {1}, {2}", 30 | i.Title, i.status, i.InventoryID); 31 | } 32 | } 33 | 34 | else 35 | Console.WriteLine("No items were found"); 36 | Console.WriteLine("Press ENTER to exit"); 37 | Console.ReadLine(); 38 | 39 | 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /MVVM.Packpub.OrderEntry.UI.WPF/ViewModel/MainViewModel.cs: -------------------------------------------------------------------------------- 1 | using GalaSoft.MvvmLight; 2 | 3 | namespace MVVM.Packpub.OrderEntry.UI.WPF.ViewModel 4 | { 5 | /// 6 | /// This class contains properties that the main View can data bind to. 7 | /// 8 | /// Use the mvvminpc snippet to add bindable properties to this ViewModel. 9 | /// 10 | /// 11 | /// You can also use Blend to data bind with the tool's support. 12 | /// 13 | /// 14 | /// See http://www.galasoft.ch/mvvm/getstarted 15 | /// 16 | /// 17 | public class MainViewModel : ViewModelBase 18 | { 19 | public string Welcome 20 | { 21 | get 22 | { 23 | return "Welcome to MVVM Light"; 24 | } 25 | } 26 | 27 | /// 28 | /// Initializes a new instance of the MainViewModel class. 29 | /// 30 | public MainViewModel() 31 | { 32 | if (IsInDesignMode) 33 | { 34 | // Code runs in Blend --> create design time data. 35 | } 36 | else 37 | { 38 | // Code runs "for real" 39 | } 40 | } 41 | 42 | ////public override void Cleanup() 43 | ////{ 44 | //// // Clean up if needed 45 | 46 | //// base.Cleanup(); 47 | ////} 48 | } 49 | } -------------------------------------------------------------------------------- /AppFabric/WebSites/Contoso.Claims.Web/Claims.Web/Views/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 16 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookInventory/PerformLookupParameter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Activities; 6 | 7 | namespace BookInventory 8 | { 9 | 10 | public sealed class PerformLookupParameter : CodeActivity 11 | { 12 | // Define an activity input argument of type string 13 | public InArgument Title { get; set; } 14 | public InArgument Author { get; set; } 15 | public InArgument ISBN { get; set; } 16 | public OutArgument BookList { get; set; } 17 | 18 | 19 | // If your activity returns a value, derive from CodeActivity 20 | // and return the value from the Execute method. 21 | protected override void Execute(CodeActivityContext context) 22 | { 23 | // Obtain the runtime value of the Text input argument 24 | string author = Author.Get(context); 25 | string title = Title.Get(context); 26 | string isbn = ISBN.Get(context); 27 | BookInfo[] l = new BookInfo[4]; 28 | l[0] = new BookInfo(title, author, isbn, "Available"); 29 | l[1] = new BookInfo(title, author, isbn, "CheckedOut"); 30 | l[2] = new BookInfo(title, author, isbn, "Missing"); 31 | l[3] = new BookInfo(title, author, isbn, "Available"); 32 | BookList.Set(context, l); 33 | 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookLkp.Client/Service References/ServiceReference1/configuration.svcinfo: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookLkp.Client/Service References/ServiceReference2/configuration.svcinfo: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookLkp.Client/Service References/ServiceReference1/BookInventoryParameter1.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /BeginWF40.Comunication.BookLkp.Client/Service References/ServiceReference2/BookInventoryParameter1.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /BeginWF40.Extension.LeadResponse/CreateAssignment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Activities; 3 | using LeadGenerator; 4 | 5 | namespace LeadResponse 6 | { 7 | /*****************************************************/ 8 | // This custom activity creates an Assignment class 9 | // using the input parameters (LeadID and AsignedTo). 10 | /*****************************************************/ 11 | public sealed class CreateAssignment : CodeActivity 12 | { 13 | public InArgument LeadID { get; set; } 14 | public InArgument AssignedTo { get; set; } 15 | public OutArgument Assignment { get; set; } 16 | 17 | protected override void Execute(CodeActivityContext context) 18 | { 19 | // Create an Assignment class and populate its properties 20 | Assignment a = new Assignment(); 21 | 22 | a.WorkflowID = context.WorkflowInstanceId; 23 | a.LeadID = LeadID.Get(context); 24 | a.DateAssigned = DateTime.Now; 25 | a.AssignedTo = AssignedTo.Get(context); 26 | a.Status = "Assigned"; 27 | a.DateDue = DateTime.Now + TimeSpan.FromDays(5); 28 | 29 | PersistAssignment persist = context.GetExtension(); 30 | persist.AddAssignment(context.WorkflowInstanceId, a, "Insert"); 31 | 32 | // Store the request in the OutArgument 33 | Assignment.Set(context, a); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel/ToolViewModel.cs: -------------------------------------------------------------------------------- 1 | using GalaSoft.MvvmLight; 2 | using GalaSoft.MvvmLight.Command; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows.Input; 9 | 10 | namespace MVVM.Packpub.Northwind.ViewModel 11 | { 12 | public class ToolViewModel : ViewModelBase 13 | { 14 | private readonly IToolManager _toolManager; 15 | 16 | public string DisplayName { get; set; } 17 | 18 | private ICommand _closeCommand = null; 19 | public ICommand CloseCommand 20 | { 21 | get 22 | { 23 | return _closeCommand ?? 24 | (_closeCommand = 25 | new RelayCommand(Close)); 26 | } 27 | } 28 | 29 | public ToolViewModel(IToolManager toolManager) 30 | { 31 | _toolManager = toolManager; 32 | } 33 | protected void Close() 34 | { 35 | _toolManager.CloseTool(this); 36 | } 37 | 38 | } 39 | 40 | //public class AToolViewModel : ToolViewModel 41 | //{ 42 | // public AToolViewModel() 43 | // { 44 | // DisplayName = "A"; 45 | // } 46 | //} 47 | 48 | //public class BToolViewModel : ToolViewModel 49 | //{ 50 | // public BToolViewModel() 51 | // { 52 | // DisplayName = "B"; 53 | // } 54 | //} 55 | 56 | } 57 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.UI.WPF/BootStrapper.cs: -------------------------------------------------------------------------------- 1 | using MVVM.Packpub.Northwind.ViewModel; 2 | using StructureMap; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace MVVM.Packpub.Northwind.UI.WPF 10 | { 11 | public class BootStrapper 12 | { 13 | public MainWindowViewModel MainWindowViewModel 14 | { 15 | get 16 | { 17 | return ObjectFactory.GetInstance(); 18 | } 19 | } 20 | public BootStrapper() 21 | { 22 | ObjectFactory.Initialize( 23 | o => o.Scan( 24 | a => 25 | { 26 | // a.TheCallingAssembly(); 27 | a.WithDefaultConventions(); 28 | //a.Exclude(x => x.FullName.Contains("System.Action")); 29 | a.AssembliesFromApplicationBaseDirectory(d => d.FullName.StartsWith("MVVM.Packpub.Northwind")); 30 | a.LookForRegistries(); 31 | //a.Assembly("MVVM.Packpub.Northwind.Model"); 32 | // a.Assembly("MVVM.Packpub.Northwind.ViewModel"); 33 | // a.Assembly("MVVM.Packpub.Northwind.UI.WPF"); 34 | //a.Assembly("MVVM.Packpub.Northwind.Application"); 35 | //a.ExcludeNamespaceContainingType(); 36 | //a.AssembliesFromPath(AppDomain.CurrentDomain.BaseDirectory); 37 | 38 | })); 39 | } 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /PROWF45.CH11.WCF.WORKFLOW.SERVICE/model/JobApplication.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace Exercise1.Core 7 | { 8 | public class JobApplicationStatus 9 | { 10 | public Guid JobApplicationId { get; set; } 11 | public JobApplication SubmittedApplication { get; set; } 12 | public bool PassedInterview { get; set; } 13 | public bool PassedBackgroundCheck { get; set; } 14 | public JobPosting JobAppliedTo { get; set; } 15 | } 16 | public class JobApplication 17 | { 18 | public Candidate ApplyingCandidate { get; set; } 19 | public int JobPostingId { get; set; } 20 | } 21 | 22 | public class Candidate 23 | { 24 | public int CandidateId { get; set; } 25 | public string FirstName { get; set; } 26 | public string LastName { get; set; } 27 | public string EmailAddress { get; set; } 28 | public string SSN { get; set; } 29 | } 30 | 31 | public class JobPosting 32 | { 33 | public int JobPostingId { get; set; } 34 | public string PositionName { get; set; } 35 | public DateTime PostingDate { get; set; } 36 | public ContactManager HiringManager { get; set; } 37 | } 38 | 39 | public class ContactManager 40 | { 41 | public int ManagerId { get; set; } 42 | public string FirstName { get; set; } 43 | public string LastName { get; set; } 44 | public string EmailAddress { get; set; } 45 | } 46 | } -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Claims.Web")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Claims.Web")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2009")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("31a733ca-1d84-41aa-a3e1-9df1661d9467")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /BeginWF40.PassArgoment.OrderProcess/lookupItems.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Activities; 6 | 7 | namespace OrderProcess 8 | { 9 | 10 | public sealed class lookupItems : CodeActivity 11 | { 12 | // Define an activity input argument of type string 13 | public InArgument ItemCode { get; set; } 14 | public OutArgument Item { get; set; } 15 | 16 | // If your activity returns a value, derive from CodeActivity 17 | // and return the value from the Execute method. 18 | protected override void Execute(CodeActivityContext context) 19 | { 20 | // Obtain the runtime value of the Text input argument 21 | ItemInfo i = new ItemInfo(); 22 | i.ItemCode = context.GetValue(this.ItemCode); 23 | 24 | switch (i.ItemCode) 25 | { 26 | case "12345": 27 | i.Description = "Widget"; 28 | i.Price = (decimal)10.0; 29 | break; 30 | 31 | case "12346": 32 | i.Description = "Gadget"; 33 | i.Price = (decimal)15.0; 34 | break; 35 | 36 | case "12347": 37 | i.Description = "Super Gadget"; 38 | i.Price = (decimal)25.0; 39 | break; 40 | 41 | 42 | } 43 | 44 | context.SetValue(this.Item, i); 45 | 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /AppFabric/Solution/Claims.Web/Claims.Web/Views/Shared/Site.Master: -------------------------------------------------------------------------------- 1 | <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> 2 | 3 | 4 | 5 | 6 | <asp:ContentPlaceHolder ID="TitleContent" runat="server" /> 7 | 8 | 9 | 10 | 11 |
12 | 13 | 32 | 33 |
34 | 35 | 36 | 39 |
40 |
41 | 42 | 43 | -------------------------------------------------------------------------------- /AppFabric/WebSites/Contoso.Claims.Web/Claims.Web/Views/Shared/Site.Master: -------------------------------------------------------------------------------- 1 | <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> 2 | 3 | 4 | 5 | 6 | <asp:ContentPlaceHolder ID="TitleContent" runat="server" /> 7 | 8 | 9 | 10 | 11 |
12 | 13 | 32 | 33 |
34 | 35 | 36 | 39 |
40 |
41 | 42 | 43 | -------------------------------------------------------------------------------- /MVVM.Packpub.Northwind.ViewModel/ViewModelLocator.cs: -------------------------------------------------------------------------------- 1 | using MVVM.Packpub.Northwind.Application; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using MVVM.Packpub.Northwind.Application.CustomerService; 8 | 9 | namespace MVVM.Packpub.Northwind.ViewModel 10 | { 11 | public static class ViewModelLocator 12 | { 13 | // private static MainWindowViewModel _mainWindowViewModel; 14 | // public static MainWindowViewModel MainWindowViewModelStatic 15 | // { 16 | // get 17 | // { 18 | // return _mainWindowViewModel ?? 19 | // (_mainWindowViewModel = 20 | // new MainWindowViewModel( 21 | // new UIDataProvider( 22 | // new CustomerServiceClient()), 23 | // new ToolManager())); 24 | 25 | // //return _mainWindowViewModel ?? 26 | // // (_mainWindowViewModel = 27 | // // new MainWindowViewModel(new UIDataProvider(new CustomerServiceClient()))); 28 | 29 | // //if (_mainWindowViewModel == null) 30 | // //{ 31 | // // _mainWindowViewModel = new MainWindowViewModel(new UIDataProvider()); 32 | // //} 33 | // //return _mainWindowViewModel; 34 | // } 35 | // } 36 | 37 | } 38 | } 39 | --------------------------------------------------------------------------------