diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e645270 --- /dev/null +++ b/.gitignore @@ -0,0 +1,353 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/README.md b/README.md index 9fa8fed..f424b99 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,7 @@ -# simpleOrderSearch -simpleOrderSearch +# OverEngineeredOrderSearch +SimpleOrderSearch test - -I want to assess your ability to create an application and web service. It truly is the bare minimum of knowledge necessary to be successful in this position. I don't want you to spend a lot of time on this. You should be able to do this in an hour or so if the job is right for you. - -Order Search - -This programming task consists of building a simple console application to search for orders. Fork this repository and create your application. It should take this input from the user: - -(Order Number || (MSA && Status)) && CompletionDte - -The console application will call a service that you create using C#. I have provided some sample data for the application in the JSON file in the data folder. - - - -The file contains an array whose elements represent orders. The data should be defined as a model in your service. - -The application calling the service can be a console app. You have total freedom to do what you want but make sure it can do these three things: - -• Validate that the user has provided the right criteria to make a search - -• Provide an offset and page value for pagination. - -• Write the outputs of the service call to a console window. - -Create a pull request once you have it working. I will clone your repository, verify that it works, and evaluate it. Please ensure you include any instructions for running that may be required. +A couple of things needed to run this: +1) Copy "...\SimpleOrderSearch\App_Data\orderInfo.json" into "C:\Temp". +2) Open SimpleOrderSearch.sln. Rebuild solution. Debug it. +3) Open "...\SimpleOrderSearchClient\SimpleOrderSearchClient.sln". Rebuild and debug it. diff --git a/SimpleOrderSearch.sln b/SimpleOrderSearch.sln new file mode 100644 index 0000000..1ea33a8 --- /dev/null +++ b/SimpleOrderSearch.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.168 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleOrderSearchSvc", "SimpleOrderSearch\SimpleOrderSearchSvc.csproj", "{73151D50-D274-47EB-AB7E-E213F0B57330}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {73151D50-D274-47EB-AB7E-E213F0B57330}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73151D50-D274-47EB-AB7E-E213F0B57330}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73151D50-D274-47EB-AB7E-E213F0B57330}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73151D50-D274-47EB-AB7E-E213F0B57330}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9C38AD55-B440-48BD-89DB-329E9775A9DF} + EndGlobalSection +EndGlobal diff --git a/SimpleOrderSearch/App_Data/orderInfo.json b/SimpleOrderSearch/App_Data/orderInfo.json new file mode 100644 index 0000000..e9a6a59 --- /dev/null +++ b/SimpleOrderSearch/App_Data/orderInfo.json @@ -0,0 +1,136 @@ +[ + { + "OrderID": 36, + "ShipperID": 4, + "DriverID": 35, + "CompletionDte": "2018-01-12T05:10:00", + "Status": 10, + "Code": "R4C877FF", + "MSA": 1, + "Duration": "92.00", + "OfferType": 1 + + }, + { + "OrderID": 37, + "ShipperID": 4, + "DriverID": 243, + "CompletionDte": "2018-02-15T05:10:00", + "Status": 10, + "Code": "R47077FF", + "MSA": 1, + "Duration": "43.00", + "OfferType": 1 + }, + { + "OrderID": 38, + "ShipperID": 4, + "DriverID": 35, + "CompletionDte": "2018-01-31T05:10:00", + "Status": 10, + "Code": "R6453FF", + "MSA": 2, + "Duration": "120.00", + "OfferType": 1 + }, + { + "OrderID": 39, + "ShipperID": 4, + "DriverID": 35, + "CompletionDte": "2018-01-31T05:10:00", + "Status": 10, + "Code": "R4C877DS", + "MSA": 4, + "Duration": "15.00", + "OfferType": 1 + }, + { + "OrderID": 40, + "ShipperID": 4, + "DriverID": 35, + "CompletionDte": "2018-01-31T05:10:00", + "Status": 10, + "Code": "R4C9999F", + "MSA": 1, + "Duration": "111.00", + "OfferType": 1 + }, + { + "OrderID": 41, + "ShipperID": 67, + "DriverID": 35, + "CompletionDte": "2018-01-31T05:10:00", + "Status": 10, + "Code": "R4C87S32", + "MSA": 1, + "Duration": "54.00", + "OfferType": 1 + }, + { + "OrderID": 42, + "ShipperID": 4, + "DriverID": 35, + "CompletionDte": "2018-01-31T05:10:00", + "Status": 10, + "Code": "R4C87123", + "MSA": 1, + "Duration": "92.00", + "OfferType": 1 + }, + { + "OrderID": 43, + "ShipperID": 4, + "DriverID": 35, + "CompletionDte": "2018-01-31T05:10:00", + "Status": 10, + "Code": "R42G77FF", + "MSA": 1, + "Duration": "40.00", + "OfferType": 1 + }, + { + "OrderID": 44, + "ShipperID": 4, + "DriverID": 35, + "CompletionDte": "2018-01-31T05:10:00", + "Status": 10, + "Code": "R4002WFF", + "MSA": 1, + "Duration": "92.00", + "OfferType": 2 + }, + { + "OrderID": 45, + "ShipperID": 4, + "DriverID": 35, + "CompletionDte": "2018-01-31T05:10:00", + "Status": 20, + "Code": "R400KHFF", + "MSA": 3, + "Duration": "23.00", + "OfferType": 1 + }, + { + "OrderID": 46, + "ShipperID": 24, + "DriverID": 35, + "CompletionDte": "2018-01-31T05:10:00", + "Status": 61, + "Code": "R4C437FF", + "MSA": 1, + "Duration": "92.00", + "OfferType": 1 + }, + { + "OrderID": 47, + "ShipperID": 121, + "DriverID": 35, + "CompletionDte": "2018-03-1T05:10:00", + "Status": 10, + "Code": "R422AQF", + "MSA": 1, + "Duration": "66.00", + "OfferType": 2 + } + +] \ No newline at end of file diff --git a/SimpleOrderSearch/IService1.cs b/SimpleOrderSearch/IService1.cs new file mode 100644 index 0000000..82c1d77 --- /dev/null +++ b/SimpleOrderSearch/IService1.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.ServiceModel; +using System.ServiceModel.Web; +using System.Text; + +namespace SimpleOrderSearch +{ + // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together. + [ServiceContract] + public interface IService1 + { + // TODO: Add your service operations here + [OperationContract] + OrderInfoResponse GetOrderInfos(OrderInfo orderInfo); + } + + + // Use a data contract as illustrated in the sample below to add composite types to service operations. + [DataContract] + public class OrderInfo + { + [DataMember] + public int OrderID { get; set; } + + [DataMember] + public int ShipperID { get; set; } + + [DataMember] + public int DriverID { get; set; } + + [DataMember] + public string CompletionDte { get; set; } + + [DataMember] + public int Status { get; set; } + + [DataMember] + public string Code { get; set; } + + [DataMember] + public int MSA { get; set; } + + [DataMember] + public string Duration { get; set; } + + [DataMember] + public string OfferType { get; set; } + } + + [DataContract] + public class OrderInfoResponse + { + [DataMember] + public int ReturnCode { get; set; } + + [DataMember] + public OrderInfo[] OrderInfos { get; set; } + } +} diff --git a/SimpleOrderSearch/Properties/AssemblyInfo.cs b/SimpleOrderSearch/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f73450b --- /dev/null +++ b/SimpleOrderSearch/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SimpleOrderSearch")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SimpleOrderSearch")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("73151d50-d274-47eb-ab7e-e213f0b57330")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SimpleOrderSearch/Service1.svc b/SimpleOrderSearch/Service1.svc new file mode 100644 index 0000000..5bd5e82 --- /dev/null +++ b/SimpleOrderSearch/Service1.svc @@ -0,0 +1 @@ +<%@ ServiceHost Language="C#" Debug="true" Service="SimpleOrderSearch.Service1" CodeBehind="Service1.svc.cs" %> \ No newline at end of file diff --git a/SimpleOrderSearch/Service1.svc.cs b/SimpleOrderSearch/Service1.svc.cs new file mode 100644 index 0000000..e1e2c0c --- /dev/null +++ b/SimpleOrderSearch/Service1.svc.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.ServiceModel; +using System.ServiceModel.Web; +using System.Text; +using System.IO; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json; + +namespace SimpleOrderSearch +{ + // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together. + // NOTE: In order to launch WCF Test Client for testing this service, please select Service1.svc or Service1.svc.cs at the Solution Explorer and start debugging. + public class Service1 : IService1 + { + #region Constant definitions + + private const int c_errCompletionDteMissing = -1; + + #endregion + + public OrderInfoResponse GetOrderInfos(OrderInfo orderInfo) + { + var response = new OrderInfoResponse(); + + // perform basic parameter validation... + if (string.IsNullOrWhiteSpace(orderInfo.CompletionDte)) + { + response.ReturnCode = c_errCompletionDteMissing; + } + else + { + using (StreamReader r = new StreamReader(@"C:\temp\orderInfo.json")) + { + string json = r.ReadToEnd(); + List dataItems = JsonConvert.DeserializeObject>(json); + + // Select matching items + var results = + from p in dataItems + where p.CompletionDte == orderInfo.CompletionDte + && (p.OrderID == orderInfo.OrderID || ( + p.MSA == orderInfo.MSA && p.Status == orderInfo.Status)) + select p; + + response.ReturnCode = 0; + response.OrderInfos = results.ToArray(); + } + } + + return response; + } + } +} diff --git a/SimpleOrderSearch/SimpleOrderSearchSvc.csproj b/SimpleOrderSearch/SimpleOrderSearchSvc.csproj new file mode 100644 index 0000000..76eb1e9 --- /dev/null +++ b/SimpleOrderSearch/SimpleOrderSearchSvc.csproj @@ -0,0 +1,122 @@ + + + + Debug + AnyCPU + + + 2.0 + {73151D50-D274-47EB-AB7E-E213F0B57330} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + SimpleOrderSearch + SimpleOrderSearch + v4.6.1 + True + true + true + + + + + + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + + ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + + + + + + + + Service1.svc + + + + + + + + Always + + + + Web.config + + + Web.config + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + True + True + 3118 + / + http://localhost:3118/ + False + False + + + False + + + + + + \ No newline at end of file diff --git a/SimpleOrderSearch/Web.Debug.config b/SimpleOrderSearch/Web.Debug.config new file mode 100644 index 0000000..fae9cfe --- /dev/null +++ b/SimpleOrderSearch/Web.Debug.config @@ -0,0 +1,30 @@ + + + + + + + + + + \ No newline at end of file diff --git a/SimpleOrderSearch/Web.Release.config b/SimpleOrderSearch/Web.Release.config new file mode 100644 index 0000000..da6e960 --- /dev/null +++ b/SimpleOrderSearch/Web.Release.config @@ -0,0 +1,31 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/SimpleOrderSearch/Web.config b/SimpleOrderSearch/Web.config new file mode 100644 index 0000000..0924ce7 --- /dev/null +++ b/SimpleOrderSearch/Web.config @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SimpleOrderSearch/packages.config b/SimpleOrderSearch/packages.config new file mode 100644 index 0000000..8ab13a9 --- /dev/null +++ b/SimpleOrderSearch/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/SimpleOrderSearchClient/App.config b/SimpleOrderSearchClient/App.config new file mode 100644 index 0000000..bd4b7c8 --- /dev/null +++ b/SimpleOrderSearchClient/App.config @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SimpleOrderSearchClient/App.xaml b/SimpleOrderSearchClient/App.xaml new file mode 100644 index 0000000..c948dfb --- /dev/null +++ b/SimpleOrderSearchClient/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/SimpleOrderSearchClient/App.xaml.cs b/SimpleOrderSearchClient/App.xaml.cs new file mode 100644 index 0000000..8883fe9 --- /dev/null +++ b/SimpleOrderSearchClient/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace SimpleOrderSearchClient +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Reference.cs b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Reference.cs new file mode 100644 index 0000000..6f97553 --- /dev/null +++ b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Reference.cs @@ -0,0 +1,296 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SimpleOrderSearchClient.SimpleOrderSearch { + using System.Runtime.Serialization; + using System; + + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] + [System.Runtime.Serialization.DataContractAttribute(Name="OrderInfo", Namespace="http://schemas.datacontract.org/2004/07/SimpleOrderSearch")] + [System.SerializableAttribute()] + public partial class OrderInfo : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged { + + [System.NonSerializedAttribute()] + private System.Runtime.Serialization.ExtensionDataObject extensionDataField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string CodeField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string CompletionDteField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private int DriverIDField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string DurationField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private int MSAField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string OfferTypeField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private int OrderIDField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private int ShipperIDField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private int StatusField; + + [global::System.ComponentModel.BrowsableAttribute(false)] + public System.Runtime.Serialization.ExtensionDataObject ExtensionData { + get { + return this.extensionDataField; + } + set { + this.extensionDataField = value; + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string Code { + get { + return this.CodeField; + } + set { + if ((object.ReferenceEquals(this.CodeField, value) != true)) { + this.CodeField = value; + this.RaisePropertyChanged("Code"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string CompletionDte { + get { + return this.CompletionDteField; + } + set { + if ((object.ReferenceEquals(this.CompletionDteField, value) != true)) { + this.CompletionDteField = value; + this.RaisePropertyChanged("CompletionDte"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public int DriverID { + get { + return this.DriverIDField; + } + set { + if ((this.DriverIDField.Equals(value) != true)) { + this.DriverIDField = value; + this.RaisePropertyChanged("DriverID"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string Duration { + get { + return this.DurationField; + } + set { + if ((object.ReferenceEquals(this.DurationField, value) != true)) { + this.DurationField = value; + this.RaisePropertyChanged("Duration"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public int MSA { + get { + return this.MSAField; + } + set { + if ((this.MSAField.Equals(value) != true)) { + this.MSAField = value; + this.RaisePropertyChanged("MSA"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string OfferType { + get { + return this.OfferTypeField; + } + set { + if ((object.ReferenceEquals(this.OfferTypeField, value) != true)) { + this.OfferTypeField = value; + this.RaisePropertyChanged("OfferType"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public int OrderID { + get { + return this.OrderIDField; + } + set { + if ((this.OrderIDField.Equals(value) != true)) { + this.OrderIDField = value; + this.RaisePropertyChanged("OrderID"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public int ShipperID { + get { + return this.ShipperIDField; + } + set { + if ((this.ShipperIDField.Equals(value) != true)) { + this.ShipperIDField = value; + this.RaisePropertyChanged("ShipperID"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public int Status { + get { + return this.StatusField; + } + set { + if ((this.StatusField.Equals(value) != true)) { + this.StatusField = value; + this.RaisePropertyChanged("Status"); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] + [System.Runtime.Serialization.DataContractAttribute(Name="OrderInfoResponse", Namespace="http://schemas.datacontract.org/2004/07/SimpleOrderSearch")] + [System.SerializableAttribute()] + public partial class OrderInfoResponse : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged { + + [System.NonSerializedAttribute()] + private System.Runtime.Serialization.ExtensionDataObject extensionDataField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private SimpleOrderSearchClient.SimpleOrderSearch.OrderInfo[] OrderInfosField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private int ReturnCodeField; + + [global::System.ComponentModel.BrowsableAttribute(false)] + public System.Runtime.Serialization.ExtensionDataObject ExtensionData { + get { + return this.extensionDataField; + } + set { + this.extensionDataField = value; + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public SimpleOrderSearchClient.SimpleOrderSearch.OrderInfo[] OrderInfos { + get { + return this.OrderInfosField; + } + set { + if ((object.ReferenceEquals(this.OrderInfosField, value) != true)) { + this.OrderInfosField = value; + this.RaisePropertyChanged("OrderInfos"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public int ReturnCode { + get { + return this.ReturnCodeField; + } + set { + if ((this.ReturnCodeField.Equals(value) != true)) { + this.ReturnCodeField = value; + this.RaisePropertyChanged("ReturnCode"); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.ServiceModel.ServiceContractAttribute(ConfigurationName="SimpleOrderSearch.IService1")] + public interface IService1 { + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService1/GetOrderInfos", ReplyAction="http://tempuri.org/IService1/GetOrderInfosResponse")] + SimpleOrderSearchClient.SimpleOrderSearch.OrderInfoResponse GetOrderInfos(SimpleOrderSearchClient.SimpleOrderSearch.OrderInfo orderInfo); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService1/GetOrderInfos", ReplyAction="http://tempuri.org/IService1/GetOrderInfosResponse")] + System.Threading.Tasks.Task GetOrderInfosAsync(SimpleOrderSearchClient.SimpleOrderSearch.OrderInfo orderInfo); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + public interface IService1Channel : SimpleOrderSearchClient.SimpleOrderSearch.IService1, System.ServiceModel.IClientChannel { + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + public partial class Service1Client : System.ServiceModel.ClientBase, SimpleOrderSearchClient.SimpleOrderSearch.IService1 { + + public Service1Client() { + } + + public Service1Client(string endpointConfigurationName) : + base(endpointConfigurationName) { + } + + public Service1Client(string endpointConfigurationName, string remoteAddress) : + base(endpointConfigurationName, remoteAddress) { + } + + public Service1Client(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : + base(endpointConfigurationName, remoteAddress) { + } + + public Service1Client(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + base(binding, remoteAddress) { + } + + public SimpleOrderSearchClient.SimpleOrderSearch.OrderInfoResponse GetOrderInfos(SimpleOrderSearchClient.SimpleOrderSearch.OrderInfo orderInfo) { + return base.Channel.GetOrderInfos(orderInfo); + } + + public System.Threading.Tasks.Task GetOrderInfosAsync(SimpleOrderSearchClient.SimpleOrderSearch.OrderInfo orderInfo) { + return base.Channel.GetOrderInfosAsync(orderInfo); + } + } +} diff --git a/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Reference.svcmap b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Reference.svcmap new file mode 100644 index 0000000..14e1306 --- /dev/null +++ b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Reference.svcmap @@ -0,0 +1,35 @@ + + + + false + true + true + + false + false + false + + + true + Auto + true + true + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Service1.disco b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Service1.disco new file mode 100644 index 0000000..56d92f7 --- /dev/null +++ b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Service1.disco @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Service1.wsdl b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Service1.wsdl new file mode 100644 index 0000000..b9ef203 --- /dev/null +++ b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Service1.wsdl @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Service1.xsd b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Service1.xsd new file mode 100644 index 0000000..35d0b0b --- /dev/null +++ b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Service1.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Service11.xsd b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Service11.xsd new file mode 100644 index 0000000..d58e7f3 --- /dev/null +++ b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Service11.xsd @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Service12.xsd b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Service12.xsd new file mode 100644 index 0000000..30e76c5 --- /dev/null +++ b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/Service12.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/SimpleOrderSearchClient.SimpleOrderSearch.OrderInfoResponse.datasource b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/SimpleOrderSearchClient.SimpleOrderSearch.OrderInfoResponse.datasource new file mode 100644 index 0000000..b5f1a5f --- /dev/null +++ b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/SimpleOrderSearchClient.SimpleOrderSearch.OrderInfoResponse.datasource @@ -0,0 +1,10 @@ + + + + SimpleOrderSearchClient.SimpleOrderSearch.OrderInfoResponse, Connected Services.SimpleOrderSearch.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/configuration.svcinfo b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/configuration.svcinfo new file mode 100644 index 0000000..ad8503d --- /dev/null +++ b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/configuration.svcinfo @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/configuration91.svcinfo b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/configuration91.svcinfo new file mode 100644 index 0000000..38df846 --- /dev/null +++ b/SimpleOrderSearchClient/Connected Services/SimpleOrderSearch/configuration91.svcinfo @@ -0,0 +1,201 @@ + + + + + + + BasicHttpBinding_IService1 + + + + + + + + + + + + + + + + + + + + + StrongWildcard + + + + + + 65536 + + + + + + + + + System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + System.Text.UTF8Encoding + + + Buffered + + + + + + Text + + + System.ServiceModel.Configuration.BasicHttpSecurityElement + + + None + + + System.ServiceModel.Configuration.HttpTransportSecurityElement + + + None + + + None + + + System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement + + + Never + + + TransportSelected + + + (Collection) + + + + + + System.ServiceModel.Configuration.BasicHttpMessageSecurityElement + + + UserName + + + Default + + + + + + + + + http://localhost:3118/Service1.svc + + + + + + basicHttpBinding + + + BasicHttpBinding_IService1 + + + SimpleOrderSearch.IService1 + + + System.ServiceModel.Configuration.AddressHeaderCollectionElement + + + <Header /> + + + System.ServiceModel.Configuration.IdentityElement + + + System.ServiceModel.Configuration.UserPrincipalNameElement + + + + + + System.ServiceModel.Configuration.ServicePrincipalNameElement + + + + + + System.ServiceModel.Configuration.DnsElement + + + + + + System.ServiceModel.Configuration.RsaElement + + + + + + System.ServiceModel.Configuration.CertificateElement + + + + + + System.ServiceModel.Configuration.CertificateReferenceElement + + + My + + + LocalMachine + + + FindBySubjectDistinguishedName + + + + + + False + + + BasicHttpBinding_IService1 + + + + + + + + + + + \ No newline at end of file diff --git a/SimpleOrderSearchClient/MainWindow.xaml b/SimpleOrderSearchClient/MainWindow.xaml new file mode 100644 index 0000000..a2480e8 --- /dev/null +++ b/SimpleOrderSearchClient/MainWindow.xaml @@ -0,0 +1,33 @@ + + + + + + + +