Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
8 changes: 4 additions & 4 deletions LinqToSData/CustomBuild.AdminModule/CustomBuildModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void CustomBuildModule_ModuleLoaded(object sender, ItemEventArgs<IModuleInfo> e)
var platformAdminModule = ApplicationContext.Current.Modules.Get<Sage.Platform.AdminModule.AdminModuleInit>();
if (platformAdminModule != null)
{
ModuleWorkItem.Commands[_buildCommandUrl].ExecuteAction += platformAdminModule.BuildPackageCommand;
ModuleWorkItem.Commands[_buildCommandUrl].ExecuteAction += platformAdminModule.BuildPackageCommand;
_buildCommandInitialized = true;
}
}
Expand Down Expand Up @@ -73,18 +73,18 @@ ModuleConfiguration IModuleConfigurationProvider.GetConfiguration()
buildPackagesMenu.ChildElements = new ChildElementCollection();

var attrib = (DisplayNameAttribute)Attribute.GetCustomAttribute(
typeof(SDataClientEntityDeploymentPackage),
typeof(SDataClientEntityDeploymentPackage),
typeof(DisplayNameAttribute));
string menuText = attrib.DisplayName;

UIElementConfiguration packageItem = CreateMenuItemElement(
"mnu://MainMenu/Build/Packages/" + typeof(SDataClientEntityDeploymentPackage).GUID,
menuText,
_buildCommandUrl);
buildPackagesMenu.ChildElements.Add(packageItem);
buildPackagesMenu.ChildElements.Add(packageItem);

moduleConfig.UIElements.Add(buildPackagesMenu);

return moduleConfig;
}

Expand Down
10 changes: 5 additions & 5 deletions LinqToSData/CustomBuild.AdminModule/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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)]

Expand All @@ -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")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
10 changes: 5 additions & 5 deletions LinqToSData/SDataLinqProvider/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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)]

Expand All @@ -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")]
Expand Down
6 changes: 3 additions & 3 deletions LinqToSData/SDataLinqProvider/SDataQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ public SDataQuery(SDataQueryProvider<TEntity> provider, Expression expression)
{
if (provider == null)
throw new ArgumentNullException("provider");

if (expression == null)
throw new ArgumentNullException("expression");

if (!typeof(IQueryable<TReturnElement>).IsAssignableFrom(expression.Type))
throw new ArgumentOutOfRangeException("expression");

_provider = provider;
_expression = expression;
}
Expand Down
16 changes: 8 additions & 8 deletions LinqToSData/SDataLinqProvider/SDataQueryProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class SDataQueryProvider<TEntity> : IQueryProvider, ISDataCrudProvider
private SDataEntityRepository _repository;
private static readonly WeakDictionary<object, string> _eTagCache = new WeakDictionary<object, string>();

public SDataQueryProvider(string sdataContractUrl, string userName, string password,
public SDataQueryProvider(string sdataContractUrl, string userName, string password,
SDataEntityRepository repository)
{
_sdataContractUrl = sdataContractUrl;
Expand Down Expand Up @@ -107,7 +107,7 @@ private IEnumerable<TEntity> 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"];

Expand Down Expand Up @@ -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)
{
Expand All @@ -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();
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -267,7 +267,7 @@ private SDataSingleResourceRequest CreateResourceRequest(string entityId)
request.ResourceSelector = "('" + entityId + "')";
return request;
}

#endregion
}
}
8 changes: 4 additions & 4 deletions LinqToSData/SDataLinqProvider/SDataQueryTranslator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ internal TranslateResult Translate(Expression expression, IEnumerable<string> 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<string> includeNames)
Expand Down Expand Up @@ -143,7 +143,7 @@ protected override Expression VisitConstant(ConstantExpression constantExpr)
{
return constantExpr;
}

if (constantExpr.Value == null)
{
_sb.Append("NULL");
Expand Down Expand Up @@ -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"));
Expand Down
16 changes: 8 additions & 8 deletions LinqToSData/SDataLinqProvider/WeakDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> : WeakReference where T : class
{
Expand All @@ -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<T> : WeakReference<T> where T : class
Expand Down Expand Up @@ -61,7 +61,7 @@ public WeakKeyReference(T key, WeakKeyComparer<T> 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<T> for T = object as there is no
// implement IEqualityComparer<T> for T = object as there is no
// other common base between T and WeakKeyReference<T>. We need a
// single comparer to handle both types because we don't want to
// allocate a new weak reference for every lookup.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -138,11 +138,11 @@ private static T GetTarget(object obj, out bool isDead)
}

/// <summary>
/// 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.
/// </summary>
///
///
/// <remarks>
/// If either the key or value of a particular entry in the dictionary
/// has been collected, then both the key and value become effectively
Expand Down Expand Up @@ -271,7 +271,7 @@ public void RemoveCollectedEntries()
/// <summary>
/// Represents a dictionary mapping keys to values.
/// </summary>
///
///
/// <remarks>
/// Provides the plumbing for the portions of IDictionary<TKey,
/// TValue> which can reasonably be implemented without any
Expand Down
Loading