diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c091839 --- /dev/null +++ b/.gitignore @@ -0,0 +1,50 @@ +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so +*.pyc + +# Numerous always-ignore extensions +################### +*.diff +*.err +*.orig +*.log +*.rej +*.swo +*.swp +*.vi +*~ + +*.sass-cache +# Folders to ignore +################### +.hg +.svn +.CVS +# OS or Editor folders +################### +.DS_Store +Icon? +Thumbs.db +ehthumbs.db +nbproject +.cache +.project +.settings +.tmproj +*.esproj +*.sublime-project +*.sublime-workspace +# Dreamweaver added files +################### +_notes +dwsync.xml +# Komodo +################### +*.komodoproject +.komodotools diff --git a/LICENSE b/LICENSE index 2166ee2..c3a7405 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,3 @@ -Copyright (c) 2010, Sage Software, Inc. All rights reserved. Sage does not charge for use of the Software licensed herein. Charges for any other software or services will be set forth in a separate written agreement between the parties. Software license granted to you herein is contingent upon your acknowledgement and agreement to the terms herein. If you do not agree to these terms, you do not have the permission to use the Software in any manner. You acknowledge and agree to the following: (i) Sage provides the Software free of charge and without any obligation of technical support or maintenance; (ii) Sage does not guarantee the accuracy, completeness, and reliability of the Software or whether the Software is virus-free; (iii) Sage makes no representation about whether the Software has been tested (either internally or via beta test) for quality assurance or quality control, (iv) Sage does not guarantee that the Software does not infringe any third party rights; (v) you may experience bugs, errors, loss or corruption of data, and difficulty in use, and (vi) you shall have sole responsibility for protection and preservation of your data and files. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this sentence and the following Disclaimer. Redistributions in binary form must reproduce the above copyright notice, this sentence and the following Disclaimer in the documentation and/or other materials provided with the distribution. Neither the names of ACT!, Sage, Sage Group plc, any of Sage?s product/service names, nor the names of the contributors to the Software may be used to endorse or promote products/services derived from this Software without specific prior written permission of Sage. Disclaimer: THE SOFTWARE IS ACCEPTED BY YOU "AS IS" AND "WITH ALL FAULTS". ALL WARRANTIES CONCERNING THE SOFTWARE, EXPRESS OR IMPLIED, STATUTORY, OR IN ANY OTHER PROVISION OF THIS AGREEMENT INCLUDING, WITHOUT LIMITATION, ANY WARRANTY OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE, ARE HEREBY EXPRESSLY DISCLAIMED AND EXCLUDED. WHETHER OR NOT ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, SAGE SHALL NOT UNDER ANY CIRCUMSTANCE BE LIABLE TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF GOODWILL, LOST PROFITS, LOST DATA, WORK STOPPAGE OR COMPUTER HARDWARE OR SOFTWARE DAMAGE, FAILURE OR MALFUNCTION, EVEN IF SAGE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. +Copyright (c) 2010, Sage Software, Inc. All rights reserved. Sage does not charge for use of the Software licensed herein. Charges for any other software or services will be set forth in a separate written agreement between the parties. Software license granted to you herein is contingent upon your acknowledgement and agreement to the terms herein. If you do not agree to these terms, you do not have the permission to use the Software in any manner. You acknowledge and agree to the following: (i) Sage provides the Software free of charge and without any obligation of technical support or maintenance; (ii) Sage does not guarantee the accuracy, completeness, and reliability of the Software or whether the Software is virus-free; (iii) Sage makes no representation about whether the Software has been tested (either internally or via beta test) for quality assurance or quality control, (iv) Sage does not guarantee that the Software does not infringe any third party rights; (v) you may experience bugs, errors, loss or corruption of data, and difficulty in use, and (vi) you shall have sole responsibility for protection and preservation of your data and files. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this sentence and the following Disclaimer. Redistributions in binary form must reproduce the above copyright notice, this sentence and the following Disclaimer in the documentation and/or other materials provided with the distribution. Neither the names of ACT!, Sage, Sage Group plc, any of Sage?s product/service names, nor the names of the contributors to the Software may be used to endorse or promote products/services derived from this Software without specific prior written permission of Sage. Disclaimer: THE SOFTWARE IS ACCEPTED BY YOU "AS IS" AND "WITH ALL FAULTS". ALL WARRANTIES CONCERNING THE SOFTWARE, EXPRESS OR IMPLIED, STATUTORY, OR IN ANY OTHER PROVISION OF THIS AGREEMENT INCLUDING, WITHOUT LIMITATION, ANY WARRANTY OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE, ARE HEREBY EXPRESSLY DISCLAIMED AND EXCLUDED. WHETHER OR NOT ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, SAGE SHALL NOT UNDER ANY CIRCUMSTANCE BE LIABLE TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF GOODWILL, LOST PROFITS, LOST DATA, WORK STOPPAGE OR COMPUTER HARDWARE OR SOFTWARE DAMAGE, FAILURE OR MALFUNCTION, EVEN IF SAGE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. You acknowledge that Sage retains and is not transferring to you any title to or ownership rights in or to any intellectual property in the Software, any modifications thereto, or copies thereof. Sage may terminate this Agreement, in its sole discretion. Upon termination of this Agreement, you shall return to Sage, or destroy, all originals and copies of all Software (including any support materials furnished by Sage), permanently purge all machine-readable copies of the Software from all computers and storage devices, and to certify to Sage in writing that the foregoing duties have been performed and that you will not in any way use or permit the use of the Software. This Agreement shall be governed by the laws of the State of California. \ No newline at end of file diff --git a/LinqToSData/CustomBuild.AdminModule/CustomBuildModule.cs b/LinqToSData/CustomBuild.AdminModule/CustomBuildModule.cs index c9aae5c..9f333ff 100644 --- a/LinqToSData/CustomBuild.AdminModule/CustomBuildModule.cs +++ b/LinqToSData/CustomBuild.AdminModule/CustomBuildModule.cs @@ -34,7 +34,7 @@ void CustomBuildModule_ModuleLoaded(object sender, ItemEventArgs e) var platformAdminModule = ApplicationContext.Current.Modules.Get(); if (platformAdminModule != null) { - ModuleWorkItem.Commands[_buildCommandUrl].ExecuteAction += platformAdminModule.BuildPackageCommand; + ModuleWorkItem.Commands[_buildCommandUrl].ExecuteAction += platformAdminModule.BuildPackageCommand; _buildCommandInitialized = true; } } @@ -73,7 +73,7 @@ ModuleConfiguration IModuleConfigurationProvider.GetConfiguration() buildPackagesMenu.ChildElements = new ChildElementCollection(); var attrib = (DisplayNameAttribute)Attribute.GetCustomAttribute( - typeof(SDataClientEntityDeploymentPackage), + typeof(SDataClientEntityDeploymentPackage), typeof(DisplayNameAttribute)); string menuText = attrib.DisplayName; @@ -81,10 +81,10 @@ ModuleConfiguration IModuleConfigurationProvider.GetConfiguration() "mnu://MainMenu/Build/Packages/" + typeof(SDataClientEntityDeploymentPackage).GUID, menuText, _buildCommandUrl); - buildPackagesMenu.ChildElements.Add(packageItem); + buildPackagesMenu.ChildElements.Add(packageItem); moduleConfig.UIElements.Add(buildPackagesMenu); - + return moduleConfig; } diff --git a/LinqToSData/CustomBuild.AdminModule/Properties/AssemblyInfo.cs b/LinqToSData/CustomBuild.AdminModule/Properties/AssemblyInfo.cs index 460c891..5d50711 100644 --- a/LinqToSData/CustomBuild.AdminModule/Properties/AssemblyInfo.cs +++ b/LinqToSData/CustomBuild.AdminModule/Properties/AssemblyInfo.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// 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("CustomBuild.AdminModule")] @@ -14,8 +14,8 @@ [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 +// 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)] @@ -25,11 +25,11 @@ // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] diff --git a/LinqToSData/CustomBuild.AdminModule/SDataClientEntityDeploymentPackage.cs b/LinqToSData/CustomBuild.AdminModule/SDataClientEntityDeploymentPackage.cs index 6af39c8..69209e4 100644 --- a/LinqToSData/CustomBuild.AdminModule/SDataClientEntityDeploymentPackage.cs +++ b/LinqToSData/CustomBuild.AdminModule/SDataClientEntityDeploymentPackage.cs @@ -69,7 +69,7 @@ protected override void GenerateInternal(OperationStatus op, BuildType buildType BaseEntityGenerator baseGen = new SDataClientEntityCodeGenerator(); baseGen.Initialize(WorkingDirectoryPath); generatorList.Add(baseGen); - + // Ensure all paths are created foreach (var gen in generatorList) { diff --git a/LinqToSData/SDataLinqProvider/Properties/AssemblyInfo.cs b/LinqToSData/SDataLinqProvider/Properties/AssemblyInfo.cs index 9dfd9d7..159ec4c 100644 --- a/LinqToSData/SDataLinqProvider/Properties/AssemblyInfo.cs +++ b/LinqToSData/SDataLinqProvider/Properties/AssemblyInfo.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// 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("SDataLinqProvider")] @@ -14,8 +14,8 @@ [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 +// 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)] @@ -25,11 +25,11 @@ // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] diff --git a/LinqToSData/SDataLinqProvider/SDataQuery.cs b/LinqToSData/SDataLinqProvider/SDataQuery.cs index 0438b00..2a87a2f 100644 --- a/LinqToSData/SDataLinqProvider/SDataQuery.cs +++ b/LinqToSData/SDataLinqProvider/SDataQuery.cs @@ -26,13 +26,13 @@ public SDataQuery(SDataQueryProvider provider, Expression expression) { if (provider == null) throw new ArgumentNullException("provider"); - + if (expression == null) throw new ArgumentNullException("expression"); - + if (!typeof(IQueryable).IsAssignableFrom(expression.Type)) throw new ArgumentOutOfRangeException("expression"); - + _provider = provider; _expression = expression; } diff --git a/LinqToSData/SDataLinqProvider/SDataQueryProvider.cs b/LinqToSData/SDataLinqProvider/SDataQueryProvider.cs index 38d9954..4026fad 100644 --- a/LinqToSData/SDataLinqProvider/SDataQueryProvider.cs +++ b/LinqToSData/SDataLinqProvider/SDataQueryProvider.cs @@ -24,7 +24,7 @@ public class SDataQueryProvider : IQueryProvider, ISDataCrudProvider private SDataEntityRepository _repository; private static readonly WeakDictionary _eTagCache = new WeakDictionary(); - public SDataQueryProvider(string sdataContractUrl, string userName, string password, + public SDataQueryProvider(string sdataContractUrl, string userName, string password, SDataEntityRepository repository) { _sdataContractUrl = sdataContractUrl; @@ -107,7 +107,7 @@ private IEnumerable GetEntitiesFromSData(string sdataQuery) SDataUri uri = new SDataUri(sdataQuery); if (!string.IsNullOrEmpty(uri.Where)) request.QueryValues["where"] = uri.Where; - + if (uri.QueryArgs.ContainsKey("select")) request.QueryValues["select"] = uri.QueryArgs["select"]; @@ -139,14 +139,14 @@ private TEntity GetEntityFromSData(string entityId) internal TEntity GetEntity(string entityId) { - return GetEntityFromSData(entityId); + return GetEntityFromSData(entityId); } internal static Type FindConcreteEntityType() { Assembly assembly = Assembly.Load("Sage.SData.Client.Entities"); return assembly.GetTypes().Where(type => typeof (TEntity).IsAssignableFrom(type)).First(); - } + } private string Translate(Expression expression) { @@ -163,7 +163,7 @@ private string Translate(Expression expression) void ISDataCrudProvider.Insert(IPersistentEntity entity) { var request = CreateResourceRequest(null); - request.Entry = CopyEntityToAtomEntry(entity); + request.Entry = CopyEntityToAtomEntry(entity); request.Create(); } @@ -209,10 +209,10 @@ private void SetEntityProperty(PropertyInfo prop, SDataPayload payload, IPersist return; if (prop.PropertyType.FullName.StartsWith("Sage.Entity.Interfaces") || - prop.PropertyType.FullName.StartsWith("ICollection")) + prop.PropertyType.FullName.StartsWith("ICollection")) return; - if (!payload.Values.ContainsKey(prop.Name) || payload.Values[prop.Name] == null) + if (!payload.Values.ContainsKey(prop.Name) || payload.Values[prop.Name] == null) return; object convertedValue; @@ -267,7 +267,7 @@ private SDataSingleResourceRequest CreateResourceRequest(string entityId) request.ResourceSelector = "('" + entityId + "')"; return request; } - + #endregion } } \ No newline at end of file diff --git a/LinqToSData/SDataLinqProvider/SDataQueryTranslator.cs b/LinqToSData/SDataLinqProvider/SDataQueryTranslator.cs index 8bafe4b..3136795 100644 --- a/LinqToSData/SDataLinqProvider/SDataQueryTranslator.cs +++ b/LinqToSData/SDataLinqProvider/SDataQueryTranslator.cs @@ -40,12 +40,12 @@ internal TranslateResult Translate(Expression expression, IEnumerable in internal string IdToQueryText(string entityId) { - return GetResourceUrl() + "('" + entityId + "')"; + return GetResourceUrl() + "('" + entityId + "')"; } internal string GetResourceUrl() { - return _sdataContractUrl + "/-/" + ResourceKindMappings[_entityType]; + return _sdataContractUrl + "/-/" + ResourceKindMappings[_entityType]; } private void AddIncludes(IEnumerable includeNames) @@ -143,7 +143,7 @@ protected override Expression VisitConstant(ConstantExpression constantExpr) { return constantExpr; } - + if (constantExpr.Value == null) { _sb.Append("NULL"); @@ -206,7 +206,7 @@ private void BuildupResourceKindMappings() type => GetEntityInterfaceFromType(type), type => GetResourcePath(type)); } - + private Type GetEntityInterfaceFromType(Type type) { return type.GetInterfaces().First(intf => intf.FullName.Contains("Sage.Entity.Interfaces")); diff --git a/LinqToSData/SDataLinqProvider/WeakDictionary.cs b/LinqToSData/SDataLinqProvider/WeakDictionary.cs index 40e21ee..feb4e3a 100644 --- a/LinqToSData/SDataLinqProvider/WeakDictionary.cs +++ b/LinqToSData/SDataLinqProvider/WeakDictionary.cs @@ -6,7 +6,7 @@ namespace SDataLinqProvider { // Adds strong typing to WeakReference.Target using generics. Also, // the Create factory method is used in place of a constructor - // to handle the case where target is null, but we want the + // to handle the case where target is null, but we want the // reference to still appear to be alive. internal class WeakReference : WeakReference where T : class { @@ -28,7 +28,7 @@ protected WeakReference(T target) } // Provides a weak reference to a null target object, which, unlike - // other weak references, is always considered to be alive. This + // other weak references, is always considered to be alive. This // facilitates handling null dictionary values, which are perfectly // legal. internal class WeakNullReference : WeakReference where T : class @@ -61,7 +61,7 @@ public WeakKeyReference(T key, WeakKeyComparer comparer) // Compares objects of the given type or WeakKeyReferences to them // for equality based on the given comparer. Note that we can only - // implement IEqualityComparer for T = object as there is no + // implement IEqualityComparer for T = object as there is no // other common base between T and WeakKeyReference. We need a // single comparer to handle both types because we don't want to // allocate a new weak reference for every lookup. @@ -91,10 +91,10 @@ public int GetHashCode(object obj) // Let Wa = Alive Weak Reference // Let Wd = Dead Weak Reference // Let S = Strong Reference - // + // // x | y | Equals(x,y) // ------------------------------------------------- - // Wa | Wa | comparer.Equals(x.Target, y.Target) + // Wa | Wa | comparer.Equals(x.Target, y.Target) // Wa | Wd | false // Wa | S | comparer.Equals(x.Target, y) // Wd | Wa | false @@ -138,11 +138,11 @@ private static T GetTarget(object obj, out bool isDead) } /// - /// A generic dictionary, which allows both its keys and values + /// A generic dictionary, which allows both its keys and values /// to be garbage collected if there are no other references /// to them than from the dictionary itself. /// - /// + /// /// /// If either the key or value of a particular entry in the dictionary /// has been collected, then both the key and value become effectively @@ -271,7 +271,7 @@ public void RemoveCollectedEntries() /// /// Represents a dictionary mapping keys to values. /// - /// + /// /// /// Provides the plumbing for the portions of IDictionary which can reasonably be implemented without any diff --git a/LinqToSData/WindowsFormsClientSample/Form1.Designer.cs b/LinqToSData/WindowsFormsClientSample/Form1.Designer.cs index f5e6b4d..4754131 100644 --- a/LinqToSData/WindowsFormsClientSample/Form1.Designer.cs +++ b/LinqToSData/WindowsFormsClientSample/Form1.Designer.cs @@ -45,18 +45,18 @@ private void InitializeComponent() emailLabel = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); this.SuspendLayout(); - // + // // emailLabel - // + // emailLabel.AutoSize = true; emailLabel.Location = new System.Drawing.Point(13, 203); emailLabel.Name = "emailLabel"; emailLabel.Size = new System.Drawing.Size(35, 13); emailLabel.TabIndex = 9; emailLabel.Text = "Email:"; - // + // // button1 - // + // this.button1.Location = new System.Drawing.Point(289, 18); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); @@ -64,63 +64,63 @@ private void InitializeComponent() this.button1.Text = "Load"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); - // + // // textBox1 - // + // this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bindingSource1, "FirstName", true)); this.textBox1.Location = new System.Drawing.Point(80, 151); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(181, 20); this.textBox1.TabIndex = 4; - // + // // bindingSource1 - // + // this.bindingSource1.DataSource = typeof(Sage.Entity.Interfaces.IContact); - // + // // textBox2 - // + // this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bindingSource1, "LastName", true)); this.textBox2.Location = new System.Drawing.Point(80, 177); this.textBox2.Name = "textBox2"; this.textBox2.Size = new System.Drawing.Size(181, 20); this.textBox2.TabIndex = 5; - // + // // label1 - // + // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(12, 151); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(60, 13); this.label1.TabIndex = 3; this.label1.Text = "First Name:"; - // + // // label2 - // + // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(13, 177); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(61, 13); this.label2.TabIndex = 4; this.label2.Text = "Last Name:"; - // + // // label3 - // + // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(15, 23); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(152, 13); this.label3.TabIndex = 5; this.label3.Text = "Search Contact By First Name:"; - // + // // txtFirstNameSearch - // + // this.txtFirstNameSearch.Location = new System.Drawing.Point(173, 20); this.txtFirstNameSearch.Name = "txtFirstNameSearch"; this.txtFirstNameSearch.Size = new System.Drawing.Size(100, 20); this.txtFirstNameSearch.TabIndex = 0; - // + // // btnPrevious - // + // this.btnPrevious.Location = new System.Drawing.Point(15, 85); this.btnPrevious.Name = "btnPrevious"; this.btnPrevious.Size = new System.Drawing.Size(75, 23); @@ -128,9 +128,9 @@ private void InitializeComponent() this.btnPrevious.Text = "Previous"; this.btnPrevious.UseVisualStyleBackColor = true; this.btnPrevious.Click += new System.EventHandler(this.btnPrevious_Click); - // + // // btnNext - // + // this.btnNext.Location = new System.Drawing.Point(108, 85); this.btnNext.Name = "btnNext"; this.btnNext.Size = new System.Drawing.Size(75, 23); @@ -138,17 +138,17 @@ private void InitializeComponent() this.btnNext.Text = "Next"; this.btnNext.UseVisualStyleBackColor = true; this.btnNext.Click += new System.EventHandler(this.btnNext_Click); - // + // // emailTextBox - // + // this.emailTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bindingSource1, "Email", true)); this.emailTextBox.Location = new System.Drawing.Point(80, 203); this.emailTextBox.Name = "emailTextBox"; this.emailTextBox.Size = new System.Drawing.Size(181, 20); this.emailTextBox.TabIndex = 10; - // + // // btnTestCRUD - // + // this.btnTestCRUD.Location = new System.Drawing.Point(289, 68); this.btnTestCRUD.Name = "btnTestCRUD"; this.btnTestCRUD.Size = new System.Drawing.Size(75, 23); @@ -156,9 +156,9 @@ private void InitializeComponent() this.btnTestCRUD.Text = "Test CRUD"; this.btnTestCRUD.UseVisualStyleBackColor = true; this.btnTestCRUD.Click += new System.EventHandler(this.btnTestCRUD_Click); - // + // // Form1 - // + // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(428, 349); diff --git a/LinqToSData/WindowsFormsClientSample/Form1.cs b/LinqToSData/WindowsFormsClientSample/Form1.cs index 601a50c..430c651 100644 --- a/LinqToSData/WindowsFormsClientSample/Form1.cs +++ b/LinqToSData/WindowsFormsClientSample/Form1.cs @@ -51,7 +51,7 @@ private void button1_Click(object sender, EventArgs e) // .Select(contact2 => new { FN = contact2.FirstName, LN = contact2.LastName }); //var miniList2 = miniContacts.ToList(); - ////project anonymous type with string concatenation + ////project anonymous type with string concatenation //var contactNames = (from contact3 in repository.CreateQuery() // select new { FullName = contact3.FirstName + " " + contact3.LastName }).ToList(); //var contactFullNameList = contactNames.ToList(); @@ -99,7 +99,7 @@ private void btnTestCRUD_Click(object sender, EventArgs e) { const string address1 = "My Street"; var repository = new SDataEntityRepository(SDATA_CONTRACT_URL, SDATA_USERNAME, SDATA_PASSWORD); - + IAddress newAddress = repository.Create(); newAddress.Address1 = address1; newAddress.City = "Scottsdale"; @@ -112,7 +112,7 @@ private void btnTestCRUD_Click(object sender, EventArgs e) var addressQuery = from address in repository.CreateQuery() where address.Address1 == address1 select address; - var getAddress = addressQuery.ToList().First(); + var getAddress = addressQuery.ToList().First(); repository.Delete(getAddress); } } diff --git a/LinqToSData/WindowsFormsClientSample/Properties/AssemblyInfo.cs b/LinqToSData/WindowsFormsClientSample/Properties/AssemblyInfo.cs index ab2832b..21db865 100644 --- a/LinqToSData/WindowsFormsClientSample/Properties/AssemblyInfo.cs +++ b/LinqToSData/WindowsFormsClientSample/Properties/AssemblyInfo.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// 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("WindowsFormsClientSample")] @@ -14,8 +14,8 @@ [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 +// 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)] @@ -25,11 +25,11 @@ // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")]