Author: antonello
Date: 2007-03-24 22:48:09 -0500 (Sat, 24 Mar 2007)
New Revision: 74949
Added:
trunk/olive/class/System.Data.Linq/System.Data.Linq/ChangeConflictCollection.cs
trunk/olive/class/System.Data.Linq/System.Data.Linq/ChangeConflictException.cs
trunk/olive/class/System.Data.Linq/System.Data.Linq/CompiledQuery.cs
trunk/olive/class/System.Data.Linq/System.Data.Linq/ForeignKeyReferenceAlreadyHasValueException.cs
trunk/olive/class/System.Data.Linq/System.Data.Linq/FunctionAttribute.cs
trunk/olive/class/System.Data.Linq/System.Data.Linq/ITable.cs
trunk/olive/class/System.Data.Linq/System.Data.Linq/MemberChangeConflict.cs
trunk/olive/class/System.Data.Linq/System.Data.Linq/ObjectChangeConflict.cs
trunk/olive/class/System.Data.Linq/System.Data.Linq/ParameterAttribute.cs
trunk/olive/class/System.Data.Linq/System.Data.Linq/ProviderAttribute.cs
trunk/olive/class/System.Data.Linq/System.Data.Linq/ResultTypeAttribute.cs
trunk/olive/class/System.Data.Linq/System.Data.Linq/Schema.cs
trunk/olive/class/System.Data.Linq/System.Data.Linq/StoredProcedureAttribute.cs
trunk/olive/class/System.Data.Linq/System.Data.Linq/TableAttribute.cs
trunk/olive/class/System.Data.Linq/System.Data.Linq/Table_T.cs
Modified:
trunk/olive/class/System.Data.Linq/System.Data.Linq.Provider/MetaTable.cs
trunk/olive/class/System.Data.Linq/System.Data.Linq.dll.sources
Log:
System.Data.Linq implementations.
Added:
trunk/olive/class/System.Data.Linq/System.Data.Linq/ChangeConflictCollection.cs
===================================================================
---
trunk/olive/class/System.Data.Linq/System.Data.Linq/ChangeConflictCollection.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++
trunk/olive/class/System.Data.Linq/System.Data.Linq/ChangeConflictCollection.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -0,0 +1,100 @@
+using System.Collections;
+using System.Collections.Generic;
+
+namespace System.Data.Linq
+{
+ public sealed class ChangeConflictCollection :
ICollection<ObjectChangeConflict>, ICollection
+ {
+ #region .ctor
+ internal ChangeConflictCollection()
+ {
+ list = new List<ObjectChangeConflict>();
+ }
+ #endregion
+
+ #region Fields
+ private List<ObjectChangeConflict> list;
+ #endregion
+
+ #region Properties
+
+ public int Count
+ {
+ get { return list.Count; }
+ }
+
+ public ObjectChangeConflict this[int index]
+ {
+ get { return list[index]; }
+ }
+
+ #endregion
+
+ #region ICollection<ObjectChangeConflict> Implementations
+ bool ICollection<ObjectChangeConflict>.IsReadOnly
+ {
+ get { return true; }
+ }
+
+ void ICollection<ObjectChangeConflict>.Add(ObjectChangeConflict item)
+ {
+ throw new NotSupportedException();
+ }
+
+ void ICollection.CopyTo(Array array, int index)
+ {
+ CopyTo((ObjectChangeConflict[])array, index);
+ }
+ #endregion
+
+ #region IEnumerable Implementations
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return list.GetEnumerator();
+ }
+
+ #endregion
+
+ #region ICollection Implementations
+ bool ICollection.IsSynchronized
+ {
+ get { return false; }
+ }
+
+ object ICollection.SyncRoot
+ {
+ get { return null; }
+ }
+ #endregion
+
+ #region Public Methods
+
+ public void Clear()
+ {
+ list.Clear();
+ }
+
+ public bool Contains(ObjectChangeConflict item)
+ {
+ return list.Contains(item);
+ }
+
+ public void CopyTo(ObjectChangeConflict[] array, int arrayIndex)
+ {
+ list.CopyTo(array, arrayIndex);
+ }
+
+ public bool Remove(ObjectChangeConflict item)
+ {
+ return list.Remove(item);
+ }
+
+ public IEnumerator<ObjectChangeConflict> GetEnumerator()
+ {
+ return list.GetEnumerator();
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
Added:
trunk/olive/class/System.Data.Linq/System.Data.Linq/ChangeConflictException.cs
===================================================================
---
trunk/olive/class/System.Data.Linq/System.Data.Linq/ChangeConflictException.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++
trunk/olive/class/System.Data.Linq/System.Data.Linq/ChangeConflictException.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -0,0 +1,19 @@
+namespace System.Data.Linq
+{
+ public class ChangeConflictException : Exception
+ {
+ public ChangeConflictException()
+ {
+ }
+
+ public ChangeConflictException(string message)
+ : base(message)
+ {
+ }
+
+ public ChangeConflictException(string message, Exception
innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
\ No newline at end of file
Added: trunk/olive/class/System.Data.Linq/System.Data.Linq/CompiledQuery.cs
===================================================================
--- trunk/olive/class/System.Data.Linq/System.Data.Linq/CompiledQuery.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++ trunk/olive/class/System.Data.Linq/System.Data.Linq/CompiledQuery.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -0,0 +1,61 @@
+// 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
+//
+// Authors:
+// Antonello Provenzano <[EMAIL PROTECTED]>
+//
+
+using System.Linq;
+using System.Linq.Expressions;
+
+namespace System.Data.Linq
+{
+ public sealed class CompiledQuery
+ {
+ #region Fields
+ private LambdaExpression expression;
+ #endregion
+
+ #region Properties
+ public LambdaExpression Expression
+ {
+ get { return expression; }
+ }
+ #endregion
+
+ public static Func<TArg0, TResult> Compile<TArg0,
TResult>(Expression<Func<TArg0, TResult>> query) where TArg0 : DataContext
+ {
+ throw new NotImplementedException();
+ }
+
+ public static Func<TArg0, TArg1, TResult> Compile<TArg0, TArg1,
TResult>(Expression<Func<TArg0, TArg1, TResult>> query) where TArg0 :
DataContext
+ {
+ throw new NotImplementedException();
+ }
+
+ public static Func<TArg0, TArg1, TArg2, TResult> Compile<TArg0, TArg1,
TArg2, TResult>(Expression<Func<TArg0, TArg1, TArg2, TResult>> query) where
TArg0 : DataContext
+ {
+ throw new NotImplementedException();
+ }
+
+ public static Func<TArg0, TArg1, TArg2, TArg3, TResult> Compile<TArg0,
TArg1, TArg2, TArg3, TResult>(Expression<Func<TArg0, TArg1, TArg2, TArg3,
TResult>> query) where TArg0 : DataContext
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
\ No newline at end of file
Added:
trunk/olive/class/System.Data.Linq/System.Data.Linq/ForeignKeyReferenceAlreadyHasValueException.cs
===================================================================
---
trunk/olive/class/System.Data.Linq/System.Data.Linq/ForeignKeyReferenceAlreadyHasValueException.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++
trunk/olive/class/System.Data.Linq/System.Data.Linq/ForeignKeyReferenceAlreadyHasValueException.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -0,0 +1,41 @@
+// 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
+//
+// Authors:
+// Antonello Provenzano <[EMAIL PROTECTED]>
+//
+
+namespace System.Data.Linq
+{
+ public class ForeignKeyReferenceAlreadyHasValueException :
InvalidOperationException
+ {
+ public ForeignKeyReferenceAlreadyHasValueException()
+ {
+ }
+
+ public ForeignKeyReferenceAlreadyHasValueException(string message)
+ : base(message)
+ {
+ }
+
+ public ForeignKeyReferenceAlreadyHasValueException(string message,
Exception innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
\ No newline at end of file
Added: trunk/olive/class/System.Data.Linq/System.Data.Linq/FunctionAttribute.cs
===================================================================
--- trunk/olive/class/System.Data.Linq/System.Data.Linq/FunctionAttribute.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++ trunk/olive/class/System.Data.Linq/System.Data.Linq/FunctionAttribute.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -0,0 +1,46 @@
+// 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
+//
+// Authors:
+// Antonello Provenzano <[EMAIL PROTECTED]>
+//
+
+namespace System.Data.Linq
+{
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
+ public sealed class FunctionAttribute : Attribute
+ {
+ #region .ctor
+ public FunctionAttribute()
+ {
+ }
+ #endregion
+
+ #region Fields
+ private string name;
+ #endregion
+
+ #region Properties
+ public string Name
+ {
+ get { return name; }
+ set { name = value; }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
Added: trunk/olive/class/System.Data.Linq/System.Data.Linq/ITable.cs
===================================================================
--- trunk/olive/class/System.Data.Linq/System.Data.Linq/ITable.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++ trunk/olive/class/System.Data.Linq/System.Data.Linq/ITable.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -0,0 +1,36 @@
+// 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
+//
+// Authors:
+// Antonello Provenzano <[EMAIL PROTECTED]>
+//
+
+using System.Collections;
+using System.Linq;
+
+namespace System.Data.Linq
+{
+ public interface ITable : IQueryable, IEnumerable
+ {
+ DataContext Context { get; }
+
+ string Name { get; }
+
+ Type RowType { get; }
+ }
+}
\ No newline at end of file
Added:
trunk/olive/class/System.Data.Linq/System.Data.Linq/MemberChangeConflict.cs
===================================================================
--- trunk/olive/class/System.Data.Linq/System.Data.Linq/MemberChangeConflict.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++ trunk/olive/class/System.Data.Linq/System.Data.Linq/MemberChangeConflict.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -0,0 +1,93 @@
+// 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
+//
+// Authors:
+// Antonello Provenzano <[EMAIL PROTECTED]>
+//
+
+using System.Reflection;
+
+namespace System.Data.Linq
+{
+ public sealed class MemberChangeConflict
+ {
+ #region .ctor
+ internal MemberChangeConflict()
+ {
+ }
+ #endregion
+
+ #region Fields
+ private object currentValue;
+ private object databaseValue;
+ private bool resolved;
+ private bool modified;
+ private object originalValue;
+ #endregion
+
+ #region Properties
+ //TODO:
+ public object CurrentValue
+ {
+ get { return currentValue; }
+ }
+
+ //TODO:
+ public object DatabaseValue
+ {
+ get { return databaseValue; }
+ }
+
+ //TODO:
+ public bool IsModified
+ {
+ get { return modified; }
+ }
+
+ //TODO:
+ public bool IsResolved
+ {
+ get { return resolved; }
+ }
+
+ //TODO:
+ public MemberInfo Member
+ {
+ get { return null; }
+ }
+
+ //TODO:
+ public object OriginalValue
+ {
+ get { return originalValue; }
+ }
+ #endregion
+
+ #region Public Methods
+ public void Resolve(RefreshMode refreshMode)
+ {
+ //TODO:
+ }
+
+ public void Resolve(object value)
+ {
+ //TODO:
+ }
+ #endregion
+ }
+}
\ No newline at end of file
Added:
trunk/olive/class/System.Data.Linq/System.Data.Linq/ObjectChangeConflict.cs
===================================================================
--- trunk/olive/class/System.Data.Linq/System.Data.Linq/ObjectChangeConflict.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++ trunk/olive/class/System.Data.Linq/System.Data.Linq/ObjectChangeConflict.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -0,0 +1,84 @@
+// 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
+//
+// Authors:
+// Antonello Provenzano <[EMAIL PROTECTED]>
+//
+
+using System.Collections.ObjectModel;
+
+namespace System.Data.Linq
+{
+ public sealed class ObjectChangeConflict
+ {
+ #region Fields
+ private bool deleted;
+ private bool resolved;
+ #endregion
+
+ #region Properties
+ //TODO:
+ public bool IsDeleted
+ {
+ get { return deleted; }
+ }
+
+ //TODO:
+ public bool IsResolved
+ {
+ get { return resolved; }
+ }
+
+ //TODO:
+ public ReadOnlyCollection<MemberChangeConflict> MemberConflicts
+ {
+ get { return null; }
+ }
+
+ //TODO:
+ public object Object
+ {
+ get { return null; }
+ }
+
+ //TODO:
+ public ITable Table
+ {
+ get { return null; }
+ }
+ #endregion
+
+ #region Public Methods
+ public void Resolve()
+ {
+ //TODO: check this...
+ Resolve(RefreshMode.KeepCurrentValues, true);
+ }
+
+ public void Resolve(RefreshMode refreshMode)
+ {
+ Resolve(refreshMode, false);
+ }
+
+ public void Resolve(RefreshMode refreshMode, bool autoResolveDeletes)
+ {
+ //TODO:
+ }
+ #endregion
+ }
+}
\ No newline at end of file
Added: trunk/olive/class/System.Data.Linq/System.Data.Linq/ParameterAttribute.cs
===================================================================
--- trunk/olive/class/System.Data.Linq/System.Data.Linq/ParameterAttribute.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++ trunk/olive/class/System.Data.Linq/System.Data.Linq/ParameterAttribute.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -0,0 +1,53 @@
+// 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
+//
+// Authors:
+// Antonello Provenzano <[EMAIL PROTECTED]>
+//
+
+namespace System.Data.Linq
+{
+ [AttributeUsage(AttributeTargets.ReturnValue | AttributeTargets.Parameter,
AllowMultiple = false)]
+ public sealed class ParameterAttribute : Attribute
+ {
+ #region .ctor
+ public ParameterAttribute()
+ {
+ }
+ #endregion
+
+ #region Fields
+ private string dbType;
+ private string name;
+ #endregion
+
+ #region Properties
+ public string DBType
+ {
+ get { return dbType; }
+ set { dbType = value; }
+ }
+
+ public string Name
+ {
+ get { return name; }
+ set { name = value; }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
Added: trunk/olive/class/System.Data.Linq/System.Data.Linq/ProviderAttribute.cs
===================================================================
--- trunk/olive/class/System.Data.Linq/System.Data.Linq/ProviderAttribute.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++ trunk/olive/class/System.Data.Linq/System.Data.Linq/ProviderAttribute.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -0,0 +1,50 @@
+// 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
+//
+// Authors:
+// Antonello Provenzano <[EMAIL PROTECTED]>
+//
+
+namespace System.Data.Linq
+{
+ [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
+ public sealed class ProviderAttribute : Attribute
+ {
+ #region .ctor
+ public ProviderAttribute()
+ {
+ }
+
+ public ProviderAttribute(Type type)
+ {
+ this.type = type;
+ }
+ #endregion
+
+ #region Fields
+ private Type type;
+ #endregion
+
+ #region Properties
+ public Type Type
+ {
+ get { return type; }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
Added:
trunk/olive/class/System.Data.Linq/System.Data.Linq/ResultTypeAttribute.cs
===================================================================
--- trunk/olive/class/System.Data.Linq/System.Data.Linq/ResultTypeAttribute.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++ trunk/olive/class/System.Data.Linq/System.Data.Linq/ResultTypeAttribute.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -0,0 +1,46 @@
+// 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
+//
+// Authors:
+// Antonello Provenzano <[EMAIL PROTECTED]>
+//
+
+namespace System.Data.Linq
+{
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
+ public sealed class ResultTypeAttribute : Attribute
+ {
+ #region .ctor
+ public ResultTypeAttribute(Type type)
+ {
+ this.type = type;
+ }
+ #endregion
+
+ #region Fields
+ private Type type;
+ #endregion
+
+ #region Properties
+ public Type Type
+ {
+ get { return type; }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
Added: trunk/olive/class/System.Data.Linq/System.Data.Linq/Schema.cs
===================================================================
--- trunk/olive/class/System.Data.Linq/System.Data.Linq/Schema.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++ trunk/olive/class/System.Data.Linq/System.Data.Linq/Schema.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -0,0 +1,68 @@
+// 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
+//
+// Authors:
+// Antonello Provenzano <[EMAIL PROTECTED]>
+//
+
+using System.Data.Linq.Provider;
+using System.Reflection;
+
+namespace System.Data.Linq
+{
+ public abstract class Schema
+ {
+ protected Schema(DataContext context)
+ {
+ if (context == null)
+ throw new ArgumentNullException("context");
+ this.context = context;
+ }
+
+ #region Fields
+ private DataContext context;
+ #endregion
+
+ #region Properties
+ public DataContext Context
+ {
+ get { return context; }
+ }
+ #endregion
+
+ #region Protected Methods
+ protected IExecuteResults ExecuteMethodCall(object instance,
MethodInfo methodInfo, params object[] parameters)
+ {
+ //TODO:
+ throw new NotImplementedException();
+ }
+
+ protected IQueryResults<T> ExecuteMethodCall<T>(object instance,
MethodInfo methodInfo, params object[] parameters)
+ {
+ //TODO:
+ throw new NotImplementedException();
+ }
+
+ protected IMultipleResults ExecuteMethodCallWithMultipleResults(object
instance, MethodInfo methodInfo, params object[] parameters)
+ {
+ //TODO:
+ throw new NotImplementedException();
+ }
+ #endregion
+ }
+}
\ No newline at end of file
Added:
trunk/olive/class/System.Data.Linq/System.Data.Linq/StoredProcedureAttribute.cs
===================================================================
---
trunk/olive/class/System.Data.Linq/System.Data.Linq/StoredProcedureAttribute.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++
trunk/olive/class/System.Data.Linq/System.Data.Linq/StoredProcedureAttribute.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -0,0 +1,24 @@
+namespace System.Data.Linq
+{
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
+ public sealed class StoredProcedureAttribute : Attribute
+ {
+ #region .ctor
+ public StoredProcedureAttribute()
+ {
+ }
+ #endregion
+
+ #region Fields
+ private string name;
+ #endregion
+
+ #region Properties
+ public string Name
+ {
+ get { return name; }
+ set { name = value; }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
Added: trunk/olive/class/System.Data.Linq/System.Data.Linq/TableAttribute.cs
===================================================================
--- trunk/olive/class/System.Data.Linq/System.Data.Linq/TableAttribute.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++ trunk/olive/class/System.Data.Linq/System.Data.Linq/TableAttribute.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -0,0 +1,46 @@
+// 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
+//
+// Authors:
+// Antonello Provenzano <[EMAIL PROTECTED]>
+//
+
+namespace System.Data.Linq
+{
+ [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
+ public sealed class TableAttribute : Attribute
+ {
+ #region .ctor
+ public TableAttribute()
+ {
+ }
+ #endregion
+
+ #region Fields
+ private string name;
+ #endregion
+
+ #region Properties
+ public string Name
+ {
+ get { return name; }
+ set { name = value; }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
Added: trunk/olive/class/System.Data.Linq/System.Data.Linq/Table_T.cs
===================================================================
--- trunk/olive/class/System.Data.Linq/System.Data.Linq/Table_T.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++ trunk/olive/class/System.Data.Linq/System.Data.Linq/Table_T.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -0,0 +1,169 @@
+// 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
+//
+// Authors:
+// Antonello Provenzano <[EMAIL PROTECTED]>
+//
+
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data.Linq.Provider;
+using System.Linq;
+using System.Linq.Expressions;
+
+namespace System.Data.Linq
+{
+ public sealed class Table<T> : IQueryable<T>, IEnumerable<T>, ITable,
IQueryable, IEnumerable, IListSource
+ {
+ #region .ctor
+ public Table(DataContext context, MetaTable metaTable)
+ {
+ this.context = context;
+ this.metaTable = metaTable;
+ }
+ #endregion
+
+ #region Fields
+ private DataContext context;
+ private MetaTable metaTable;
+ #endregion
+
+ #region Properties
+ public DataContext Context
+ {
+ get { return context; }
+ }
+
+ //TODO:
+ public bool IsReadOnly
+ {
+ get { return false; }
+ }
+
+ //TODO: check this... is this right?
+ public string Name {
+ get { return metaTable.TableName; }
+ }
+
+ //TODO: check this... is this right?
+ public Type RowType
+ {
+ get { return typeof(T); }
+ }
+ #endregion
+
+ #region IListSource Implementations
+ bool IListSource.ContainsListCollection
+ {
+ get { return false; }
+ }
+
+ IList IListSource.GetList()
+ {
+ //TODO:
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region IQueryable Implementations
+ //TODO: check this... is this right?
+ Type IQueryable.ElementType
+ {
+ get { return typeof(T); }
+ }
+
+ //TODO:
+ Expression IQueryable.Expression
+ {
+ get { return null; }
+ }
+
+ IQueryable IQueryable.CreateQuery(Expression expression)
+ {
+ if (expression == null)
+ throw new ArgumentNullException("expression");
+
+ //TODO:
+ throw new NotImplementedException();
+ }
+
+ IQueryable<S> IQueryable<T>.CreateQuery<S>(Expression expression)
+ {
+ //TODO:
+ throw new NotImplementedException();
+ }
+
+ S IQueryable<T>.Execute<S>(Expression expression)
+ {
+ //TODO:
+ throw new NotImplementedException();
+ }
+
+ object IQueryable.Execute(Expression expression)
+ {
+ //TODO:
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region ICollection Implementations
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return this.GetEnumerator();
+ }
+ #endregion
+
+ #region Public Methods
+ public void Add(T item)
+ {
+ //TODO:
+ throw new NotImplementedException();
+ }
+
+ public void Attach(T item)
+ {
+ //TODO:
+ throw new NotImplementedException();
+ }
+
+ public IEnumerator<T> GetEnumerator()
+ {
+ //TODO:
+ throw new NotImplementedException();
+ }
+
+ public void Remove(T item)
+ {
+ //TODO:
+ throw new NotImplementedException();
+ }
+
+ public void RemoveAll(IEnumerable<T> items)
+ {
+ //TODO:
+ throw new NotImplementedException();
+ }
+
+ public override string ToString()
+ {
+ return Name;
+ }
+ #endregion
+ }
+}
\ No newline at end of file
Modified:
trunk/olive/class/System.Data.Linq/System.Data.Linq.Provider/MetaTable.cs
===================================================================
--- trunk/olive/class/System.Data.Linq/System.Data.Linq.Provider/MetaTable.cs
2007-03-25 01:10:12 UTC (rev 74948)
+++ trunk/olive/class/System.Data.Linq/System.Data.Linq.Provider/MetaTable.cs
2007-03-25 03:48:09 UTC (rev 74949)
@@ -20,9 +20,22 @@
// Antonello Provenzano <[EMAIL PROTECTED]>
//
-namespace System.Data.Linq
+namespace System.Data.Linq.Provider
{
public abstract class MetaTable
{
+ #region .ctor
+ protected MetaTable()
+ {
+ }
+ #endregion
+
+ #region Properties
+ public abstract MetaModel Model { get; }
+
+ public abstract MetaType RowType { get; }
+
+ public abstract string TableName { get; }
+ #endregion
}
}
\ No newline at end of file
Modified: trunk/olive/class/System.Data.Linq/System.Data.Linq.dll.sources
===================================================================
--- trunk/olive/class/System.Data.Linq/System.Data.Linq.dll.sources
2007-03-25 01:10:12 UTC (rev 74948)
+++ trunk/olive/class/System.Data.Linq/System.Data.Linq.dll.sources
2007-03-25 03:48:09 UTC (rev 74949)
@@ -4,15 +4,29 @@
System.Data.Linq/AttributeMappingSource.cs
System.Data.Linq/AutoSyn.cs
System.Data.Linq/Binary.cs
+System.Data.Linq/ChangeConflictCollection.cs
+System.Data.Linq/ChangeConflictException.cs
System.Data.Linq/ColumnAttribute.cs
System.Data.Linq/ConflictMode.cs
System.Data.Linq/DataAttribute.cs
System.Data.Linq/DatabaseAttribute.cs
System.Data.Linq/DataContext.cs
System.Data.Linq/DuplicateKeyException.cs
+Systen.Data.Linq/ForeignKeyReferenceAlreadyHasValueException.cs
+System.Data.Linq/FunctionAttribute.cs
+System.Data.Linq/ITable.cs
System.Data.Linq/Link_T.cs
System.Data.Linq/MappingSource.cs
+System.Data.Linq/MemberChangeConflict.cs
+System.Data.Linq/ObjectChangeConflict.cs
+System.Data.Linq/ParameterAttribute.cs
+System.Data.Linq/ProviderAttribute.cs
System.Data.Linq/RefreshMode.cs
+System.Data.Linq/ResultTypeAttribute.cs
+System.Data.Linq/Schema.cs
+System.Data.Linq/StoredProcedureAttribute.cs
+System.Data.Linq/Table_T.cs
+System.Data.Linq/TableAttribute.cs
System.Data.Linq/UpdateCheck.cs
System.Data.Linq.Provider/ICompiledQuery.cs
System.Data.Linq.Provider/IDataServices.cs
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches