You've already forked linux-packaging-mono
Imported Upstream version 6.4.0.137
Former-commit-id: 943baa9f16a098c33e129777827f3a9d20da00d6
This commit is contained in:
parent
e9207cf623
commit
ef583813eb
@@ -1,72 +1,51 @@
|
||||
//
|
||||
// Link.cs
|
||||
//
|
||||
// Author:
|
||||
// Atsushi Enomoto <atsushi@ximian.com>
|
||||
//
|
||||
// Copyright (C) 2008 Novell, Inc.
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.Data.Linq
|
||||
{
|
||||
public struct Link<T>
|
||||
{
|
||||
[MonoTODO]
|
||||
public Link (T value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public Link (IEnumerable<T> source)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public Link (Link<T> link)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool HasLoadedOrAssignedValue {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool HasValue {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public T Value {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
// AssemblyInfo.cs
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Security;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle ("System.Data.Linq.dll")]
|
||||
[assembly: AssemblyDescription ("System.Data.Linq.dll")]
|
||||
[assembly: AssemblyDefaultAlias ("System.Data.Linq.dll")]
|
||||
|
||||
[assembly: AssemblyCompany (Consts.MonoCompany)]
|
||||
[assembly: AssemblyProduct (Consts.MonoProduct)]
|
||||
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
|
||||
[assembly: AssemblyVersion (Consts.FxVersion)]
|
||||
[assembly: SatelliteContractVersion (Consts.FxVersion)]
|
||||
[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
|
||||
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
|
||||
|
||||
[assembly: NeutralResourcesLanguage ("en-US")]
|
||||
[assembly: CLSCompliant (true)]
|
||||
[assembly: AssemblyDelaySign (true)]
|
||||
|
||||
[assembly: ComVisible (false)]
|
||||
[assembly: AllowPartiallyTrustedCallers]
|
||||
|
||||
[assembly: SecurityCritical]
|
||||
@@ -3,41 +3,13 @@ SUBDIRS =
|
||||
include ../../build/rules.make
|
||||
|
||||
LIBRARY = System.Data.Linq.dll
|
||||
LIB_REFS = System System.Core System.Xml System.Data System.Runtime.Serialization
|
||||
LIB_REFS = System System.Core System.Xml System.Xml.Linq System.Data System.Runtime.Serialization System.Transactions
|
||||
KEYFILE = ../ecma.pub
|
||||
LIB_MCS_FLAGS = \
|
||||
/resource:./src/DbLinq/Schema/Dbml/DbmlSchema.xsd,DbLinq.Schema.Dbml.DbmlSchema.xsd \
|
||||
/d:MONO_STRICT /d:MONO_DEPLOY -warn:1
|
||||
LIB_MCS_FLAGS = -d:ILGEN
|
||||
|
||||
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
TEST_MCS_FLAGS = -d:MONO_STRICT
|
||||
TEST_LIB_REFS = System System.Core System.Data System.Xml
|
||||
|
||||
EXTRA_DISTFILES = src/DbLinq/Schema/Dbml/DbmlSchema.xsd
|
||||
TXT_RESOURCE_STRINGS = ../referencesource/System.Data.Linq/System.Data.Linq.txt
|
||||
|
||||
include ../../build/library.make
|
||||
|
||||
dist-local: dist-default dist-DbLinq
|
||||
|
||||
dist-DbLinq:
|
||||
find src -name '*.cs' -o -name '*.snk' -o -name '*.xml' -o -name '*.txt' > .files ; \
|
||||
tar cTf .files - | (cd $(distdir); tar xf -) ; \
|
||||
rm .files
|
||||
|
||||
RSYNC_EXCLUDES = \
|
||||
--exclude '*.cache' \
|
||||
--exclude '*.csproj.*.txt' \
|
||||
--exclude '*.dll' \
|
||||
--exclude '*.exe' \
|
||||
--exclude '*.force' \
|
||||
--exclude '*.pdb' \
|
||||
--exclude '*.pidb' \
|
||||
--exclude '*.suo' \
|
||||
--exclude '*.user' \
|
||||
--exclude '*.userprefs' \
|
||||
--exclude '*.usertasks' \
|
||||
--exclude '.svn'
|
||||
|
||||
update-dblinq:
|
||||
rsync -avz $(RSYNC_EXCLUDES) $$HOME/Development/mono-HEAD/dblinq2007/src/ src/
|
||||
rsync -avz $(RSYNC_EXCLUDES) $$HOME/Development/mono-HEAD/dblinq2007/tests/ tests/
|
||||
rsync -avz $(RSYNC_EXCLUDES) $$HOME/Development/mono-HEAD/dblinq2007/examples/ examples/
|
||||
|
||||
|
||||
1576
mcs/class/System.Data.Linq/ReferenceSources/Error.cs
Normal file
1576
mcs/class/System.Data.Linq/ReferenceSources/Error.cs
Normal file
File diff suppressed because it is too large
Load Diff
283
mcs/class/System.Data.Linq/ReferenceSources/SR.cs
Normal file
283
mcs/class/System.Data.Linq/ReferenceSources/SR.cs
Normal file
@@ -0,0 +1,283 @@
|
||||
//
|
||||
// This file was generated by txt2sr tool
|
||||
//
|
||||
|
||||
partial class SR
|
||||
{
|
||||
public const string OwningTeam = "DLinq";
|
||||
public const string CannotAddChangeConflicts = "Cannot add change conflicts. They are added automatically during SubmitChanges.";
|
||||
public const string CannotRemoveChangeConflicts = "Cannot remove change conflicts.";
|
||||
public const string InconsistentAssociationAndKeyChange = "The member '{0}' was changed to be inconsistent with the association member '{1}'.";
|
||||
public const string UnableToDetermineDataContext = "Unable to determine DataContext for compiled query execution.";
|
||||
public const string ArgumentTypeHasNoIdentityKey = "The type '{0}' has no identity key.";
|
||||
public const string CouldNotConvert = "Could not convert from type '{0}' to type '{1}'.";
|
||||
public const string CannotRemoveUnattachedEntity = "Cannot remove an entity that has not been attached.";
|
||||
public const string ColumnMappedMoreThanOnce = "Mapping Problem: The database column '{0}' is mapped more than once.";
|
||||
public const string CouldNotAttach = "Item already exists in data context.";
|
||||
public const string CouldNotGetTableForSubtype = "Could not retrieve a Table for inheritance subtype '{0}', try Table of {1} instead.";
|
||||
public const string CouldNotRemoveRelationshipBecauseOneSideCannotBeNull = "An attempt was made to remove a relationship between a {0} and a {1}. However, one of the relationship's foreign keys ({2}) cannot be set to null.";
|
||||
public const string EntitySetAlreadyLoaded = "The EntitySet is already loaded and the source cannot be changed.";
|
||||
public const string EntitySetModifiedDuringEnumeration = "EntitySet was modified during enumeration.";
|
||||
public const string ExpectedQueryableArgument = "Argument {0} does not implement {1}.";
|
||||
public const string ExpectedUpdateDeleteOrChange = "Expected update, delete, or change.";
|
||||
public const string KeyIsWrongSize = "Key is the wrong size. Expected {0}. Actual {1}.";
|
||||
public const string KeyValueIsWrongType = "Key value is the wrong type. Expected assignable from {0}. Actual {1}.";
|
||||
public const string IdentityChangeNotAllowed = "Value of member '{0}' of an object of type '{1}' changed.\r\nA member defining the identity of the object cannot be changed.\r\nConsider adding a new object with new identity and deleting the existing one instead.";
|
||||
public const string DbGeneratedChangeNotAllowed = "Value of member '{0}' of an object of type '{1}' changed.\r\nA member that is computed or generated by the database cannot be changed.";
|
||||
public const string ModifyDuringAddOrRemove = "Could not modify EntitySet.";
|
||||
public const string ProviderDoesNotImplementRequiredInterface = "Specified provider type '{0}' does not implement '{1}'.";
|
||||
public const string ProviderTypeNull = "Non-null provider type expected.";
|
||||
public const string TypeCouldNotBeAdded = "Instance of type '{0}' could not be added. This type is not part of the mapped type system.";
|
||||
public const string TypeCouldNotBeRemoved = "Instance of type '{0}' could not be removed. This type is not part of the mapped type system.";
|
||||
public const string TypeCouldNotBeTracked = "Instance of type '{0}' could not be tracked. This type is not part of the mapped type system.";
|
||||
public const string TypeIsNotEntity = "The type '{0}' is not an entity.";
|
||||
public const string UnrecognizedRefreshObject = "An object specified for refresh is not recognized.";
|
||||
public const string UnhandledExpressionType = "Unhandled Expression Type: {0}";
|
||||
public const string UnhandledBindingType = "Unhandled Binding Type: {0}";
|
||||
public const string ObjectTrackingRequired = "Object tracking is not enabled for the current data context instance.";
|
||||
public const string OptionsCannotBeModifiedAfterQuery = "Data context options cannot be modified after results have been returned from a query.";
|
||||
public const string DeferredLoadingRequiresObjectTracking = "Deferred loading requires that object tracking is also enabled.";
|
||||
public const string SubqueryDoesNotSupportOperator = "The operator '{0}' is not supported in Subquery.";
|
||||
public const string SubqueryNotSupportedOn = "Subquery is not supported on '{0}'.";
|
||||
public const string SubqueryNotSupportedOnType = "Subquery is not supported on '{0}' of type '{1}'.";
|
||||
public const string SubqueryNotAllowedAfterFreeze = "SetSubquery is not allowed after freeze or attach to DataContext.";
|
||||
public const string IncludeNotAllowedAfterFreeze = "LoadWith is not allowed after freeze or attach to DataContext.";
|
||||
public const string LoadOptionsChangeNotAllowedAfterQuery = "Setting load options is not allowed after results have been returned from a query.";
|
||||
public const string IncludeCycleNotAllowed = "Cycles not allowed in LoadOptions LoadWith type graph.";
|
||||
public const string SubqueryMustBeSequence = "Subquery must be a sequence expression.";
|
||||
public const string RefreshOfDeletedObject = "Unable to refresh the specified object. The object no longer exists in the database.";
|
||||
public const string RefreshOfNewObject = "An object specified for refresh is pending insert and cannot be refreshed.";
|
||||
public const string CannotChangeInheritanceType = "Not allowed: Inheritance discriminator change from '{0}' to '{1}' would change type from '{2}' to '{3}'.";
|
||||
public const string DataContextCannotBeUsedAfterDispose = "DataContext accessed after Dispose.";
|
||||
public const string TypeIsNotMarkedAsTable = "The type '{0}' is not mapped as a Table.";
|
||||
public const string NonEntityAssociationMapping = "Invalid association mapping for member '{0}.{1}'. '{2}' is not an entity.";
|
||||
public const string CannotPerformCUDOnReadOnlyTable = "Can't perform Create, Update, or Delete operations on '{0}' because it has no primary key.";
|
||||
public const string InsertCallbackComment = "--Callback into user code for insert.";
|
||||
public const string UpdateCallbackComment = "--Callback into user code for update.";
|
||||
public const string DeleteCallbackComment = "--Callback into user code for delete.";
|
||||
public const string RowNotFoundOrChanged = "Row not found or changed.";
|
||||
public const string UpdatesFailedMessage = "{0} of {1} updates failed.";
|
||||
public const string CycleDetected = "A cycle was detected in the set of changes";
|
||||
public const string CantAddAlreadyExistingItem = "Cannot add an entity that already exists.";
|
||||
public const string CantAddAlreadyExistingKey = "Cannot add an entity with a key that is already in use.";
|
||||
public const string DatabaseGeneratedAlreadyExistingKey = "The database generated a key that is already in use.";
|
||||
public const string InsertAutoSyncFailure = "Member AutoSync failure. For members to be AutoSynced after insert, the type must either have an auto-generated identity, or a key that is not modified by the database after insert.";
|
||||
public const string EntitySetDataBindingWithAbstractBaseClass = "Cannot add an instance of an abstract class to EntitySet<{0}>.";
|
||||
public const string EntitySetDataBindingWithNonPublicDefaultConstructor = "{0} must have a parameterless constructor when using IBindingList to add new instances.";
|
||||
public const string InvalidLoadOptionsLoadMemberSpecification = "The expression specified must be of the form p.A, where p is the parameter and A is a property or field member.";
|
||||
public const string EntityIsTheWrongType = "The entity is not of the correct type.";
|
||||
public const string OriginalEntityIsWrongType = "The original state instance has the wrong type.";
|
||||
public const string CannotAttachAlreadyExistingEntity = "Cannot attach an entity that already exists.";
|
||||
public const string CannotAttachAsModifiedWithoutOriginalState = "An entity can only be attached as modified without original state if it declares a version member or does not have an update check policy.";
|
||||
public const string CannotPerformOperationDuringSubmitChanges = "The operation cannot be performed during a call to SubmitChanges.";
|
||||
public const string CannotPerformOperationOutsideSubmitChanges = "The operation can only be performed inside a user override method during a call to SubmitChanges.";
|
||||
public const string CannotPerformOperationForUntrackedObject = "The operation cannot be performed for the entity because it is not being change tracked.";
|
||||
public const string CannotAttachAddNonNewEntities = "An attempt has been made to Attach or Add an entity that is not new, perhaps having been loaded from another DataContext. This is not supported.";
|
||||
public const string QueryWasCompiledForDifferentMappingSource = "Query was compiled for a different mapping source than the one associated with the specified DataContext.";
|
||||
|
||||
// manually harvested
|
||||
public const string AbstractClassAssignInheritanceDiscriminator = "Abstract class '{0}' should not be assigned an inheritance discriminator key.";
|
||||
public const string ArgumentEmpty = "The string parameter '{0}' was expected to have length greater than zero.";
|
||||
public const string ArgumentTypeMismatch = "One or more type mismatches in argument '{0}'.";
|
||||
public const string ArgumentWrongType = "The argument '{0}' was the wrong type. Expected '{1}'. Actual '{2}'.";
|
||||
public const string ArgumentWrongValue = "The argument '{0}' was the wrong value.";
|
||||
public const string BadFunctionTypeInMethodMapping = "Mapping Problem: Bad function type in mapping for method '{0}'.";
|
||||
public const string BadKeyMember = "Could not find key member '{0}' of key '{1}' on type '{2}'. The key may be wrong or the field or property on '{2}' has changed names.";
|
||||
public const string BadParameterType = "A query parameter cannot be of type '{0}'.";
|
||||
public const string BadProjectionInSelect = "Bad projection in Select.";
|
||||
public const string BadStorageProperty = "Bad Storage property: '{0}' on member '{1}.{2}'.";
|
||||
public const string BinaryOperatorNotRecognized = "Binary operator not recognized: {0}";
|
||||
public const string CannotAggregateType = "The type '{0}' is not supported in aggregation operations.";
|
||||
public const string CannotAssignNull = "The null value cannot be assigned to a member with type {0} which is a non-nullable value type.";
|
||||
public const string CannotAssignToMember = "Cannot assign value to member '{0}'. It does not define a setter.";
|
||||
public const string CannotCompareItemsAssociatedWithDifferentTable = "Cannot compare entities associated with different tables.";
|
||||
public const string CannotConvertToEntityRef = "Cannot convert type '{0}' to EntityRef/Link.";
|
||||
public const string CannotDeleteTypesOf = "Cannot delete items of type {0}.";
|
||||
public const string CannotEnumerateResultsMoreThanOnce = "The query results cannot be enumerated more than once.";
|
||||
public const string CannotGetInheritanceDefaultFromNonInheritanceClass = "Mapping Problem: Cannot get inheritance default from class not mapped into an inheritance hierarchy.";
|
||||
public const string CannotMaterializeEntityType = "Explicit construction of entity type '{0}' in query is not allowed.";
|
||||
public const string CannotMaterializeList = "Cannot create a query result of type '{0}'.";
|
||||
public const string CannotTranslateExpressionToSql = "Cannot translate expression to SQL for this server version.";
|
||||
public const string CapturedValuesCannotBeSequences = "Local sequence cannot be used in LINQ to SQL implementations of query operators except the Contains operator.";
|
||||
public const string ClassLiteralsNotAllowed = "Class literals are not allowed: {0}.";
|
||||
public const string ClientCaseShouldNotHold = "Client case should not hold '{0}'. It should probably have been SqlSimpleCase.";
|
||||
public const string ClrBoolDoesNotAgreeWithSqlType = "Expected Node with CLR Type of 'bool' to have SQL type of 'Bit' or 'Predicate'. Instead, it was type '{0}'.";
|
||||
public const string ColumnCannotReferToItself = "Column cannot refer to itself.";
|
||||
public const string ColumnClrTypeDoesNotAgreeWithExpressionsClrType = "The ClrType of the column did not agree with the ClrType of the expression.";
|
||||
public const string ColumnIsDefinedInMultiplePlaces = "Column '{0}' is defined in multiple places.";
|
||||
public const string ColumnIsNotAccessibleThroughDistinct = "Column '{0}' is not accessible through distinct.";
|
||||
public const string ColumnIsNotAccessibleThroughGroupBy = "Column '{0}' is not accessible through group by.";
|
||||
public const string ColumnReferencedIsNotInScope = "Column referenced is not in scope: '{0}'.";
|
||||
public const string ComparisonNotSupportedForType = "Comparison operators not supported for type '{0}'.";
|
||||
public const string CompiledQueryAgainstMultipleShapesNotSupported = "Compiled queries across DataContexts with different LoadOptions not supported.";
|
||||
public const string CompiledQueryCannotReturnType = "A compiled query cannot return type '{0}'.";
|
||||
public const string ConstructedArraysNotSupported = "Constructed arrays are only supported for Contains.";
|
||||
public const string ContextNotInitialized = "SqlContext is not initialized.";
|
||||
public const string ConvertToCharFromBoolNotSupported = "There is no supported conversion from a Boolean to a Character type.";
|
||||
public const string ConvertToDateTimeOnlyForDateTimeOrString = "Only DateTimes or strings can be converted to DateTime.";
|
||||
public const string CouldNotAssignSequence = "Could not assign sequence of {0} to type {1}.";
|
||||
public const string CouldNotConvertToPropertyOrField = "MemberInfo '{0}' had no corresponding field or property.";
|
||||
public const string CouldNotCreateAccessorToProperty = "Could not create PropertyAccessor<{0},{1}> to {2}.";
|
||||
public const string CouldNotDetermineCatalogName = "Unable to determine catalog name.";
|
||||
public const string CouldNotDetermineDbGeneratedSqlType = "Unable to determine SQL type for '{0}' that can also be generated by the server.";
|
||||
public const string CouldNotDetermineSqlType = "Unable to determine SQL type for '{0}'.";
|
||||
public const string CouldNotFindElementTypeInModel = "Mapping Problem: Could not find element type in model for '{0}'.";
|
||||
public const string CouldNotFindRequiredAttribute = "Mapping Problem: Could not find required attribute '{0}': {1}.";
|
||||
public const string CouldNotFindRuntimeTypeForMapping = "Mapping Problem: Cannot find runtime type for type mapping '{0}'.";
|
||||
public const string CouldNotFindTypeFromMapping = "Mapping Problem: Cannot find type '{0}' from mapping.";
|
||||
public const string CouldNotGetClrType = "Could not get the ClrType.";
|
||||
public const string CouldNotGetSqlType = "Could not get the SqlType.";
|
||||
public const string CouldNotHandleAliasRef = "Could not handle alias ref of {0}.";
|
||||
public const string CouldNotTranslateExpressionForReading = "Could not translate expression '{0}' into SQL and could not treat it as a local expression.";
|
||||
public const string CreateDatabaseFailedBecauseOfClassWithNoMembers = "Unable to create database because mapped class '{0}' has zero members.";
|
||||
public const string CreateDatabaseFailedBecauseOfContextWithNoTables = "Unable to create database because data context '{0}' has no tables.";
|
||||
public const string CreateDatabaseFailedBecauseSqlCEDatabaseAlreadyExists = "Unable to create database because the database '{0}' already exists.";
|
||||
public const string DatabaseDeleteThroughContext = "Operation not allowed after DeleteDatabase call.";
|
||||
public const string DatabaseNodeNotFound = "Database node not found. Is the mapping namespace ({0}) correctly specified?";
|
||||
public const string DeferredMemberWrongType = "Deferred member not one of EntitySet, EntityRef, or Link.";
|
||||
public const string DidNotExpectAs = "Did not expect 'as' operator in '{0}'.";
|
||||
public const string DidNotExpectTypeBinding = "Did not expect type binding back. This should result in a type case not a simple case.";
|
||||
public const string DidNotExpectTypeChange = "Did not expect operation to change result type. Original type was '{0}' new type is '{1}'.";
|
||||
public const string DiscriminatorClrTypeNotSupported = "Discriminator '{0}.{1}' may not be type '{2}'.";
|
||||
public const string DistributedTransactionsAreNotAllowed = "Distributed transactions are not allowed.";
|
||||
public const string EmptyCaseNotSupported = "Empty case is not supported.";
|
||||
public const string EntityRefAlreadyLoaded = "The EntityRef is already loaded and the source cannot be changed.";
|
||||
public const string ExceptNotSupportedForHierarchicalTypes = "Except is not supported for hierarchical result types.";
|
||||
public const string ExpectedBitFoundPredicate = "Expected a Bit here but found a Predicate.";
|
||||
public const string ExpectedClrTypesToAgree = "Expected ClrTypes to agree. One was '{0}' the other was '{1}'.";
|
||||
public const string ExpectedEmptyElement = "Element '{0}' must be empty, but contains a node of type {1} named '{2}'.";
|
||||
public const string ExpectedNoObjectType = "Expected no ObjectType nodes to remain.";
|
||||
public const string ExpectedPredicateFoundBit = "Expected a Predicate here but found a Bit.";
|
||||
public const string ExpressionNotDeferredQuerySource = "Expression is not a deferred query source.";
|
||||
public const string GeneralCollectionMaterializationNotSupported = "General collection materialization is not supported.";
|
||||
public const string GroupingNotSupportedAsOrderCriterion = "A grouping cannot be used as an order criterion; you may want to use its key instead.";
|
||||
public const string IQueryableCannotReturnSelfReferencingConstantExpression = "An IQueryable that returns a self-referencing Constant expression is not supported.";
|
||||
public const string IdentityClrTypeNotSupported = "Invalid type mapping for Identity member '{0}.{1}'. Type '{2}' is not supported for identity members.";
|
||||
public const string IifReturnTypesMustBeEqual = "The IIF method returns two separate types: {0}, {1}. Translation to SQL does not support different return types.";
|
||||
public const string Impossible = "Should not have reached this point.";
|
||||
public const string IncorrectAutoSyncSpecification = "Incorrect AutoSync specification for member '{0}'.";
|
||||
public const string IncorrectNumberOfParametersMappedForMethod = "Mapping Problem: Incorrect number of parameters mapped for method '{0}'.";
|
||||
public const string IndexOfWithStringComparisonArgNotSupported = "The translation of String.IndexOf to SQL does not support versions with a StringComparison argument.";
|
||||
public const string InfiniteDescent = "Descent limit exceeded.";
|
||||
public const string InheritanceCodeMayNotBeNull = "Inheritance code value may not be null.";
|
||||
public const string InheritanceCodeUsedForMultipleTypes = "The inheritance code '{0}' is used for multiple types.";
|
||||
public const string InheritanceHierarchyDoesNotDefineDefault = "The inheritance hierarchy rooted at '{0}' does not define a default.";
|
||||
public const string InheritanceSubTypeIsAlsoRoot = "The inheritance subtype '{0}' is also declared as a root type.";
|
||||
public const string InheritanceTypeDoesNotDeriveFromRoot = "Inheritance type '{0}' does not derive from inheritance root type '{1}'.";
|
||||
public const string InheritanceTypeHasMultipleDefaults = "The inheritance type '{0}' has multiple defaults.";
|
||||
public const string InheritanceTypeHasMultipleDiscriminators = "The inherited type '{0}' cannot have multiple discriminator key values.";
|
||||
public const string InsertItemMustBeConstant = "The item of an Insert must be a constant value expression.";
|
||||
public const string IntersectNotSupportedForHierarchicalTypes = "Intersect is not supported for hierarchical result types.";
|
||||
public const string InvalidConnectionArgument = "'{0}' must be string, SqlConnection, SqlCeConnection, SqlTransaction, or SqlCeTransaction.";
|
||||
public const string InvalidDbGeneratedType = "The primary key column of type '{0}' cannot be generated by the server.";
|
||||
public const string InvalidDeleteOnNullSpecification = "Invalid DeleteOnNull specification for member '{0}'. DeleteOnNull can only be true for singleton association members mapped to non-nullable foreign key columns.";
|
||||
public const string InvalidFieldInfo = "Could not create FieldAccessor<{0},{1}> from FieldInfo '{2}'.";
|
||||
public const string InvalidFormatNode = "Could not format node '{0}' for execution as SQL.";
|
||||
public const string InvalidGroupByExpression = "The group by operation contains an expression that cannot be translated.";
|
||||
public const string InvalidGroupByExpressionType = "A group by expression can only contain non-constant scalars that are comparable by the server. The expression with type '{0}' is not comparable.";
|
||||
public const string InvalidMethodExecution = "The method '{0}' is not mapped as a stored procedure or user-defined function.";
|
||||
public const string InvalidOrderByExpression = "An order by expression can only contain non-constant scalars that are order comparable by the server. The expression with type '{0}' is not order comparable.";
|
||||
public const string InvalidProviderType = "The specified type '{0}' is not a valid provider type.";
|
||||
public const string InvalidReferenceToRemovedAliasDuringDeflation = "Reference to removed alias discovered during deflation.";
|
||||
public const string InvalidReturnFromSproc = "'{0}' is not a valid return type for a mapped stored procedure method.";
|
||||
public const string InvalidSequenceOperatorCall = "Sequence operator call is only valid for Sequence, Queryable, or DataQueryExtensions not for '{0}'.";
|
||||
public const string InvalidUseOfGenericMethodAsMappedFunction = "Invalid use of generic method '{0}' as mapped function.";
|
||||
public const string LastIndexOfWithStringComparisonArgNotSupported = "The translation of String.LastIndexOf to SQL does not support versions with a StringComparison argument.";
|
||||
public const string LenOfTextOrNTextNotSupported = "Translation would contain LEN of Text or NText arguments: {0}";
|
||||
public const string LinkAlreadyLoaded = "The Link is already loaded and the source cannot be changed.";
|
||||
public const string LogAttemptingToDeleteDatabase = "Attempting to delete the database '{0}'.";
|
||||
public const string LogGeneralInfoMessage = "{0}: {1}.";
|
||||
public const string LogStoredProcedureExecution = "Execute stored procedure: {0}({1}).";
|
||||
public const string MappedMemberHadNoCorrespondingMemberInType = "The column or association '{0}' in the mapping had no corresponding member in type '{1}'. Mapping members from above root type is not supported.";
|
||||
public const string MappedTypeMustHaveDefaultConstructor = "The type '{0}' must declare a default (parameterless) constructor in order to be constructed during mapping.";
|
||||
public const string MappingForTableUndefined = "Mapping Problem: Mapping for table '{0}' is not defined.";
|
||||
public const string MappingOfInterfacesMemberIsNotSupported = "The mapping of interface member {0}.{1} is not supported.";
|
||||
public const string MathRoundNotSupported = "For translation to SQL, the Math.Round method needs a MidpointRounding parameter. Use 'AwayFromZero' to specify the SQL function ROUND.";
|
||||
public const string MaxSizeNotSupported = "Translation would contain an out parameter of type Text, NText, or Image: {0}";
|
||||
public const string MemberAccessIllegal = "Member access '{0}' of '{1}' not legal on type '{2}.";
|
||||
public const string MemberCannotBeTranslated = "The member '{0}.{1}' has no supported translation to SQL.";
|
||||
public const string MemberCouldNotBeTranslated = "Member '{0}.{1}' could not be translated.";
|
||||
public const string MemberMappedMoreThanOnce = "The member '{0}' is mapped more than once.";
|
||||
public const string MemberNotPartOfProjection = "Binding error: Member '{0}.{1}' not found in projection.";
|
||||
public const string MethodCannotBeFound = "Method '{0}' cannot be found.";
|
||||
public const string MethodFormHasNoSupportConversionToSql = "The method '{0}' has a translation to SQL, but the overload '{1}' does not.";
|
||||
public const string MethodHasNoSupportConversionToSql = "Method '{0}' has no supported translation to SQL.";
|
||||
public const string MethodNotMappedToStoredProcedure = "The method specified ({0}) is not mapped to a stored procedure.";
|
||||
public const string MismatchedThisKeyOtherKey = "The number of ThisKey columns is different from the number of OtherKey columns for the association property '{0}' in the type '{1}'.";
|
||||
public const string NoDiscriminatorFound = "The inheritance type '{0}' does not declare a discriminator column.";
|
||||
public const string NoMethodInTypeMatchingArguments = "No method in type '{0}' matching arguments.";
|
||||
public const string NoResultTypesDeclaredForFunction = "No result types declared for function '{0}' that returns IMultipleResults.";
|
||||
public const string NonConstantExpressionsNotSupportedFor = "Only arguments that can be evaluated on the client are supported for the {0} method.";
|
||||
public const string NonConstantExpressionsNotSupportedForRounding = "Only arguments that can be evaluated on the client are supported for the MidpointRounding argument in Math.Round.";
|
||||
public const string NonCountAggregateFunctionsAreNotValidOnProjections = "Parameterless aggregate operator '{0}' is not supported over projections.";
|
||||
public const string NonInheritanceClassHasDiscriminator = "The inheritance type '{0}' has a discriminator but is not part of a mapped inheritance hierarchy.";
|
||||
public const string ParameterNotInScope = "The parameter '{0}' is not in scope.";
|
||||
public const string ParametersCannotBeSequences = "Parameters cannot be sequences.";
|
||||
public const string PrimaryKeyInSubTypeNotSupported = "The subtype '{0}' cannot contain the primary key member '{1}'.";
|
||||
public const string ProviderCannotBeUsedAfterDispose = "Provider cannot be accessed after Dispose.";
|
||||
public const string ProviderNotInstalled = "Cannot open '{0}'. Provider '{1}' not installed.";
|
||||
public const string ProviderTypeNotFound = "Specified provider type '{0}' not found.";
|
||||
public const string QueryOnLocalCollectionNotSupported = "Queries with local collections are not supported.";
|
||||
public const string QueryOperatorNotSupported = "The query operator '{0}' is not supported.";
|
||||
public const string QueryOperatorOverloadNotSupported = "Unsupported overload used for query operator '{0}'.";
|
||||
public const string ReaderUsedAfterDispose = "Reader used after dispose.";
|
||||
public const string RequiredColumnDoesNotExist = "The required column '{0}' does not exist in the results.";
|
||||
public const string ResultTypeNotMappedToFunction = "Result type '{0}' is not mapped to function '{1}'.";
|
||||
public const string SelectManyDoesNotSupportStrings = "SelectMany does not support strings.";
|
||||
public const string SequenceOperatorsNotSupportedForType = "Sequence operators not supported for type '{0}'.";
|
||||
public const string SimpleCaseShouldNotHold = "Simple case should not hold '{0}' should probably have been SqlClientCase.";
|
||||
public const string SkipIsValidOnlyOverOrderedQueries = "The Skip operator is valid only over ordered queries.";
|
||||
public const string SkipNotSupportedForSequenceTypes = "The Skip operator is not supported for sequences containing sequences (with the exception of IGrouping under SQL Server 2005).";
|
||||
public const string SkipRequiresSingleTableQueryWithPKs = "This provider supports Skip only over ordered queries returning entities or projections that contain all identity columns, where the query is a single-table (non-join) query, or is a Distinct, Except, Intersect, or Union (not Concat) operation.";
|
||||
public const string SourceExpressionAnnotation = "Source Expression: {0}";
|
||||
public const string SprocsCannotBeComposed = "Stored procedures cannot be used inside queries.";
|
||||
public const string SqlMethodOnlyForSql = "Method '{0}' cannot be used on the client; it is only for translation to SQL.";
|
||||
public const string TextNTextAndImageCannotOccurInDistinct = "Translation would contain an expression of type Text, NText, or Image in a SELECT DISTINCT clause: {0}";
|
||||
public const string TextNTextAndImageCannotOccurInUnion = "Translation would contain an expression of type Text, NText, or Image in a SELECT within a UNION: {0}";
|
||||
public const string ToStringOnlySupportedForPrimitiveTypes = "Method ToString can only be translated to SQL for primitive types.";
|
||||
public const string TooManyResultTypesDeclaredForFunction = "More than one result type declared for function '{0}' that does not return IMultipleResults.";
|
||||
public const string TransactionDoesNotMatchConnection = "Transaction does not match connection.";
|
||||
public const string TwoMembersMarkedAsInheritanceDiscriminator = "Members '{0}' and '{1}' both marked as inheritance discriminator.";
|
||||
public const string TwoMembersMarkedAsPrimaryKeyAndDBGenerated = "Members '{0}' and '{1}' both marked as IsPrimaryKey and IsDbGenerated.";
|
||||
public const string TwoMembersMarkedAsRowVersion = "Members '{0}' and '{1}' both marked as row version.";
|
||||
public const string TypeBinaryOperatorNotRecognized = "Type Binary operator not recognized.";
|
||||
public const string TypeCannotBeOrdered = "Cannot order by type '{0}'.";
|
||||
public const string TypeColumnWithUnhandledSource = "Type column with unhandled source";
|
||||
public const string UnableToAssignValueToReadonlyProperty = "Unable to assign value to read only property '{0}'.";
|
||||
public const string UnableToBindUnmappedMember = "Binding error: Member '{0}.{1}' is not a mapped member of '{2}'.";
|
||||
public const string UnableToResolveRootForType = "Mapping Problem: Unable to resolve root for type '{0}'.";
|
||||
public const string UnexpectedElement = "Expected element '{0}', but found '{1}'.";
|
||||
public const string UnexpectedFloatingColumn = "Column declaration found outside row or table declaration.";
|
||||
public const string UnexpectedNode = "Unexpected node: {0}";
|
||||
public const string UnexpectedNull = "Unexpected null '{0}'.";
|
||||
public const string UnexpectedSharedExpression = "Unexpected shared-expression found.";
|
||||
public const string UnexpectedSharedExpressionReference = "Unexpected shared-expression reference found.";
|
||||
public const string UnexpectedTypeCode = "Unexpected type code: {0}";
|
||||
public const string UnhandledDeferredStorageType = "Unhandled deferred storage type: {0}.";
|
||||
public const string UnhandledMemberAccess = "Member '{0}' on node type '{1}' does not have a known translation to SQL.";
|
||||
public const string UnhandledStringTypeComparison = "SQL Server does not handle comparison of NText, Text, Xml, or Image data types.";
|
||||
public const string UnionDifferentMemberOrder = "Types in Union or Concat have members assigned in different order.";
|
||||
public const string UnionDifferentMembers = "Types in Union or Concat have different members assigned.";
|
||||
public const string UnionIncompatibleConstruction = "Types in Union or Concat are constructed incompatibly.";
|
||||
public const string UnionOfIncompatibleDynamicTypes = "Sources of type GetType or typeof are incompatible for Union-like operation.";
|
||||
public const string UnionWithHierarchy = "Types in Union or Concat cannot be constructed with hierarchy.";
|
||||
public const string UnmappedClassMember = "Class member {0}.{1} is unmapped.";
|
||||
public const string UnmappedDataMember = "Data member '{0}' of type '{1}' is not part of the mapping for type '{2}'. Is the member above the root of an inheritance hierarchy?";
|
||||
public const string UnrecognizedAttribute = "Unrecognized attribute '{0}' in mapping file.";
|
||||
public const string UnrecognizedElement = "Unrecognized element '{0}' in mapping file.";
|
||||
public const string UnrecognizedExpressionNode = "Unrecognized expression node: {0}";
|
||||
public const string UnrecognizedProviderMode = "'{0}' is not a valid provider mode.";
|
||||
public const string UnsafeStringConversion = "Unsafe string conversion from {0} to {1} may lead to implicit truncation. Try reshaping the string explicitly with a Substring operation.";
|
||||
public const string UnsupportedDateTimeConstructorForm = "DateTime constructor form is not supported.";
|
||||
public const string UnsupportedDateTimeOffsetConstructorForm = "DateTimeOffset constructor form is not supported.";
|
||||
public const string UnsupportedNodeType = "The node type '{0}' is not supported.";
|
||||
public const string UnsupportedStringConstructorForm = "String constructor form is not supported.";
|
||||
public const string UnsupportedTimeSpanConstructorForm = "TimeSpan constructor form is not supported.";
|
||||
public const string UnsupportedTypeConstructorForm = "Constructor for server type '{0}' is not supported.";
|
||||
public const string UpdateItemMustBeConstant = "The item of an Update must be a constant value expression.";
|
||||
public const string ValueHasNoLiteralInSql = "Value has no literal in SQL: {0}";
|
||||
public const string VbLikeDoesNotSupportMultipleCharacterRanges = "Cannot translate multiple character ranges in the pattern argument.";
|
||||
public const string VbLikeUnclosedBracket = "Pattern contains unclosed bracket.";
|
||||
public const string WrongDataContext = "The query contains references to items defined on a different data context.";
|
||||
public const string WrongNumberOfValuesInCollectionArgument = "Wrong number of values in '{0}'. Expected {1}. Actually {2}.";
|
||||
}
|
||||
317
mcs/class/System.Data.Linq/ReferenceSources/Strings.cs
Normal file
317
mcs/class/System.Data.Linq/ReferenceSources/Strings.cs
Normal file
@@ -0,0 +1,317 @@
|
||||
namespace System.Data.Linq
|
||||
{
|
||||
internal static class Strings
|
||||
{
|
||||
internal static string OwningTeam {
|
||||
get { return SR.OwningTeam; }
|
||||
}
|
||||
|
||||
internal static string CannotAddChangeConflicts {
|
||||
get { return SR.CannotAddChangeConflicts; }
|
||||
}
|
||||
|
||||
internal static string CannotRemoveChangeConflicts {
|
||||
get { return SR.CannotRemoveChangeConflicts; }
|
||||
}
|
||||
|
||||
internal static string InconsistentAssociationAndKeyChange (object p0, object p1) {
|
||||
return SR.Format (SR.InconsistentAssociationAndKeyChange, p0, p1);
|
||||
}
|
||||
|
||||
internal static string UnableToDetermineDataContext {
|
||||
get { return SR.UnableToDetermineDataContext; }
|
||||
}
|
||||
|
||||
internal static string ArgumentTypeHasNoIdentityKey (object p0) {
|
||||
return SR.Format (SR.ArgumentTypeHasNoIdentityKey, p0);
|
||||
}
|
||||
|
||||
internal static string CouldNotConvert (object p0, object p1) {
|
||||
return SR.Format (SR.CouldNotConvert, p0, p1);
|
||||
}
|
||||
|
||||
internal static string CannotRemoveUnattachedEntity {
|
||||
get { return SR.CannotRemoveUnattachedEntity; }
|
||||
}
|
||||
|
||||
internal static string ColumnMappedMoreThanOnce (object p0) {
|
||||
return SR.Format (SR.ColumnMappedMoreThanOnce, p0);
|
||||
}
|
||||
|
||||
internal static string CouldNotAttach {
|
||||
get { return SR.CouldNotAttach; }
|
||||
}
|
||||
|
||||
internal static string CouldNotGetTableForSubtype (object p0, object p1) {
|
||||
return SR.Format (SR.CouldNotGetTableForSubtype, p0, p1);
|
||||
}
|
||||
|
||||
internal static string CouldNotRemoveRelationshipBecauseOneSideCannotBeNull (object p0, object p1, object p2) {
|
||||
return SR.Format (SR.CouldNotRemoveRelationshipBecauseOneSideCannotBeNull, p0, p1, p2);
|
||||
}
|
||||
|
||||
internal static string EntitySetAlreadyLoaded {
|
||||
get { return SR.EntitySetAlreadyLoaded; }
|
||||
}
|
||||
|
||||
internal static string EntitySetModifiedDuringEnumeration {
|
||||
get { return SR.EntitySetModifiedDuringEnumeration; }
|
||||
}
|
||||
|
||||
internal static string ExpectedQueryableArgument (object p0, object p1) {
|
||||
return SR.Format (SR.ExpectedQueryableArgument, p0, p1);
|
||||
}
|
||||
|
||||
internal static string ExpectedUpdateDeleteOrChange {
|
||||
get { return SR.ExpectedUpdateDeleteOrChange; }
|
||||
}
|
||||
|
||||
internal static string KeyIsWrongSize (object p0, object p1) {
|
||||
return SR.Format (SR.KeyIsWrongSize, p0, p1);
|
||||
}
|
||||
|
||||
internal static string KeyValueIsWrongType (object p0, object p1) {
|
||||
return SR.Format (SR.KeyValueIsWrongType, p0, p1);
|
||||
}
|
||||
|
||||
internal static string IdentityChangeNotAllowed (object p0, object p1) {
|
||||
return SR.Format (SR.IdentityChangeNotAllowed, p0, p1);
|
||||
}
|
||||
|
||||
internal static string DbGeneratedChangeNotAllowed (object p0, object p1) {
|
||||
return SR.Format (SR.DbGeneratedChangeNotAllowed, p0, p1);
|
||||
}
|
||||
|
||||
internal static string ModifyDuringAddOrRemove {
|
||||
get { return SR.ModifyDuringAddOrRemove; }
|
||||
}
|
||||
|
||||
internal static string ProviderDoesNotImplementRequiredInterface (object p0, object p1) {
|
||||
return SR.Format (SR.ProviderDoesNotImplementRequiredInterface, p0, p1);
|
||||
}
|
||||
|
||||
internal static string ProviderTypeNull {
|
||||
get { return SR.ProviderTypeNull; }
|
||||
}
|
||||
|
||||
internal static string TypeCouldNotBeAdded (object p0) {
|
||||
return SR.Format (SR.TypeCouldNotBeAdded, p0);
|
||||
}
|
||||
|
||||
internal static string TypeCouldNotBeRemoved (object p0) {
|
||||
return SR.Format (SR.TypeCouldNotBeRemoved, p0);
|
||||
}
|
||||
|
||||
internal static string TypeCouldNotBeTracked (object p0) {
|
||||
return SR.Format (SR.TypeCouldNotBeTracked, p0);
|
||||
}
|
||||
|
||||
internal static string TypeIsNotEntity (object p0) {
|
||||
return SR.Format (SR.TypeIsNotEntity, p0);
|
||||
}
|
||||
|
||||
internal static string UnrecognizedRefreshObject {
|
||||
get { return SR.UnrecognizedRefreshObject; }
|
||||
}
|
||||
|
||||
internal static string UnhandledExpressionType (object p0) {
|
||||
return SR.Format (SR.UnhandledExpressionType, p0);
|
||||
}
|
||||
|
||||
internal static string UnhandledBindingType (object p0) {
|
||||
return SR.Format (SR.UnhandledBindingType, p0);
|
||||
}
|
||||
|
||||
internal static string ObjectTrackingRequired {
|
||||
get { return SR.ObjectTrackingRequired; }
|
||||
}
|
||||
|
||||
internal static string OptionsCannotBeModifiedAfterQuery {
|
||||
get { return SR.OptionsCannotBeModifiedAfterQuery; }
|
||||
}
|
||||
|
||||
internal static string DeferredLoadingRequiresObjectTracking {
|
||||
get { return SR.DeferredLoadingRequiresObjectTracking; }
|
||||
}
|
||||
|
||||
internal static string SubqueryDoesNotSupportOperator (object p0) {
|
||||
return SR.Format (SR.SubqueryDoesNotSupportOperator, p0);
|
||||
}
|
||||
|
||||
internal static string SubqueryNotSupportedOn (object p0) {
|
||||
return SR.Format (SR.SubqueryNotSupportedOn, p0);
|
||||
}
|
||||
|
||||
internal static string SubqueryNotSupportedOnType (object p0, object p1) {
|
||||
return SR.Format (SR.SubqueryNotSupportedOnType, p0, p1);
|
||||
}
|
||||
|
||||
internal static string SubqueryNotAllowedAfterFreeze {
|
||||
get { return SR.SubqueryNotAllowedAfterFreeze; }
|
||||
}
|
||||
|
||||
internal static string IncludeNotAllowedAfterFreeze {
|
||||
get{ return SR.IncludeNotAllowedAfterFreeze; }
|
||||
}
|
||||
|
||||
internal static string LoadOptionsChangeNotAllowedAfterQuery {
|
||||
get { return SR.LoadOptionsChangeNotAllowedAfterQuery; }
|
||||
}
|
||||
|
||||
internal static string IncludeCycleNotAllowed {
|
||||
get { return SR.IncludeCycleNotAllowed; }
|
||||
}
|
||||
|
||||
internal static string SubqueryMustBeSequence {
|
||||
get { return SR.SubqueryMustBeSequence; }
|
||||
}
|
||||
|
||||
internal static string RefreshOfDeletedObject {
|
||||
get { return SR.RefreshOfDeletedObject; }
|
||||
}
|
||||
|
||||
internal static string RefreshOfNewObject {
|
||||
get { return SR.RefreshOfNewObject; }
|
||||
}
|
||||
|
||||
internal static string CannotChangeInheritanceType (object p0, object p1, object p2, object p3) {
|
||||
return SR.Format (SR.CannotChangeInheritanceType, p0, p1, p2, p3);
|
||||
}
|
||||
|
||||
internal static string DataContextCannotBeUsedAfterDispose {
|
||||
get { return SR.DataContextCannotBeUsedAfterDispose; }
|
||||
}
|
||||
|
||||
internal static string TypeIsNotMarkedAsTable (object p0) {
|
||||
return SR.Format (SR.TypeIsNotMarkedAsTable, p0);
|
||||
}
|
||||
|
||||
internal static string NonEntityAssociationMapping (object p0, object p1, object p2) {
|
||||
return SR.Format (SR.NonEntityAssociationMapping, p0, p1, p2);
|
||||
}
|
||||
|
||||
internal static string CannotPerformCUDOnReadOnlyTable (object p0) {
|
||||
return SR.Format (SR.CannotPerformCUDOnReadOnlyTable, p0);
|
||||
}
|
||||
|
||||
internal static string InsertCallbackComment {
|
||||
get { return SR.InsertCallbackComment; }
|
||||
}
|
||||
|
||||
internal static string UpdateCallbackComment {
|
||||
get { return SR.UpdateCallbackComment; }
|
||||
}
|
||||
|
||||
internal static string DeleteCallbackComment {
|
||||
get { return SR.DeleteCallbackComment; }
|
||||
}
|
||||
|
||||
internal static string RowNotFoundOrChanged {
|
||||
get { return SR.RowNotFoundOrChanged; }
|
||||
}
|
||||
|
||||
internal static string UpdatesFailedMessage (object p0, object p1) {
|
||||
return SR.Format (SR.UpdatesFailedMessage, p0, p1);
|
||||
}
|
||||
|
||||
internal static string CycleDetected {
|
||||
get { return SR.CycleDetected; }
|
||||
}
|
||||
|
||||
internal static string CantAddAlreadyExistingItem {
|
||||
get { return SR.CantAddAlreadyExistingItem; }
|
||||
}
|
||||
|
||||
internal static string CantAddAlreadyExistingKey {
|
||||
get { return SR.CantAddAlreadyExistingKey; }
|
||||
}
|
||||
|
||||
internal static string DatabaseGeneratedAlreadyExistingKey {
|
||||
get { return SR.DatabaseGeneratedAlreadyExistingKey; }
|
||||
}
|
||||
|
||||
internal static string InsertAutoSyncFailure {
|
||||
get { return SR.InsertAutoSyncFailure; }
|
||||
}
|
||||
|
||||
internal static string EntitySetDataBindingWithAbstractBaseClass (object p0) {
|
||||
return SR.Format (SR.EntitySetDataBindingWithAbstractBaseClass, p0);
|
||||
}
|
||||
|
||||
internal static string EntitySetDataBindingWithNonPublicDefaultConstructor (object p0) {
|
||||
return SR.Format (SR.EntitySetDataBindingWithNonPublicDefaultConstructor, p0);
|
||||
}
|
||||
|
||||
internal static string TextNTextAndImageCannotOccurInDistinct (object p0) {
|
||||
return SR.Format (SR.TextNTextAndImageCannotOccurInDistinct, p0);
|
||||
}
|
||||
|
||||
internal static string TextNTextAndImageCannotOccurInUnion (object p0) {
|
||||
return SR.Format (SR.TextNTextAndImageCannotOccurInUnion, p0);
|
||||
}
|
||||
|
||||
internal static string LenOfTextOrNTextNotSupported (object p0) {
|
||||
return SR.Format (SR.LenOfTextOrNTextNotSupported, p0);
|
||||
}
|
||||
|
||||
internal static string SourceExpressionAnnotation (object p0) {
|
||||
return SR.Format (SR.SourceExpressionAnnotation, p0);
|
||||
}
|
||||
|
||||
internal static string LogGeneralInfoMessage (object p0, object p1) {
|
||||
return SR.Format (SR.LogGeneralInfoMessage, p0, p1);
|
||||
}
|
||||
|
||||
internal static string LogAttemptingToDeleteDatabase (object p0) {
|
||||
return SR.Format (SR.LogAttemptingToDeleteDatabase, p0);
|
||||
}
|
||||
|
||||
internal static string MaxSizeNotSupported (object p0) {
|
||||
return SR.Format (SR.MaxSizeNotSupported, p0);
|
||||
}
|
||||
|
||||
internal static string InvalidLoadOptionsLoadMemberSpecification {
|
||||
get { return SR.InvalidLoadOptionsLoadMemberSpecification; }
|
||||
}
|
||||
|
||||
internal static string EntityIsTheWrongType {
|
||||
get { return SR.EntityIsTheWrongType; }
|
||||
}
|
||||
|
||||
internal static string OriginalEntityIsWrongType {
|
||||
get { return SR.OriginalEntityIsWrongType; }
|
||||
}
|
||||
|
||||
internal static string CannotAttachAlreadyExistingEntity {
|
||||
get { return SR.CannotAttachAlreadyExistingEntity; }
|
||||
}
|
||||
|
||||
internal static string CannotAttachAsModifiedWithoutOriginalState {
|
||||
get { return SR.CannotAttachAsModifiedWithoutOriginalState; }
|
||||
}
|
||||
|
||||
internal static string CannotPerformOperationDuringSubmitChanges {
|
||||
get { return SR.CannotPerformOperationDuringSubmitChanges; }
|
||||
}
|
||||
|
||||
internal static string CannotPerformOperationOutsideSubmitChanges {
|
||||
get { return SR.CannotPerformOperationOutsideSubmitChanges; }
|
||||
}
|
||||
|
||||
internal static string CannotPerformOperationForUntrackedObject {
|
||||
get { return SR.CannotPerformOperationForUntrackedObject; }
|
||||
}
|
||||
|
||||
internal static string CannotTranslateExpressionToSql {
|
||||
get { return SR.CannotTranslateExpressionToSql; }
|
||||
}
|
||||
|
||||
internal static string CannotAttachAddNonNewEntities {
|
||||
get { return SR.CannotAttachAddNonNewEntities; }
|
||||
}
|
||||
|
||||
internal static string QueryWasCompiledForDifferentMappingSource {
|
||||
get { return SR.QueryWasCompiledForDifferentMappingSource; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
static class ThisAssembly
|
||||
{
|
||||
public const string InformationalVersion = Consts.FxFileVersion;
|
||||
}
|
||||
@@ -1,324 +1,109 @@
|
||||
../../build/common/Consts.cs
|
||||
../../build/common/Locale.cs
|
||||
../../build/common/SR.cs
|
||||
../../build/common/MonoTODOAttribute.cs
|
||||
src/DbLinq.Firebird/FirebirdDataContext.cs
|
||||
src/DbLinq.Firebird/FirebirdExpressionTranslator.cs
|
||||
src/DbLinq.Firebird/FirebirdSchemaLoader.Columns.cs
|
||||
src/DbLinq.Firebird/FirebirdSchemaLoader.Constraints.cs
|
||||
src/DbLinq.Firebird/FirebirdSchemaLoader.cs
|
||||
src/DbLinq.Firebird/FirebirdSchemaLoader.StoredProcedures.cs
|
||||
src/DbLinq.Firebird/FirebirdSchemaLoader.Tables.cs
|
||||
src/DbLinq.Firebird/FirebirdSqlProvider.cs
|
||||
src/DbLinq.Firebird/FirebirdVendor.cs
|
||||
src/DbLinq.Ingres/IngresDataContext.cs
|
||||
src/DbLinq.Ingres/IngresSchemaLoader.Columns.cs
|
||||
src/DbLinq.Ingres/IngresSchemaLoader.Constraints.cs
|
||||
src/DbLinq.Ingres/IngresSchemaLoader.cs
|
||||
src/DbLinq.Ingres/IngresSchemaLoader.StoredProcedures.cs
|
||||
src/DbLinq.Ingres/IngresSchemaLoader.Tables.cs
|
||||
src/DbLinq.Ingres/IngresSqlProvider.cs
|
||||
src/DbLinq.Ingres/IngresVendor.cs
|
||||
src/DbLinq.MySql/MySqlDataContext.cs
|
||||
src/DbLinq.MySql/MySqlSchemaLoader.Columns.cs
|
||||
src/DbLinq.MySql/MySqlSchemaLoader.Constraints.cs
|
||||
src/DbLinq.MySql/MySqlSchemaLoader.cs
|
||||
src/DbLinq.MySql/MySqlSchemaLoader.StoredProcedures.cs
|
||||
src/DbLinq.MySql/MySqlSchemaLoader.Tables.cs
|
||||
src/DbLinq.MySql/MySqlSqlProvider.cs
|
||||
src/DbLinq.MySql/MySqlVendor.cs
|
||||
src/DbLinq.Oracle/OracleDataContext.cs
|
||||
src/DbLinq.Oracle/OracleSchemaLoader.Columns.cs
|
||||
src/DbLinq.Oracle/OracleSchemaLoader.Constraints.cs
|
||||
src/DbLinq.Oracle/OracleSchemaLoader.cs
|
||||
src/DbLinq.Oracle/OracleSchemaLoader.StoredProcedures.cs
|
||||
src/DbLinq.Oracle/OracleSchemaLoader.Tables.cs
|
||||
src/DbLinq.Oracle/OracleSqlProvider.cs
|
||||
src/DbLinq.Oracle/OracleVendor.cs
|
||||
src/DbLinq.PostgreSql/PgsqlDataContext.cs
|
||||
src/DbLinq.PostgreSql/PgsqlSchemaLoader.Columns.cs
|
||||
src/DbLinq.PostgreSql/PgsqlSchemaLoader.Constraints.cs
|
||||
src/DbLinq.PostgreSql/PgsqlSchemaLoader.cs
|
||||
src/DbLinq.PostgreSql/PgsqlSchemaLoader.StoredProcedures.cs
|
||||
src/DbLinq.PostgreSql/PgsqlSchemaLoader.Tables.cs
|
||||
src/DbLinq.PostgreSql/PgsqlSqlProvider.cs
|
||||
src/DbLinq.PostgreSql/PgsqlVendor.cs
|
||||
src/DbLinq.Sqlite/Schema/DataCommand.cs
|
||||
src/DbLinq.Sqlite/SqliteDataContext.cs
|
||||
src/DbLinq.Sqlite/SqliteSchemaLoader.Columns.cs
|
||||
src/DbLinq.Sqlite/SqliteSchemaLoader.Constraints.cs
|
||||
src/DbLinq.Sqlite/SqliteSchemaLoader.cs
|
||||
src/DbLinq.Sqlite/SqliteSchemaLoader.Tables.cs
|
||||
src/DbLinq.Sqlite/SqliteSqlProvider.cs
|
||||
src/DbLinq.Sqlite/SqliteVendor.cs
|
||||
src/DbLinq.SqlServer/SqlServerDataContext.cs
|
||||
src/DbLinq.SqlServer/SqlServerExpressionTranslator.cs
|
||||
src/DbLinq.SqlServer/SqlServerSchemaLoader.cs
|
||||
src/DbLinq.SqlServer/SqlServerSqlProvider.cs
|
||||
src/DbLinq.SqlServer/SqlServerTypeConversions.cs
|
||||
src/DbLinq.SqlServer/SqlServerVendor.cs
|
||||
src/DbLinq/Data/Linq/ChangeAction.cs
|
||||
src/DbLinq/Data/Linq/ChangeSet.cs
|
||||
src/DbLinq/Data/Linq/Database/IDatabaseContext.cs
|
||||
src/DbLinq/Data/Linq/Database/IDatabaseTransaction.cs
|
||||
src/DbLinq/Data/Linq/Database/Implementation/DatabaseConnection.cs
|
||||
src/DbLinq/Data/Linq/Database/Implementation/DatabaseContext.cs
|
||||
src/DbLinq/Data/Linq/Database/Implementation/DatabaseTransaction.cs
|
||||
src/DbLinq/Data/Linq/Database/Implementation/TransactionalCommand.cs
|
||||
src/DbLinq/Data/Linq/Database/ITransactionalCommand.cs
|
||||
src/DbLinq/Data/Linq/DataContext.cs
|
||||
src/DbLinq/Data/Linq/DataLoadOptions.cs
|
||||
src/DbLinq/Data/Linq/DBLinqExtendedAttributte.cs
|
||||
src/DbLinq/Data/Linq/EntityRef.cs
|
||||
src/DbLinq/Data/Linq/EntitySet.cs
|
||||
src/DbLinq/Data/Linq/Identity/IdentityKey.cs
|
||||
src/DbLinq/Data/Linq/Identity/IIdentityProvider.cs
|
||||
src/DbLinq/Data/Linq/Identity/IIdentityReader.cs
|
||||
src/DbLinq/Data/Linq/Identity/IIdentityReaderFactory.cs
|
||||
src/DbLinq/Data/Linq/Identity/Implementation/IdentityProviderReader.cs
|
||||
src/DbLinq/Data/Linq/Identity/Implementation/IdentityReader.cs
|
||||
src/DbLinq/Data/Linq/Identity/Implementation/IdentityReaderFactory.cs
|
||||
src/DbLinq/Data/Linq/IExecuteResult.cs
|
||||
src/DbLinq/Data/Linq/IMemberModificationHandler.cs
|
||||
src/DbLinq/Data/Linq/Implementation/DisabledEntityTracker.cs
|
||||
src/DbLinq/Data/Linq/Implementation/EntityState.cs
|
||||
src/DbLinq/Data/Linq/Implementation/EntityTrack.cs
|
||||
src/DbLinq/Data/Linq/Implementation/EntityTracker.cs
|
||||
src/DbLinq/Data/Linq/Implementation/IEntityTracker.cs
|
||||
src/DbLinq/Data/Linq/Implementation/MemberModificationHandler.cs
|
||||
src/DbLinq/Data/Linq/Implementation/QueryProvider.cs
|
||||
src/DbLinq/Data/Linq/Implementation/VendorProvider.cs
|
||||
src/DbLinq/Data/Linq/ITable.cs
|
||||
src/DbLinq/Data/Linq/IVendorProvider.cs
|
||||
src/DbLinq/Data/Linq/Mapping/AttributedAbstractMetaDataMember.cs
|
||||
src/DbLinq/Data/Linq/Mapping/AttributedAssociationMetaDataMember.cs
|
||||
src/DbLinq/Data/Linq/Mapping/AttributedColumnMetaDataMember.cs
|
||||
src/DbLinq/Data/Linq/Mapping/AttributedMetaAssociation.cs
|
||||
src/DbLinq/Data/Linq/Mapping/AttributedMetaFunction.cs
|
||||
src/DbLinq/Data/Linq/Mapping/AttributedMetaModel.cs
|
||||
src/DbLinq/Data/Linq/Mapping/AttributedMetaTable.cs
|
||||
src/DbLinq/Data/Linq/Mapping/AttributedMetaType.cs
|
||||
src/DbLinq/Data/Linq/Mapping/AttributeMappingSource.cs
|
||||
src/DbLinq/Data/Linq/Mapping/LambdaMetaAccessor.cs
|
||||
src/DbLinq/Data/Linq/Mapping/MappingContext.cs
|
||||
src/DbLinq/Data/Linq/Mapping/XmlMappingSource.cs
|
||||
src/DbLinq/Data/Linq/RefreshMode.cs
|
||||
src/DbLinq/Data/Linq/Sql/SqlLiteralPart.cs
|
||||
src/DbLinq/Data/Linq/Sql/SqlParameterPart.cs
|
||||
src/DbLinq/Data/Linq/Sql/SqlPart.cs
|
||||
src/DbLinq/Data/Linq/Sql/SqlStatement.cs
|
||||
src/DbLinq/Data/Linq/Sql/SqlStatementBuilder.cs
|
||||
src/DbLinq/Data/Linq/SqlClient/FirebirdProvider.cs
|
||||
src/DbLinq/Data/Linq/SqlClient/IngresProvider.cs
|
||||
src/DbLinq/Data/Linq/SqlClient/MySqlProvider.cs
|
||||
src/DbLinq/Data/Linq/SqlClient/OracleProvider.cs
|
||||
src/DbLinq/Data/Linq/SqlClient/PostgreSqlProvider.cs
|
||||
src/DbLinq/Data/Linq/SqlClient/Sql2000Provider.cs
|
||||
src/DbLinq/Data/Linq/SqlClient/Sql2005Provider.cs
|
||||
src/DbLinq/Data/Linq/SqlClient/Sql2008Provider.cs
|
||||
src/DbLinq/Data/Linq/SqlClient/SqliteProvider.cs
|
||||
src/DbLinq/Data/Linq/SqlClient/SqlServerProvider.cs
|
||||
src/DbLinq/Data/Linq/Sugar/AbstractQuery.cs
|
||||
src/DbLinq/Data/Linq/Sugar/BuilderContext.cs
|
||||
src/DbLinq/Data/Linq/Sugar/DeleteQuery.cs
|
||||
src/DbLinq/Data/Linq/Sugar/DirectQuery.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Error.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionChain.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/ExpressionMutatorExtensions.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/ExpressionMutatorFactory.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/BinaryExpressionMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/ConditionalExpressionMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/ConstantExpressionMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/IMemberBindingMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/InvocationExpressionMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/LambdaExpressionMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/ListInitExpressionMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/MemberAssignmentMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/MemberBindingMutatorFactory.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/MemberExpressionMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/MemberInitExpressionMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/MemberListBindingMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/MemberMemberBindingMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/MethodCallExpressionMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/NewArrayExpressionMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/NewExpressionMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/ParameterExpressionMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/TypeBinaryExpressionMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionMutator/Implementation/UnaryExpressionMutator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionPrecedence.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionQuery.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/ColumnExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/CustomExpressionType.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/EntitySetExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/ExpressionTranslator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/GroupExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/IExecutableExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/IMutableExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/InputParameterExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/MetaTableExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/MutableExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/ObjectInputParameterExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/ObjectOutputParameterExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/OperandsMutableExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/OrderByExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/SelectExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/SelectOperatorType.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/SpecialExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/SpecialExpressionType.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/StartIndexOffsetExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/SubSelectExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/TableExpression.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Expressions/TableJoinType.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ExpressionTier.cs
|
||||
src/DbLinq/Data/Linq/Sugar/IDataMapper.cs
|
||||
src/DbLinq/Data/Linq/Sugar/IDataRecordReader.cs
|
||||
src/DbLinq/Data/Linq/Sugar/IExpressionDispatcher.cs
|
||||
src/DbLinq/Data/Linq/Sugar/IExpressionLanguageParser.cs
|
||||
src/DbLinq/Data/Linq/Sugar/IExpressionOptimizer.cs
|
||||
src/DbLinq/Data/Linq/Sugar/IExpressionQualifier.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/DataMapper.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/DataRecordReader.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/ExpressionDispatcher.Analyzer.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/ExpressionDispatcher.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/ExpressionDispatcher.Registrar.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/ExpressionLanguageParser.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/ExpressionOptimizer.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/ExpressionQualifier.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/LineGrouping.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/PrequelAnalyzer.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/QueryBuilder.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/QueryBuilder.Upsert.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/QueryCache.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/QueryRunner.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/SpecialExpressionTranslator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/Implementation/SqlBuilder.cs
|
||||
src/DbLinq/Data/Linq/Sugar/IPrequelAnalyzer.cs
|
||||
src/DbLinq/Data/Linq/Sugar/IQueryBuilder.cs
|
||||
src/DbLinq/Data/Linq/Sugar/IQueryCache.cs
|
||||
src/DbLinq/Data/Linq/Sugar/IQueryRunner.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ISpecialExpressionTranslator.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ISqlBuilder.cs
|
||||
src/DbLinq/Data/Linq/Sugar/ParameterizedQuery.cs
|
||||
src/DbLinq/Data/Linq/Sugar/QueryContext.cs
|
||||
src/DbLinq/Data/Linq/Sugar/SelectQuery.cs
|
||||
src/DbLinq/Data/Linq/Sugar/UpsertQuery.cs
|
||||
src/DbLinq/Data/Linq/Table.cs
|
||||
src/DbLinq/DbLinqToDoAttribute.cs
|
||||
src/DbLinq/Factory/DbLinqAttribute.cs
|
||||
src/DbLinq/Factory/Implementation/ReflectionObjectFactory.cs
|
||||
src/DbLinq/Factory/IObjectFactory.cs
|
||||
src/DbLinq/Factory/ObjectFactory.cs
|
||||
src/DbLinq/Language/ILanguages.cs
|
||||
src/DbLinq/Language/ILanguageWords.cs
|
||||
src/DbLinq/Language/Implementation/AbstractEndPluralWords.cs
|
||||
src/DbLinq/Language/Implementation/AbstractWords.cs
|
||||
src/DbLinq/Language/Implementation/Languages.cs
|
||||
src/DbLinq/Language/Implementation/NoLanguageWords.cs
|
||||
src/DbLinq/Schema/AssociationName.cs
|
||||
src/DbLinq/Schema/Case.cs
|
||||
src/DbLinq/Schema/ColumnName.cs
|
||||
src/DbLinq/Schema/Dbml/Adapter/ArrayAdapter.cs
|
||||
src/DbLinq/Schema/Dbml/Adapter/CsvArrayAdapter.cs
|
||||
src/DbLinq/Schema/Dbml/Adapter/EnumType.cs
|
||||
src/DbLinq/Schema/Dbml/Adapter/INamedType.cs
|
||||
src/DbLinq/Schema/Dbml/Adapter/ISimpleList.cs
|
||||
src/DbLinq/Schema/Dbml/Adapter/SpecifiedPropertyUpdater.cs
|
||||
src/DbLinq/Schema/Dbml/DatabaseSerializer.cs
|
||||
src/DbLinq/Schema/Dbml/DbmlSchema.Adapter.cs
|
||||
src/DbLinq/Schema/Dbml/DbmlSchema.cs
|
||||
src/DbLinq/Schema/Dbml/DbmlSerializer.cs
|
||||
src/DbLinq/Schema/Implementation/NameFormatter.cs
|
||||
src/DbLinq/Schema/INameFormatter.cs
|
||||
src/DbLinq/Schema/Name.cs
|
||||
src/DbLinq/Schema/NameFormat.cs
|
||||
src/DbLinq/Schema/ParameterName.cs
|
||||
src/DbLinq/Schema/ProcedureName.cs
|
||||
src/DbLinq/Schema/SchemaName.cs
|
||||
src/DbLinq/Schema/TableName.cs
|
||||
src/DbLinq/Schema/WordsExtraction.cs
|
||||
src/DbLinq/System.Data.Linq/Assembly/AssemblyInfo.cs
|
||||
src/DbLinq/System.Data.Linq/Binary.cs
|
||||
src/DbLinq/System.Data.Linq/ChangeConflictCollection.cs
|
||||
src/DbLinq/System.Data.Linq/ChangeConflictException.cs
|
||||
src/DbLinq/System.Data.Linq/CompiledQuery.cs
|
||||
src/DbLinq/System.Data.Linq/ConflictMode.cs
|
||||
src/DbLinq/System.Data.Linq/DBConvert.cs
|
||||
src/DbLinq/System.Data.Linq/DuplicateKeyException.cs
|
||||
src/DbLinq/System.Data.Linq/ForeignKeyReferenceAlreadyHasValueException.cs
|
||||
src/DbLinq/System.Data.Linq/IFunctionResult.cs
|
||||
src/DbLinq/System.Data.Linq/IMultipleResults.cs
|
||||
src/DbLinq/System.Data.Linq/ISingleResult.cs
|
||||
src/DbLinq/System.Data.Linq/Link.cs
|
||||
src/DbLinq/System.Data.Linq/MemberChangeConflict.cs
|
||||
src/DbLinq/System.Data.Linq/ModifiedMemberInfo.cs
|
||||
src/DbLinq/System.Data.Linq/ObjectChangeConflict.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/AssociationAttribute.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/AutoSync.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/ColumnAttribute.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/DataAttribute.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/DatabaseAttribute.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/FunctionAttribute.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/InheritanceMappingAttribute.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/MappingSource.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/MetaAccessor.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/MetaAccessor_2.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/MetaAssociation.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/MetaDataMember.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/MetaFunction.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/MetaModel.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/MetaParameter.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/MetaTable.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/MetaType.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/ParameterAttribute.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/ProviderAttribute.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/ResultTypeAttribute.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/TableAttribute.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.Mapping/UpdateCheck.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.SqlClient.Implementation/ObjectMaterializer.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.SqlClient/SqlHelpers.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.SqlClient/SqlMethods.cs
|
||||
src/DbLinq/System.Data.Linq/System.Data.Linq.SqlClient/SqlProvider.cs
|
||||
src/DbLinq/Util/DataCommand.cs
|
||||
src/DbLinq/Util/DbmlExtensions.cs
|
||||
src/DbLinq/Util/ExpressionChainEqualityComparer.cs
|
||||
src/DbLinq/Util/ExpressionEqualityComparer.cs
|
||||
src/DbLinq/Util/IDataRecordExtensions.cs
|
||||
src/DbLinq/Util/IDataTypeExtensions.cs
|
||||
src/DbLinq/Util/IDbDataParameterExtensions.cs
|
||||
src/DbLinq/Util/IThreadSafeDictionary.cs
|
||||
src/DbLinq/Util/LambdaComparer.cs
|
||||
src/DbLinq/Util/MemberInfoExtensions.cs
|
||||
src/DbLinq/Util/Output.cs
|
||||
src/DbLinq/Util/OutputLevel.cs
|
||||
src/DbLinq/Util/Page.cs
|
||||
src/DbLinq/Util/Profiler.cs
|
||||
src/DbLinq/Util/QuotesHelper.cs
|
||||
src/DbLinq/Util/ReferenceEqualityComparer.cs
|
||||
src/DbLinq/Util/ReflectionExtensions.cs
|
||||
src/DbLinq/Util/ReflectionUtility.cs
|
||||
src/DbLinq/Util/StringExtensions.cs
|
||||
src/DbLinq/Util/TextWriterExtension.cs
|
||||
src/DbLinq/Util/ThreadSafeDictionary.cs
|
||||
src/DbLinq/Util/TypeConvert.cs
|
||||
src/DbLinq/Util/TypeExtensions.cs
|
||||
src/DbLinq/Util/TypeLoader.cs
|
||||
src/DbLinq/Vendor/DbSchemaLoader.cs
|
||||
src/DbLinq/Vendor/IDataName.cs
|
||||
src/DbLinq/Vendor/IDataTableColumn.cs
|
||||
src/DbLinq/Vendor/IDataType.cs
|
||||
src/DbLinq/Vendor/Implementation/SchemaLoader.Columns.cs
|
||||
src/DbLinq/Vendor/Implementation/SchemaLoader.cs
|
||||
src/DbLinq/Vendor/Implementation/SchemaLoader.DataName.cs
|
||||
src/DbLinq/Vendor/Implementation/SchemaLoader.DataTableColumn.cs
|
||||
src/DbLinq/Vendor/Implementation/SchemaLoader.ForeignKey.cs
|
||||
src/DbLinq/Vendor/Implementation/SchemaLoader.Name.cs
|
||||
src/DbLinq/Vendor/Implementation/SchemaLoader.StoredProcedures.cs
|
||||
src/DbLinq/Vendor/Implementation/SchemaLoader.Tables.cs
|
||||
src/DbLinq/Vendor/Implementation/SchemaLoader.TypeMapping.cs
|
||||
src/DbLinq/Vendor/Implementation/SqlProvider.cs
|
||||
src/DbLinq/Vendor/Implementation/Vendor.cs
|
||||
src/DbLinq/Vendor/Implementation/Vendor.ProcedureResult.cs
|
||||
src/DbLinq/Vendor/INameAliases.cs
|
||||
src/DbLinq/Vendor/ISchemaLoader.cs
|
||||
src/DbLinq/Vendor/ISqlProvider.cs
|
||||
src/DbLinq/Vendor/IVendor.cs
|
||||
src/DbLinq/Vendor/VendorAttribute.cs
|
||||
|
||||
Assembly/AssemblyInfo.cs
|
||||
|
||||
ReferenceSources/SR.cs
|
||||
ReferenceSources/Strings.cs
|
||||
ReferenceSources/Error.cs
|
||||
ReferenceSources/ThisAssembly.cs
|
||||
|
||||
../referencesource/System.Data.Linq/ChangeConflicts.cs
|
||||
../referencesource/System.Data.Linq/ChangeDirector.cs
|
||||
../referencesource/System.Data.Linq/ChangeProcessor.cs
|
||||
../referencesource/System.Data.Linq/ChangeTracker.cs
|
||||
../referencesource/System.Data.Linq/CompiledQuery.cs
|
||||
../referencesource/System.Data.Linq/DataBindingList.cs
|
||||
../referencesource/System.Data.Linq/DataContext.cs
|
||||
../referencesource/System.Data.Linq/DataQuery.cs
|
||||
../referencesource/System.Data.Linq/DataServices.cs
|
||||
../referencesource/System.Data.Linq/DataShape.cs
|
||||
../referencesource/System.Data.Linq/DbConvert.cs
|
||||
../referencesource/System.Data.Linq/DbmlShared/Mapping.cs
|
||||
../referencesource/System.Data.Linq/EntitySetDataBindingList.cs
|
||||
../referencesource/System.Data.Linq/Exceptions.cs
|
||||
../referencesource/System.Data.Linq/FunctionResults.cs
|
||||
../referencesource/System.Data.Linq/GlobalSuppressions.cs
|
||||
../referencesource/System.Data.Linq/IdentityManager.cs
|
||||
../referencesource/System.Data.Linq/Mapping/Accessors.cs
|
||||
../referencesource/System.Data.Linq/Mapping/AttributedMetaModel.cs
|
||||
../referencesource/System.Data.Linq/Mapping/Attributes.cs
|
||||
../referencesource/System.Data.Linq/Mapping/MappedMetaModel.cs
|
||||
../referencesource/System.Data.Linq/Mapping/MappingSource.cs
|
||||
../referencesource/System.Data.Linq/Mapping/MetaModel.cs
|
||||
../referencesource/System.Data.Linq/Provider/IDataServices.cs
|
||||
../referencesource/System.Data.Linq/Provider/IProvider.cs
|
||||
../referencesource/System.Data.Linq/SortableBindingList.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Common/DbFormatter.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Common/Expressions.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Common/IConnectionManager.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Common/InheritanceRules.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Common/SqlFactory.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Common/SqlNode.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Common/SqlNodeAnnotation.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Common/SqlNodeAnnotations.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Common/SqlNodeTypeOperators.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Common/SqlServer2KCompatibilityAnnotation.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Common/SqlServer2KCompatibilityCheck.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Common/SqlVisitor.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Common/TypeSystem.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Common/TypeSystemProvider.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Error.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/OptimizationFlags.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/PerfTimer.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/ContainsRowNumberChecker.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/Funcletizer.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/LongTypeConverter.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/MethodCallConverter.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/QueryConverter.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SimpleExpression.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlAggregateChecker.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlAliaser.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlAliasesReferenced.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlBinder.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlBooleanMismatchVisitor.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlBooleanizer.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlCaseSimplifier.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlColumnizer.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlComparer.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlCrossApplyToCrossJoin.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlDeflator.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlDuplicator.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlExpander.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlExpressionNullability.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlFlattener.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlFormatter.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlGatherConsumedAliases.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlGatherProducedAliases.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlIdentifier.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlLiftIndependentRowExpressions.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlLiftWhereClauses.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlMethodCallConverter.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlMethodTransformer.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlMultiplexer.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlNamer.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlOuterApplyReducer.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlParameterizer.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlRemoveConstantOrderBy.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlReorderer.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlResolver.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlRetyper.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlRewriteScalarSubqueries.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlSupersetValidator.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlTopReducer.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlTypeConverter.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/SqlUnionizer.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/Translator.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Query/TypeSource.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Reader/ObjectReader.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/Reader/ObjectReaderCompiler.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/SqlBuilder.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/SqlConnectionManager.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/SqlMethods.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/SqlProvider.cs
|
||||
../referencesource/System.Data.Linq/SqlClient/SqlTypeSystemProvider.cs
|
||||
../referencesource/System.Data.Linq/SubqueryRules.cs
|
||||
../referencesource/System.Data.Linq/Types.cs
|
||||
../referencesource/System.Data.Linq/misc/SecurityUtils.cs
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
../../test-helpers/NunitHelpers.cs
|
||||
|
||||
dummy.cs
|
||||
../src/DbLinq.SqlServer/Test/MsSqlDataContextTest.cs
|
||||
../src/DbLinq/Test/BinaryTest.cs
|
||||
../src/DbLinq/Test/DataContextTest.cs
|
||||
../src/DbLinq/Test/EntitySetTest.cs
|
||||
../src/DbLinq/Test/NullProvider.cs
|
||||
../src/DbLinq/Test/PeopleTable.cs
|
||||
../src/DbLinq/Test/Providers/DataContextTestBase.cs
|
||||
../src/DbLinq/Test/TableTest.cs
|
||||
SqlServer/MsSqlDataContextTest.cs
|
||||
BinaryTest.cs
|
||||
DataContextTest.cs
|
||||
EntitySetTest.cs
|
||||
NullProvider.cs
|
||||
PeopleTable.cs
|
||||
Providers/DataContextTestBase.cs
|
||||
TableTest.cs
|
||||
|
||||
@@ -1,138 +1,136 @@
|
||||
#region MIT license
|
||||
//
|
||||
// MIT license
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using System.Data.Linq;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace DbLinqTest
|
||||
{
|
||||
[TestFixture]
|
||||
public class BinaryTest
|
||||
{
|
||||
// XXX: oddly, MSDN documents that while ArgumentNullException is
|
||||
// thrown, that may change in the future. Why would this change?
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void Constructor_ValueNull()
|
||||
{
|
||||
new Binary(null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Constructor()
|
||||
{
|
||||
new Binary(Encoding.UTF8.GetBytes("hello!"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Equals()
|
||||
{
|
||||
Binary a = new Binary(Encoding.UTF8.GetBytes("a"));
|
||||
Assert.IsFalse(a.Equals((Binary)null));
|
||||
Assert.IsFalse(a.Equals((object)null));
|
||||
Assert.IsFalse(a.Equals(new Binary(Encoding.UTF8.GetBytes("b"))));
|
||||
Assert.IsTrue(a.Equals(a));
|
||||
Assert.IsTrue(a.Equals(new Binary(Encoding.UTF8.GetBytes("a"))));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Equality()
|
||||
{
|
||||
Binary a = new Binary(Encoding.UTF8.GetBytes("a"));
|
||||
Binary a2 = new Binary(Encoding.UTF8.GetBytes("a"));
|
||||
Binary b = new Binary(Encoding.UTF8.GetBytes("b"));
|
||||
|
||||
Assert.IsTrue(a == a);
|
||||
Assert.IsTrue(a == a2);
|
||||
Assert.IsFalse(a == null);
|
||||
Assert.IsFalse(null == a);
|
||||
Assert.IsFalse(a == b);
|
||||
Assert.IsFalse(b == a);
|
||||
|
||||
a = null;
|
||||
b = null;
|
||||
Assert.IsTrue(a == b);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Inequality()
|
||||
{
|
||||
Binary a = new Binary(Encoding.UTF8.GetBytes("a"));
|
||||
Binary a2 = new Binary(Encoding.UTF8.GetBytes("a"));
|
||||
Binary b = new Binary(Encoding.UTF8.GetBytes("b"));
|
||||
|
||||
Assert.IsFalse(a != a);
|
||||
Assert.IsFalse(a != a2);
|
||||
Assert.IsTrue(a != null);
|
||||
Assert.IsTrue(null != a);
|
||||
Assert.IsTrue(a != b);
|
||||
Assert.IsTrue(b != a);
|
||||
|
||||
a = null;
|
||||
b = null;
|
||||
Assert.IsFalse(a != b);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetHashCode()
|
||||
{
|
||||
Binary a = new Binary(Encoding.UTF8.GetBytes("a"));
|
||||
Binary b = new Binary(Encoding.UTF8.GetBytes("a"));
|
||||
Assert.AreEqual(a.GetHashCode(), b.GetHashCode());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Length()
|
||||
{
|
||||
byte[] data = Encoding.UTF8.GetBytes("Hello, world!");
|
||||
Binary b = new Binary(data);
|
||||
Assert.AreEqual(data.Length, b.Length);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ToArray()
|
||||
{
|
||||
byte[] data = Encoding.UTF8.GetBytes("is the array copied? Yes.");
|
||||
Binary b = new Binary(data);
|
||||
Assert.IsTrue(data.SequenceEqual(b.ToArray()));
|
||||
|
||||
data[0] = (byte) 'I';
|
||||
Assert.IsFalse(data.SequenceEqual(b.ToArray()));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public new void ToString()
|
||||
{
|
||||
byte[] data = new byte[] { 0x1, 0x2, 0x3, 0x4 };
|
||||
Binary b = new Binary(data);
|
||||
Assert.AreEqual('"' + Convert.ToBase64String(data) + '"', b.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
#region MIT license
|
||||
//
|
||||
// MIT license
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using System.Data.Linq;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace DbLinqTest
|
||||
{
|
||||
[TestFixture]
|
||||
public class BinaryTest
|
||||
{
|
||||
[Test]
|
||||
public void Constructor_ValueNull()
|
||||
{
|
||||
new Binary(null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Constructor()
|
||||
{
|
||||
new Binary(Encoding.UTF8.GetBytes("hello!"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Equals()
|
||||
{
|
||||
Binary a = new Binary(Encoding.UTF8.GetBytes("a"));
|
||||
Assert.IsFalse(a.Equals((Binary)null));
|
||||
Assert.IsFalse(a.Equals((object)null));
|
||||
Assert.IsFalse(a.Equals(new Binary(Encoding.UTF8.GetBytes("b"))));
|
||||
Assert.IsTrue(a.Equals(a));
|
||||
Assert.IsTrue(a.Equals(new Binary(Encoding.UTF8.GetBytes("a"))));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Equality()
|
||||
{
|
||||
Binary a = new Binary(Encoding.UTF8.GetBytes("a"));
|
||||
Binary a2 = new Binary(Encoding.UTF8.GetBytes("a"));
|
||||
Binary b = new Binary(Encoding.UTF8.GetBytes("b"));
|
||||
|
||||
Assert.IsTrue(a == a);
|
||||
Assert.IsTrue(a == a2);
|
||||
Assert.IsFalse(a == null);
|
||||
Assert.IsFalse(null == a);
|
||||
Assert.IsFalse(a == b);
|
||||
Assert.IsFalse(b == a);
|
||||
|
||||
a = null;
|
||||
b = null;
|
||||
Assert.IsTrue(a == b);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Inequality()
|
||||
{
|
||||
Binary a = new Binary(Encoding.UTF8.GetBytes("a"));
|
||||
Binary a2 = new Binary(Encoding.UTF8.GetBytes("a"));
|
||||
Binary b = new Binary(Encoding.UTF8.GetBytes("b"));
|
||||
|
||||
Assert.IsFalse(a != a);
|
||||
Assert.IsFalse(a != a2);
|
||||
Assert.IsTrue(a != null);
|
||||
Assert.IsTrue(null != a);
|
||||
Assert.IsTrue(a != b);
|
||||
Assert.IsTrue(b != a);
|
||||
|
||||
a = null;
|
||||
b = null;
|
||||
Assert.IsFalse(a != b);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetHashCode()
|
||||
{
|
||||
Binary a = new Binary(Encoding.UTF8.GetBytes("a"));
|
||||
Binary b = new Binary(Encoding.UTF8.GetBytes("a"));
|
||||
Assert.AreEqual(a.GetHashCode(), b.GetHashCode());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Length()
|
||||
{
|
||||
byte[] data = Encoding.UTF8.GetBytes("Hello, world!");
|
||||
Binary b = new Binary(data);
|
||||
Assert.AreEqual(data.Length, b.Length);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ToArray()
|
||||
{
|
||||
byte[] data = Encoding.UTF8.GetBytes("is the array copied? Yes.");
|
||||
Binary b = new Binary(data);
|
||||
Assert.IsTrue(data.SequenceEqual(b.ToArray()));
|
||||
|
||||
data[0] = (byte) 'I';
|
||||
Assert.IsFalse(data.SequenceEqual(b.ToArray()));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public new void ToString()
|
||||
{
|
||||
byte[] data = new byte[] { 0x1, 0x2, 0x3, 0x4 };
|
||||
Binary b = new Binary(data);
|
||||
Assert.AreEqual('"' + Convert.ToBase64String(data) + '"', b.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,63 +1,63 @@
|
||||
#region MIT license
|
||||
//
|
||||
// MIT license
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
// using System.Data.Linq;
|
||||
using System.Data.Linq.Mapping;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
#if MONO_STRICT
|
||||
using System.Data.Linq;
|
||||
#else
|
||||
using DbLinq.Data.Linq;
|
||||
#endif
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using DbLinq.Null;
|
||||
|
||||
namespace DbLinqTest {
|
||||
|
||||
[Table(Name="people")]
|
||||
class BadPerson
|
||||
{
|
||||
public string FirstName {get; set;}
|
||||
public string LastName {get; set;}
|
||||
}
|
||||
|
||||
[Table(Name="people")]
|
||||
class Person
|
||||
{
|
||||
[Column(Name="first_name")]
|
||||
public string FirstName {get; set;}
|
||||
[Column(Name="last_name")]
|
||||
public string LastName {get; set;}
|
||||
}
|
||||
}
|
||||
|
||||
#region MIT license
|
||||
//
|
||||
// MIT license
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
// using System.Data.Linq;
|
||||
using System.Data.Linq.Mapping;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
#if MONO_STRICT
|
||||
using System.Data.Linq;
|
||||
#else
|
||||
using DbLinq.Data.Linq;
|
||||
#endif
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using DbLinq.Null;
|
||||
|
||||
namespace DbLinqTest {
|
||||
|
||||
[Table(Name="people")]
|
||||
class BadPerson
|
||||
{
|
||||
public string FirstName {get; set;}
|
||||
public string LastName {get; set;}
|
||||
}
|
||||
|
||||
[Table(Name="people")]
|
||||
class Person
|
||||
{
|
||||
[Column(Name="first_name")]
|
||||
public string FirstName {get; set;}
|
||||
[Column(Name="last_name")]
|
||||
public string LastName {get; set;}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,158 +1,158 @@
|
||||
#region MIT license
|
||||
//
|
||||
// MIT license
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
// using System.Data.Linq;
|
||||
using System.Data.Linq.Mapping;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
#if MONO_STRICT
|
||||
using System.Data.Linq;
|
||||
#else
|
||||
using DbLinq.Data.Linq;
|
||||
#endif
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using DbLinq.Null;
|
||||
|
||||
namespace DbLinqTest {
|
||||
|
||||
public abstract class DataContextTestBase
|
||||
{
|
||||
DataContext context;
|
||||
|
||||
protected DataContext Context {
|
||||
get { return context; }
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
context = CreateDataContext();
|
||||
}
|
||||
|
||||
protected abstract DataContext CreateDataContext();
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
context = null;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ExecuteCommand()
|
||||
{
|
||||
context.Log = new StringWriter ();
|
||||
try
|
||||
{
|
||||
context.ExecuteCommand("SomeCommand", 1, 2, 3);
|
||||
}
|
||||
catch (NotSupportedException)
|
||||
{
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Assert.Fail("# ExecuteCommand: Got exception {0}", e.ToString());
|
||||
}
|
||||
Console.WriteLine ("# ExecuteCommand: Log={0}", context.Log);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ExecuteQuery()
|
||||
{
|
||||
context.Log = new StringWriter ();
|
||||
try
|
||||
{
|
||||
context.ExecuteQuery(typeof(Person), "select * from people", 1, 2, 3);
|
||||
}
|
||||
catch (NotSupportedException)
|
||||
{
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Assert.Fail("# ExecuteQuery: unexpected exception: {0}", e.ToString());
|
||||
}
|
||||
Console.WriteLine ("# ExecuteQuery: Log={0}", context.Log);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ExecuteQueryTResult()
|
||||
{
|
||||
context.Log = new StringWriter ();
|
||||
try
|
||||
{
|
||||
context.ExecuteQuery<Person>("select * from people", 1, 2, 3);
|
||||
}
|
||||
catch (NotSupportedException)
|
||||
{
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Assert.Fail();
|
||||
}
|
||||
Console.WriteLine ("# ExecuteQueryTResult: Log={0}", context.Log);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetChangeSet()
|
||||
{
|
||||
// TODO
|
||||
context.GetChangeSet();
|
||||
}
|
||||
|
||||
protected abstract string People(string firstName);
|
||||
protected abstract string People(string firstName, string lastName);
|
||||
protected abstract string People(string firstName, string lastName, int skip, int take);
|
||||
|
||||
[Test]
|
||||
public void GetCommand()
|
||||
{
|
||||
var foos =
|
||||
from p in context.GetTable<Person>()
|
||||
where p.FirstName == "foo"
|
||||
select p;
|
||||
var cmd = context.GetCommand(foos);
|
||||
|
||||
Assert.AreEqual(People("foo"), cmd.CommandText);
|
||||
|
||||
foos = foos.Where(p => p.LastName == "bar");
|
||||
var cmd2 = context.GetCommand(foos);
|
||||
|
||||
Assert.IsFalse(object.ReferenceEquals(cmd, cmd2));
|
||||
|
||||
Assert.AreEqual(People("foo", "bar"), cmd2.CommandText);
|
||||
|
||||
foos = foos.Skip(1).Take(2);
|
||||
cmd = context.GetCommand(foos);
|
||||
Assert.AreEqual(People("foo", "bar", 1, 2), cmd.CommandText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region MIT license
|
||||
//
|
||||
// MIT license
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
// using System.Data.Linq;
|
||||
using System.Data.Linq.Mapping;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
#if MONO_STRICT
|
||||
using System.Data.Linq;
|
||||
#else
|
||||
using DbLinq.Data.Linq;
|
||||
#endif
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using DbLinq.Null;
|
||||
|
||||
namespace DbLinqTest {
|
||||
|
||||
public abstract class DataContextTestBase
|
||||
{
|
||||
DataContext context;
|
||||
|
||||
protected DataContext Context {
|
||||
get { return context; }
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
context = CreateDataContext();
|
||||
}
|
||||
|
||||
protected abstract DataContext CreateDataContext();
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
context = null;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ExecuteCommand()
|
||||
{
|
||||
context.Log = new StringWriter ();
|
||||
try
|
||||
{
|
||||
context.ExecuteCommand("SomeCommand", 1, 2, 3);
|
||||
}
|
||||
catch (NotSupportedException)
|
||||
{
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Assert.Fail("# ExecuteCommand: Got exception {0}", e.ToString());
|
||||
}
|
||||
Console.WriteLine ("# ExecuteCommand: Log={0}", context.Log);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ExecuteQuery()
|
||||
{
|
||||
context.Log = new StringWriter ();
|
||||
try
|
||||
{
|
||||
context.ExecuteQuery(typeof(Person), "select * from people", 1, 2, 3);
|
||||
}
|
||||
catch (NotSupportedException)
|
||||
{
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Assert.Fail("# ExecuteQuery: unexpected exception: {0}", e.ToString());
|
||||
}
|
||||
Console.WriteLine ("# ExecuteQuery: Log={0}", context.Log);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ExecuteQueryTResult()
|
||||
{
|
||||
context.Log = new StringWriter ();
|
||||
try
|
||||
{
|
||||
context.ExecuteQuery<Person>("select * from people", 1, 2, 3);
|
||||
}
|
||||
catch (NotSupportedException)
|
||||
{
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Assert.Fail();
|
||||
}
|
||||
Console.WriteLine ("# ExecuteQueryTResult: Log={0}", context.Log);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetChangeSet()
|
||||
{
|
||||
// TODO
|
||||
context.GetChangeSet();
|
||||
}
|
||||
|
||||
protected abstract string People(string firstName);
|
||||
protected abstract string People(string firstName, string lastName);
|
||||
protected abstract string People(string firstName, string lastName, int skip, int take);
|
||||
|
||||
[Test]
|
||||
public void GetCommand()
|
||||
{
|
||||
var foos =
|
||||
from p in context.GetTable<Person>()
|
||||
where p.FirstName == "foo"
|
||||
select p;
|
||||
var cmd = context.GetCommand(foos);
|
||||
|
||||
Assert.AreEqual(People("foo"), cmd.CommandText);
|
||||
|
||||
foos = foos.Where(p => p.LastName == "bar");
|
||||
var cmd2 = context.GetCommand(foos);
|
||||
|
||||
Assert.IsFalse(object.ReferenceEquals(cmd, cmd2));
|
||||
|
||||
Assert.AreEqual(People("foo", "bar"), cmd2.CommandText);
|
||||
|
||||
foos = foos.Skip(1).Take(2);
|
||||
cmd = context.GetCommand(foos);
|
||||
Assert.AreEqual(People("foo", "bar", 1, 2), cmd.CommandText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,126 +1,127 @@
|
||||
#region MIT license
|
||||
//
|
||||
// MIT license
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
#if MONO_STRICT
|
||||
using System.Data.Linq;
|
||||
using System.Data.Linq.Mapping;
|
||||
#else
|
||||
using DbLinq.Data.Linq;
|
||||
using DbLinq.Data.Linq.Mapping;
|
||||
#endif
|
||||
|
||||
using DbLinq.Null;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace DbLinqTest {
|
||||
|
||||
[TestFixture]
|
||||
public class MsSqlDataContextTest : DataContextTestBase
|
||||
{
|
||||
static MsSqlDataContextTest()
|
||||
{
|
||||
#if !MONO_STRICT
|
||||
// Make sure this assembly has a ref to DbLinq.SqlServer.dll.
|
||||
var dummy = new DbLinq.SqlServer.SqlServerSqlProvider();
|
||||
#endif
|
||||
}
|
||||
|
||||
protected override DataContext CreateDataContext()
|
||||
{
|
||||
return new DataContext (new NullConnection (), new AttributeMappingSource ());
|
||||
}
|
||||
|
||||
protected override string People(string firstName)
|
||||
{
|
||||
return string.Format(
|
||||
"SELECT [first_name], [last_name]{0}" +
|
||||
"FROM [people]{0}" +
|
||||
"WHERE ([first_name] = '" + firstName + "')",
|
||||
Environment.NewLine); ;
|
||||
}
|
||||
|
||||
protected override string People(string firstName, string lastName)
|
||||
{
|
||||
return People(firstName) + " AND ([last_name] = '" + lastName + "')";
|
||||
}
|
||||
|
||||
protected override string People(string firstName, string lastName, int skip, int take)
|
||||
{
|
||||
return string.Format("SELECT *{0}" +
|
||||
"FROM ({0}" +
|
||||
" SELECT [first_name], [last_name]{0}" +
|
||||
",{0}" +
|
||||
" ROW_NUMBER() OVER(ORDER BY [first_name], [last_name]{0}" +
|
||||
") AS [__ROW_NUMBER]{0}" +
|
||||
" FROM [people]{0}" +
|
||||
"WHERE ([first_name] = '{1}') AND ([last_name] = '{2}') ) AS [t0]{0}" +
|
||||
"WHERE [__ROW_NUMBER] BETWEEN {3}+1 AND {3}+{4}{0}" +
|
||||
"ORDER BY [__ROW_NUMBER]",
|
||||
Environment.NewLine, firstName, lastName, skip, take);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Count()
|
||||
{
|
||||
var oldLog = Context.Log;
|
||||
var log = new StringWriter();
|
||||
try
|
||||
{
|
||||
Context.Log = log;
|
||||
(from p in Context.GetTable<Person>()
|
||||
orderby p.LastName
|
||||
select p)
|
||||
.Count();
|
||||
}
|
||||
catch (NotSupportedException)
|
||||
{
|
||||
Console.WriteLine("# logfile=\n{0}", log.ToString());
|
||||
var expected = string.Format("SELECT COUNT(*){0}" +
|
||||
"FROM [people]{0}" +
|
||||
"--",
|
||||
Environment.NewLine);
|
||||
Assert.IsTrue(log.ToString().Contains(expected));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Assert.Fail("# ExecuteCommand: Got exception {0}", e.ToString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
Context.Log = oldLog;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region MIT license
|
||||
//
|
||||
// MIT license
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
#if MONO_STRICT
|
||||
using System.Data.Linq;
|
||||
using System.Data.Linq.Mapping;
|
||||
#else
|
||||
using DbLinq.Data.Linq;
|
||||
using DbLinq.Data.Linq.Mapping;
|
||||
#endif
|
||||
|
||||
using DbLinq.Null;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace DbLinqTest {
|
||||
|
||||
[TestFixture]
|
||||
public class MsSqlDataContextTest : DataContextTestBase
|
||||
{
|
||||
static MsSqlDataContextTest()
|
||||
{
|
||||
#if !MONO_STRICT
|
||||
// Make sure this assembly has a ref to DbLinq.SqlServer.dll.
|
||||
var dummy = new DbLinq.SqlServer.SqlServerSqlProvider();
|
||||
#endif
|
||||
}
|
||||
|
||||
protected override DataContext CreateDataContext()
|
||||
{
|
||||
return new DataContext (new NullConnection (), new AttributeMappingSource ());
|
||||
}
|
||||
|
||||
protected override string People(string firstName)
|
||||
{
|
||||
return string.Format(
|
||||
"SELECT [t0].[first_name] AS [FirstName], [t0].[last_name] AS [LastName]{0}" +
|
||||
"FROM [people] AS [t0]{0}" +
|
||||
"WHERE [t0].[first_name] = @p0",
|
||||
Environment.NewLine);
|
||||
}
|
||||
|
||||
protected override string People(string firstName, string lastName)
|
||||
{
|
||||
return string.Format(
|
||||
"SELECT [t0].[first_name] AS [FirstName], [t0].[last_name] AS [LastName]{0}" +
|
||||
"FROM [people] AS [t0]{0}" +
|
||||
"WHERE ([t0].[last_name] = @p0) AND ([t0].[first_name] = @p1)",
|
||||
Environment.NewLine);
|
||||
}
|
||||
|
||||
protected override string People(string firstName, string lastName, int skip, int take)
|
||||
{
|
||||
return string.Format("SELECT [t1].[first_name] AS [FirstName], [t1].[last_name] AS [LastName]{0}" +
|
||||
"FROM ({0}" +
|
||||
" SELECT ROW_NUMBER() OVER (ORDER BY [t0].[first_name], [t0].[last_name]) AS [ROW_NUMBER], [t0].[first_name], [t0].[last_name]{0}" +
|
||||
" FROM [people] AS [t0]{0}" +
|
||||
" WHERE ([t0].[last_name] = @p0) AND ([t0].[first_name] = @p1){0}" +
|
||||
" ) AS [t1]{0}" +
|
||||
"WHERE [t1].[ROW_NUMBER] BETWEEN @p2 + 1 AND @p2 + @p3{0}" +
|
||||
"ORDER BY [t1].[ROW_NUMBER]",
|
||||
Environment.NewLine, firstName, lastName, skip, take);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Count()
|
||||
{
|
||||
var oldLog = Context.Log;
|
||||
var log = new StringWriter();
|
||||
try
|
||||
{
|
||||
Context.Log = log;
|
||||
(from p in Context.GetTable<Person>()
|
||||
orderby p.LastName
|
||||
select p)
|
||||
.Count();
|
||||
}
|
||||
catch (NotSupportedException)
|
||||
{
|
||||
Console.WriteLine("# logfile=\n{0}", log.ToString());
|
||||
var expected = string.Format("SELECT COUNT(*) AS [value]{0}" +
|
||||
"FROM [people] AS [t0]{0}" +
|
||||
"--",
|
||||
Environment.NewLine);
|
||||
StringAssert.Contains (expected, log.ToString());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Assert.Fail("# ExecuteCommand: Got exception {0}", e.ToString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
Context.Log = oldLog;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,118 +1,118 @@
|
||||
#region MIT license
|
||||
//
|
||||
// MIT license
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
#if MONO_STRICT
|
||||
using System.Data.Linq;
|
||||
#else
|
||||
using DbLinq.Data.Linq;
|
||||
#endif
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using DbLinq.Null;
|
||||
|
||||
namespace DbLinqTest
|
||||
{
|
||||
[TestFixture]
|
||||
public class TableTest
|
||||
{
|
||||
Table<Person> people;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
people = new DataContext(new NullConnection() { ConnectionString = "" })
|
||||
.GetTable<Person>();
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
people = null;
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void Attach_EntityNull()
|
||||
{
|
||||
people.Attach(null);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void AttachAll_EntitiesNull()
|
||||
{
|
||||
IEnumerable<Person> entities = null;
|
||||
people.AttachAll(entities);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void DeleteAllOnSubmit_EntitiesNull()
|
||||
{
|
||||
IEnumerable<Person> entities = null;
|
||||
people.DeleteAllOnSubmit(entities);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void DeleteOnSubmit_EntityNull()
|
||||
{
|
||||
people.DeleteOnSubmit(null);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void GetModifiedMembers_EntityNull()
|
||||
{
|
||||
people.GetModifiedMembers(null);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void GetOriginalEntityState_EntityNull()
|
||||
{
|
||||
people.GetOriginalEntityState(null);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void InsertAllOnSubmit_EntitiesNull()
|
||||
{
|
||||
IEnumerable<Person> entities = null;
|
||||
people.InsertAllOnSubmit(entities);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void InsertOnSubmit_EntityNull()
|
||||
{
|
||||
people.InsertOnSubmit(null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public new void ToString()
|
||||
{
|
||||
Assert.AreEqual("Table(Person)", people.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
#region MIT license
|
||||
//
|
||||
// MIT license
|
||||
//
|
||||
// Copyright (c) 2009 Novell, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
#if MONO_STRICT
|
||||
using System.Data.Linq;
|
||||
#else
|
||||
using DbLinq.Data.Linq;
|
||||
#endif
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using DbLinq.Null;
|
||||
|
||||
namespace DbLinqTest
|
||||
{
|
||||
[TestFixture]
|
||||
public class TableTest
|
||||
{
|
||||
Table<Person> people;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
people = new DataContext(new NullConnection() { ConnectionString = "" })
|
||||
.GetTable<Person>();
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
people = null;
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void Attach_EntityNull()
|
||||
{
|
||||
people.Attach(null);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void AttachAll_EntitiesNull()
|
||||
{
|
||||
IEnumerable<Person> entities = null;
|
||||
people.AttachAll(entities);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void DeleteAllOnSubmit_EntitiesNull()
|
||||
{
|
||||
IEnumerable<Person> entities = null;
|
||||
people.DeleteAllOnSubmit(entities);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void DeleteOnSubmit_EntityNull()
|
||||
{
|
||||
people.DeleteOnSubmit(null);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void GetModifiedMembers_EntityNull()
|
||||
{
|
||||
people.GetModifiedMembers(null);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void GetOriginalEntityState_EntityNull()
|
||||
{
|
||||
people.GetOriginalEntityState(null);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void InsertAllOnSubmit_EntitiesNull()
|
||||
{
|
||||
IEnumerable<Person> entities = null;
|
||||
people.InsertAllOnSubmit(entities);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
public void InsertOnSubmit_EntityNull()
|
||||
{
|
||||
people.InsertOnSubmit(null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public new void ToString()
|
||||
{
|
||||
Assert.AreEqual("Table(Person)", people.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
# note that databaserver can be specified in %DbLinqServer%, and is localhost by default (if not specified)
|
||||
#/code=..\examples\DbLinq.FbSql.Example\nwind\Northwind.cs /provider=Firebird /database="c:\program files\Firebird\Firebird_2_1\examples\nwind\Northwind.FDB"
|
||||
/code=..\examples\DbLinq.SQLite.Example\nwind\Northwind.cs /provider=Sqlite /conn="data source=Northwind.db3"
|
||||
/code=..\examples\DbLinq.Ora.Example\nwind\Northwind.cs /provider=Oracle /user=Northwind
|
||||
/code=..\examples\DbLinq.Pgsql.Example\nwind\Northwind.cs /provider=PostgreSQL
|
||||
#/code=..\examples\DbLinq.Ingres.Example\nwind\Northwind.cs /provider=Ingres
|
||||
/code=..\examples\DbLinq.MySql.Example\nwind\Northwind.cs /provider=MySQL
|
||||
@@ -1,57 +0,0 @@
|
||||
#region MIT license
|
||||
//
|
||||
// MIT license
|
||||
//
|
||||
// Copyright (c) 2007-2008 Jiri Moudry, Pascal Craponne
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
using System.Data;
|
||||
|
||||
#if MONO_STRICT
|
||||
using System.Data.Linq;
|
||||
#else
|
||||
using DbLinq.Data.Linq;
|
||||
#endif
|
||||
|
||||
namespace DbLinq.Firebird
|
||||
{
|
||||
#if !MONO_STRICT
|
||||
public
|
||||
#endif
|
||||
class FirebirdDataContext : DataContext
|
||||
{
|
||||
#if FIREBIRDSQL_IS_REFERENCED
|
||||
public FbDataContext(string connStr)
|
||||
: base(new global::FirebirdSql.Data.FirebirdClient.FbConnection(connStr), new FbVendor())
|
||||
{
|
||||
}
|
||||
#endif
|
||||
public FirebirdDataContext(IDbConnection conn)
|
||||
#if MONO_STRICT
|
||||
: base(conn)
|
||||
#else
|
||||
: base(conn, new FirebirdVendor())
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using DbLinq.Data.Linq.Sugar.Expressions;
|
||||
|
||||
namespace DbLinq.Firebird
|
||||
{
|
||||
class FirebirdExpressionTranslator : ExpressionTranslator
|
||||
{
|
||||
public override SelectExpression OuterExpression(SelectExpression e)
|
||||
{
|
||||
// Check for (from f in foo orderby f.Field select f).Count() trees
|
||||
// Firebird doesn't support 'ORDER BY' for 'SELECT COUNT(*)'.
|
||||
if (e.Operands.Select(o => o as SpecialExpression)
|
||||
.Where(o => o != null)
|
||||
.Where(s => s.SpecialNodeType == SpecialExpressionType.Count)
|
||||
.Any())
|
||||
{
|
||||
e.OrderBy.Clear();
|
||||
}
|
||||
return e;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
#region MIT license
|
||||
//
|
||||
// MIT license
|
||||
//
|
||||
// Copyright (c) 2007-2008 Jiri Moudry, Pascal Craponne
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using DbLinq.Util;
|
||||
using DbLinq.Vendor;
|
||||
|
||||
namespace DbLinq.Firebird
|
||||
{
|
||||
partial class FirebirdSchemaLoader
|
||||
{
|
||||
protected virtual IDataTableColumn ReadColumn(IDataReader rdr)
|
||||
{
|
||||
var column = new DataTableColumn();
|
||||
int field = 0;
|
||||
column.TableSchema = rdr.GetAsString(field++);
|
||||
column.TableName = rdr.GetAsString(field++).Trim();
|
||||
column.ColumnName = rdr.GetAsString(field++).Trim();
|
||||
column.Nullable = rdr.GetAsBool(field++);
|
||||
column.SqlType = rdr.GetAsString(field++).Trim();
|
||||
column.Generated = rdr.GetAsBool(field++);
|
||||
//column.Unsigned = column.FullType.Contains("unsigned");
|
||||
column.PrimaryKey = rdr.GetAsBool(field++);
|
||||
column.Length = rdr.GetAsNullableNumeric<long>(field++);
|
||||
column.Precision = rdr.GetAsNullableNumeric<int>(field++);
|
||||
column.Scale = rdr.GetAsNullableNumeric<int>(field++);
|
||||
column.DefaultValue = rdr.GetAsString(field++);
|
||||
FormatFullType(column);
|
||||
return column;
|
||||
}
|
||||
|
||||
private void FormatFullType(DataTableColumn column)
|
||||
{
|
||||
// TODO: Implement.
|
||||
}
|
||||
|
||||
protected override IList<IDataTableColumn> ReadColumns(IDbConnection connectionString, string databaseName)
|
||||
{
|
||||
const string sql = @"
|
||||
select 'Foo' ""TableSchema""
|
||||
, rf.RDB$RELATION_NAME ""TableName""
|
||||
, rf.RDB$FIELD_NAME ""ColumnName""
|
||||
, case when rf.RDB$NULL_FLAG is null then 1 else 0 end ""Nullable""
|
||||
, t.RDB$TYPE_NAME ""Type""
|
||||
, case when f.RDB$COMPUTED_SOURCE is null then 0 else 1 end ""Generated""
|
||||
, case when exists(select *
|
||||
from RDB$RELATION_CONSTRAINTS rc
|
||||
inner join RDB$INDEX_SEGMENTS xs on xs.RDB$INDEX_NAME = rc.RDB$INDEX_NAME
|
||||
where rc.RDB$RELATION_NAME = rf.RDB$RELATION_NAME and xs.RDB$FIELD_NAME = rf.RDB$FIELD_NAME
|
||||
and rc.RDB$CONSTRAINT_TYPE = 'PRIMARY KEY') then 1 else 0 end ""PrimaryKey""
|
||||
, f.RDB$FIELD_LENGTH ""Length""
|
||||
, f.RDB$FIELD_PRECISION ""Precision""
|
||||
, f.RDB$FIELD_SCALE ""Scale""
|
||||
, rf.RDB$DEFAULT_VALUE ""DefaultValue""
|
||||
from RDB$RELATION_FIELDS rf
|
||||
inner join RDB$FIELDS f on f.RDB$FIELD_NAME = rf.RDB$FIELD_SOURCE
|
||||
inner join RDB$TYPES t on t.RDB$TYPE = f.RDB$FIELD_TYPE and t.RDB$FIELD_NAME = 'RDB$FIELD_TYPE'
|
||||
where rf.RDB$SYSTEM_FLAG = 0
|
||||
order by rf.RDB$RELATION_NAME, rf.RDB$FIELD_POSITION
|
||||
";
|
||||
|
||||
return DataCommand.Find<IDataTableColumn>(connectionString, sql, "@db", databaseName, ReadColumn);
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user