Commit for development environment setup
This commit is contained in:
@@ -0,0 +1,253 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Csla.Properties;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// This is the base class from which most business objects
|
||||
/// will be derived.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// This class is the core of the CSLA .NET framework. To create
|
||||
/// a business object, inherit from this class.
|
||||
/// </para><para>
|
||||
/// Please refer to 'Expert C# 2005 Business Objects' for
|
||||
/// full details on the use of this base class to create business
|
||||
/// objects.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <typeparam name="T">Type of the business object being defined.</typeparam>
|
||||
[Serializable()]
|
||||
public abstract class BusinessBase<T> :
|
||||
Core.BusinessBase, Core.ISavable where T : BusinessBase<T>
|
||||
{
|
||||
|
||||
#region Object ID Value
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to return a unique identifying
|
||||
/// value for this object.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If you can not provide a unique identifying value, it
|
||||
/// is best if you can generate such a unique value (even
|
||||
/// temporarily). If you can not do that, then return
|
||||
/// <see langword="Nothing"/> and then manually override the
|
||||
/// <see cref="Equals"/>, <see cref="GetHashCode"/> and
|
||||
/// <see cref="ToString"/> methods in your business object.
|
||||
/// </remarks>
|
||||
protected abstract object GetIdValue();
|
||||
|
||||
#endregion
|
||||
|
||||
#region System.Object Overrides
|
||||
|
||||
/// <summary>
|
||||
/// Compares this object for equality with another object, using
|
||||
/// the results of <see cref="GetIdValue"/> to determine
|
||||
/// equality.
|
||||
/// </summary>
|
||||
/// <param name="obj">The object to be compared.</param>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is T)
|
||||
{
|
||||
object id = GetIdValue();
|
||||
if (id == null)
|
||||
throw new ArgumentException(Resources.GetIdValueCantBeNull);
|
||||
return id.Equals(((T)obj).GetIdValue());
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a hash code value for this object, based on
|
||||
/// the results of <see cref="GetIdValue"/>.
|
||||
/// </summary>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
object id = GetIdValue();
|
||||
if (id == null)
|
||||
throw new ArgumentException(Resources.GetIdValueCantBeNull);
|
||||
return id.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a text representation of this object by
|
||||
/// returning the <see cref="GetIdValue"/> value
|
||||
/// in text form.
|
||||
/// </summary>
|
||||
public override string ToString()
|
||||
{
|
||||
object id = GetIdValue();
|
||||
if (id == null)
|
||||
throw new ArgumentException(Resources.GetIdValueCantBeNull);
|
||||
return id.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Clone
|
||||
|
||||
/// <summary>
|
||||
/// Creates a clone of the object.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// A new object containing the exact data of the original object.
|
||||
/// </returns>
|
||||
public T Clone()
|
||||
{
|
||||
return (T)GetClone();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Data Access
|
||||
|
||||
/// <summary>
|
||||
/// Saves the object to the database.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Calling this method starts the save operation, causing the object
|
||||
/// to be inserted, updated or deleted within the database based on the
|
||||
/// object's current state.
|
||||
/// </para><para>
|
||||
/// If <see cref="Core.BusinessBase.IsDeleted" /> is <see langword="true"/>
|
||||
/// the object will be deleted. Otherwise, if <see cref="Core.BusinessBase.IsNew" />
|
||||
/// is <see langword="true"/> the object will be inserted.
|
||||
/// Otherwise the object's data will be updated in the database.
|
||||
/// </para><para>
|
||||
/// All this is contingent on <see cref="Core.BusinessBase.IsDirty" />. If
|
||||
/// this value is <see langword="false"/>, no data operation occurs.
|
||||
/// It is also contingent on <see cref="Core.BusinessBase.IsValid" />.
|
||||
/// If this value is <see langword="false"/> an
|
||||
/// exception will be thrown to indicate that the UI attempted to save an
|
||||
/// invalid object.
|
||||
/// </para><para>
|
||||
/// It is important to note that this method returns a new version of the
|
||||
/// business object that contains any data updated during the save operation.
|
||||
/// You MUST update all object references to use this new version of the
|
||||
/// business object in order to have access to the correct object data.
|
||||
/// </para><para>
|
||||
/// You can override this method to add your own custom behaviors to the save
|
||||
/// operation. For instance, you may add some security checks to make sure
|
||||
/// the user can save the object. If all security checks pass, you would then
|
||||
/// invoke the base Save method via <c>base.Save()</c>.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <returns>A new object containing the saved values.</returns>
|
||||
public virtual T Save()
|
||||
{
|
||||
T result;
|
||||
if (this.IsChild)
|
||||
throw new NotSupportedException(Resources.NoSaveChildException);
|
||||
if (EditLevel > 0)
|
||||
throw new Validation.ValidationException(Resources.NoSaveEditingException);
|
||||
if (!IsValid)
|
||||
throw new Validation.ValidationException(Resources.NoSaveInvalidException);
|
||||
if (IsDirty)
|
||||
result = (T)DataPortal.Update(this);
|
||||
else
|
||||
result = (T)this;
|
||||
OnSaved(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Saves the object to the database, forcing
|
||||
/// IsNew to <see langword="false"/> and IsDirty to True.
|
||||
/// </summary>
|
||||
/// <param name="forceUpdate">
|
||||
/// If <see langword="true"/>, triggers overriding IsNew and IsDirty.
|
||||
/// If <see langword="false"/> then it is the same as calling Save().
|
||||
/// </param>
|
||||
/// <returns>A new object containing the saved values.</returns>
|
||||
/// <remarks>
|
||||
/// This overload is designed for use in web applications
|
||||
/// when implementing the Update method in your
|
||||
/// data wrapper object.
|
||||
/// </remarks>
|
||||
public T Save(bool forceUpdate)
|
||||
{
|
||||
if (forceUpdate && IsNew)
|
||||
{
|
||||
// mark the object as old - which makes it
|
||||
// not dirty
|
||||
MarkOld();
|
||||
// now mark the object as dirty so it can save
|
||||
MarkDirty(true);
|
||||
}
|
||||
return this.Save();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ISavable Members
|
||||
|
||||
object Csla.Core.ISavable.Save()
|
||||
{
|
||||
return Save();
|
||||
}
|
||||
|
||||
|
||||
[NonSerialized]
|
||||
[NotUndoable]
|
||||
private EventHandler<Csla.Core.SavedEventArgs> _nonSerializableSavedHandlers;
|
||||
[NotUndoable]
|
||||
private EventHandler<Csla.Core.SavedEventArgs> _serializableSavedHandlers;
|
||||
|
||||
/// <summary>
|
||||
/// Event raised when an object has been saved.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design",
|
||||
"CA1062:ValidateArgumentsOfPublicMethods")]
|
||||
public event EventHandler<Csla.Core.SavedEventArgs> Saved
|
||||
{
|
||||
add
|
||||
{
|
||||
if (value.Method.IsPublic &&
|
||||
(value.Method.DeclaringType.IsSerializable ||
|
||||
value.Method.IsStatic))
|
||||
_serializableSavedHandlers = (EventHandler<Csla.Core.SavedEventArgs>)
|
||||
System.Delegate.Combine(_serializableSavedHandlers, value);
|
||||
else
|
||||
_nonSerializableSavedHandlers = (EventHandler<Csla.Core.SavedEventArgs>)
|
||||
System.Delegate.Combine(_nonSerializableSavedHandlers, value);
|
||||
}
|
||||
remove
|
||||
{
|
||||
if (value.Method.IsPublic &&
|
||||
(value.Method.DeclaringType.IsSerializable ||
|
||||
value.Method.IsStatic))
|
||||
_serializableSavedHandlers = (EventHandler<Csla.Core.SavedEventArgs>)
|
||||
System.Delegate.Remove(_serializableSavedHandlers, value);
|
||||
else
|
||||
_nonSerializableSavedHandlers = (EventHandler<Csla.Core.SavedEventArgs>)
|
||||
System.Delegate.Remove(_nonSerializableSavedHandlers, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raises the Saved event, indicating that the
|
||||
/// object has been saved, and providing a reference
|
||||
/// to the new object instance.
|
||||
/// </summary>
|
||||
/// <param name="newObject">The new object instance.</param>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected void OnSaved(T newObject)
|
||||
{
|
||||
Csla.Core.SavedEventArgs args = new Csla.Core.SavedEventArgs(newObject);
|
||||
if (_nonSerializableSavedHandlers != null)
|
||||
_nonSerializableSavedHandlers.Invoke(this, args);
|
||||
if (_serializableSavedHandlers != null)
|
||||
_serializableSavedHandlers.Invoke(this, args);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,767 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Csla.Properties;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
/// <summary>
|
||||
/// This is the base class from which most business collections
|
||||
/// or lists will be derived.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Type of the business object being defined.</typeparam>
|
||||
/// <typeparam name="C">Type of the child objects contained in the list.</typeparam>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage(
|
||||
"Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
|
||||
[Serializable()]
|
||||
public abstract class BusinessListBase<T, C> :
|
||||
Core.ExtendedBindingList<C>,
|
||||
Core.IEditableCollection, ICloneable, Core.ISavable, Core.IParent
|
||||
where T : BusinessListBase<T, C>
|
||||
where C : Core.IEditableBusinessObject
|
||||
{
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
protected BusinessListBase()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Initialize
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to set up event handlers so user
|
||||
/// code in a partial class can respond to events raised by
|
||||
/// generated code.
|
||||
/// </summary>
|
||||
protected virtual void Initialize()
|
||||
{ /* allows subclass to initialize events before any other activity occurs */ }
|
||||
|
||||
#endregion
|
||||
|
||||
#region IsDirty, IsValid
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this object's data has been changed.
|
||||
/// </summary>
|
||||
public bool IsDirty
|
||||
{
|
||||
get
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (C item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (C child in this)
|
||||
if (child.IsDirty)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this object is currently in
|
||||
/// a valid state (has no broken validation rules).
|
||||
/// </summary>
|
||||
public virtual bool IsValid
|
||||
{
|
||||
get
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (C child in this)
|
||||
if (!child.IsValid)
|
||||
{
|
||||
#if DEBUG
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Begin/Cancel/ApplyEdit
|
||||
|
||||
/// <summary>
|
||||
/// Starts a nested edit on the object.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// When this method is called the object takes a snapshot of
|
||||
/// its current state (the values of its variables). This snapshot
|
||||
/// can be restored by calling <see cref="CancelEdit" />
|
||||
/// or committed by calling <see cref="ApplyEdit" />.
|
||||
/// </para><para>
|
||||
/// This is a nested operation. Each call to BeginEdit adds a new
|
||||
/// snapshot of the object's state to a stack. You should ensure that
|
||||
/// for each call to BeginEdit there is a corresponding call to either
|
||||
/// CancelEdit or ApplyEdit to remove that snapshot from the stack.
|
||||
/// </para><para>
|
||||
/// See Chapters 2 and 3 for details on n-level undo and state stacking.
|
||||
/// </para><para>
|
||||
/// This method triggers the copying of all child object states.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void BeginEdit()
|
||||
{
|
||||
if (this.IsChild)
|
||||
throw new NotSupportedException(Resources.NoBeginEditChildException);
|
||||
|
||||
CopyState();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cancels the current edit process, restoring the object's state to
|
||||
/// its previous values.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Calling this method causes the most recently taken snapshot of the
|
||||
/// object's state to be restored. This resets the object's values
|
||||
/// to the point of the last <see cref="BeginEdit" />
|
||||
/// call.
|
||||
/// <para>
|
||||
/// This method triggers an undo in all child objects.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void CancelEdit()
|
||||
{
|
||||
if (this.IsChild)
|
||||
throw new NotSupportedException(Resources.NoCancelEditChildException);
|
||||
|
||||
UndoChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Commits the current edit process.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Calling this method causes the most recently taken snapshot of the
|
||||
/// object's state to be discarded, thus committing any changes made
|
||||
/// to the object's state since the last
|
||||
/// <see cref="BeginEdit" /> call.
|
||||
/// <para>
|
||||
/// This method triggers an <see cref="Core.BusinessBase.ApplyEdit"/>
|
||||
/// in all child objects.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void ApplyEdit()
|
||||
{
|
||||
if (this.IsChild)
|
||||
throw new NotSupportedException(Resources.NoApplyEditChildException);
|
||||
|
||||
AcceptChanges();
|
||||
}
|
||||
|
||||
void Core.IParent.ApplyEditChild(Core.IEditableBusinessObject child)
|
||||
{
|
||||
EditChildComplete(child);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to be notified when a child object's
|
||||
/// <see cref="Core.BusinessBase.ApplyEdit" /> method has
|
||||
/// completed.
|
||||
/// </summary>
|
||||
/// <param name="child">The child object that was edited.</param>
|
||||
protected virtual void EditChildComplete(Core.IEditableBusinessObject child)
|
||||
{
|
||||
|
||||
// do nothing, we don't really care
|
||||
// when a child has its edits applied
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region N-level undo
|
||||
|
||||
void Core.IUndoableObject.CopyState()
|
||||
{
|
||||
CopyState();
|
||||
}
|
||||
|
||||
void Core.IUndoableObject.UndoChanges()
|
||||
{
|
||||
UndoChanges();
|
||||
}
|
||||
|
||||
void Core.IUndoableObject.AcceptChanges()
|
||||
{
|
||||
AcceptChanges();
|
||||
}
|
||||
|
||||
private void CopyState()
|
||||
{
|
||||
// we are going a level deeper in editing
|
||||
_editLevel += 1;
|
||||
|
||||
// cascade the call to all child objects
|
||||
foreach (C child in this)
|
||||
child.CopyState();
|
||||
|
||||
// cascade the call to all deleted child objects
|
||||
foreach (C child in DeletedList)
|
||||
child.CopyState();
|
||||
}
|
||||
|
||||
private void UndoChanges()
|
||||
{
|
||||
C child;
|
||||
|
||||
// we are coming up one edit level
|
||||
_editLevel -= 1;
|
||||
if (_editLevel < 0) _editLevel = 0;
|
||||
|
||||
// Cancel edit on all current items
|
||||
for (int index = Count - 1; index >= 0; index--)
|
||||
{
|
||||
child = this[index];
|
||||
child.UndoChanges();
|
||||
// if item is below its point of addition, remove
|
||||
if (child.EditLevelAdded > _editLevel)
|
||||
{
|
||||
bool oldAllowRemove = this.AllowRemove;
|
||||
try
|
||||
{
|
||||
this.AllowRemove = true;
|
||||
RemoveAt(index);
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.AllowRemove = oldAllowRemove;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// cancel edit on all deleted items
|
||||
for (int index = DeletedList.Count - 1; index >= 0; index--)
|
||||
{
|
||||
child = DeletedList[index];
|
||||
child.UndoChanges();
|
||||
if (child.EditLevelAdded > _editLevel)
|
||||
{
|
||||
// if item is below its point of addition, remove
|
||||
DeletedList.RemoveAt(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
// if item is no longer deleted move back to main list
|
||||
if (!child.IsDeleted) UnDeleteChild(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AcceptChanges()
|
||||
{
|
||||
// we are coming up one edit level
|
||||
_editLevel -= 1;
|
||||
if (_editLevel < 0) _editLevel = 0;
|
||||
|
||||
// cascade the call to all child objects
|
||||
foreach (C child in this)
|
||||
{
|
||||
child.AcceptChanges();
|
||||
// if item is below its point of addition, lower point of addition
|
||||
if (child.EditLevelAdded > _editLevel) child.EditLevelAdded = _editLevel;
|
||||
}
|
||||
|
||||
// cascade the call to all deleted child objects
|
||||
for (int index = DeletedList.Count - 1; index >= 0; index--)
|
||||
{
|
||||
C child = DeletedList[index];
|
||||
child.AcceptChanges();
|
||||
// if item is below its point of addition, remove
|
||||
if (child.EditLevelAdded > _editLevel)
|
||||
DeletedList.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Delete and Undelete child
|
||||
|
||||
private List<C> _deletedList;
|
||||
|
||||
/// <summary>
|
||||
/// A collection containing all child objects marked
|
||||
/// for deletion.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage(
|
||||
"Microsoft.Design", "CA1002:DoNotExposeGenericLists")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected List<C> DeletedList
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_deletedList == null)
|
||||
_deletedList = new List<C>();
|
||||
return _deletedList;
|
||||
}
|
||||
}
|
||||
|
||||
private void DeleteChild(C child)
|
||||
{
|
||||
// mark the object as deleted
|
||||
child.DeleteChild();
|
||||
// and add it to the deleted collection for storage
|
||||
DeletedList.Add(child);
|
||||
}
|
||||
|
||||
private void UnDeleteChild(C child)
|
||||
{
|
||||
// we are inserting an _existing_ object so
|
||||
// we need to preserve the object's editleveladded value
|
||||
// because it will be changed by the normal add process
|
||||
int saveLevel = child.EditLevelAdded;
|
||||
Add(child);
|
||||
child.EditLevelAdded = saveLevel;
|
||||
|
||||
// since the object is no longer deleted, remove it from
|
||||
// the deleted collection
|
||||
DeletedList.Remove(child);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns <see langword="true"/> if the internal deleted list
|
||||
/// contains the specified child object.
|
||||
/// </summary>
|
||||
/// <param name="item">Child object to check.</param>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
public bool ContainsDeleted(C item)
|
||||
{
|
||||
return DeletedList.Contains(item);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Insert, Remove, Clear
|
||||
|
||||
/// <summary>
|
||||
/// This method is called by a child object when it
|
||||
/// wants to be removed from the collection.
|
||||
/// </summary>
|
||||
/// <param name="child">The child object to remove.</param>
|
||||
void Core.IEditableCollection.RemoveChild(Csla.Core.IEditableBusinessObject child)
|
||||
{
|
||||
Remove((C)child);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called by a child object when it
|
||||
/// wants to be removed from the collection.
|
||||
/// </summary>
|
||||
/// <param name="child">The child object to remove.</param>
|
||||
void Core.IParent.RemoveChild(Csla.Core.IEditableBusinessObject child)
|
||||
{
|
||||
Remove((C)child);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the edit level of the child object as it is added.
|
||||
/// </summary>
|
||||
/// <param name="index">Index of the item to insert.</param>
|
||||
/// <param name="item">Item to insert.</param>
|
||||
protected override void InsertItem(int index, C item)
|
||||
{
|
||||
// when an object is inserted we assume it is
|
||||
// a new object and so the edit level when it was
|
||||
// added must be set
|
||||
item.EditLevelAdded = _editLevel;
|
||||
item.SetParent(this);
|
||||
base.InsertItem(index, item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Marks the child object for deletion and moves it to
|
||||
/// the collection of deleted objects.
|
||||
/// </summary>
|
||||
/// <param name="index">Index of the item to remove.</param>
|
||||
protected override void RemoveItem(int index)
|
||||
{
|
||||
// when an object is 'removed' it is really
|
||||
// being deleted, so do the deletion work
|
||||
C child = this[index];
|
||||
base.RemoveItem(index);
|
||||
CopyToDeletedList(child);
|
||||
}
|
||||
|
||||
private void CopyToDeletedList(C child)
|
||||
{
|
||||
DeleteChild(child);
|
||||
INotifyPropertyChanged c = child as INotifyPropertyChanged;
|
||||
if (c != null)
|
||||
c.PropertyChanged -= new PropertyChangedEventHandler(Child_PropertyChanged);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears the collection, moving all active
|
||||
/// items to the deleted list.
|
||||
/// </summary>
|
||||
protected override void ClearItems()
|
||||
{
|
||||
while (base.Count > 0) RemoveItem(0);
|
||||
base.ClearItems();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces the item at the specified index with
|
||||
/// the specified item, first moving the original
|
||||
/// item to the deleted list.
|
||||
/// </summary>
|
||||
/// <param name="index">The zero-based index of the item to replace.</param>
|
||||
/// <param name="item">
|
||||
/// The new value for the item at the specified index.
|
||||
/// The value can be null for reference types.
|
||||
/// </param>
|
||||
/// <remarks></remarks>
|
||||
protected override void SetItem(int index, C item)
|
||||
{
|
||||
// copy the original object to the deleted list,
|
||||
// marking as deleted, etc.
|
||||
C child = default(C);
|
||||
if (!ReferenceEquals(this[index], item))
|
||||
child = this[index];
|
||||
// replace the original object with this new
|
||||
// object
|
||||
base.SetItem(index, item);
|
||||
if (child != null)
|
||||
CopyToDeletedList(child);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Edit level tracking
|
||||
|
||||
// keep track of how many edit levels we have
|
||||
private int _editLevel;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the current edit level of the object.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
protected int EditLevel
|
||||
{
|
||||
get { return _editLevel; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IsChild
|
||||
|
||||
[NotUndoable()]
|
||||
private bool _isChild = false;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether this collection object is a child object.
|
||||
/// </summary>
|
||||
/// <returns>True if this is a child object.</returns>
|
||||
protected bool IsChild
|
||||
{
|
||||
get { return _isChild; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Marks the object as being a child object.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// By default all business objects are 'parent' objects. This means
|
||||
/// that they can be directly retrieved and updated into the database.
|
||||
/// </para><para>
|
||||
/// We often also need child objects. These are objects which are contained
|
||||
/// within other objects. For instance, a parent Invoice object will contain
|
||||
/// child LineItem objects.
|
||||
/// </para><para>
|
||||
/// To create a child object, the MarkAsChild method must be called as the
|
||||
/// object is created. Please see Chapter 7 for details on the use of the
|
||||
/// MarkAsChild method.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
protected void MarkAsChild()
|
||||
{
|
||||
_isChild = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ICloneable
|
||||
|
||||
object ICloneable.Clone()
|
||||
{
|
||||
return GetClone();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a clone of the object.
|
||||
/// </summary>
|
||||
/// <returns>A new object containing the exact data of the original object.</returns>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual object GetClone()
|
||||
{
|
||||
return Core.ObjectCloner.Clone(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a clone of the object.
|
||||
/// </summary>
|
||||
/// <returns>A new object containing the exact data of the original object.</returns>
|
||||
public T Clone()
|
||||
{
|
||||
return (T)GetClone();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Cascade Child events
|
||||
|
||||
private void Child_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
for (int index = 0; index < Count; index++)
|
||||
{
|
||||
if (ReferenceEquals(this[index], sender))
|
||||
{
|
||||
OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, index));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Serialization Notification
|
||||
|
||||
[OnDeserialized()]
|
||||
private void OnDeserializedHandler(StreamingContext context)
|
||||
{
|
||||
OnDeserialized(context);
|
||||
foreach (Core.IEditableBusinessObject child in this)
|
||||
{
|
||||
child.SetParent(this);
|
||||
INotifyPropertyChanged c = child as INotifyPropertyChanged;
|
||||
if (c != null)
|
||||
c.PropertyChanged += new PropertyChangedEventHandler(Child_PropertyChanged);
|
||||
}
|
||||
foreach (Core.IEditableBusinessObject child in DeletedList)
|
||||
child.SetParent(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called on a newly deserialized object
|
||||
/// after deserialization is complete.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void OnDeserialized(StreamingContext context)
|
||||
{
|
||||
// do nothing - this is here so a subclass
|
||||
// could override if needed
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Data Access
|
||||
|
||||
/// <summary>
|
||||
/// Saves the object to the database.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Calling this method starts the save operation, causing the all child
|
||||
/// objects to be inserted, updated or deleted within the database based on the
|
||||
/// each object's current state.
|
||||
/// </para><para>
|
||||
/// All this is contingent on <see cref="IsDirty" />. If
|
||||
/// this value is <see langword="false"/>, no data operation occurs.
|
||||
/// It is also contingent on <see cref="IsValid" />. If this value is
|
||||
/// <see langword="false"/> an exception will be thrown to
|
||||
/// indicate that the UI attempted to save an invalid object.
|
||||
/// </para><para>
|
||||
/// It is important to note that this method returns a new version of the
|
||||
/// business collection that contains any data updated during the save operation.
|
||||
/// You MUST update all object references to use this new version of the
|
||||
/// business collection in order to have access to the correct object data.
|
||||
/// </para><para>
|
||||
/// You can override this method to add your own custom behaviors to the save
|
||||
/// operation. For instance, you may add some security checks to make sure
|
||||
/// the user can save the object. If all security checks pass, you would then
|
||||
/// invoke the base Save method via <c>MyBase.Save()</c>.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <returns>A new object containing the saved values.</returns>
|
||||
public virtual T Save()
|
||||
{
|
||||
T result;
|
||||
if (this.IsChild)
|
||||
throw new NotSupportedException(Resources.NoSaveChildException);
|
||||
|
||||
if (_editLevel > 0)
|
||||
throw new Validation.ValidationException(Resources.NoSaveEditingException);
|
||||
|
||||
if (!IsValid)
|
||||
throw new Validation.ValidationException(Resources.NoSaveInvalidException);
|
||||
|
||||
if (IsDirty)
|
||||
result = (T)DataPortal.Update(this);
|
||||
else
|
||||
result = (T)this;
|
||||
OnSaved(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to load a new business object with default
|
||||
/// values from the database.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
protected virtual void DataPortal_Create()
|
||||
{
|
||||
throw new NotSupportedException(Resources.CreateNotSupportedException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to allow retrieval of an existing business
|
||||
/// object based on data in the database.
|
||||
/// </summary>
|
||||
/// <param name="criteria">An object containing criteria values to identify the object.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
protected virtual void DataPortal_Fetch(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Resources.FetchNotSupportedException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to allow update of a business
|
||||
/// object.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
protected virtual void DataPortal_Update()
|
||||
{
|
||||
throw new NotSupportedException(Resources.UpdateNotSupportedException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to allow immediate deletion of a business object.
|
||||
/// </summary>
|
||||
/// <param name="criteria">An object containing criteria values to identify the object.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
protected virtual void DataPortal_Delete(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Resources.DeleteNotSupportedException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal prior to calling the
|
||||
/// requested DataPortal_xyz method.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalInvoke(DataPortalEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal after calling the
|
||||
/// requested DataPortal_xyz method.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalInvokeComplete(DataPortalEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal if an exception
|
||||
/// occurs during data access.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
/// <param name="ex">The Exception thrown during data access.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalException(DataPortalEventArgs e, Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ISavable Members
|
||||
|
||||
object Csla.Core.ISavable.Save()
|
||||
{
|
||||
return Save();
|
||||
}
|
||||
|
||||
[NonSerialized()]
|
||||
[NotUndoable]
|
||||
private EventHandler<Csla.Core.SavedEventArgs> _nonSerializableSavedHandlers;
|
||||
[NotUndoable]
|
||||
private EventHandler<Csla.Core.SavedEventArgs> _serializableSavedHandlers;
|
||||
|
||||
/// <summary>
|
||||
/// Event raised when an object has been saved.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design",
|
||||
"CA1062:ValidateArgumentsOfPublicMethods")]
|
||||
public event EventHandler<Csla.Core.SavedEventArgs> Saved
|
||||
{
|
||||
add
|
||||
{
|
||||
if (value.Method.IsPublic &&
|
||||
(value.Method.DeclaringType.IsSerializable ||
|
||||
value.Method.IsStatic))
|
||||
_serializableSavedHandlers = (EventHandler<Csla.Core.SavedEventArgs>)
|
||||
System.Delegate.Combine(_serializableSavedHandlers, value);
|
||||
else
|
||||
_nonSerializableSavedHandlers = (EventHandler<Csla.Core.SavedEventArgs>)
|
||||
System.Delegate.Combine(_nonSerializableSavedHandlers, value);
|
||||
}
|
||||
remove
|
||||
{
|
||||
if (value.Method.IsPublic &&
|
||||
(value.Method.DeclaringType.IsSerializable ||
|
||||
value.Method.IsStatic))
|
||||
_serializableSavedHandlers = (EventHandler<Csla.Core.SavedEventArgs>)
|
||||
System.Delegate.Remove(_serializableSavedHandlers, value);
|
||||
else
|
||||
_nonSerializableSavedHandlers = (EventHandler<Csla.Core.SavedEventArgs>)
|
||||
System.Delegate.Remove(_nonSerializableSavedHandlers, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raises the <see cref="Saved"/> event, indicating that the
|
||||
/// object has been saved, and providing a reference
|
||||
/// to the new object instance.
|
||||
/// </summary>
|
||||
/// <param name="newObject">The new object instance.</param>
|
||||
[System.ComponentModel.EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected void OnSaved(T newObject)
|
||||
{
|
||||
Csla.Core.SavedEventArgs args = new Csla.Core.SavedEventArgs(newObject);
|
||||
if (_nonSerializableSavedHandlers != null)
|
||||
_nonSerializableSavedHandlers.Invoke(this, args);
|
||||
if (_serializableSavedHandlers != null)
|
||||
_serializableSavedHandlers.Invoke(this, args);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Csla.Properties;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// This is the base class from which command
|
||||
/// objects will be derived.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Command objects allow the execution of arbitrary server-side
|
||||
/// functionality. Most often, this involves the invocation of
|
||||
/// a stored procedure in the database, but can involve any other
|
||||
/// type of stateless, atomic call to the server instead.
|
||||
/// </para><para>
|
||||
/// To implement a command object, inherit from CommandBase and
|
||||
/// override the DataPortal_Execute method. In this method you can
|
||||
/// implement any server-side code as required.
|
||||
/// </para><para>
|
||||
/// To pass data to/from the server, use instance variables within
|
||||
/// the command object itself. The command object is instantiated on
|
||||
/// the client, and is passed by value to the server where the
|
||||
/// DataPortal_Execute method is invoked. The command object is then
|
||||
/// returned to the client by value.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Serializable()]
|
||||
public abstract class CommandBase : Core.ICommandObject
|
||||
{
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
protected CommandBase()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Initialize
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to set up event handlers so user
|
||||
/// code in a partial class can respond to events raised by
|
||||
/// generated code.
|
||||
/// </summary>
|
||||
protected virtual void Initialize()
|
||||
{ /* allows subclass to initialize events before any other activity occurs */ }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Data Access
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "criteria")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
private void DataPortal_Create(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Resources.CreateNotSupportedException);
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "criteria")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
private void DataPortal_Fetch(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Resources.FetchNotSupportedException);
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
private void DataPortal_Update()
|
||||
{
|
||||
throw new NotSupportedException(Resources.UpdateNotSupportedException);
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "criteria")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
private void DataPortal_Delete(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Resources.DeleteNotSupportedException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to implement any server-side code
|
||||
/// that is to be run when the command is executed.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
protected virtual void DataPortal_Execute()
|
||||
{
|
||||
throw new NotSupportedException(Resources.ExecuteNotSupportedException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal prior to calling the
|
||||
/// requested DataPortal_xyz method.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalInvoke(DataPortalEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal after calling the
|
||||
/// requested DataPortal_xyz method.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalInvokeComplete(DataPortalEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal if an exception
|
||||
/// occurs during server-side processing.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
/// <param name="ex">The Exception thrown during processing.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalException(DataPortalEventArgs e, Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// This class implements INotifyPropertyChanged
|
||||
/// in a serialization-safe manner.
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
public abstract class BindableBase : System.ComponentModel.INotifyPropertyChanged
|
||||
{
|
||||
[NonSerialized()]
|
||||
private PropertyChangedEventHandler _nonSerializableHandlers;
|
||||
private PropertyChangedEventHandler _serializableHandlers;
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
protected BindableBase()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implements a serialization-safe PropertyChanged event.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design",
|
||||
"CA1062:ValidateArgumentsOfPublicMethods")]
|
||||
public event PropertyChangedEventHandler PropertyChanged
|
||||
{
|
||||
add
|
||||
{
|
||||
if (value.Method.IsPublic &&
|
||||
(value.Method.DeclaringType.IsSerializable ||
|
||||
value.Method.IsStatic))
|
||||
_serializableHandlers = (PropertyChangedEventHandler)
|
||||
System.Delegate.Combine(_serializableHandlers, value);
|
||||
else
|
||||
_nonSerializableHandlers = (PropertyChangedEventHandler)
|
||||
System.Delegate.Combine(_nonSerializableHandlers, value);
|
||||
}
|
||||
remove
|
||||
{
|
||||
if (value.Method.IsPublic &&
|
||||
(value.Method.DeclaringType.IsSerializable ||
|
||||
value.Method.IsStatic))
|
||||
_serializableHandlers = (PropertyChangedEventHandler)
|
||||
System.Delegate.Remove(_serializableHandlers, value);
|
||||
else
|
||||
_nonSerializableHandlers = (PropertyChangedEventHandler)
|
||||
System.Delegate.Remove(_nonSerializableHandlers, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Call this method to raise the PropertyChanged event
|
||||
/// for all object properties.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This method is for backward compatibility with
|
||||
/// CSLA .NET 1.x.
|
||||
/// </remarks>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void OnIsDirtyChanged()
|
||||
{
|
||||
OnUnknownPropertyChanged();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Call this method to raise the PropertyChanged event
|
||||
/// for all object properties.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This method is automatically called by MarkDirty. It
|
||||
/// actually raises PropertyChanged for an empty string,
|
||||
/// which tells data binding to refresh all properties.
|
||||
/// </remarks>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void OnUnknownPropertyChanged()
|
||||
{
|
||||
OnPropertyChanged(string.Empty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Call this method to raise the PropertyChanged event
|
||||
/// for a specific property.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property that
|
||||
/// has changed.</param>
|
||||
/// <remarks>
|
||||
/// This method may be called by properties in the business
|
||||
/// class to indicate the change in a specific property.
|
||||
/// </remarks>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
if (_nonSerializableHandlers != null)
|
||||
_nonSerializableHandlers.Invoke(this,
|
||||
new PropertyChangedEventArgs(propertyName));
|
||||
if (_serializableHandlers != null)
|
||||
_serializableHandlers.Invoke(this,
|
||||
new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Extends BindingList of T by adding extra
|
||||
/// events.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Type of item contained in list.</typeparam>
|
||||
[Serializable]
|
||||
public class ExtendedBindingList<T> : BindingList<T>, IExtendedBindingList
|
||||
{
|
||||
#region RemovingItem event
|
||||
|
||||
[NonSerialized()]
|
||||
private EventHandler<RemovingItemEventArgs> _nonSerializableHandlers;
|
||||
private EventHandler<RemovingItemEventArgs> _serializableHandlers;
|
||||
|
||||
/// <summary>
|
||||
/// Implements a serialization-safe RemovingItem event.
|
||||
/// </summary>
|
||||
public event EventHandler<RemovingItemEventArgs> RemovingItem
|
||||
{
|
||||
add
|
||||
{
|
||||
if (value.Method.IsPublic &&
|
||||
(value.Method.DeclaringType.IsSerializable ||
|
||||
value.Method.IsStatic))
|
||||
_serializableHandlers = (EventHandler<RemovingItemEventArgs>)
|
||||
System.Delegate.Combine(_serializableHandlers, value);
|
||||
else
|
||||
_nonSerializableHandlers = (EventHandler<RemovingItemEventArgs>)
|
||||
System.Delegate.Combine(_nonSerializableHandlers, value);
|
||||
}
|
||||
remove
|
||||
{
|
||||
if (value.Method.IsPublic &&
|
||||
(value.Method.DeclaringType.IsSerializable ||
|
||||
value.Method.IsStatic))
|
||||
_serializableHandlers = (EventHandler<RemovingItemEventArgs>)
|
||||
System.Delegate.Remove(_serializableHandlers, value);
|
||||
else
|
||||
_nonSerializableHandlers = (EventHandler<RemovingItemEventArgs>)
|
||||
System.Delegate.Remove(_nonSerializableHandlers, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raise the RemovingItem event.
|
||||
/// </summary>
|
||||
/// <param name="removedItem">
|
||||
/// A reference to the item that
|
||||
/// is being removed.
|
||||
/// </param>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected void OnRemovingItem(T removedItem)
|
||||
{
|
||||
if (_nonSerializableHandlers != null)
|
||||
_nonSerializableHandlers.Invoke(this,
|
||||
new RemovingItemEventArgs(removedItem));
|
||||
if (_serializableHandlers != null)
|
||||
_serializableHandlers.Invoke(this,
|
||||
new RemovingItemEventArgs(removedItem));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Remove the item at the
|
||||
/// specified index.
|
||||
/// </summary>
|
||||
/// <param name="index">
|
||||
/// The zero-based index of the item
|
||||
/// to remove.
|
||||
/// </param>
|
||||
protected override void RemoveItem(int index)
|
||||
{
|
||||
OnRemovingItem(this[index]);
|
||||
base.RemoveItem(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// This is the core interface implemented
|
||||
/// by all CSLA .NET base classes.
|
||||
/// </summary>
|
||||
public interface IBusinessObject
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// This interface is implemented by all
|
||||
/// Command objects.
|
||||
/// </summary>
|
||||
interface ICommandObject : IBusinessObject
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the common methods required by all
|
||||
/// editable CSLA single objects.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// It is strongly recommended that the implementations
|
||||
/// of the methods in this interface be made Private
|
||||
/// so as to not clutter up the native interface of
|
||||
/// the collection objects.
|
||||
/// </remarks>
|
||||
public interface IEditableBusinessObject : IUndoableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns <see langword="true" /> if this object's data has been changed.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// When an object's data is changed, CSLA .NET makes note of that change
|
||||
/// and considers the object to be 'dirty' or changed. This value is used to
|
||||
/// optimize data updates, since an unchanged object does not need to be
|
||||
/// updated into the database. All new objects are considered dirty. All objects
|
||||
/// marked for deletion are considered dirty.
|
||||
/// </para><para>
|
||||
/// Once an object's data has been saved to the database (inserted or updated)
|
||||
/// the dirty flag is cleared and the object is considered unchanged. Objects
|
||||
/// newly loaded from the database are also considered unchanged.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <returns>A value indicating if this object's data has been changed.</returns>
|
||||
bool IsDirty { get;}
|
||||
/// <summary>
|
||||
/// Returns <see langword="true" /> if the object is currently valid, <see langword="false" /> if the
|
||||
/// object has broken rules or is otherwise invalid.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// By default this property relies on the underling ValidationRules
|
||||
/// object to track whether any business rules are currently broken for this object.
|
||||
/// </para><para>
|
||||
/// You can override this property to provide more sophisticated
|
||||
/// implementations of the behavior. For instance, you should always override
|
||||
/// this method if your object has child objects, since the validity of this object
|
||||
/// is affected by the validity of all child objects.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <returns>A value indicating if the object is currently valid.</returns>
|
||||
bool IsValid { get;}
|
||||
/// <summary>
|
||||
/// Returns <see langword="true" /> if this object is marked for deletion.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// CSLA .NET supports both immediate and deferred deletion of objects. This
|
||||
/// property is part of the support for deferred deletion, where an object
|
||||
/// can be marked for deletion, but isn't actually deleted until the object
|
||||
/// is saved to the database. This property indicates whether or not the
|
||||
/// current object has been marked for deletion. If it is <see langword="true" />
|
||||
/// , the object will
|
||||
/// be deleted when it is saved to the database, otherwise it will be inserted
|
||||
/// or updated by the save operation.
|
||||
/// </remarks>
|
||||
/// <returns>A value indicating if this object is marked for deletion.</returns>
|
||||
bool IsDeleted { get;}
|
||||
/// <summary>
|
||||
/// Returns <see langword="true" /> if this is a new object,
|
||||
/// <see langword="false" /> if it is a pre-existing object.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// An object is considered to be new if its primary identifying (key) value
|
||||
/// doesn't correspond to data in the database. In other words,
|
||||
/// if the data values in this particular
|
||||
/// object have not yet been saved to the database the object is considered to
|
||||
/// be new. Likewise, if the object's data has been deleted from the database
|
||||
/// then the object is considered to be new.
|
||||
/// </remarks>
|
||||
/// <returns>A value indicating if this object is new.</returns>
|
||||
bool IsNew { get;}
|
||||
/// <summary>
|
||||
/// Returns <see langword="true" /> if this object is both dirty and valid.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// An object is considered dirty (changed) if
|
||||
/// <see cref="P:Csla.BusinessBase.IsDirty" /> returns <see langword="true" />. It is
|
||||
/// considered valid if IsValid
|
||||
/// returns <see langword="true" />. The IsSavable property is
|
||||
/// a combination of these two properties.
|
||||
/// </remarks>
|
||||
/// <returns>A value indicating if this object is both dirty and valid.</returns>
|
||||
bool IsSavable { get;}
|
||||
/// <summary>
|
||||
/// For internal use only!!
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Altering this value will almost certainly
|
||||
/// break your code. This property is for use
|
||||
/// by the parent collection only!
|
||||
/// </remarks>
|
||||
int EditLevelAdded { get; set;}
|
||||
/// <summary>
|
||||
/// Gets the current edit level of the object.
|
||||
/// </summary>
|
||||
int EditLevel { get; }
|
||||
/// <summary>
|
||||
/// Called by a parent object to mark the child
|
||||
/// for deferred deletion.
|
||||
/// </summary>
|
||||
void DeleteChild();
|
||||
/// <summary>
|
||||
/// Used by BusinessListBase as a child object is
|
||||
/// created to tell the child object about its
|
||||
/// parent.
|
||||
/// </summary>
|
||||
/// <param name="parent">A reference to the parent collection object.</param>
|
||||
void SetParent(IParent parent);
|
||||
/// <summary>
|
||||
/// Marks the object for deletion. The object will be deleted as part of the
|
||||
/// next save operation.
|
||||
/// </summary>
|
||||
void Delete();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the common methods required by all
|
||||
/// editable CSLA collection objects.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// It is strongly recommended that the implementations
|
||||
/// of the methods in this interface be made Private
|
||||
/// so as to not clutter up the native interface of
|
||||
/// the collection objects.
|
||||
/// </remarks>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming",
|
||||
"CA1711:IdentifiersShouldNotHaveIncorrectSuffix")]
|
||||
public interface IEditableCollection : IUndoableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Removes the specified child from the parent
|
||||
/// collection.
|
||||
/// </summary>
|
||||
/// <param name="child">Child object to be removed.</param>
|
||||
void RemoveChild(Core.IEditableBusinessObject child);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Extends <see cref="IBindingList" /> by adding extra
|
||||
/// events.
|
||||
/// </summary>
|
||||
public interface IExtendedBindingList : IBindingList
|
||||
{
|
||||
/// <summary>
|
||||
/// Event indicating that an item is being
|
||||
/// removed from the list.
|
||||
/// </summary>
|
||||
event EventHandler<RemovingItemEventArgs> RemovingItem;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the interface that must be implemented
|
||||
/// by any business object that contains child
|
||||
/// objects.
|
||||
/// </summary>
|
||||
public interface IParent
|
||||
{
|
||||
/// <summary>
|
||||
/// This method is called by a child object when it
|
||||
/// wants to be removed from the collection.
|
||||
/// </summary>
|
||||
/// <param name="child">The child object to remove.</param>
|
||||
void RemoveChild(Core.IEditableBusinessObject child);
|
||||
/// <summary>
|
||||
/// Override this method to be notified when a child object's
|
||||
/// <see cref="Core.BusinessBase.ApplyEdit" /> method has
|
||||
/// completed.
|
||||
/// </summary>
|
||||
/// <param name="child">The child object that was edited.</param>
|
||||
void ApplyEditChild(Core.IEditableBusinessObject child);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface implemented by all read-only collection
|
||||
/// classes.
|
||||
/// </summary>
|
||||
public interface IReadOnlyCollection : IBusinessObject
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies that the object is a readonly
|
||||
/// business object.
|
||||
/// </summary>
|
||||
public interface IReadOnlyObject : IBusinessObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns <see langword="true" /> if the user is allowed to read the
|
||||
/// calling property.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property to read.</param>
|
||||
bool CanReadProperty(string propertyName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this interface in a collection
|
||||
/// to report a total row count to
|
||||
/// <see cref="Csla.Web.CslaDataSource"/>, where that
|
||||
/// row count is different from the collection's
|
||||
/// normal Count property value.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This interface is used to provide paging
|
||||
/// support for web data binding through
|
||||
/// <see cref="Csla.Web.CslaDataSource"/>. You should
|
||||
/// implement this interface in your business
|
||||
/// collection class, along with windowed
|
||||
/// data loading, to provide efficient paging
|
||||
/// support.
|
||||
/// </remarks>
|
||||
public interface IReportTotalRowCount
|
||||
{
|
||||
/// <summary>
|
||||
/// The total number of rows of available
|
||||
/// data.
|
||||
/// </summary>
|
||||
int TotalRowCount { get;}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies that the object can save
|
||||
/// itself.
|
||||
/// </summary>
|
||||
public interface ISavable
|
||||
{
|
||||
/// <summary>
|
||||
/// Saves the object to the database.
|
||||
/// </summary>
|
||||
/// <returns>A new object containing the saved values.</returns>
|
||||
object Save();
|
||||
/// <summary>
|
||||
/// Event raised when an object has been saved.
|
||||
/// </summary>
|
||||
event EventHandler<SavedEventArgs> Saved;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the methods required to participate
|
||||
/// in n-level undo within the CSLA .NET framework.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This interface is used by Csla.Core.UndoableBase
|
||||
/// to initiate begin, cancel and apply edit operations.
|
||||
/// </remarks>
|
||||
public interface IUndoableObject : IBusinessObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Copies the state of the object and places the copy
|
||||
/// onto the state stack.
|
||||
/// </summary>
|
||||
void CopyState();
|
||||
/// <summary>
|
||||
/// Restores the object's state to the most recently
|
||||
/// copied values from the state stack.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Restores the state of the object to its
|
||||
/// previous value by taking the data out of
|
||||
/// the stack and restoring it into the fields
|
||||
/// of the object.
|
||||
/// </remarks>
|
||||
void UndoChanges();
|
||||
/// <summary>
|
||||
/// Accepts any changes made to the object since the last
|
||||
/// state copy was made.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The most recent state copy is removed from the state
|
||||
/// stack and discarded, thus committing any changes made
|
||||
/// to the object's state.
|
||||
/// </remarks>
|
||||
void AcceptChanges();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
|
||||
namespace Csla.Core
|
||||
{
|
||||
internal static class ObjectCloner
|
||||
{
|
||||
/// <summary>
|
||||
/// Clones an object by using the
|
||||
/// <see cref="BinaryFormatter" />.
|
||||
/// </summary>
|
||||
/// <param name="obj">The object to clone.</param>
|
||||
/// <remarks>
|
||||
/// The object to be cloned must be serializable.
|
||||
/// </remarks>
|
||||
public static object Clone(object obj)
|
||||
{
|
||||
using (MemoryStream buffer = new MemoryStream())
|
||||
{
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
formatter.Serialize(buffer, obj);
|
||||
buffer.Position = 0;
|
||||
object temp = formatter.Deserialize(buffer);
|
||||
return temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
using System;
|
||||
using Csla.Properties;
|
||||
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// A readonly version of BindingList(Of T)
|
||||
/// </summary>
|
||||
/// <typeparam name="C">Type of item contained in the list.</typeparam>
|
||||
/// <remarks>
|
||||
/// This is a subclass of BindingList(Of T) that implements
|
||||
/// a readonly list, preventing adding and removing of items
|
||||
/// from the list. Use the IsReadOnly property
|
||||
/// to unlock the list for loading/unloading data.
|
||||
/// </remarks>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming",
|
||||
"CA1710:IdentifiersShouldHaveCorrectSuffix")]
|
||||
[Serializable()]
|
||||
public abstract class ReadOnlyBindingList<C> :
|
||||
Core.ExtendedBindingList<C>, Core.IBusinessObject
|
||||
{
|
||||
private bool _isReadOnly = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the list is readonly.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Subclasses can set this value to unlock the collection
|
||||
/// in order to alter the collection's data.
|
||||
/// </remarks>
|
||||
/// <value>True indicates that the list is readonly.</value>
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get { return _isReadOnly; }
|
||||
protected set { _isReadOnly = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
protected ReadOnlyBindingList()
|
||||
{
|
||||
this.RaiseListChangedEvents = false;
|
||||
AllowEdit = false;
|
||||
AllowRemove = false;
|
||||
AllowNew = false;
|
||||
this.RaiseListChangedEvents = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prevents clearing the collection.
|
||||
/// </summary>
|
||||
protected override void ClearItems()
|
||||
{
|
||||
if (!IsReadOnly)
|
||||
{
|
||||
bool oldValue = AllowRemove;
|
||||
AllowRemove = true;
|
||||
base.ClearItems();
|
||||
AllowRemove = oldValue;
|
||||
}
|
||||
else
|
||||
throw new NotSupportedException(Resources.ClearInvalidException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prevents insertion of items into the collection.
|
||||
/// </summary>
|
||||
protected override object AddNewCore()
|
||||
{
|
||||
if (!IsReadOnly)
|
||||
return base.AddNewCore();
|
||||
else
|
||||
throw new NotSupportedException(Resources.InsertInvalidException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prevents insertion of items into the collection.
|
||||
/// </summary>
|
||||
/// <param name="index">Index at which to insert the item.</param>
|
||||
/// <param name="item">Item to insert.</param>
|
||||
protected override void InsertItem(int index, C item)
|
||||
{
|
||||
if (!IsReadOnly)
|
||||
base.InsertItem(index, item);
|
||||
else
|
||||
throw new NotSupportedException(Resources.InsertInvalidException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes the item at the specified index if the collection is
|
||||
/// not in readonly mode.
|
||||
/// </summary>
|
||||
/// <param name="index">Index of the item to remove.</param>
|
||||
protected override void RemoveItem(int index)
|
||||
{
|
||||
if (!IsReadOnly)
|
||||
{
|
||||
bool oldValue = AllowRemove;
|
||||
AllowRemove = true;
|
||||
base.RemoveItem(index);
|
||||
AllowRemove = oldValue;
|
||||
}
|
||||
else
|
||||
throw new NotSupportedException(Resources.RemoveInvalidException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces the item at the specified index with the
|
||||
/// specified item if the collection is not in
|
||||
/// readonly mode.
|
||||
/// </summary>
|
||||
/// <param name="index">Index of the item to replace.</param>
|
||||
/// <param name="item">New item for the list.</param>
|
||||
protected override void SetItem(int index, C item)
|
||||
{
|
||||
if (!IsReadOnly)
|
||||
base.SetItem(index, item);
|
||||
else
|
||||
throw new NotSupportedException(Resources.ChangeInvalidException);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains event data for the RemovingItem
|
||||
/// event.
|
||||
/// </summary>
|
||||
public class RemovingItemEventArgs : EventArgs
|
||||
{
|
||||
private object _removingItem;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a reference to the item that was
|
||||
/// removed from the list.
|
||||
/// </summary>
|
||||
public object RemovingItem
|
||||
{
|
||||
get { return _removingItem; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an instance of the object.
|
||||
/// </summary>
|
||||
/// <param name="removingItem">
|
||||
/// A reference to the item that was
|
||||
/// removed from the list.
|
||||
/// </param>
|
||||
public RemovingItemEventArgs(object removingItem)
|
||||
{
|
||||
_removingItem = removingItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Event arguments containing a reference
|
||||
/// to the new object that was returned
|
||||
/// as a result of the Save() operation.
|
||||
/// </summary>
|
||||
public class SavedEventArgs : EventArgs
|
||||
{
|
||||
private object _newObject;
|
||||
/// <summary>
|
||||
/// Gets the object that was returned
|
||||
/// as a result of the Save() operation.
|
||||
/// </summary>
|
||||
public object NewObject
|
||||
{
|
||||
get { return _newObject; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
/// <param name="newObject">
|
||||
/// The object that was returned as a
|
||||
/// result of the Save() operation.
|
||||
/// </param>
|
||||
public SavedEventArgs(object newObject)
|
||||
{
|
||||
_newObject = newObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,296 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Csla.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements n-level undo capabilities as
|
||||
/// described in Chapters 2 and 3.
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
public abstract class UndoableBase : Csla.Core.BindableBase, Csla.Core.IUndoableObject
|
||||
{
|
||||
// keep a stack of object state values.
|
||||
[NotUndoable()]
|
||||
private Stack<byte[]> _stateStack = new Stack<byte[]>();
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
protected UndoableBase()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the current edit level of the object.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
protected int EditLevel
|
||||
{
|
||||
get { return _stateStack.Count; }
|
||||
}
|
||||
|
||||
void IUndoableObject.CopyState()
|
||||
{
|
||||
CopyState();
|
||||
}
|
||||
|
||||
void IUndoableObject.UndoChanges()
|
||||
{
|
||||
UndoChanges();
|
||||
}
|
||||
|
||||
void IUndoableObject.AcceptChanges()
|
||||
{
|
||||
AcceptChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is invoked after the CopyState
|
||||
/// operation is complete.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void CopyStateComplete()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies the state of the object and places the copy
|
||||
/// onto the state stack.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
protected internal void CopyState()
|
||||
{
|
||||
Type currentType = this.GetType();
|
||||
HybridDictionary state = new HybridDictionary();
|
||||
FieldInfo[] fields;
|
||||
|
||||
do
|
||||
{
|
||||
// get the list of fields in this type
|
||||
fields = currentType.GetFields(
|
||||
BindingFlags.NonPublic |
|
||||
BindingFlags.Instance |
|
||||
BindingFlags.Public);
|
||||
|
||||
foreach (FieldInfo field in fields)
|
||||
{
|
||||
// make sure we process only our variables
|
||||
if (field.DeclaringType == currentType)
|
||||
{
|
||||
// see if this field is marked as not undoable
|
||||
if (!NotUndoableField(field))
|
||||
{
|
||||
// the field is undoable, so it needs to be processed.
|
||||
object value = field.GetValue(this);
|
||||
|
||||
if (typeof(Csla.Core.IUndoableObject).IsAssignableFrom(field.FieldType))
|
||||
{
|
||||
// make sure the variable has a value
|
||||
if (value == null)
|
||||
{
|
||||
// variable has no value - store that fact
|
||||
state.Add(GetFieldName(field), null);
|
||||
}
|
||||
else
|
||||
{
|
||||
// this is a child object, cascade the call
|
||||
((Core.IUndoableObject)value).CopyState();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// this is a normal field, simply trap the value
|
||||
state.Add(GetFieldName(field), value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
currentType = currentType.BaseType;
|
||||
} while (currentType != typeof(UndoableBase));
|
||||
|
||||
// serialize the state and stack it
|
||||
using (MemoryStream buffer = new MemoryStream())
|
||||
{
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
formatter.Serialize(buffer, state);
|
||||
_stateStack.Push(buffer.ToArray());
|
||||
}
|
||||
CopyStateComplete();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is invoked after the UndoChanges
|
||||
/// operation is complete.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void UndoChangesComplete()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restores the object's state to the most recently
|
||||
/// copied values from the state stack.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Restores the state of the object to its
|
||||
/// previous value by taking the data out of
|
||||
/// the stack and restoring it into the fields
|
||||
/// of the object.
|
||||
/// </remarks>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
protected internal void UndoChanges()
|
||||
{
|
||||
// if we are a child object we might be asked to
|
||||
// undo below the level where stacked states,
|
||||
// so just do nothing in that case
|
||||
if (EditLevel > 0)
|
||||
{
|
||||
HybridDictionary state;
|
||||
using (MemoryStream buffer = new MemoryStream(_stateStack.Pop()))
|
||||
{
|
||||
buffer.Position = 0;
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
state = (HybridDictionary)formatter.Deserialize(buffer);
|
||||
}
|
||||
|
||||
Type currentType = this.GetType();
|
||||
FieldInfo[] fields;
|
||||
|
||||
do
|
||||
{
|
||||
// get the list of fields in this type
|
||||
fields = currentType.GetFields(
|
||||
BindingFlags.NonPublic |
|
||||
BindingFlags.Instance |
|
||||
BindingFlags.Public);
|
||||
foreach (FieldInfo field in fields)
|
||||
{
|
||||
// make sure we process only our variables
|
||||
if (field.DeclaringType == currentType)
|
||||
{
|
||||
// see if the field is undoable or not
|
||||
if (!NotUndoableField(field))
|
||||
{
|
||||
// the field is undoable, so restore its value
|
||||
object value = field.GetValue(this);
|
||||
|
||||
if (typeof(Csla.Core.IUndoableObject).IsAssignableFrom(field.FieldType))
|
||||
{
|
||||
// this is a child object
|
||||
// see if the previous value was empty
|
||||
if (state.Contains(GetFieldName(field)))
|
||||
{
|
||||
// previous value was empty - restore to empty
|
||||
field.SetValue(this, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
// make sure the variable has a value
|
||||
if (value != null)
|
||||
{
|
||||
// this is a child object, cascade the call.
|
||||
((Core.IUndoableObject)value).UndoChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// this is a regular field, restore its value
|
||||
field.SetValue(this, state[GetFieldName(field)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
currentType = currentType.BaseType;
|
||||
} while (currentType != typeof(UndoableBase));
|
||||
}
|
||||
UndoChangesComplete();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is invoked after the AcceptChanges
|
||||
/// operation is complete.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void AcceptChangesComplete()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Accepts any changes made to the object since the last
|
||||
/// state copy was made.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The most recent state copy is removed from the state
|
||||
/// stack and discarded, thus committing any changes made
|
||||
/// to the object's state.
|
||||
/// </remarks>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
protected internal void AcceptChanges()
|
||||
{
|
||||
if (EditLevel > 0)
|
||||
{
|
||||
_stateStack.Pop();
|
||||
Type currentType = this.GetType();
|
||||
FieldInfo[] fields;
|
||||
|
||||
do
|
||||
{
|
||||
// get the list of fields in this type
|
||||
fields = currentType.GetFields(
|
||||
BindingFlags.NonPublic |
|
||||
BindingFlags.Instance |
|
||||
BindingFlags.Public);
|
||||
foreach (FieldInfo field in fields)
|
||||
{
|
||||
// make sure we process only our variables
|
||||
if (field.DeclaringType == currentType)
|
||||
{
|
||||
// see if the field is undoable or not
|
||||
if (!NotUndoableField(field))
|
||||
{
|
||||
// the field is undoable so see if it is a child object
|
||||
if (typeof(Csla.Core.IUndoableObject).IsAssignableFrom(field.FieldType))
|
||||
{
|
||||
object value = field.GetValue(this);
|
||||
// make sure the variable has a value
|
||||
if (value != null)
|
||||
{
|
||||
// it is a child object so cascade the call
|
||||
((Core.IUndoableObject)value).AcceptChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
currentType = currentType.BaseType;
|
||||
} while (currentType != typeof(UndoableBase));
|
||||
}
|
||||
AcceptChangesComplete();
|
||||
}
|
||||
|
||||
#region Helper Functions
|
||||
|
||||
private static bool NotUndoableField(FieldInfo field)
|
||||
{
|
||||
return Attribute.IsDefined(field, typeof(NotUndoableAttribute));
|
||||
}
|
||||
|
||||
private static string GetFieldName(FieldInfo field)
|
||||
{
|
||||
return field.DeclaringType.Name + "!" + field.Name;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
300
PROMS/csla20cs-2.1.4-070223/csla20cs/csla20cs/Csla/Csla.csproj
Normal file
300
PROMS/csla20cs-2.1.4-070223/csla20cs/csla20cs/Csla/Csla.csproj
Normal file
@@ -0,0 +1,300 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{9DA591ED-C570-47AC-8E5D-35B039E07973}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Csla</RootNamespace>
|
||||
<AssemblyName>Csla</AssemblyName>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>CslaKey.snk</AssemblyOriginatorKeyFile>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<RunCodeAnalysis>false</RunCodeAnalysis>
|
||||
<DocumentationFile>bin\Debug\Csla.XML</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
<Reference Include="System.Runtime.Remoting" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BusinessBase.cs" />
|
||||
<Compile Include="BusinessListBase.cs" />
|
||||
<Compile Include="CommandBase.cs" />
|
||||
<Compile Include="Core\BindableBase.cs" />
|
||||
<Compile Include="Core\BusinessBase.cs" />
|
||||
<Compile Include="Core\ExtendedBindingList.cs" />
|
||||
<Compile Include="Core\IEditableBusinessObject.cs" />
|
||||
<Compile Include="Core\IExtendedBindingList.cs" />
|
||||
<Compile Include="Core\IParent.cs" />
|
||||
<Compile Include="Core\IReportTotalRowCount.cs" />
|
||||
<Compile Include="Core\ISavable.cs" />
|
||||
<Compile Include="Core\IUndoableObject.cs" />
|
||||
<Compile Include="Core\IBusinessObject.cs" />
|
||||
<Compile Include="Core\ICommandObject.cs" />
|
||||
<Compile Include="Core\IEditableCollection.cs" />
|
||||
<Compile Include="Core\IReadOnlyCollection.cs" />
|
||||
<Compile Include="Core\IReadOnlyObject.cs" />
|
||||
<Compile Include="Core\ObjectCloner.cs" />
|
||||
<Compile Include="Core\ReadOnlyBindingList.cs" />
|
||||
<Compile Include="Core\RemovingItemEventArgs.cs" />
|
||||
<Compile Include="Core\SavedEventArgs.cs" />
|
||||
<Compile Include="Core\UndoableBase.cs" />
|
||||
<Compile Include="DataPortal\ApplicationContext.cs" />
|
||||
<Compile Include="DataPortal\Client\DataPortal.cs" />
|
||||
<Compile Include="DataPortal\Client\EnterpriseServicesProxy.cs" />
|
||||
<Compile Include="DataPortal\Client\IDataPortalProxy.cs" />
|
||||
<Compile Include="DataPortal\Client\LocalProxy.cs" />
|
||||
<Compile Include="DataPortal\Client\RemotingProxy.cs" />
|
||||
<Compile Include="DataPortal\Client\WebServicesProxy.cs">
|
||||
</Compile>
|
||||
<Compile Include="DataPortal\CriteriaBase.cs" />
|
||||
<Compile Include="DataPortal\DataPortalEventArgs.cs" />
|
||||
<Compile Include="DataPortal\DataPortalException.cs" />
|
||||
<Compile Include="DataPortal\Hosts\EnterpriseServicesPortal.cs" />
|
||||
<Compile Include="DataPortal\Hosts\RemotingPortal.cs" />
|
||||
<Compile Include="DataPortal\Hosts\WebServicePortal.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DataPortal\MethodCaller.cs" />
|
||||
<Compile Include="DataPortal\RunLocalAttribute.cs" />
|
||||
<Compile Include="DataPortal\Server\CallMethodException.cs" />
|
||||
<Compile Include="DataPortal\Server\DataPortal.cs" />
|
||||
<Compile Include="DataPortal\Server\DataPortalContext.cs" />
|
||||
<Compile Include="DataPortal\Server\DataPortalException.cs" />
|
||||
<Compile Include="DataPortal\Server\DataPortalResult.cs" />
|
||||
<Compile Include="DataPortal\Server\IDataPortalServer.cs" />
|
||||
<Compile Include="DataPortal\Server\ServicedDataPortal.cs" />
|
||||
<Compile Include="DataPortal\Server\SimpleDataPortal.cs" />
|
||||
<Compile Include="DataPortal\Server\TransactionalDataPortal.cs" />
|
||||
<Compile Include="DataPortal\TransactionalAttribute.cs" />
|
||||
<Compile Include="DataPortal\TransactionalTypes.cs" />
|
||||
<Compile Include="Data\DataMapper.cs" />
|
||||
<Compile Include="Data\ObjectAdapter.cs" />
|
||||
<Compile Include="Data\SafeDataReader.cs" />
|
||||
<Compile Include="DefaultFilter.cs" />
|
||||
<Compile Include="EditableRootListBase.cs" />
|
||||
<Compile Include="EnterpriseServicesSettings.cs" />
|
||||
<Compile Include="FilteredBindingList.cs" />
|
||||
<Compile Include="FilterProvider.cs" />
|
||||
<Compile Include="GlobalSuppressions.cs" />
|
||||
<Compile Include="NameValueListBase.cs" />
|
||||
<Compile Include="NotUndoableAttribute.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ReadOnlyBase.cs" />
|
||||
<Compile Include="ReadOnlyListBase.cs" />
|
||||
<Compile Include="Security\AccessType.cs" />
|
||||
<Compile Include="Security\AuthorizationRules.cs" />
|
||||
<Compile Include="Security\AuthorizationRulesManager.cs" />
|
||||
<Compile Include="Security\BusinessPrincipalBase.cs" />
|
||||
<Compile Include="Security\IAuthorizeReadWrite.cs" />
|
||||
<Compile Include="Security\RolesForProperty.cs" />
|
||||
<Compile Include="Security\SharedAuthorizationRules.cs" />
|
||||
<Compile Include="SmartDate.cs" />
|
||||
<Compile Include="SortedBindingList.cs" />
|
||||
<Compile Include="Utilities.cs" />
|
||||
<Compile Include="Validation\BrokenRule.cs" />
|
||||
<Compile Include="Validation\BrokenRulesCollection.cs" />
|
||||
<Compile Include="Validation\CommonRules.cs" />
|
||||
<Compile Include="Validation\IRuleMethod.cs" />
|
||||
<Compile Include="Validation\RuleArgs.cs" />
|
||||
<Compile Include="Validation\RuleHandler.cs" />
|
||||
<Compile Include="Validation\RuleMethod.cs" />
|
||||
<Compile Include="Validation\RuleSeverity.cs" />
|
||||
<Compile Include="Validation\RulesList.cs" />
|
||||
<Compile Include="Validation\SharedValidationRules.cs" />
|
||||
<Compile Include="Validation\ValidationException.cs" />
|
||||
<Compile Include="Validation\ValidationRules.cs" />
|
||||
<Compile Include="Validation\ValidationRulesManager.cs" />
|
||||
<Compile Include="Web References\WebServiceHost\Reference.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Reference.map</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Web\CslaDataSource.cs" />
|
||||
<Compile Include="Web\CslaDataSourceView.cs" />
|
||||
<Compile Include="Web\DeleteObjectArgs.cs" />
|
||||
<Compile Include="Web\Design\CslaDataSourceConfiguration.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Web\Design\CslaDataSourceConfiguration.Designer.cs">
|
||||
<DependentUpon>CslaDataSourceConfiguration.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Web\Design\CslaDataSourceDesigner.cs" />
|
||||
<Compile Include="Web\Design\CslaDesignerDataSourceView.cs" />
|
||||
<Compile Include="Web\Design\ObjectFieldInfo.cs" />
|
||||
<Compile Include="Web\Design\ObjectSchema.cs" />
|
||||
<Compile Include="Web\Design\ObjectViewSchema.cs" />
|
||||
<Compile Include="Web\InsertObjectArgs.cs" />
|
||||
<Compile Include="Web\SelectObjectArgs.cs" />
|
||||
<Compile Include="Web\UpdateObjectArgs.cs" />
|
||||
<Compile Include="Windows\BindingSourceRefresh.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Windows\ReadWriteAuthorization.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="CslaKey.snk" />
|
||||
<None Include="Diagrams\BindableBaseClasses.cd" />
|
||||
<None Include="Diagrams\Csla.cd" />
|
||||
<None Include="Diagrams\CslaBaseClasses.cd" />
|
||||
<None Include="Diagrams\DataPortal.cd" />
|
||||
<None Include="Diagrams\FullCsla.cd" />
|
||||
<None Include="Diagrams\UndoableBase.cd" />
|
||||
<None Include="Diagrams\ValidationRules.cd" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Properties\Resources-il.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.bs.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.ca-ES.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.de.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.es-ES.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.es.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.fr.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.hr.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.it.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.nl.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.no.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.pt-br.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.pt.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.da.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.ro.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.ru.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.sr.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.sv.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.zh-CHS.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Web\Design\CslaDataSourceConfiguration.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>CslaDataSourceConfiguration.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WebReferences Include="Web References\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WebReferenceUrl Include="http://localhost:4804/WSPortalcs/Service.asmx">
|
||||
<UrlBehavior>Dynamic</UrlBehavior>
|
||||
<RelPath>Web References\WebServiceHost\</RelPath>
|
||||
<UpdateFromURL>http://localhost:4804/WSPortalcs/Service.asmx</UpdateFromURL>
|
||||
<ServiceLocationURL>
|
||||
</ServiceLocationURL>
|
||||
<CachedDynamicPropName>
|
||||
</CachedDynamicPropName>
|
||||
<CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
|
||||
<CachedSettingsPropName>Csla_WebServiceHost_WebServicePortal</CachedSettingsPropName>
|
||||
</WebReferenceUrl>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="Diagrams\AuthorizationRules.cd" />
|
||||
<None Include="Diagrams\CslaDataSource.cd" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Web References\WebServiceHost\Reference.map">
|
||||
<Generator>MSDiscoCodeGenerator</Generator>
|
||||
<LastGenOutput>Reference.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Web References\WebServiceHost\Service.disco" />
|
||||
<None Include="Web References\WebServiceHost\Service.wsdl" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
BIN
PROMS/csla20cs-2.1.4-070223/csla20cs/csla20cs/Csla/CslaKey.snk
Normal file
BIN
PROMS/csla20cs-2.1.4-070223/csla20cs/csla20cs/Csla/CslaKey.snk
Normal file
Binary file not shown.
@@ -0,0 +1,230 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.ComponentModel;
|
||||
using Csla.Properties;
|
||||
|
||||
namespace Csla.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Map data from a source into a target object
|
||||
/// by copying public property values.
|
||||
/// </summary>
|
||||
/// <remarks></remarks>
|
||||
public static class DataMapper
|
||||
{
|
||||
|
||||
#region Map from IDictionary
|
||||
|
||||
/// <summary>
|
||||
/// Copies values from the source into the
|
||||
/// properties of the target.
|
||||
/// </summary>
|
||||
/// <param name="source">A name/value dictionary containing the source values.</param>
|
||||
/// <param name="target">An object with properties to be set from the dictionary.</param>
|
||||
/// <remarks>
|
||||
/// The key names in the dictionary must match the property names on the target
|
||||
/// object. Target properties may not be readonly or indexed.
|
||||
/// </remarks>
|
||||
public static void Map(System.Collections.IDictionary source, object target)
|
||||
{
|
||||
Map(source, target, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies values from the source into the
|
||||
/// properties of the target.
|
||||
/// </summary>
|
||||
/// <param name="source">A name/value dictionary containing the source values.</param>
|
||||
/// <param name="target">An object with properties to be set from the dictionary.</param>
|
||||
/// <param name="ignoreList">A list of property names to ignore.
|
||||
/// These properties will not be set on the target object.</param>
|
||||
/// <remarks>
|
||||
/// The key names in the dictionary must match the property names on the target
|
||||
/// object. Target properties may not be readonly or indexed.
|
||||
/// </remarks>
|
||||
public static void Map(System.Collections.IDictionary source, object target, params string[] ignoreList)
|
||||
{
|
||||
Map(source, target, false, ignoreList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies values from the source into the
|
||||
/// properties of the target.
|
||||
/// </summary>
|
||||
/// <param name="source">A name/value dictionary containing the source values.</param>
|
||||
/// <param name="target">An object with properties to be set from the dictionary.</param>
|
||||
/// <param name="ignoreList">A list of property names to ignore.
|
||||
/// These properties will not be set on the target object.</param>
|
||||
/// <param name="suppressExceptions">If <see langword="true" />, any exceptions will be supressed.</param>
|
||||
/// <remarks>
|
||||
/// The key names in the dictionary must match the property names on the target
|
||||
/// object. Target properties may not be readonly or indexed.
|
||||
/// </remarks>
|
||||
public static void Map(
|
||||
System.Collections.IDictionary source,
|
||||
object target, bool suppressExceptions,
|
||||
params string[] ignoreList)
|
||||
{
|
||||
List<string> ignore = new List<string>(ignoreList);
|
||||
foreach (string propertyName in source.Keys)
|
||||
{
|
||||
if (!ignore.Contains(propertyName))
|
||||
{
|
||||
try
|
||||
{
|
||||
SetPropertyValue(target, propertyName, source[propertyName]);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (!suppressExceptions)
|
||||
throw new ArgumentException(
|
||||
String.Format("{0} ({1})",
|
||||
Resources.PropertyCopyFailed, propertyName), ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Map from Object
|
||||
|
||||
/// <summary>
|
||||
/// Copies values from the source into the
|
||||
/// properties of the target.
|
||||
/// </summary>
|
||||
/// <param name="source">An object containing the source values.</param>
|
||||
/// <param name="target">An object with properties to be set from the dictionary.</param>
|
||||
/// <remarks>
|
||||
/// The property names and types of the source object must match the property names and types
|
||||
/// on the target object. Source properties may not be indexed.
|
||||
/// Target properties may not be readonly or indexed.
|
||||
/// </remarks>
|
||||
public static void Map(object source, object target)
|
||||
{
|
||||
Map(source, target, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies values from the source into the
|
||||
/// properties of the target.
|
||||
/// </summary>
|
||||
/// <param name="source">An object containing the source values.</param>
|
||||
/// <param name="target">An object with properties to be set from the dictionary.</param>
|
||||
/// <param name="ignoreList">A list of property names to ignore.
|
||||
/// These properties will not be set on the target object.</param>
|
||||
/// <remarks>
|
||||
/// The property names and types of the source object must match the property names and types
|
||||
/// on the target object. Source properties may not be indexed.
|
||||
/// Target properties may not be readonly or indexed.
|
||||
/// </remarks>
|
||||
public static void Map(object source, object target, params string[] ignoreList)
|
||||
{
|
||||
Map(source, target, false, ignoreList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies values from the source into the
|
||||
/// properties of the target.
|
||||
/// </summary>
|
||||
/// <param name="source">An object containing the source values.</param>
|
||||
/// <param name="target">An object with properties to be set from the dictionary.</param>
|
||||
/// <param name="ignoreList">A list of property names to ignore.
|
||||
/// These properties will not be set on the target object.</param>
|
||||
/// <param name="suppressExceptions">If <see langword="true" />, any exceptions will be supressed.</param>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// The property names and types of the source object must match the property names and types
|
||||
/// on the target object. Source properties may not be indexed.
|
||||
/// Target properties may not be readonly or indexed.
|
||||
/// </para><para>
|
||||
/// Properties to copy are determined based on the source object. Any properties
|
||||
/// on the source object marked with the <see cref="BrowsableAttribute"/> equal
|
||||
/// to false are ignored.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static void Map(
|
||||
object source, object target,
|
||||
bool suppressExceptions,
|
||||
params string[] ignoreList)
|
||||
{
|
||||
List<string> ignore = new List<string>(ignoreList);
|
||||
PropertyInfo[] sourceProperties =
|
||||
GetSourceProperties(source.GetType());
|
||||
foreach (PropertyInfo sourceProperty in sourceProperties)
|
||||
{
|
||||
string propertyName = sourceProperty.Name;
|
||||
if (!ignore.Contains(propertyName))
|
||||
{
|
||||
try
|
||||
{
|
||||
SetPropertyValue(
|
||||
target, propertyName,
|
||||
sourceProperty.GetValue(source, null));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (!suppressExceptions)
|
||||
throw new ArgumentException(
|
||||
String.Format("{0} ({1})",
|
||||
Resources.PropertyCopyFailed, propertyName), ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static PropertyInfo[] GetSourceProperties(Type sourceType)
|
||||
{
|
||||
List<PropertyInfo> result = new List<PropertyInfo>();
|
||||
PropertyDescriptorCollection props =
|
||||
TypeDescriptor.GetProperties(sourceType);
|
||||
foreach (PropertyDescriptor item in props)
|
||||
if (item.IsBrowsable)
|
||||
result.Add(sourceType.GetProperty(item.Name));
|
||||
return result.ToArray();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Sets an object's property with the specified value,
|
||||
/// coercing that value to the appropriate type if possible.
|
||||
/// </summary>
|
||||
/// <param name="target">Object containing the property to set.</param>
|
||||
/// <param name="propertyName">Name of the property to set.</param>
|
||||
/// <param name="value">Value to set into the property.</param>
|
||||
public static void SetPropertyValue(
|
||||
object target, string propertyName, object value)
|
||||
{
|
||||
PropertyInfo propertyInfo =
|
||||
target.GetType().GetProperty(propertyName);
|
||||
if (value == null)
|
||||
propertyInfo.SetValue(target, value, null);
|
||||
else
|
||||
{
|
||||
Type pType =
|
||||
Utilities.GetPropertyType(propertyInfo.PropertyType);
|
||||
Type vType =
|
||||
Utilities.GetPropertyType(value.GetType());
|
||||
if (pType.Equals(vType))
|
||||
{
|
||||
// types match, just copy value
|
||||
propertyInfo.SetValue(target, value, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
// types don't match, try to coerce
|
||||
if (pType.Equals(typeof(Guid)))
|
||||
propertyInfo.SetValue(
|
||||
target, new Guid(value.ToString()), null);
|
||||
else if (pType.IsEnum && vType.Equals(typeof(string)))
|
||||
propertyInfo.SetValue(target, Enum.Parse(pType, value.ToString()), null);
|
||||
else
|
||||
propertyInfo.SetValue(
|
||||
target, Convert.ChangeType(value, pType), null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,267 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.ComponentModel;
|
||||
using System.Reflection;
|
||||
using Csla.Properties;
|
||||
|
||||
namespace Csla.Data
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// An ObjectAdapter is used to convert data in an object
|
||||
/// or collection into a DataTable.
|
||||
/// </summary>
|
||||
public class ObjectAdapter
|
||||
{
|
||||
/// <summary>
|
||||
/// Fills the DataSet with data from an object or collection.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The name of the DataTable being filled is will be the class name of
|
||||
/// the object acting as the data source. The
|
||||
/// DataTable will be inserted if it doesn't already exist in the DataSet.
|
||||
/// </remarks>
|
||||
/// <param name="ds">A reference to the DataSet to be filled.</param>
|
||||
/// <param name="source">A reference to the object or collection acting as a data source.</param>
|
||||
public void Fill(DataSet ds, object source)
|
||||
{
|
||||
string className = source.GetType().Name;
|
||||
Fill(ds, className, source);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fills the DataSet with data from an object or collection.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The name of the DataTable being filled is specified as a parameter. The
|
||||
/// DataTable will be inserted if it doesn't already exist in the DataSet.
|
||||
/// </remarks>
|
||||
/// <param name="ds">A reference to the DataSet to be filled.</param>
|
||||
/// <param name="tableName"></param>
|
||||
/// <param name="source">A reference to the object or collection acting as a data source.</param>
|
||||
public void Fill(DataSet ds, string tableName, object source)
|
||||
{
|
||||
DataTable dt;
|
||||
bool exists;
|
||||
|
||||
dt = ds.Tables[tableName];
|
||||
exists = (dt != null);
|
||||
|
||||
if (!exists)
|
||||
dt = new DataTable(tableName);
|
||||
|
||||
Fill(dt, source);
|
||||
|
||||
if (!exists)
|
||||
ds.Tables.Add(dt);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fills a DataTable with data values from an object or collection.
|
||||
/// </summary>
|
||||
/// <param name="dt">A reference to the DataTable to be filled.</param>
|
||||
/// <param name="source">A reference to the object or collection acting as a data source.</param>
|
||||
public void Fill(DataTable dt, object source)
|
||||
{
|
||||
if (source == null)
|
||||
throw new ArgumentException(Resources.NothingNotValid);
|
||||
|
||||
// get the list of columns from the source
|
||||
List<string> columns = GetColumns(source);
|
||||
if (columns.Count < 1) return;
|
||||
|
||||
// create columns in DataTable if needed
|
||||
foreach (string column in columns)
|
||||
if (!dt.Columns.Contains(column))
|
||||
dt.Columns.Add(column);
|
||||
|
||||
// get an IList and copy the data
|
||||
CopyData(dt, GetIList(source), columns);
|
||||
}
|
||||
|
||||
#region DataCopyIList
|
||||
|
||||
private IList GetIList(object source)
|
||||
{
|
||||
if (source is IListSource)
|
||||
return ((IListSource)source).GetList();
|
||||
else if (source is IList)
|
||||
return source as IList;
|
||||
else
|
||||
{
|
||||
// this is a regular object - create a list
|
||||
ArrayList col = new ArrayList();
|
||||
col.Add(source);
|
||||
return col;
|
||||
}
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
|
||||
private void CopyData(
|
||||
DataTable dt, IList ds, List<string> columns)
|
||||
{
|
||||
// load the data into the DataTable
|
||||
dt.BeginLoadData();
|
||||
for (int index = 0; index < ds.Count; index++)
|
||||
{
|
||||
DataRow dr = dt.NewRow();
|
||||
foreach (string column in columns)
|
||||
{
|
||||
try
|
||||
{
|
||||
dr[column] = GetField(ds[index], column);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
dr[column] = ex.Message;
|
||||
}
|
||||
}
|
||||
dt.Rows.Add(dr);
|
||||
}
|
||||
dt.EndLoadData();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetColumns
|
||||
|
||||
private List<string> GetColumns(object source)
|
||||
{
|
||||
List<string> result;
|
||||
// first handle DataSet/DataTable
|
||||
object innerSource;
|
||||
IListSource iListSource = source as IListSource;
|
||||
if (iListSource != null)
|
||||
innerSource = iListSource.GetList();
|
||||
else
|
||||
innerSource = source;
|
||||
|
||||
DataView dataView = innerSource as DataView;
|
||||
if (dataView != null)
|
||||
result = ScanDataView(dataView);
|
||||
else
|
||||
{
|
||||
// now handle lists/arrays/collections
|
||||
IEnumerable iEnumerable = innerSource as IEnumerable;
|
||||
if (iEnumerable != null)
|
||||
{
|
||||
Type childType = Utilities.GetChildItemType(
|
||||
innerSource.GetType());
|
||||
result = ScanObject(childType);
|
||||
}
|
||||
else
|
||||
{
|
||||
// the source is a regular object
|
||||
result = ScanObject(innerSource.GetType());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<string> ScanDataView(DataView ds)
|
||||
{
|
||||
List<string> result = new List<string>();
|
||||
for (int field = 0; field < ds.Table.Columns.Count; field++)
|
||||
result.Add(ds.Table.Columns[field].ColumnName);
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<string> ScanObject(Type sourceType)
|
||||
{
|
||||
List<string> result = new List<string>();
|
||||
|
||||
if (sourceType != null)
|
||||
{
|
||||
// retrieve a list of all public properties
|
||||
PropertyInfo[] props = sourceType.GetProperties();
|
||||
if (props.Length >= 0)
|
||||
for (int column = 0; column < props.Length; column++)
|
||||
if (props[column].CanRead)
|
||||
result.Add(props[column].Name);
|
||||
|
||||
// retrieve a list of all public fields
|
||||
FieldInfo[] fields = sourceType.GetFields();
|
||||
if (fields.Length >= 0)
|
||||
for (int column = 0; column < fields.Length; column++)
|
||||
result.Add(fields[column].Name);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetField
|
||||
|
||||
private static string GetField(object obj, string fieldName)
|
||||
{
|
||||
string result;
|
||||
DataRowView dataRowView = obj as DataRowView;
|
||||
if (dataRowView != null)
|
||||
{
|
||||
// this is a DataRowView from a DataView
|
||||
result = dataRowView[fieldName].ToString();
|
||||
}
|
||||
else if (obj is ValueType && obj.GetType().IsPrimitive)
|
||||
{
|
||||
// this is a primitive value type
|
||||
result = obj.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
string tmp = obj as string;
|
||||
if (tmp != null)
|
||||
{
|
||||
// this is a simple string
|
||||
result = (string)obj;
|
||||
}
|
||||
else
|
||||
{
|
||||
// this is an object or Structure
|
||||
try
|
||||
{
|
||||
Type sourceType = obj.GetType();
|
||||
|
||||
// see if the field is a property
|
||||
PropertyInfo prop = sourceType.GetProperty(fieldName);
|
||||
|
||||
if ((prop == null) || (!prop.CanRead))
|
||||
{
|
||||
// no readable property of that name exists -
|
||||
// check for a field
|
||||
FieldInfo field = sourceType.GetField(fieldName);
|
||||
if (field == null)
|
||||
{
|
||||
// no field exists either, throw an exception
|
||||
throw new DataException(
|
||||
Resources.NoSuchValueExistsException +
|
||||
" " + fieldName);
|
||||
}
|
||||
else
|
||||
{
|
||||
// got a field, return its value
|
||||
result = field.GetValue(obj).ToString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// found a property, return its value
|
||||
result = prop.GetValue(obj, null).ToString();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new DataException(
|
||||
Resources.ErrorReadingValueException +
|
||||
" " + fieldName, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,761 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
|
||||
namespace Csla.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// This is a DataReader that 'fixes' any null values before
|
||||
/// they are returned to our business code.
|
||||
/// </summary>
|
||||
public class SafeDataReader : IDataReader
|
||||
{
|
||||
private IDataReader _dataReader;
|
||||
|
||||
/// <summary>
|
||||
/// Get a reference to the underlying data reader
|
||||
/// object that actually contains the data from
|
||||
/// the data source.
|
||||
/// </summary>
|
||||
protected IDataReader DataReader
|
||||
{
|
||||
get { return _dataReader; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the SafeDataReader object to use data from
|
||||
/// the provided DataReader object.
|
||||
/// </summary>
|
||||
/// <param name="dataReader">The source DataReader object containing the data.</param>
|
||||
public SafeDataReader(IDataReader dataReader)
|
||||
{
|
||||
_dataReader = dataReader;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a string value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns empty string for null.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public string GetString(string name)
|
||||
{
|
||||
return GetString(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a string value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns empty string for null.
|
||||
/// </remarks>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual string GetString(int i)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return string.Empty;
|
||||
else
|
||||
return _dataReader.GetString(i);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value of type <see cref="System.Object" /> from the datareader.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public object GetValue(string name)
|
||||
{
|
||||
return GetValue(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value of type <see cref="System.Object" /> from the datareader.
|
||||
/// </summary>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual object GetValue(int i)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return null;
|
||||
else
|
||||
return _dataReader.GetValue(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets an integer from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public int GetInt32(string name)
|
||||
{
|
||||
return GetInt32(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets an integer from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual int GetInt32(int i)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return 0;
|
||||
else
|
||||
return _dataReader.GetInt32(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a double from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public double GetDouble(string name)
|
||||
{
|
||||
return GetDouble(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a double from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual double GetDouble(int i)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return 0;
|
||||
else
|
||||
return _dataReader.GetDouble(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="SmartDate" /> from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A null is converted into min possible date
|
||||
/// See Chapter 5 for more details on the SmartDate class.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public Csla.SmartDate GetSmartDate(string name)
|
||||
{
|
||||
return GetSmartDate(_dataReader.GetOrdinal(name), true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="SmartDate" /> from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A null is converted into the min possible date
|
||||
/// See Chapter 5 for more details on the SmartDate class.
|
||||
/// </remarks>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual Csla.SmartDate GetSmartDate(int i)
|
||||
{
|
||||
return GetSmartDate(i, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="SmartDate" /> from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A null is converted into either the min or max possible date
|
||||
/// depending on the MinIsEmpty parameter. See Chapter 5 for more
|
||||
/// details on the SmartDate class.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
/// <param name="minIsEmpty">
|
||||
/// A flag indicating whether the min or max
|
||||
/// value of a data means an empty date.</param>
|
||||
public Csla.SmartDate GetSmartDate(string name, bool minIsEmpty)
|
||||
{
|
||||
return GetSmartDate(_dataReader.GetOrdinal(name), minIsEmpty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="SmartDate"/> from the datareader.
|
||||
/// </summary>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
/// <param name="minIsEmpty">
|
||||
/// A flag indicating whether the min or max
|
||||
/// value of a data means an empty date.</param>
|
||||
public virtual Csla.SmartDate GetSmartDate(
|
||||
int i, bool minIsEmpty)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return new Csla.SmartDate(minIsEmpty);
|
||||
else
|
||||
return new Csla.SmartDate(
|
||||
_dataReader.GetDateTime(i), minIsEmpty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a Guid value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns Guid.Empty for null.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public System.Guid GetGuid(string name)
|
||||
{
|
||||
return GetGuid(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a Guid value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns Guid.Empty for null.
|
||||
/// </remarks>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual System.Guid GetGuid(int i)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return Guid.Empty;
|
||||
else
|
||||
return _dataReader.GetGuid(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the next row of data from the datareader.
|
||||
/// </summary>
|
||||
public bool Read()
|
||||
{
|
||||
return _dataReader.Read();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves to the next result set in the datareader.
|
||||
/// </summary>
|
||||
public bool NextResult()
|
||||
{
|
||||
return _dataReader.NextResult();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Closes the datareader.
|
||||
/// </summary>
|
||||
public void Close()
|
||||
{
|
||||
_dataReader.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the depth property value from the datareader.
|
||||
/// </summary>
|
||||
public int Depth
|
||||
{
|
||||
get
|
||||
{
|
||||
return _dataReader.Depth;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the FieldCount property from the datareader.
|
||||
/// </summary>
|
||||
public int FieldCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return _dataReader.FieldCount;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a boolean value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns <see langword="false" /> for null.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public bool GetBoolean(string name)
|
||||
{
|
||||
return GetBoolean(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a boolean value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns <see langword="false" /> for null.
|
||||
/// </remarks>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual bool GetBoolean(int i)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return false;
|
||||
else
|
||||
return _dataReader.GetBoolean(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a byte value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public byte GetByte(string name)
|
||||
{
|
||||
return GetByte(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a byte value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual byte GetByte(int i)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return 0;
|
||||
else
|
||||
return _dataReader.GetByte(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the GetBytes method of the underlying datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
/// <param name="buffer">Array containing the data.</param>
|
||||
/// <param name="bufferOffset">Offset position within the buffer.</param>
|
||||
/// <param name="fieldOffset">Offset position within the field.</param>
|
||||
/// <param name="length">Length of data to read.</param>
|
||||
public Int64 GetBytes(string name, Int64 fieldOffset,
|
||||
byte[] buffer, int bufferOffset, int length)
|
||||
{
|
||||
return GetBytes(_dataReader.GetOrdinal(name), fieldOffset, buffer, bufferOffset, length);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the GetBytes method of the underlying datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
/// <param name="buffer">Array containing the data.</param>
|
||||
/// <param name="bufferOffset">Offset position within the buffer.</param>
|
||||
/// <param name="fieldOffset">Offset position within the field.</param>
|
||||
/// <param name="length">Length of data to read.</param>
|
||||
public virtual Int64 GetBytes(int i, Int64 fieldOffset,
|
||||
byte[] buffer, int bufferOffset, int length)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return 0;
|
||||
else
|
||||
return _dataReader.GetBytes(i, fieldOffset, buffer, bufferOffset, length);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a char value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns Char.MinValue for null.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public char GetChar(string name)
|
||||
{
|
||||
return GetChar(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a char value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns Char.MinValue for null.
|
||||
/// </remarks>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual char GetChar(int i)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return char.MinValue;
|
||||
else
|
||||
{
|
||||
char[] myChar = new char[1];
|
||||
_dataReader.GetChars(i, 0, myChar, 0, 1);
|
||||
return myChar[0];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the GetChars method of the underlying datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
/// <param name="buffer">Array containing the data.</param>
|
||||
/// <param name="bufferOffset">Offset position within the buffer.</param>
|
||||
/// <param name="fieldOffset">Offset position within the field.</param>
|
||||
/// <param name="length">Length of data to read.</param>
|
||||
public Int64 GetChars(string name, Int64 fieldOffset,
|
||||
char[] buffer, int bufferOffset, int length)
|
||||
{
|
||||
return GetChars(_dataReader.GetOrdinal(name), fieldOffset, buffer, bufferOffset, length);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the GetChars method of the underlying datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
/// <param name="buffer">Array containing the data.</param>
|
||||
/// <param name="bufferOffset">Offset position within the buffer.</param>
|
||||
/// <param name="fieldOffset">Offset position within the field.</param>
|
||||
/// <param name="length">Length of data to read.</param>
|
||||
public virtual Int64 GetChars(int i, Int64 fieldOffset,
|
||||
char[] buffer, int bufferOffset, int length)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return 0;
|
||||
else
|
||||
return _dataReader.GetChars(i, fieldOffset, buffer, bufferOffset, length);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the GetData method of the underlying datareader.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public IDataReader GetData(string name)
|
||||
{
|
||||
return GetData(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the GetData method of the underlying datareader.
|
||||
/// </summary>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual IDataReader GetData(int i)
|
||||
{
|
||||
return _dataReader.GetData(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the GetDataTypeName method of the underlying datareader.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public string GetDataTypeName(string name)
|
||||
{
|
||||
return GetDataTypeName(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the GetDataTypeName method of the underlying datareader.
|
||||
/// </summary>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual string GetDataTypeName(int i)
|
||||
{
|
||||
return _dataReader.GetDataTypeName(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a date value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns DateTime.MinValue for null.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public virtual DateTime GetDateTime(string name)
|
||||
{
|
||||
return GetDateTime(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a date value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns DateTime.MinValue for null.
|
||||
/// </remarks>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual DateTime GetDateTime(int i)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return DateTime.MinValue;
|
||||
else
|
||||
return _dataReader.GetDateTime(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a decimal value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public decimal GetDecimal(string name)
|
||||
{
|
||||
return GetDecimal(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a decimal value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual decimal GetDecimal(int i)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return 0;
|
||||
else
|
||||
return _dataReader.GetDecimal(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the GetFieldType method of the underlying datareader.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public Type GetFieldType(string name)
|
||||
{
|
||||
return GetFieldType(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the GetFieldType method of the underlying datareader.
|
||||
/// </summary>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual Type GetFieldType(int i)
|
||||
{
|
||||
return _dataReader.GetFieldType(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a Single value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public float GetFloat(string name)
|
||||
{
|
||||
return GetFloat(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a Single value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual float GetFloat(int i)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return 0;
|
||||
else
|
||||
return _dataReader.GetFloat(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a Short value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public short GetInt16(string name)
|
||||
{
|
||||
return GetInt16(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a Short value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual short GetInt16(int i)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return 0;
|
||||
else
|
||||
return _dataReader.GetInt16(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a Long value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public Int64 GetInt64(string name)
|
||||
{
|
||||
return GetInt64(_dataReader.GetOrdinal(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a Long value from the datareader.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns 0 for null.
|
||||
/// </remarks>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual Int64 GetInt64(int i)
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return 0;
|
||||
else
|
||||
return _dataReader.GetInt64(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the GetName method of the underlying datareader.
|
||||
/// </summary>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual string GetName(int i)
|
||||
{
|
||||
return _dataReader.GetName(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets an ordinal value from the datareader.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public int GetOrdinal(string name)
|
||||
{
|
||||
return _dataReader.GetOrdinal(name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the GetSchemaTable method of the underlying datareader.
|
||||
/// </summary>
|
||||
public DataTable GetSchemaTable()
|
||||
{
|
||||
return _dataReader.GetSchemaTable();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the GetValues method of the underlying datareader.
|
||||
/// </summary>
|
||||
/// <param name="values">An array of System.Object to
|
||||
/// copy the values into.</param>
|
||||
public int GetValues(object[] values)
|
||||
{
|
||||
return _dataReader.GetValues(values);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the IsClosed property value from the datareader.
|
||||
/// </summary>
|
||||
public bool IsClosed
|
||||
{
|
||||
get
|
||||
{
|
||||
return _dataReader.IsClosed;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the IsDBNull method of the underlying datareader.
|
||||
/// </summary>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual bool IsDBNull(int i)
|
||||
{
|
||||
return _dataReader.IsDBNull(i);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a value from the datareader.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the column containing the value.</param>
|
||||
public object this[string name]
|
||||
{
|
||||
get
|
||||
{
|
||||
object val = _dataReader[name];
|
||||
if (DBNull.Value.Equals(val))
|
||||
return null;
|
||||
else
|
||||
return val;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a value from the datareader.
|
||||
/// </summary>
|
||||
/// <param name="i">Ordinal column position of the value.</param>
|
||||
public virtual object this[int i]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_dataReader.IsDBNull(i))
|
||||
return null;
|
||||
else
|
||||
return _dataReader[i];
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns the RecordsAffected property value from the underlying datareader.
|
||||
/// </summary>
|
||||
public int RecordsAffected
|
||||
{
|
||||
get
|
||||
{
|
||||
return _dataReader.RecordsAffected;
|
||||
}
|
||||
}
|
||||
|
||||
#region IDisposable Support
|
||||
|
||||
private bool _disposedValue; // To detect redundant calls
|
||||
|
||||
/// <summary>
|
||||
/// Disposes the object.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True if called by
|
||||
/// the public Dispose method.</param>
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!_disposedValue)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
// free unmanaged resources when explicitly called
|
||||
_dataReader.Dispose();
|
||||
}
|
||||
|
||||
// free shared unmanaged resources
|
||||
}
|
||||
_disposedValue = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disposes the object.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
// Do not change this code. Put cleanup code in Dispose(bool disposing) above.
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Object finalizer.
|
||||
/// </summary>
|
||||
~SafeDataReader()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,369 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Security.Principal;
|
||||
using System.Collections.Specialized;
|
||||
using System.Configuration;
|
||||
using System.Web;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides consistent context information between the client
|
||||
/// and server DataPortal objects.
|
||||
/// </summary>
|
||||
public static class ApplicationContext
|
||||
{
|
||||
#region User
|
||||
|
||||
/// <summary>
|
||||
/// Get or set the current <see cref="IPrincipal" />
|
||||
/// object representing the user's identity.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is discussed in Chapter 5. When running
|
||||
/// under IIS the HttpContext.Current.User value
|
||||
/// is used, otherwise the current Thread.CurrentPrincipal
|
||||
/// value is used.
|
||||
/// </remarks>
|
||||
public static IPrincipal User
|
||||
{
|
||||
get
|
||||
{
|
||||
if (HttpContext.Current == null)
|
||||
return Thread.CurrentPrincipal;
|
||||
else
|
||||
return HttpContext.Current.User;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (HttpContext.Current != null)
|
||||
HttpContext.Current.User = value;
|
||||
Thread.CurrentPrincipal = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region LocalContext
|
||||
|
||||
private const string _localContextName = "Csla.LocalContext";
|
||||
|
||||
/// <summary>
|
||||
/// Returns the application-specific context data that
|
||||
/// is local to the current AppDomain.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// The return value is a HybridDictionary. If one does
|
||||
/// not already exist, and empty one is created and returned.
|
||||
/// </para><para>
|
||||
/// Note that data in this context is NOT transferred to and from
|
||||
/// the client and server.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static HybridDictionary LocalContext
|
||||
{
|
||||
get
|
||||
{
|
||||
HybridDictionary ctx = GetLocalContext();
|
||||
if (ctx == null)
|
||||
{
|
||||
ctx = new HybridDictionary();
|
||||
SetLocalContext(ctx);
|
||||
}
|
||||
return ctx;
|
||||
}
|
||||
}
|
||||
|
||||
private static HybridDictionary GetLocalContext()
|
||||
{
|
||||
if (HttpContext.Current == null)
|
||||
{
|
||||
LocalDataStoreSlot slot = Thread.GetNamedDataSlot(_localContextName);
|
||||
return (HybridDictionary)Thread.GetData(slot);
|
||||
}
|
||||
else
|
||||
return (HybridDictionary)HttpContext.Current.Items[_localContextName];
|
||||
}
|
||||
|
||||
private static void SetLocalContext(HybridDictionary localContext)
|
||||
{
|
||||
if (HttpContext.Current == null)
|
||||
{
|
||||
LocalDataStoreSlot slot = Thread.GetNamedDataSlot(_localContextName);
|
||||
Thread.SetData(slot, localContext);
|
||||
}
|
||||
else
|
||||
HttpContext.Current.Items[_localContextName] = localContext;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Client/Global Context
|
||||
|
||||
private static object _syncClientContext = new object();
|
||||
private const string _clientContextName = "Csla.ClientContext";
|
||||
private const string _globalContextName = "Csla.GlobalContext";
|
||||
|
||||
/// <summary>
|
||||
/// Returns the application-specific context data provided
|
||||
/// by the client.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// The return value is a HybridDictionary. If one does
|
||||
/// not already exist, and empty one is created and returned.
|
||||
/// </para><para>
|
||||
/// Note that data in this context is transferred from
|
||||
/// the client to the server. No data is transferred from
|
||||
/// the server to the client.
|
||||
/// </para><para>
|
||||
/// This property is thread safe in a Windows client
|
||||
/// setting and on an application server. It is not guaranteed
|
||||
/// to be thread safe within the context of an ASP.NET
|
||||
/// client setting (i.e. in your ASP.NET UI).
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static HybridDictionary ClientContext
|
||||
{
|
||||
get
|
||||
{
|
||||
lock (_syncClientContext)
|
||||
{
|
||||
HybridDictionary ctx = GetClientContext();
|
||||
if (ctx == null)
|
||||
{
|
||||
ctx = new HybridDictionary();
|
||||
SetClientContext(ctx);
|
||||
}
|
||||
return ctx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the application-specific context data shared
|
||||
/// on both client and server.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// The return value is a HybridDictionary. If one does
|
||||
/// not already exist, and empty one is created and returned.
|
||||
/// </para><para>
|
||||
/// Note that data in this context is transferred to and from
|
||||
/// the client and server. Any objects or data in this context
|
||||
/// will be transferred bi-directionally across the network.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static HybridDictionary GlobalContext
|
||||
{
|
||||
get
|
||||
{
|
||||
HybridDictionary ctx = GetGlobalContext();
|
||||
if (ctx == null)
|
||||
{
|
||||
ctx = new HybridDictionary();
|
||||
SetGlobalContext(ctx);
|
||||
}
|
||||
return ctx;
|
||||
}
|
||||
}
|
||||
|
||||
internal static HybridDictionary GetClientContext()
|
||||
{
|
||||
if (HttpContext.Current == null)
|
||||
{
|
||||
if (ApplicationContext.ExecutionLocation == ExecutionLocations.Client)
|
||||
lock (_syncClientContext)
|
||||
return (HybridDictionary)AppDomain.CurrentDomain.GetData(_clientContextName);
|
||||
else
|
||||
{
|
||||
LocalDataStoreSlot slot =
|
||||
Thread.GetNamedDataSlot(_clientContextName);
|
||||
return (HybridDictionary)Thread.GetData(slot);
|
||||
}
|
||||
}
|
||||
else
|
||||
return (HybridDictionary)
|
||||
HttpContext.Current.Items[_clientContextName];
|
||||
}
|
||||
|
||||
internal static HybridDictionary GetGlobalContext()
|
||||
{
|
||||
if (HttpContext.Current == null)
|
||||
{
|
||||
LocalDataStoreSlot slot = Thread.GetNamedDataSlot(_globalContextName);
|
||||
return (HybridDictionary)Thread.GetData(slot);
|
||||
}
|
||||
else
|
||||
return (HybridDictionary)HttpContext.Current.Items[_globalContextName];
|
||||
}
|
||||
|
||||
private static void SetClientContext(HybridDictionary clientContext)
|
||||
{
|
||||
if (HttpContext.Current == null)
|
||||
{
|
||||
if (ApplicationContext.ExecutionLocation == ExecutionLocations.Client)
|
||||
lock (_syncClientContext)
|
||||
AppDomain.CurrentDomain.SetData(_clientContextName, clientContext);
|
||||
else
|
||||
{
|
||||
LocalDataStoreSlot slot = Thread.GetNamedDataSlot(_clientContextName);
|
||||
Thread.SetData(slot, clientContext);
|
||||
}
|
||||
}
|
||||
else
|
||||
HttpContext.Current.Items[_clientContextName] = clientContext;
|
||||
}
|
||||
|
||||
internal static void SetGlobalContext(HybridDictionary globalContext)
|
||||
{
|
||||
if (HttpContext.Current == null)
|
||||
{
|
||||
LocalDataStoreSlot slot = Thread.GetNamedDataSlot(_globalContextName);
|
||||
Thread.SetData(slot, globalContext);
|
||||
}
|
||||
else
|
||||
HttpContext.Current.Items[_globalContextName] = globalContext;
|
||||
}
|
||||
|
||||
internal static void SetContext(
|
||||
HybridDictionary clientContext,
|
||||
HybridDictionary globalContext)
|
||||
{
|
||||
SetClientContext(clientContext);
|
||||
SetGlobalContext(globalContext);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears all context collections.
|
||||
/// </summary>
|
||||
public static void Clear()
|
||||
{
|
||||
SetContext(null, null);
|
||||
SetLocalContext(null);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Config Settings
|
||||
|
||||
/// <summary>
|
||||
/// Returns the authentication type being used by the
|
||||
/// CSLA .NET framework.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
/// <returns></returns>
|
||||
/// <remarks>
|
||||
/// This value is read from the application configuration
|
||||
/// file with the key value "CslaAuthentication". The value
|
||||
/// "Windows" indicates CSLA .NET should use Windows integrated
|
||||
/// (or AD) security. Any other value indicates the use of
|
||||
/// custom security derived from BusinessPrincipalBase.
|
||||
/// </remarks>
|
||||
public static string AuthenticationType
|
||||
{
|
||||
get { return ConfigurationManager.AppSettings["CslaAuthentication"]; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the channel or network protocol
|
||||
/// for the DataPortal server.
|
||||
/// </summary>
|
||||
/// <value>Fully qualified assembly/type name of the proxy class.</value>
|
||||
/// <returns></returns>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// This value is read from the application configuration
|
||||
/// file with the key value "CslaDataPortalProxy".
|
||||
/// </para><para>
|
||||
/// The proxy class must implement Csla.Server.IDataPortalServer.
|
||||
/// </para><para>
|
||||
/// The value "Local" is a shortcut to running the DataPortal
|
||||
/// "server" in the client process.
|
||||
/// </para><para>
|
||||
/// Other built-in values include:
|
||||
/// <list>
|
||||
/// <item>
|
||||
/// <term>Csla,Csla.DataPortalClient.RemotingProxy</term>
|
||||
/// <description>Use .NET Remoting to communicate with the server</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>Csla,Csla.DataPortalClient.EnterpriseServicesProxy</term>
|
||||
/// <description>Use Enterprise Services (DCOM) to communicate with the server</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>Csla,Csla.DataPortalClient.WebServicesProxy</term>
|
||||
/// <description>Use Web Services (asmx) to communicate with the server</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// Each proxy type does require that the DataPortal server be hosted using the appropriate
|
||||
/// technology. For instance, Web Services and Remoting should be hosted in IIS, while
|
||||
/// Enterprise Services must be hosted in COM+.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static string DataPortalProxy
|
||||
{
|
||||
get
|
||||
{
|
||||
string result = ConfigurationManager.AppSettings["CslaDataPortalProxy"];
|
||||
if (string.IsNullOrEmpty(result))
|
||||
result = "Local";
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the URL for the DataPortal server.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
/// <returns></returns>
|
||||
/// <remarks>
|
||||
/// This value is read from the application configuration
|
||||
/// file with the key value "CslaDataPortalUrl".
|
||||
/// </remarks>
|
||||
public static Uri DataPortalUrl
|
||||
{
|
||||
get { return new Uri(ConfigurationManager.AppSettings["CslaDataPortalUrl"]); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enum representing the locations code can execute.
|
||||
/// </summary>
|
||||
public enum ExecutionLocations
|
||||
{
|
||||
/// <summary>
|
||||
/// The code is executing on the client.
|
||||
/// </summary>
|
||||
Client,
|
||||
/// <summary>
|
||||
/// The code is executing on the application server.
|
||||
/// </summary>
|
||||
Server
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region In-Memory Settings
|
||||
|
||||
private static ExecutionLocations _executionLocation =
|
||||
ExecutionLocations.Client;
|
||||
|
||||
/// <summary>
|
||||
/// Returns a value indicating whether the application code
|
||||
/// is currently executing on the client or server.
|
||||
/// </summary>
|
||||
public static ExecutionLocations ExecutionLocation
|
||||
{
|
||||
get { return _executionLocation; }
|
||||
}
|
||||
|
||||
internal static void SetExecutionLocation(ExecutionLocations location)
|
||||
{
|
||||
_executionLocation = location;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,448 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Remoting;
|
||||
using System.Runtime.Remoting.Channels;
|
||||
using System.Runtime.Remoting.Channels.Http;
|
||||
using Csla.Properties;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// This is the client-side DataPortal as described in
|
||||
/// Chapter 4.
|
||||
/// </summary>
|
||||
public static class DataPortal
|
||||
{
|
||||
|
||||
#region DataPortal events
|
||||
|
||||
/// <summary>
|
||||
/// Raised by DataPortal prior to calling the
|
||||
/// requested server-side DataPortal method.
|
||||
/// </summary>
|
||||
public static event Action<DataPortalEventArgs> DataPortalInvoke;
|
||||
|
||||
/// <summary>
|
||||
/// Raised by DataPortal after the requested
|
||||
/// server-side DataPortal method call is complete.
|
||||
/// </summary>
|
||||
public static event Action<DataPortalEventArgs> DataPortalInvokeComplete;
|
||||
|
||||
private static void OnDataPortalInvoke(DataPortalEventArgs e)
|
||||
{
|
||||
Action<DataPortalEventArgs> action = DataPortalInvoke;
|
||||
if (action != null)
|
||||
action(e);
|
||||
}
|
||||
|
||||
private static void OnDataPortalInvokeComplete(DataPortalEventArgs e)
|
||||
{
|
||||
Action<DataPortalEventArgs> action = DataPortalInvokeComplete;
|
||||
if (action != null)
|
||||
action(e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Data Access methods
|
||||
|
||||
private const int EmptyCriteria = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Called by a factory method in a business class to create
|
||||
/// a new object, which is loaded with default
|
||||
/// values from the database.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Specific type of the business object.</typeparam>
|
||||
/// <param name="criteria">Object-specific criteria.</param>
|
||||
/// <returns>A new object, populated with default values.</returns>
|
||||
public static T Create<T>(object criteria)
|
||||
{
|
||||
return (T)Create(typeof(T), criteria);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by a factory method in a business class to create
|
||||
/// a new object, which is loaded with default
|
||||
/// values from the database.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Specific type of the business object.</typeparam>
|
||||
/// <returns>A new object, populated with default values.</returns>
|
||||
public static T Create<T>()
|
||||
{
|
||||
return (T)Create(typeof(T), EmptyCriteria);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by a factory method in a business class to create
|
||||
/// a new object, which is loaded with default
|
||||
/// values from the database.
|
||||
/// </summary>
|
||||
/// <param name="criteria">Object-specific criteria.</param>
|
||||
/// <returns>A new object, populated with default values.</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2223:MembersShouldDifferByMoreThanReturnType")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")]
|
||||
public static object Create(object criteria)
|
||||
{
|
||||
return Create(MethodCaller.GetObjectType(criteria), criteria);
|
||||
}
|
||||
|
||||
private static object Create(Type objectType, object criteria)
|
||||
{
|
||||
Server.DataPortalResult result;
|
||||
|
||||
MethodInfo method = MethodCaller.GetCreateMethod(objectType, criteria);
|
||||
|
||||
DataPortalClient.IDataPortalProxy proxy;
|
||||
proxy = GetDataPortalProxy(RunLocal(method));
|
||||
|
||||
Server.DataPortalContext dpContext =
|
||||
new Csla.Server.DataPortalContext(GetPrincipal(), proxy.IsServerRemote);
|
||||
|
||||
OnDataPortalInvoke(new DataPortalEventArgs(dpContext));
|
||||
|
||||
try
|
||||
{
|
||||
result = proxy.Create(objectType, criteria, dpContext);
|
||||
}
|
||||
catch (Server.DataPortalException ex)
|
||||
{
|
||||
result = ex.Result;
|
||||
if (proxy.IsServerRemote)
|
||||
ApplicationContext.SetGlobalContext(result.GlobalContext);
|
||||
throw new DataPortalException(
|
||||
string.Format("DataPortal.Create {0} ({1})", Resources.Failed, ex.InnerException.InnerException),
|
||||
ex.InnerException, result.ReturnObject);
|
||||
}
|
||||
|
||||
if (proxy.IsServerRemote)
|
||||
ApplicationContext.SetGlobalContext(result.GlobalContext);
|
||||
|
||||
OnDataPortalInvokeComplete(new DataPortalEventArgs(dpContext));
|
||||
|
||||
return result.ReturnObject;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by a factory method in a business class to retrieve
|
||||
/// an object, which is loaded with values from the database.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Specific type of the business object.</typeparam>
|
||||
/// <param name="criteria">Object-specific criteria.</param>
|
||||
/// <returns>An object populated with values from the database.</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2223:MembersShouldDifferByMoreThanReturnType")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "Csla.DataPortalException.#ctor(System.String,System.Exception,System.Object)")]
|
||||
public static T Fetch<T>(object criteria)
|
||||
{
|
||||
return (T)Fetch(typeof(T), criteria);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by a factory method in a business class to retrieve
|
||||
/// an object, which is loaded with values from the database.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Specific type of the business object.</typeparam>
|
||||
/// <returns>An object populated with values from the database.</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2223:MembersShouldDifferByMoreThanReturnType")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "Csla.DataPortalException.#ctor(System.String,System.Exception,System.Object)")]
|
||||
public static T Fetch<T>()
|
||||
{
|
||||
return (T)Fetch(typeof(T), EmptyCriteria);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by a factory method in a business class to retrieve
|
||||
/// an object, which is loaded with values from the database.
|
||||
/// </summary>
|
||||
/// <param name="criteria">Object-specific criteria.</param>
|
||||
/// <returns>An object populated with values from the database.</returns>
|
||||
public static object Fetch(object criteria)
|
||||
{
|
||||
return Fetch(MethodCaller.GetObjectType(criteria), criteria);
|
||||
}
|
||||
|
||||
private static object Fetch(Type objectType, object criteria)
|
||||
{
|
||||
Server.DataPortalResult result;
|
||||
|
||||
MethodInfo method = MethodCaller.GetFetchMethod(objectType, criteria);
|
||||
|
||||
DataPortalClient.IDataPortalProxy proxy;
|
||||
proxy = GetDataPortalProxy(RunLocal(method));
|
||||
|
||||
Server.DataPortalContext dpContext =
|
||||
new Server.DataPortalContext(GetPrincipal(),
|
||||
proxy.IsServerRemote);
|
||||
|
||||
OnDataPortalInvoke(new DataPortalEventArgs(dpContext));
|
||||
|
||||
try
|
||||
{
|
||||
result = proxy.Fetch(objectType, criteria, dpContext);
|
||||
}
|
||||
catch (Server.DataPortalException ex)
|
||||
{
|
||||
result = ex.Result;
|
||||
if (proxy.IsServerRemote)
|
||||
ApplicationContext.SetGlobalContext(result.GlobalContext);
|
||||
throw new DataPortalException(
|
||||
String.Format("DataPortal.Fetch {0} ({1})", Resources.Failed, ex.InnerException.InnerException),
|
||||
ex.InnerException, result.ReturnObject);
|
||||
}
|
||||
|
||||
if (proxy.IsServerRemote)
|
||||
ApplicationContext.SetGlobalContext(result.GlobalContext);
|
||||
|
||||
OnDataPortalInvokeComplete(new DataPortalEventArgs(dpContext));
|
||||
|
||||
return result.ReturnObject;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called to execute a Command object on the server.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// To be a Command object, the object must inherit from
|
||||
/// <see cref="CommandBase">CommandBase</see>.
|
||||
/// </para><para>
|
||||
/// Note that this method returns a reference to the updated business object.
|
||||
/// If the server-side DataPortal is running remotely, this will be a new and
|
||||
/// different object from the original, and all object references MUST be updated
|
||||
/// to use this new object.
|
||||
/// </para><para>
|
||||
/// On the server, the Command object's DataPortal_Execute() method will
|
||||
/// be invoked. Write any server-side code in that method.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <typeparam name="T">Specific type of the Command object.</typeparam>
|
||||
/// <param name="obj">A reference to the Command object to be executed.</param>
|
||||
/// <returns>A reference to the updated Command object.</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters",
|
||||
MessageId="Csla.DataPortalException.#ctor(System.String,System.Exception,System.Object)")]
|
||||
public static T Execute<T>(T obj) where T : CommandBase
|
||||
{
|
||||
return (T)Update(obj);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called to execute a Command object on the server.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Note that this method returns a reference to the updated business object.
|
||||
/// If the server-side DataPortal is running remotely, this will be a new and
|
||||
/// different object from the original, and all object references MUST be updated
|
||||
/// to use this new object.
|
||||
/// </para><para>
|
||||
/// On the server, the Command object's DataPortal_Execute() method will
|
||||
/// be invoked. Write any server-side code in that method.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <param name="obj">A reference to the Command object to be executed.</param>
|
||||
/// <returns>A reference to the updated Command object.</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId="Csla.DataPortalException.#ctor(System.String,System.Exception,System.Object)")]
|
||||
public static CommandBase Execute(CommandBase obj)
|
||||
{
|
||||
return (CommandBase)Update(obj);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the business object's Save() method to
|
||||
/// insert, update or delete an object in the database.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Note that this method returns a reference to the updated business object.
|
||||
/// If the server-side DataPortal is running remotely, this will be a new and
|
||||
/// different object from the original, and all object references MUST be updated
|
||||
/// to use this new object.
|
||||
/// </remarks>
|
||||
/// <typeparam name="T">Specific type of the business object.</typeparam>
|
||||
/// <param name="obj">A reference to the business object to be updated.</param>
|
||||
/// <returns>A reference to the updated business object.</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "Csla.DataPortalException.#ctor(System.String,System.Exception,System.Object)")]
|
||||
public static T Update<T>(T obj)
|
||||
{
|
||||
return (T)Update((object)obj);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the business object's Save() method to
|
||||
/// insert, update or delete an object in the database.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Note that this method returns a reference to the updated business object.
|
||||
/// If the server-side DataPortal is running remotely, this will be a new and
|
||||
/// different object from the original, and all object references MUST be updated
|
||||
/// to use this new object.
|
||||
/// </remarks>
|
||||
/// <param name="obj">A reference to the business object to be updated.</param>
|
||||
/// <returns>A reference to the updated business object.</returns>
|
||||
public static object Update(object obj)
|
||||
{
|
||||
Server.DataPortalResult result;
|
||||
|
||||
MethodInfo method;
|
||||
string methodName;
|
||||
if (obj is CommandBase)
|
||||
methodName = "DataPortal_Execute";
|
||||
else if (obj is Core.BusinessBase)
|
||||
{
|
||||
Core.BusinessBase tmp = (Core.BusinessBase)obj;
|
||||
if (tmp.IsDeleted)
|
||||
methodName = "DataPortal_DeleteSelf";
|
||||
else
|
||||
if (tmp.IsNew)
|
||||
methodName = "DataPortal_Insert";
|
||||
else
|
||||
methodName = "DataPortal_Update";
|
||||
}
|
||||
else
|
||||
methodName = "DataPortal_Update";
|
||||
|
||||
method = MethodCaller.GetMethod(obj.GetType(), methodName);
|
||||
|
||||
DataPortalClient.IDataPortalProxy proxy;
|
||||
proxy = GetDataPortalProxy(RunLocal(method));
|
||||
|
||||
Server.DataPortalContext dpContext =
|
||||
new Server.DataPortalContext(GetPrincipal(), proxy.IsServerRemote);
|
||||
|
||||
OnDataPortalInvoke(new DataPortalEventArgs(dpContext));
|
||||
|
||||
try
|
||||
{
|
||||
result = proxy.Update(obj, dpContext);
|
||||
}
|
||||
catch (Server.DataPortalException ex)
|
||||
{
|
||||
result = ex.Result;
|
||||
if (proxy.IsServerRemote)
|
||||
ApplicationContext.SetGlobalContext(result.GlobalContext);
|
||||
throw new DataPortalException(
|
||||
String.Format("DataPortal.Update {0} ({1})", Resources.Failed, ex.InnerException.InnerException),
|
||||
ex.InnerException, result.ReturnObject);
|
||||
}
|
||||
|
||||
if (proxy.IsServerRemote)
|
||||
ApplicationContext.SetGlobalContext(result.GlobalContext);
|
||||
|
||||
OnDataPortalInvokeComplete(new DataPortalEventArgs(dpContext));
|
||||
|
||||
return result.ReturnObject;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by a Shared (static in C#) method in the business class to cause
|
||||
/// immediate deletion of a specific object from the database.
|
||||
/// </summary>
|
||||
/// <param name="criteria">Object-specific criteria.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "Csla.DataPortalException.#ctor(System.String,System.Exception,System.Object)")]
|
||||
public static void Delete(object criteria)
|
||||
{
|
||||
Server.DataPortalResult result;
|
||||
|
||||
MethodInfo method = MethodCaller.GetMethod(
|
||||
MethodCaller.GetObjectType(criteria), "DataPortal_Delete", criteria);
|
||||
|
||||
DataPortalClient.IDataPortalProxy proxy;
|
||||
proxy = GetDataPortalProxy(RunLocal(method));
|
||||
|
||||
Server.DataPortalContext dpContext = new Server.DataPortalContext(GetPrincipal(), proxy.IsServerRemote);
|
||||
|
||||
OnDataPortalInvoke(new DataPortalEventArgs(dpContext));
|
||||
|
||||
try
|
||||
{
|
||||
result = proxy.Delete(criteria, dpContext);
|
||||
}
|
||||
catch (Server.DataPortalException ex)
|
||||
{
|
||||
result = ex.Result;
|
||||
if (proxy.IsServerRemote)
|
||||
ApplicationContext.SetGlobalContext(result.GlobalContext);
|
||||
throw new DataPortalException(
|
||||
String.Format("DataPortal.Delete {0} ({1})", Resources.Failed, ex.InnerException.InnerException),
|
||||
ex.InnerException, result.ReturnObject);
|
||||
}
|
||||
|
||||
if (proxy.IsServerRemote)
|
||||
ApplicationContext.SetGlobalContext(result.GlobalContext);
|
||||
|
||||
OnDataPortalInvokeComplete(new DataPortalEventArgs(dpContext));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region DataPortal Proxy
|
||||
|
||||
private static DataPortalClient.IDataPortalProxy _localPortal;
|
||||
private static DataPortalClient.IDataPortalProxy _portal;
|
||||
|
||||
private static DataPortalClient.IDataPortalProxy GetDataPortalProxy(bool forceLocal)
|
||||
{
|
||||
if (forceLocal)
|
||||
{
|
||||
if (_localPortal == null)
|
||||
_localPortal = new DataPortalClient.LocalProxy();
|
||||
return _localPortal;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_portal == null)
|
||||
{
|
||||
string proxyTypeName = ApplicationContext.DataPortalProxy;
|
||||
if (proxyTypeName == "Local")
|
||||
_portal = new DataPortalClient.LocalProxy();
|
||||
else
|
||||
{
|
||||
string typeName =
|
||||
proxyTypeName.Substring(0, proxyTypeName.IndexOf(",")).Trim();
|
||||
string assemblyName =
|
||||
proxyTypeName.Substring(proxyTypeName.IndexOf(",") + 1).Trim();
|
||||
_portal = (DataPortalClient.IDataPortalProxy)
|
||||
Activator.CreateInstance(assemblyName, typeName).Unwrap();
|
||||
}
|
||||
}
|
||||
return _portal;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Security
|
||||
|
||||
private static System.Security.Principal.IPrincipal GetPrincipal()
|
||||
{
|
||||
if (ApplicationContext.AuthenticationType == "Windows")
|
||||
{
|
||||
// Windows integrated security
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
// we assume using the CSLA framework security
|
||||
return ApplicationContext.User;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Helper methods
|
||||
|
||||
private static bool RunLocal(MethodInfo method)
|
||||
{
|
||||
return Attribute.IsDefined(method, typeof(RunLocalAttribute), false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
using System;
|
||||
|
||||
namespace Csla.DataPortalClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements a data portal proxy to relay data portal
|
||||
/// calls to an application server hosted in COM+.
|
||||
/// </summary>
|
||||
public abstract class EnterpriseServicesProxy : DataPortalClient.IDataPortalProxy
|
||||
{
|
||||
/// <summary>
|
||||
/// Override this method to return a reference to
|
||||
/// the server-side COM+ (ServicedComponent) object
|
||||
/// implementing the data portal server functionality.
|
||||
/// </summary>
|
||||
protected abstract Server.Hosts.EnterpriseServicesPortal GetServerObject();
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to create a
|
||||
/// new business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to create.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public virtual Server.DataPortalResult Create(Type objectType, object criteria, Server.DataPortalContext context)
|
||||
{
|
||||
Server.Hosts.EnterpriseServicesPortal svc = GetServerObject();
|
||||
try
|
||||
{
|
||||
return svc.Create(objectType, criteria, context);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (svc != null)
|
||||
svc.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to load an
|
||||
/// existing business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to retrieve.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public virtual Server.DataPortalResult Fetch(Type objectType, object criteria, Server.DataPortalContext context)
|
||||
{
|
||||
Server.Hosts.EnterpriseServicesPortal svc = GetServerObject();
|
||||
try
|
||||
{
|
||||
return svc.Fetch(objectType, criteria, context);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (svc != null)
|
||||
svc.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to update a
|
||||
/// business object.
|
||||
/// </summary>
|
||||
/// <param name="obj">The business object to update.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public virtual Server.DataPortalResult Update(object obj, Server.DataPortalContext context)
|
||||
{
|
||||
Server.Hosts.EnterpriseServicesPortal svc = GetServerObject();
|
||||
try
|
||||
{
|
||||
return svc.Update(obj, context);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (svc != null)
|
||||
svc.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to delete a
|
||||
/// business object.
|
||||
/// </summary>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public virtual Server.DataPortalResult Delete(object criteria, Server.DataPortalContext context)
|
||||
{
|
||||
Server.Hosts.EnterpriseServicesPortal svc = GetServerObject();
|
||||
try
|
||||
{
|
||||
return svc.Delete(criteria, context);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (svc != null)
|
||||
svc.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a value indicating whether this proxy will invoke
|
||||
/// a remote data portal server, or run the "server-side"
|
||||
/// data portal in the caller's process and AppDomain.
|
||||
/// </summary>
|
||||
public virtual bool IsServerRemote
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace Csla.DataPortalClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface implemented by client-side
|
||||
/// data portal proxy objects.
|
||||
/// </summary>
|
||||
public interface IDataPortalProxy : Server.IDataPortalServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Get a value indicating whether this proxy will invoke
|
||||
/// a remote data portal server, or run the "server-side"
|
||||
/// data portal in the caller's process and AppDomain.
|
||||
/// </summary>
|
||||
bool IsServerRemote { get;}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Csla.Server;
|
||||
|
||||
namespace Csla.DataPortalClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements a data portal proxy to relay data portal
|
||||
/// calls to an application server hosted locally
|
||||
/// in the client process and AppDomain.
|
||||
/// </summary>
|
||||
public class LocalProxy : DataPortalClient.IDataPortalProxy
|
||||
{
|
||||
private Server.IDataPortalServer _portal =
|
||||
new Server.DataPortal();
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to create a
|
||||
/// new business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to create.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public DataPortalResult Create(
|
||||
Type objectType, object criteria, DataPortalContext context)
|
||||
{
|
||||
return _portal.Create(objectType, criteria, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to load an
|
||||
/// existing business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to retrieve.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public DataPortalResult Fetch(Type objectType, object criteria, DataPortalContext context)
|
||||
{
|
||||
return _portal.Fetch(objectType, criteria, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to update a
|
||||
/// business object.
|
||||
/// </summary>
|
||||
/// <param name="obj">The business object to update.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public DataPortalResult Update(object obj, DataPortalContext context)
|
||||
{
|
||||
return _portal.Update(obj, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to delete a
|
||||
/// business object.
|
||||
/// </summary>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public DataPortalResult Delete(object criteria, DataPortalContext context)
|
||||
{
|
||||
return _portal.Delete(criteria, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a value indicating whether this proxy will invoke
|
||||
/// a remote data portal server, or run the "server-side"
|
||||
/// data portal in the caller's process and AppDomain.
|
||||
/// </summary>
|
||||
public bool IsServerRemote
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Threading;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Remoting;
|
||||
using System.Runtime.Remoting.Channels;
|
||||
using System.Runtime.Remoting.Channels.Http;
|
||||
|
||||
namespace Csla.DataPortalClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements a data portal proxy to relay data portal
|
||||
/// calls to a remote application server by using the
|
||||
/// .NET Remoting technology.
|
||||
/// </summary>
|
||||
public class RemotingProxy : DataPortalClient.IDataPortalProxy
|
||||
{
|
||||
|
||||
#region Configure Remoting
|
||||
|
||||
/// <summary>
|
||||
/// Configure .NET Remoting to use a binary
|
||||
/// serialization technology even when using
|
||||
/// the HTTP channel. Also ensures that the
|
||||
/// user's Windows credentials are passed to
|
||||
/// the server appropriately.
|
||||
/// </summary>
|
||||
static RemotingProxy()
|
||||
{
|
||||
// create and register a custom HTTP channel
|
||||
// that uses the binary formatter
|
||||
Hashtable properties = new Hashtable();
|
||||
properties["name"] = "HttpBinary";
|
||||
|
||||
if (ApplicationContext.AuthenticationType == "Windows" || AlwaysImpersonate)
|
||||
{
|
||||
// make sure we pass the user's Windows credentials
|
||||
// to the server
|
||||
properties["useDefaultCredentials"] = true;
|
||||
}
|
||||
|
||||
BinaryClientFormatterSinkProvider
|
||||
formatter = new BinaryClientFormatterSinkProvider();
|
||||
HttpChannel channel = new HttpChannel(properties, formatter, null);
|
||||
ChannelServices.RegisterChannel(channel, EncryptChannel);
|
||||
}
|
||||
|
||||
private static bool AlwaysImpersonate
|
||||
{
|
||||
get
|
||||
{
|
||||
bool result =
|
||||
(ConfigurationManager.AppSettings["AlwaysImpersonate"] == "true");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool EncryptChannel
|
||||
{
|
||||
get
|
||||
{
|
||||
bool encrypt =
|
||||
(ConfigurationManager.AppSettings["CslaEncryptRemoting"] == "true");
|
||||
return encrypt;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Server.IDataPortalServer _portal;
|
||||
|
||||
private Server.IDataPortalServer Portal
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_portal == null)
|
||||
_portal = (Server.IDataPortalServer)Activator.GetObject(
|
||||
typeof(Server.Hosts.RemotingPortal),
|
||||
ApplicationContext.DataPortalUrl.ToString());
|
||||
return _portal;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to create a
|
||||
/// new business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to create.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public Server.DataPortalResult Create(
|
||||
Type objectType, object criteria, Server.DataPortalContext context)
|
||||
{
|
||||
return Portal.Create(objectType, criteria, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to load an
|
||||
/// existing business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to retrieve.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public Server.DataPortalResult Fetch(Type objectType, object criteria, Server.DataPortalContext context)
|
||||
{
|
||||
return Portal.Fetch(objectType, criteria, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to update a
|
||||
/// business object.
|
||||
/// </summary>
|
||||
/// <param name="obj">The business object to update.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public Server.DataPortalResult Update(object obj, Server.DataPortalContext context)
|
||||
{
|
||||
return Portal.Update(obj, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to delete a
|
||||
/// business object.
|
||||
/// </summary>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public Server.DataPortalResult Delete(object criteria, Server.DataPortalContext context)
|
||||
{
|
||||
return Portal.Delete(criteria, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a value indicating whether this proxy will invoke
|
||||
/// a remote data portal server, or run the "server-side"
|
||||
/// data portal in the caller's process and AppDomain.
|
||||
/// </summary>
|
||||
public bool IsServerRemote
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using Csla.WebServiceHost;
|
||||
|
||||
namespace Csla.DataPortalClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements a data portal proxy to relay data portal
|
||||
/// calls to a remote application server by using
|
||||
/// Web services.
|
||||
/// </summary>
|
||||
public class WebServicesProxy : DataPortalClient.IDataPortalProxy
|
||||
{
|
||||
private WebServiceHost.WebServicePortal GetPortal()
|
||||
{
|
||||
WebServiceHost.WebServicePortal wsvc =
|
||||
new WebServiceHost.WebServicePortal();
|
||||
wsvc.Url = ApplicationContext.DataPortalUrl.ToString();
|
||||
return wsvc;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to create a
|
||||
/// new business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to create.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public Server.DataPortalResult Create(
|
||||
Type objectType, object criteria, Server.DataPortalContext context)
|
||||
{
|
||||
object result;
|
||||
Csla.Server.Hosts.WebServicePortal.CreateRequest
|
||||
request = new Csla.Server.Hosts.WebServicePortal.CreateRequest();
|
||||
request.ObjectType = objectType;
|
||||
request.Criteria = criteria;
|
||||
request.Context = context;
|
||||
|
||||
using (WebServiceHost.WebServicePortal wsvc = GetPortal())
|
||||
{
|
||||
byte[] rd = Serialize(request);
|
||||
byte[] rp = wsvc.Create(rd);
|
||||
result = Deserialize(rp);
|
||||
}
|
||||
|
||||
if (result is Exception)
|
||||
throw (Exception)result;
|
||||
return (Server.DataPortalResult)result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to load an
|
||||
/// existing business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to retrieve.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public Server.DataPortalResult Fetch(
|
||||
Type objectType, object criteria, Server.DataPortalContext context)
|
||||
{
|
||||
object result;
|
||||
Server.Hosts.WebServicePortal.FetchRequest request =
|
||||
new Server.Hosts.WebServicePortal.FetchRequest();
|
||||
request.ObjectType = objectType;
|
||||
request.Criteria = criteria;
|
||||
request.Context = context;
|
||||
|
||||
using (WebServiceHost.WebServicePortal wsvc = GetPortal())
|
||||
{
|
||||
result = Deserialize(wsvc.Fetch(Serialize(request)));
|
||||
}
|
||||
|
||||
if (result is Exception)
|
||||
throw (Exception)result;
|
||||
return (Server.DataPortalResult)result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to update a
|
||||
/// business object.
|
||||
/// </summary>
|
||||
/// <param name="obj">The business object to update.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public Server.DataPortalResult Update(object obj, Server.DataPortalContext context)
|
||||
{
|
||||
object result;
|
||||
Server.Hosts.WebServicePortal.UpdateRequest request = new Server.Hosts.WebServicePortal.UpdateRequest();
|
||||
request.Object = obj;
|
||||
request.Context = context;
|
||||
|
||||
using (WebServiceHost.WebServicePortal wsvc = GetPortal())
|
||||
{
|
||||
result = Deserialize(wsvc.Update(Serialize(request)));
|
||||
}
|
||||
|
||||
if (result is Exception)
|
||||
throw (Exception)result;
|
||||
return (Server.DataPortalResult)result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by <see cref="DataPortal" /> to delete a
|
||||
/// business object.
|
||||
/// </summary>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public Server.DataPortalResult Delete(object criteria, Server.DataPortalContext context)
|
||||
{
|
||||
object result;
|
||||
Server.Hosts.WebServicePortal.DeleteRequest request = new Server.Hosts.WebServicePortal.DeleteRequest();
|
||||
request.Criteria = criteria;
|
||||
request.Context = context;
|
||||
|
||||
using (WebServiceHost.WebServicePortal wsvc = GetPortal())
|
||||
{
|
||||
result = Deserialize(wsvc.Delete(Serialize(request)));
|
||||
}
|
||||
|
||||
if (result is Exception)
|
||||
throw (Exception)result;
|
||||
return (Server.DataPortalResult)result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a value indicating whether this proxy will invoke
|
||||
/// a remote data portal server, or run the "server-side"
|
||||
/// data portal in the caller's process and AppDomain.
|
||||
/// </summary>
|
||||
public bool IsServerRemote
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
|
||||
#region Helper functions
|
||||
|
||||
private static byte[] Serialize(object obj)
|
||||
{
|
||||
if (obj != null)
|
||||
{
|
||||
using (MemoryStream buffer = new MemoryStream())
|
||||
{
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
formatter.Serialize(buffer, obj);
|
||||
return buffer.ToArray();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static object Deserialize(byte[] obj)
|
||||
{
|
||||
if (obj != null)
|
||||
{
|
||||
using (MemoryStream buffer = new MemoryStream(obj))
|
||||
{
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
return formatter.Deserialize(buffer);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Base type from which Criteria classes can be
|
||||
/// derived in a business class.
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
public abstract class CriteriaBase
|
||||
{
|
||||
private Type _objectType;
|
||||
|
||||
/// <summary>
|
||||
/// Type of the business object to be instantiated by
|
||||
/// the server-side DataPortal.
|
||||
/// </summary>
|
||||
public Type ObjectType
|
||||
{
|
||||
get { return _objectType; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes CriteriaBase with the type of
|
||||
/// business object to be created by the DataPortal.
|
||||
/// </summary>
|
||||
/// <param name="type">The type of the
|
||||
/// business object the data portal should create.</param>
|
||||
protected CriteriaBase(Type type)
|
||||
{
|
||||
_objectType = type;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides information about the DataPortal
|
||||
/// call.
|
||||
/// </summary>
|
||||
public class DataPortalEventArgs : EventArgs
|
||||
{
|
||||
private Server.DataPortalContext _dataPortalContext;
|
||||
|
||||
/// <summary>
|
||||
/// The DataPortalContext object passed to the
|
||||
/// server-side DataPortal.
|
||||
/// </summary>
|
||||
public Server.DataPortalContext DataPortalContext
|
||||
{
|
||||
get { return _dataPortalContext; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
/// <param name="dataPortalContext">
|
||||
/// Data portal context object.
|
||||
/// </param>
|
||||
public DataPortalEventArgs(Server.DataPortalContext dataPortalContext)
|
||||
{
|
||||
_dataPortalContext = dataPortalContext;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
using System;
|
||||
using System.Security.Permissions;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// This exception is returned for any errors occuring
|
||||
/// during the server-side DataPortal invocation.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")]
|
||||
[Serializable()]
|
||||
public class DataPortalException : Exception
|
||||
{
|
||||
private object _businessObject;
|
||||
private string _innerStackTrace;
|
||||
|
||||
/// <summary>
|
||||
/// Returns a reference to the business object
|
||||
/// from the server-side DataPortal.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Remember that this object may be in an invalid
|
||||
/// or undefined state. This is the business object
|
||||
/// (and any child objects) as it existed when the
|
||||
/// exception occured on the server. Thus the object
|
||||
/// state may have been altered by the server and
|
||||
/// may no longer reflect data in the database.
|
||||
/// </remarks>
|
||||
public object BusinessObject
|
||||
{
|
||||
get { return _businessObject; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the original server-side exception.
|
||||
/// </summary>
|
||||
/// <returns>An exception object.</returns>
|
||||
/// <remarks>
|
||||
/// When an exception occurs in business code behind
|
||||
/// the data portal, it is wrapped in a
|
||||
/// <see cref="Csla.Server.DataPortalException"/>, which
|
||||
/// is then wrapped in a
|
||||
/// <see cref="Csla.DataPortalException"/>. This property
|
||||
/// unwraps and returns the original exception
|
||||
/// thrown by the business code on the server.
|
||||
/// </remarks>
|
||||
public Exception BusinessException
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.InnerException.InnerException;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the combined stack trace from the server
|
||||
/// and client.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)")]
|
||||
public override string StackTrace
|
||||
{
|
||||
get { return String.Format("{0}{1}{2}", _innerStackTrace, Environment.NewLine, base.StackTrace); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
/// <param name="message">Text describing the exception.</param>
|
||||
/// <param name="businessObject">The business object
|
||||
/// as it was at the time of the exception.</param>
|
||||
public DataPortalException(string message, object businessObject)
|
||||
: base(message)
|
||||
{
|
||||
_innerStackTrace = String.Empty;
|
||||
_businessObject = businessObject;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
/// <param name="message">Text describing the exception.</param>
|
||||
/// <param name="ex">Inner exception.</param>
|
||||
/// <param name="businessObject">The business object
|
||||
/// as it was at the time of the exception.</param>
|
||||
public DataPortalException(string message, Exception ex, object businessObject)
|
||||
: base(message, ex)
|
||||
{
|
||||
_innerStackTrace = ex.StackTrace;
|
||||
_businessObject = businessObject;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object for serialization.
|
||||
/// </summary>
|
||||
/// <param name="info">Serialiation info object.</param>
|
||||
/// <param name="context">Serialization context object.</param>
|
||||
protected DataPortalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
_businessObject = info.GetValue("_businessObject", typeof(object));
|
||||
_innerStackTrace = info.GetString("_innerStackTrace");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serializes the object.
|
||||
/// </summary>
|
||||
/// <param name="info">Serialiation info object.</param>
|
||||
/// <param name="context">Serialization context object.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods")]
|
||||
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
|
||||
[SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.SerializationFormatter)]
|
||||
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
|
||||
{
|
||||
base.GetObjectData(info, context);
|
||||
info.AddValue("_businessObject", _businessObject);
|
||||
info.AddValue("_innerStackTrace", _innerStackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
using System;
|
||||
using System.EnterpriseServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Csla.Server.Hosts
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Exposes server-side DataPortal functionality
|
||||
/// through Enterprise Services.
|
||||
/// </summary>
|
||||
[EventTrackingEnabled(true)]
|
||||
[ComVisible(true)]
|
||||
public abstract class EnterpriseServicesPortal : ServicedComponent, Server.IDataPortalServer
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Set up event handler to deal with
|
||||
/// serialization issue as discussed
|
||||
/// in Chapter 4.
|
||||
/// </summary>
|
||||
static EnterpriseServicesPortal()
|
||||
{
|
||||
SerializationWorkaround();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to create.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public virtual DataPortalResult Create(Type objectType, object criteria, DataPortalContext context)
|
||||
{
|
||||
Server.DataPortal portal = new Server.DataPortal();
|
||||
return portal.Create(objectType, criteria, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get an existing business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to retrieve.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public DataPortalResult Fetch(Type objectType, object criteria, DataPortalContext context)
|
||||
{
|
||||
Server.DataPortal portal = new Server.DataPortal();
|
||||
return portal.Fetch(objectType, criteria, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update a business object.
|
||||
/// </summary>
|
||||
/// <param name="obj">Business object to update.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public virtual DataPortalResult Update(object obj, DataPortalContext context)
|
||||
{
|
||||
Server.DataPortal portal = new Server.DataPortal();
|
||||
return portal.Update(obj, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete a business object.
|
||||
/// </summary>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public virtual DataPortalResult Delete(object criteria, DataPortalContext context)
|
||||
{
|
||||
Server.DataPortal portal = new Server.DataPortal();
|
||||
return portal.Delete(criteria, context);
|
||||
}
|
||||
|
||||
#region Serialization bug workaround
|
||||
|
||||
private static void SerializationWorkaround()
|
||||
{
|
||||
// hook up the AssemblyResolve
|
||||
// event so deep serialization works properly
|
||||
// this is a workaround for a bug in the .NET runtime
|
||||
AppDomain currentDomain = AppDomain.CurrentDomain;
|
||||
|
||||
currentDomain.AssemblyResolve +=
|
||||
new ResolveEventHandler(ResolveEventHandler);
|
||||
}
|
||||
|
||||
private static Assembly ResolveEventHandler(
|
||||
object sender, ResolveEventArgs args)
|
||||
{
|
||||
// get a list of all the assemblies loaded in our appdomain
|
||||
Assembly[] list = AppDomain.CurrentDomain.GetAssemblies();
|
||||
|
||||
// search the list to find the assembly that was not found automatically
|
||||
// and return the assembly from the list
|
||||
|
||||
foreach (Assembly asm in list)
|
||||
if (asm.FullName == args.Name)
|
||||
return asm;
|
||||
|
||||
// if the assembly wasn't already in the appdomain, then try to load it.
|
||||
return Assembly.Load(args.Name);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
|
||||
namespace Csla.Server.Hosts
|
||||
{
|
||||
/// <summary>
|
||||
/// Exposes server-side DataPortal functionality
|
||||
/// through .NET Remoting.
|
||||
/// </summary>
|
||||
public class RemotingPortal : MarshalByRefObject, Server.IDataPortalServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Create a new business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to create.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public DataPortalResult Create(
|
||||
Type objectType, object criteria, DataPortalContext context)
|
||||
{
|
||||
Server.DataPortal portal = new DataPortal();
|
||||
return portal.Create(objectType, criteria, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get an existing business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to retrieve.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public DataPortalResult Fetch(Type objectType, object criteria, DataPortalContext context)
|
||||
{
|
||||
Server.DataPortal portal = new DataPortal();
|
||||
return portal.Fetch(objectType, criteria, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update a business object.
|
||||
/// </summary>
|
||||
/// <param name="obj">Business object to update.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public DataPortalResult Update(object obj, DataPortalContext context)
|
||||
{
|
||||
Server.DataPortal portal = new DataPortal();
|
||||
return portal.Update(obj, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete a business object.
|
||||
/// </summary>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public DataPortalResult Delete(object criteria, DataPortalContext context)
|
||||
{
|
||||
Server.DataPortal portal = new DataPortal();
|
||||
return portal.Delete(criteria, context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,282 @@
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Web.Services;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
|
||||
namespace Csla.Server.Hosts
|
||||
{
|
||||
// in asmx use web directive like
|
||||
// <%@ WebService Class="Csla.Server.Hosts.WebServicePortal" %>
|
||||
/// <summary>
|
||||
/// Exposes server-side DataPortal functionality
|
||||
/// through Web Services (asmx).
|
||||
/// </summary>
|
||||
[WebService(Namespace = "http://ws.lhotka.net/Csla")]
|
||||
public class WebServicePortal : WebService
|
||||
{
|
||||
|
||||
#region Request classes
|
||||
|
||||
/// <summary>
|
||||
/// Request message for creating
|
||||
/// a new business object.
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
public class CreateRequest
|
||||
{
|
||||
private Type _objectType;
|
||||
private object _criteria;
|
||||
private Server.DataPortalContext _context;
|
||||
|
||||
/// <summary>
|
||||
/// Type of business object to create.
|
||||
/// </summary>
|
||||
public Type ObjectType
|
||||
{
|
||||
get { return _objectType; }
|
||||
set { _objectType = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Criteria object describing business object.
|
||||
/// </summary>
|
||||
public object Criteria
|
||||
{
|
||||
get { return _criteria; }
|
||||
set { _criteria = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Data portal context from client.
|
||||
/// </summary>
|
||||
public Server.DataPortalContext Context
|
||||
{
|
||||
get { return _context; }
|
||||
set { _context = value; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Request message for retrieving
|
||||
/// an existing business object.
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
public class FetchRequest
|
||||
{
|
||||
private Type _objectType;
|
||||
private object _criteria;
|
||||
private Server.DataPortalContext _context;
|
||||
|
||||
/// <summary>
|
||||
/// Type of business object to create.
|
||||
/// </summary>
|
||||
public Type ObjectType
|
||||
{
|
||||
get { return _objectType; }
|
||||
set { _objectType = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Criteria object describing business object.
|
||||
/// </summary>
|
||||
public object Criteria
|
||||
{
|
||||
get { return _criteria; }
|
||||
set { _criteria = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Data portal context from client.
|
||||
/// </summary>
|
||||
public Server.DataPortalContext Context
|
||||
{
|
||||
get { return _context; }
|
||||
set { _context = value; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Request message for updating
|
||||
/// a business object.
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
public class UpdateRequest
|
||||
{
|
||||
private object _object;
|
||||
private Server.DataPortalContext _context;
|
||||
|
||||
/// <summary>
|
||||
/// Business object to be updated.
|
||||
/// </summary>
|
||||
public object Object
|
||||
{
|
||||
get { return _object; }
|
||||
set { _object = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Data portal context from client.
|
||||
/// </summary>
|
||||
public Server.DataPortalContext Context
|
||||
{
|
||||
get { return _context; }
|
||||
set { _context = value; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Request message for deleting
|
||||
/// a business object.
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
public class DeleteRequest
|
||||
{
|
||||
private object _criteria;
|
||||
private Server.DataPortalContext _context;
|
||||
|
||||
/// <summary>
|
||||
/// Criteria object describing business object.
|
||||
/// </summary>
|
||||
public object Criteria
|
||||
{
|
||||
get { return _criteria; }
|
||||
set { _criteria = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Data portal context from client.
|
||||
/// </summary>
|
||||
public Server.DataPortalContext Context
|
||||
{
|
||||
get { return _context; }
|
||||
set { _context = value; }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Create a new business object.
|
||||
/// </summary>
|
||||
/// <param name="requestData">Byte stream containing <see cref="CreateRequest" />.</param>
|
||||
/// <returns>Byte stream containing resulting object data.</returns>
|
||||
[WebMethod()]
|
||||
public byte[] Create(byte[] requestData)
|
||||
{
|
||||
CreateRequest request = (CreateRequest)Deserialize(requestData);
|
||||
|
||||
DataPortal portal = new DataPortal();
|
||||
object result;
|
||||
try
|
||||
{
|
||||
result = portal.Create(request.ObjectType, request.Criteria, request.Context);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result = ex;
|
||||
}
|
||||
return Serialize(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get an existing business object.
|
||||
/// </summary>
|
||||
/// <param name="requestData">Byte stream containing <see cref="FetchRequest" />.</param>
|
||||
/// <returns>Byte stream containing resulting object data.</returns>
|
||||
[WebMethod()]
|
||||
public byte[] Fetch(byte[] requestData)
|
||||
{
|
||||
FetchRequest request = (FetchRequest)Deserialize(requestData);
|
||||
|
||||
DataPortal portal = new DataPortal();
|
||||
object result;
|
||||
try
|
||||
{
|
||||
result = portal.Fetch(request.ObjectType, request.Criteria, request.Context);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result = ex;
|
||||
}
|
||||
return Serialize(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update a business object.
|
||||
/// </summary>
|
||||
/// <param name="requestData">Byte stream containing <see cref="UpdateRequest" />.</param>
|
||||
/// <returns>Byte stream containing resulting object data.</returns>
|
||||
[WebMethod()]
|
||||
public byte[] Update(byte[] requestData)
|
||||
{
|
||||
UpdateRequest request = (UpdateRequest)Deserialize(requestData);
|
||||
|
||||
DataPortal portal = new DataPortal();
|
||||
object result;
|
||||
try
|
||||
{
|
||||
result = portal.Update(request.Object, request.Context);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result = ex;
|
||||
}
|
||||
return Serialize(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete a business object.
|
||||
/// </summary>
|
||||
/// <param name="requestData">Byte stream containing <see cref="DeleteRequest" />.</param>
|
||||
/// <returns>Byte stream containing resulting object data.</returns>
|
||||
[WebMethod()]
|
||||
public byte[] Delete(byte[] requestData)
|
||||
{
|
||||
DeleteRequest request = (DeleteRequest)Deserialize(requestData);
|
||||
|
||||
DataPortal portal = new DataPortal();
|
||||
object result;
|
||||
try
|
||||
{
|
||||
result = portal.Delete(request.Criteria, request.Context);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result = ex;
|
||||
}
|
||||
return Serialize(result);
|
||||
}
|
||||
|
||||
#region Helper functions
|
||||
|
||||
private static byte[] Serialize(object obj)
|
||||
{
|
||||
if (obj != null)
|
||||
{
|
||||
using (MemoryStream buffer = new MemoryStream())
|
||||
{
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
formatter.Serialize(buffer, obj);
|
||||
return buffer.ToArray();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static object Deserialize(byte[] obj)
|
||||
{
|
||||
if (obj != null)
|
||||
{
|
||||
using (MemoryStream buffer = new MemoryStream(obj))
|
||||
{
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
return formatter.Deserialize(buffer);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,249 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using Csla.Properties;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
internal static class MethodCaller
|
||||
{
|
||||
const BindingFlags allLevelFlags =
|
||||
BindingFlags.FlattenHierarchy |
|
||||
BindingFlags.Instance |
|
||||
BindingFlags.Public |
|
||||
BindingFlags.NonPublic;
|
||||
|
||||
const BindingFlags oneLevelFlags =
|
||||
BindingFlags.DeclaredOnly |
|
||||
BindingFlags.Instance |
|
||||
BindingFlags.Public |
|
||||
BindingFlags.NonPublic;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a reference to the DataPortal_Create method for
|
||||
/// the specified business object type.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of the business object.</param>
|
||||
/// <param name="criteria">Criteria parameter value.</param>
|
||||
/// <remarks>
|
||||
/// If the criteria parameter value is an integer, that is a special
|
||||
/// flag indicating that the parameter should be considered missing
|
||||
/// (not Nothing/null - just not there).
|
||||
/// </remarks>
|
||||
public static MethodInfo GetCreateMethod(Type objectType, object criteria)
|
||||
{
|
||||
MethodInfo method = null;
|
||||
if (criteria is int)
|
||||
{
|
||||
// an "Integer" criteria is a special flag indicating
|
||||
// that criteria is empty and should not be used
|
||||
method = MethodCaller.GetMethod(objectType, "DataPortal_Create");
|
||||
}
|
||||
else
|
||||
method = MethodCaller.GetMethod(objectType, "DataPortal_Create", criteria);
|
||||
return method;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a reference to the DataPortal_Fetch method for
|
||||
/// the specified business object type.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of the business object.</param>
|
||||
/// <param name="criteria">Criteria parameter value.</param>
|
||||
/// <remarks>
|
||||
/// If the criteria parameter value is an integer, that is a special
|
||||
/// flag indicating that the parameter should be considered missing
|
||||
/// (not Nothing/null - just not there).
|
||||
/// </remarks>
|
||||
public static MethodInfo GetFetchMethod(Type objectType, object criteria)
|
||||
{
|
||||
MethodInfo method = null;
|
||||
if (criteria is int)
|
||||
{
|
||||
// an "Integer" criteria is a special flag indicating
|
||||
// that criteria is empty and should not be used
|
||||
method = MethodCaller.GetMethod(objectType, "DataPortal_Fetch");
|
||||
}
|
||||
else
|
||||
method = MethodCaller.GetMethod(objectType, "DataPortal_Fetch", criteria);
|
||||
return method;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Uses reflection to dynamically invoke a method
|
||||
/// if that method is implemented on the target object.
|
||||
/// </summary>
|
||||
public static object CallMethodIfImplemented(
|
||||
object obj, string method, params object[] parameters)
|
||||
{
|
||||
MethodInfo info = GetMethod(obj.GetType(), method, parameters);
|
||||
if (info != null)
|
||||
return CallMethod(obj, info, parameters);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Uses reflection to dynamically invoke a method,
|
||||
/// throwing an exception if it is not
|
||||
/// implemented on the target object.
|
||||
/// </summary>
|
||||
public static object CallMethod(
|
||||
object obj, string method, params object[] parameters)
|
||||
{
|
||||
MethodInfo info = GetMethod(obj.GetType(), method, parameters);
|
||||
if (info == null)
|
||||
throw new NotImplementedException(
|
||||
method + " " + Resources.MethodNotImplemented);
|
||||
return CallMethod(obj, info, parameters);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Uses reflection to dynamically invoke a method,
|
||||
/// throwing an exception if it is not
|
||||
/// implemented on the target object.
|
||||
/// </summary>
|
||||
public static object CallMethod(
|
||||
object obj, MethodInfo info, params object[] parameters)
|
||||
{
|
||||
// call a private method on the object
|
||||
object result;
|
||||
try
|
||||
{
|
||||
result = info.Invoke(obj, parameters);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new Csla.Server.CallMethodException(
|
||||
info.Name + " " + Resources.MethodCallFailed, e.InnerException);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Uses reflection to locate a matching method
|
||||
/// on the target object.
|
||||
/// </summary>
|
||||
public static MethodInfo GetMethod(
|
||||
Type objectType, string method, params object[] parameters)
|
||||
{
|
||||
MethodInfo result = null;
|
||||
|
||||
// try to find a strongly typed match
|
||||
// put all param types into a list of Type
|
||||
List<Type> types = new List<Type>();
|
||||
foreach (object item in parameters)
|
||||
{
|
||||
if (item == null)
|
||||
types.Add(typeof(object));
|
||||
else
|
||||
types.Add(item.GetType());
|
||||
}
|
||||
|
||||
// first see if there's a matching method
|
||||
// where all params match types
|
||||
result = FindMethod(objectType, method, types.ToArray());
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
// no match found - so look for any method
|
||||
// with the right number of parameters
|
||||
result = FindMethod(objectType, method, parameters.Length);
|
||||
}
|
||||
|
||||
// no strongly typed match found, get default
|
||||
if (result == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
result = objectType.GetMethod(method, allLevelFlags);
|
||||
}
|
||||
catch (AmbiguousMatchException)
|
||||
{
|
||||
MethodInfo[] methods = objectType.GetMethods();
|
||||
foreach (MethodInfo m in methods)
|
||||
if (m.Name == method && m.GetParameters().Length == parameters.Length)
|
||||
{
|
||||
result = m;
|
||||
break;
|
||||
}
|
||||
if (result == null)
|
||||
throw;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a business object type based on
|
||||
/// the supplied criteria object.
|
||||
/// </summary>
|
||||
public static Type GetObjectType(object criteria)
|
||||
{
|
||||
if (criteria.GetType().IsSubclassOf(typeof(CriteriaBase)))
|
||||
{
|
||||
// get the type of the actual business object
|
||||
// from CriteriaBase
|
||||
return ((CriteriaBase)criteria).ObjectType;
|
||||
}
|
||||
else
|
||||
{
|
||||
// get the type of the actual business object
|
||||
// based on the nested class scheme in the book
|
||||
return criteria.GetType().DeclaringType;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns information about the specified
|
||||
/// method, even if the parameter types are
|
||||
/// generic and are located in an abstract
|
||||
/// generic base class.
|
||||
/// </summary>
|
||||
public static MethodInfo FindMethod(Type objType, string method, Type[] types)
|
||||
{
|
||||
MethodInfo info = null;
|
||||
do
|
||||
{
|
||||
//find for a strongly typed match
|
||||
info = objType.GetMethod(method, oneLevelFlags, null, types, null);
|
||||
if (info != null)
|
||||
break; //match found
|
||||
|
||||
objType = objType.BaseType;
|
||||
} while (objType != null);
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns information about the specified
|
||||
/// method, finding the method based purely
|
||||
/// on the method name and number of parameters.
|
||||
/// </summary>
|
||||
public static MethodInfo FindMethod(Type objType, string method, int parameterCount)
|
||||
{
|
||||
// walk up the inheritance hierarchy looking
|
||||
// for a method with the right number of
|
||||
// parameters
|
||||
MethodInfo result = null;
|
||||
Type currentType = objType;
|
||||
do
|
||||
{
|
||||
MethodInfo info = currentType.GetMethod(method, oneLevelFlags);
|
||||
if (info != null)
|
||||
{
|
||||
if (info.GetParameters().Length == parameterCount)
|
||||
{
|
||||
// got a match so use it
|
||||
result = info;
|
||||
break;
|
||||
}
|
||||
}
|
||||
currentType = currentType.BaseType;
|
||||
} while (currentType != null);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
/// <summary>
|
||||
/// Marks a DataPortal_XYZ method to
|
||||
/// be run on the client even if the server-side
|
||||
/// DataPortal is configured for remote use.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public sealed class RunLocalAttribute : Attribute
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Security.Permissions;
|
||||
|
||||
namespace Csla.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// This exception is returned from the
|
||||
/// CallMethod method in the server-side DataPortal
|
||||
/// and contains the exception thrown by the
|
||||
/// underlying business object method that was
|
||||
/// being invoked.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")]
|
||||
[Serializable()]
|
||||
public class CallMethodException : Exception
|
||||
{
|
||||
private string _innerStackTrace;
|
||||
|
||||
/// <summary>
|
||||
/// Get the stack trace from the original
|
||||
/// exception.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
/// <returns></returns>
|
||||
/// <remarks></remarks>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)")]
|
||||
public override string StackTrace
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format("{0}{1}{2}",
|
||||
_innerStackTrace, Environment.NewLine, base.StackTrace);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
/// <param name="message">Message text describing the exception.</param>
|
||||
/// <param name="ex">Inner exception object.</param>
|
||||
public CallMethodException(string message, Exception ex)
|
||||
: base(message, ex)
|
||||
{
|
||||
_innerStackTrace = ex.StackTrace;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object for deserialization.
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization info.</param>
|
||||
/// <param name="context">Serialiation context.</param>
|
||||
protected CallMethodException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
_innerStackTrace = info.GetString("_innerStackTrace");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Serializes the object.
|
||||
/// </summary>
|
||||
/// <param name="info">Serialization info.</param>
|
||||
/// <param name="context">Serialization context.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods")]
|
||||
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
|
||||
[SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.SerializationFormatter)]
|
||||
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
|
||||
{
|
||||
base.GetObjectData(info, context);
|
||||
info.AddValue("_innerStackTrace", _innerStackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,327 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Security.Principal;
|
||||
using System.Collections.Specialized;
|
||||
using Csla.Properties;
|
||||
|
||||
namespace Csla.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the server-side DataPortal
|
||||
/// message router as discussed
|
||||
/// in Chapter 4.
|
||||
/// </summary>
|
||||
public class DataPortal : IDataPortalServer
|
||||
{
|
||||
|
||||
#region Data Access
|
||||
|
||||
/// <summary>
|
||||
/// Create a new business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to create.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public DataPortalResult Create(
|
||||
Type objectType, object criteria, DataPortalContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
SetContext(context);
|
||||
|
||||
DataPortalResult result;
|
||||
|
||||
MethodInfo method = MethodCaller.GetCreateMethod(objectType, criteria);
|
||||
|
||||
IDataPortalServer portal;
|
||||
switch (TransactionalType(method))
|
||||
{
|
||||
case TransactionalTypes.EnterpriseServices:
|
||||
portal = new ServicedDataPortal();
|
||||
try
|
||||
{
|
||||
result = portal.Create(objectType, criteria, context);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((ServicedDataPortal)portal).Dispose();
|
||||
}
|
||||
|
||||
break;
|
||||
case TransactionalTypes.TransactionScope:
|
||||
|
||||
portal = new TransactionalDataPortal();
|
||||
result = portal.Create(objectType, criteria, context);
|
||||
|
||||
break;
|
||||
default:
|
||||
portal = new SimpleDataPortal();
|
||||
result = portal.Create(objectType, criteria, context);
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
finally
|
||||
{
|
||||
ClearContext(context);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get an existing business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to retrieve.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public DataPortalResult Fetch(Type objectType, object criteria, DataPortalContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
SetContext(context);
|
||||
|
||||
DataPortalResult result;
|
||||
|
||||
MethodInfo method = MethodCaller.GetFetchMethod(objectType, criteria);
|
||||
|
||||
IDataPortalServer portal;
|
||||
switch (TransactionalType(method))
|
||||
{
|
||||
case TransactionalTypes.EnterpriseServices:
|
||||
portal = new ServicedDataPortal();
|
||||
try
|
||||
{
|
||||
result = portal.Fetch(objectType, criteria, context);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((ServicedDataPortal)portal).Dispose();
|
||||
}
|
||||
break;
|
||||
case TransactionalTypes.TransactionScope:
|
||||
portal = new TransactionalDataPortal();
|
||||
result = portal.Fetch(objectType, criteria, context);
|
||||
break;
|
||||
default:
|
||||
portal = new SimpleDataPortal();
|
||||
result = portal.Fetch(objectType, criteria, context);
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
finally
|
||||
{
|
||||
ClearContext(context);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update a business object.
|
||||
/// </summary>
|
||||
/// <param name="obj">Business object to update.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods")]
|
||||
public DataPortalResult Update(object obj, DataPortalContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
SetContext(context);
|
||||
|
||||
DataPortalResult result;
|
||||
|
||||
MethodInfo method;
|
||||
string methodName;
|
||||
if (obj is CommandBase)
|
||||
methodName = "DataPortal_Execute";
|
||||
else if (obj is Core.BusinessBase)
|
||||
{
|
||||
Core.BusinessBase tmp = (Core.BusinessBase)obj;
|
||||
if (tmp.IsDeleted)
|
||||
methodName = "DataPortal_DeleteSelf";
|
||||
else
|
||||
if (tmp.IsNew)
|
||||
methodName = "DataPortal_Insert";
|
||||
else
|
||||
methodName = "DataPortal_Update";
|
||||
}
|
||||
else
|
||||
methodName = "DataPortal_Update";
|
||||
|
||||
method = MethodCaller.GetMethod(obj.GetType(), methodName);
|
||||
|
||||
IDataPortalServer portal;
|
||||
switch (TransactionalType(method))
|
||||
{
|
||||
case TransactionalTypes.EnterpriseServices:
|
||||
portal = new ServicedDataPortal();
|
||||
try
|
||||
{
|
||||
result = portal.Update(obj, context);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((ServicedDataPortal)portal).Dispose();
|
||||
}
|
||||
break;
|
||||
case TransactionalTypes.TransactionScope:
|
||||
portal = new TransactionalDataPortal();
|
||||
result = portal.Update(obj, context);
|
||||
break;
|
||||
default:
|
||||
portal = new SimpleDataPortal();
|
||||
result = portal.Update(obj, context);
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
finally
|
||||
{
|
||||
ClearContext(context);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete a business object.
|
||||
/// </summary>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
public DataPortalResult Delete(object criteria, DataPortalContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
SetContext(context);
|
||||
|
||||
DataPortalResult result;
|
||||
|
||||
MethodInfo method = MethodCaller.GetMethod(
|
||||
MethodCaller.GetObjectType(criteria), "DataPortal_Delete", criteria);
|
||||
|
||||
IDataPortalServer portal;
|
||||
switch (TransactionalType(method))
|
||||
{
|
||||
case TransactionalTypes.EnterpriseServices:
|
||||
portal = new ServicedDataPortal();
|
||||
try
|
||||
{
|
||||
result = portal.Delete(criteria, context);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((ServicedDataPortal)portal).Dispose();
|
||||
}
|
||||
break;
|
||||
case TransactionalTypes.TransactionScope:
|
||||
portal = new TransactionalDataPortal();
|
||||
result = portal.Delete(criteria, context);
|
||||
break;
|
||||
default:
|
||||
portal = new SimpleDataPortal();
|
||||
result = portal.Delete(criteria, context);
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
finally
|
||||
{
|
||||
ClearContext(context);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Context
|
||||
|
||||
private static void SetContext(DataPortalContext context)
|
||||
{
|
||||
// if the dataportal is not remote then
|
||||
// do nothing
|
||||
if (!context.IsRemotePortal) return;
|
||||
|
||||
// set the context value so everyone knows the
|
||||
// code is running on the server
|
||||
ApplicationContext.SetExecutionLocation(ApplicationContext.ExecutionLocations.Server);
|
||||
|
||||
// set the app context to the value we got from the
|
||||
// client
|
||||
ApplicationContext.SetContext(context.ClientContext, context.GlobalContext);
|
||||
|
||||
// set the thread's culture to match the client
|
||||
System.Threading.Thread.CurrentThread.CurrentCulture =
|
||||
new System.Globalization.CultureInfo(context.ClientCulture);
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture =
|
||||
new System.Globalization.CultureInfo(context.ClientUICulture);
|
||||
|
||||
if (ApplicationContext.AuthenticationType == "Windows")
|
||||
{
|
||||
// When using integrated security, Principal must be null
|
||||
if (context.Principal == null)
|
||||
{
|
||||
// Set .NET to use integrated security
|
||||
AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new System.Security.SecurityException(Resources.NoPrincipalAllowedException);
|
||||
}
|
||||
}
|
||||
// We expect the Principal to be of the type BusinesPrincipal
|
||||
if (context.Principal != null)
|
||||
{
|
||||
if (context.Principal is Security.BusinessPrincipalBase)
|
||||
ApplicationContext.User = context.Principal;
|
||||
else
|
||||
throw new System.Security.SecurityException(
|
||||
Resources.BusinessPrincipalException + " " +
|
||||
((object)context.Principal).ToString());
|
||||
}
|
||||
else
|
||||
throw new System.Security.SecurityException(
|
||||
Resources.BusinessPrincipalException + " Nothing");
|
||||
}
|
||||
|
||||
private static void ClearContext(DataPortalContext context)
|
||||
{
|
||||
// if the dataportal is not remote then
|
||||
// do nothing
|
||||
if (!context.IsRemotePortal) return;
|
||||
ApplicationContext.Clear();
|
||||
if (ApplicationContext.AuthenticationType != "Windows")
|
||||
ApplicationContext.User = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Helper methods
|
||||
|
||||
private static bool IsTransactionalMethod(MethodInfo method)
|
||||
{
|
||||
return Attribute.IsDefined(method, typeof(TransactionalAttribute));
|
||||
}
|
||||
|
||||
private static TransactionalTypes TransactionalType(MethodInfo method)
|
||||
{
|
||||
TransactionalTypes result;
|
||||
if (IsTransactionalMethod(method))
|
||||
{
|
||||
TransactionalAttribute attrib =
|
||||
(TransactionalAttribute)Attribute.GetCustomAttribute(
|
||||
method, typeof(TransactionalAttribute));
|
||||
result = attrib.TransactionType;
|
||||
}
|
||||
else
|
||||
result = TransactionalTypes.Manual;
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using System.Security.Principal;
|
||||
using System.Threading;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace Csla.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides consistent context information between the client
|
||||
/// and server DataPortal objects.
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
public class DataPortalContext
|
||||
{
|
||||
private IPrincipal _principal;
|
||||
private bool _remotePortal;
|
||||
private string _clientCulture;
|
||||
private string _clientUICulture;
|
||||
private HybridDictionary _clientContext;
|
||||
private HybridDictionary _globalContext;
|
||||
|
||||
/// <summary>
|
||||
/// The current principal object
|
||||
/// if CSLA security is being used.
|
||||
/// </summary>
|
||||
public IPrincipal Principal
|
||||
{
|
||||
get { return _principal; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns <see langword="true" /> if the
|
||||
/// server-side DataPortal is running
|
||||
/// on a remote server via remoting.
|
||||
/// </summary>
|
||||
public bool IsRemotePortal
|
||||
{
|
||||
get { return _remotePortal; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The culture setting on the client
|
||||
/// workstation.
|
||||
/// </summary>
|
||||
public string ClientCulture
|
||||
{
|
||||
get { return _clientCulture; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The culture setting on the client
|
||||
/// workstation.
|
||||
/// </summary>
|
||||
public string ClientUICulture
|
||||
{
|
||||
get { return _clientUICulture; }
|
||||
}
|
||||
internal HybridDictionary ClientContext
|
||||
{
|
||||
get { return _clientContext; }
|
||||
}
|
||||
|
||||
internal HybridDictionary GlobalContext
|
||||
{
|
||||
get { return _globalContext; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new DataPortalContext object.
|
||||
/// </summary>
|
||||
/// <param name="principal">The current Principal object.</param>
|
||||
/// <param name="isRemotePortal">Indicates whether the DataPortal is remote.</param>
|
||||
public DataPortalContext(IPrincipal principal, bool isRemotePortal)
|
||||
{
|
||||
if (isRemotePortal)
|
||||
{
|
||||
_principal = principal;
|
||||
_remotePortal = isRemotePortal;
|
||||
_clientCulture =
|
||||
System.Threading.Thread.CurrentThread.CurrentCulture.Name;
|
||||
_clientUICulture =
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture.Name;
|
||||
_clientContext = Csla.ApplicationContext.GetClientContext();
|
||||
_globalContext = Csla.ApplicationContext.GetGlobalContext();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Csla.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// This exception is returned from the
|
||||
/// server-side DataPortal and contains the exception
|
||||
/// and context data from the server.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")]
|
||||
[Serializable()]
|
||||
public class DataPortalException : Exception
|
||||
{
|
||||
private DataPortalResult _result;
|
||||
private string _innerStackTrace;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the DataPortalResult object from the server.
|
||||
/// </summary>
|
||||
public DataPortalResult Result
|
||||
{
|
||||
get { return _result; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the server-side stack trace from the
|
||||
/// original exception.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)")]
|
||||
public override string StackTrace
|
||||
{
|
||||
get { return String.Format("{0}{1}{2}",
|
||||
_innerStackTrace, Environment.NewLine, base.StackTrace); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
/// <param name="message">Text describing the exception.</param>
|
||||
/// <param name="ex">Inner exception.</param>
|
||||
/// <param name="result">The data portal result object.</param>
|
||||
public DataPortalException(
|
||||
string message, Exception ex, DataPortalResult result)
|
||||
: base(message, ex)
|
||||
{
|
||||
_innerStackTrace = ex.StackTrace;
|
||||
_result = result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object for serialization.
|
||||
/// </summary>
|
||||
/// <param name="info">Serialiation info object.</param>
|
||||
/// <param name="context">Serialization context object.</param>
|
||||
protected DataPortalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
_result = (DataPortalResult)info.GetValue(
|
||||
"_result", typeof(DataPortalResult));
|
||||
_innerStackTrace = info.GetString("_innerStackTrace");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serializes the object.
|
||||
/// </summary>
|
||||
/// <param name="info">Serialiation info object.</param>
|
||||
/// <param name="context">Serialization context object.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods")]
|
||||
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
|
||||
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
|
||||
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
|
||||
{
|
||||
base.GetObjectData(info, context);
|
||||
info.AddValue("_result", _result);
|
||||
info.AddValue("_innerStackTrace", _innerStackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Text;
|
||||
|
||||
namespace Csla.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns data from the server-side DataPortal to the
|
||||
/// client-side DataPortal. Intended for internal CSLA .NET
|
||||
/// use only.
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
public class DataPortalResult
|
||||
{
|
||||
private object _returnObject;
|
||||
private HybridDictionary _globalContext;
|
||||
|
||||
/// <summary>
|
||||
/// The business object being returned from
|
||||
/// the server.
|
||||
/// </summary>
|
||||
public object ReturnObject
|
||||
{
|
||||
get { return _returnObject; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The global context being returned from
|
||||
/// the server.
|
||||
/// </summary>
|
||||
public HybridDictionary GlobalContext
|
||||
{
|
||||
get { return _globalContext; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
public DataPortalResult()
|
||||
{
|
||||
_globalContext = ApplicationContext.GetGlobalContext();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
/// <param name="returnObject">Object to return as part
|
||||
/// of the result.</param>
|
||||
public DataPortalResult(object returnObject)
|
||||
{
|
||||
_returnObject = returnObject;
|
||||
_globalContext = ApplicationContext.GetGlobalContext();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Csla.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface implemented by server-side data portal
|
||||
/// components.
|
||||
/// </summary>
|
||||
public interface IDataPortalServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Create a new business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to create.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
DataPortalResult Create(Type objectType, object criteria, DataPortalContext context);
|
||||
/// <summary>
|
||||
/// Get an existing business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to retrieve.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
DataPortalResult Fetch(Type objectType, object criteria, DataPortalContext context);
|
||||
/// <summary>
|
||||
/// Update a business object.
|
||||
/// </summary>
|
||||
/// <param name="obj">Business object to update.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
DataPortalResult Update(object obj, DataPortalContext context);
|
||||
/// <summary>
|
||||
/// Delete a business object.
|
||||
/// </summary>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
DataPortalResult Delete(object criteria, DataPortalContext context);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using System.EnterpriseServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Csla.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the server-side Serviced
|
||||
/// DataPortal described in Chapter 4.
|
||||
/// </summary>
|
||||
[Transaction(TransactionOption.Required)]
|
||||
[EventTrackingEnabled(true)]
|
||||
[ComVisible(true)]
|
||||
public class ServicedDataPortal : ServicedComponent, IDataPortalServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Wraps a Create call in a ServicedComponent.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This method delegates to
|
||||
/// <see cref="SimpleDataPortal">SimpleDataPortal</see>
|
||||
/// but wraps that call within a COM+ transaction
|
||||
/// to provide transactional support.
|
||||
/// </remarks>
|
||||
/// <param name="objectType">A <see cref="Type">Type</see> object
|
||||
/// indicating the type of business object to be created.</param>
|
||||
/// <param name="criteria">A custom criteria object providing any
|
||||
/// extra information that may be required to properly create
|
||||
/// the object.</param>
|
||||
/// <param name="context">Context data from the client.</param>
|
||||
/// <returns>A populated business object.</returns>
|
||||
[AutoComplete(true)]
|
||||
public DataPortalResult Create(
|
||||
Type objectType, object criteria, DataPortalContext context)
|
||||
{
|
||||
SimpleDataPortal portal = new SimpleDataPortal();
|
||||
return portal.Create(objectType, criteria, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wraps a Fetch call in a ServicedComponent.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This method delegates to
|
||||
/// <see cref="SimpleDataPortal">SimpleDataPortal</see>
|
||||
/// but wraps that call within a COM+ transaction
|
||||
/// to provide transactional support.
|
||||
/// </remarks>
|
||||
/// <param name="objectType">Type of business object to retrieve.</param>
|
||||
/// <param name="criteria">Object-specific criteria.</param>
|
||||
/// <param name="context">Object containing context data from client.</param>
|
||||
/// <returns>A populated business object.</returns>
|
||||
[AutoComplete(true)]
|
||||
public DataPortalResult Fetch(Type objectType, object criteria, DataPortalContext context)
|
||||
{
|
||||
SimpleDataPortal portal = new SimpleDataPortal();
|
||||
return portal.Fetch(objectType, criteria, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wraps an Update call in a ServicedComponent.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This method delegates to
|
||||
/// <see cref="SimpleDataPortal">SimpleDataPortal</see>
|
||||
/// but wraps that call within a COM+ transaction
|
||||
/// to provide transactional support.
|
||||
/// </remarks>
|
||||
/// <param name="obj">A reference to the object being updated.</param>
|
||||
/// <param name="context">Context data from the client.</param>
|
||||
/// <returns>A reference to the newly updated object.</returns>
|
||||
[AutoComplete(true)]
|
||||
public DataPortalResult Update(object obj, DataPortalContext context)
|
||||
{
|
||||
SimpleDataPortal portal = new SimpleDataPortal();
|
||||
return portal.Update(obj, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wraps a Delete call in a ServicedComponent.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This method delegates to
|
||||
/// <see cref="SimpleDataPortal">SimpleDataPortal</see>
|
||||
/// but wraps that call within a COM+ transaction
|
||||
/// to provide transactional support.
|
||||
/// </remarks>
|
||||
/// <param name="criteria">Object-specific criteria.</param>
|
||||
/// <param name="context">Context data from the client.</param>
|
||||
[AutoComplete(true)]
|
||||
public DataPortalResult Delete(object criteria, DataPortalContext context)
|
||||
{
|
||||
SimpleDataPortal portal = new SimpleDataPortal();
|
||||
return portal.Delete(criteria, context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,317 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Security.Principal;
|
||||
using System.Collections.Specialized;
|
||||
using Csla.Properties;
|
||||
|
||||
namespace Csla.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the server-side DataPortal as discussed
|
||||
/// in Chapter 4.
|
||||
/// </summary>
|
||||
public class SimpleDataPortal : IDataPortalServer
|
||||
{
|
||||
|
||||
#region Data Access
|
||||
|
||||
/// <summary>
|
||||
/// Create a new business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to create.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "Csla.Server.DataPortalException.#ctor(System.String,System.Exception,Csla.Server.DataPortalResult)")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
|
||||
public DataPortalResult Create(
|
||||
Type objectType, object criteria, DataPortalContext context)
|
||||
{
|
||||
object obj = null;
|
||||
|
||||
try
|
||||
{
|
||||
// create an instance of the business object.
|
||||
obj = Activator.CreateInstance(objectType, true);
|
||||
|
||||
// tell the business object we're about to make a DataPortal_xyz call
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
obj, "DataPortal_OnDataPortalInvoke", new DataPortalEventArgs(context));
|
||||
|
||||
// tell the business object to create its data
|
||||
MethodInfo method = MethodCaller.GetCreateMethod(objectType, criteria);
|
||||
if (criteria is int)
|
||||
MethodCaller.CallMethod(obj, method);
|
||||
else
|
||||
MethodCaller.CallMethod(obj, method, criteria);
|
||||
|
||||
// mark the object as new
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
obj, "MarkNew");
|
||||
|
||||
// tell the business object the DataPortal_xyz call is complete
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
obj, "DataPortal_OnDataPortalInvokeComplete",
|
||||
new DataPortalEventArgs(context));
|
||||
|
||||
// return the populated business object as a result
|
||||
return new DataPortalResult(obj);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
try
|
||||
{
|
||||
// tell the business object there was an exception
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
obj, "DataPortal_OnDataPortalException",
|
||||
new DataPortalEventArgs(context), ex);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignore exceptions from the exception handler
|
||||
}
|
||||
throw new DataPortalException(
|
||||
"DataPortal.Create " + Resources.FailedOnServer,
|
||||
ex, new DataPortalResult(obj));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get an existing business object.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of business object to retrieve.</param>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "Csla.Server.DataPortalException.#ctor(System.String,System.Exception,Csla.Server.DataPortalResult)")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
|
||||
public DataPortalResult Fetch(Type objectType, object criteria, DataPortalContext context)
|
||||
{
|
||||
object obj = null;
|
||||
try
|
||||
{
|
||||
// create an instance of the business object.
|
||||
obj = Activator.CreateInstance(objectType, true);
|
||||
|
||||
// tell the business object we're about to make a DataPortal_xyz call
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
obj, "DataPortal_OnDataPortalInvoke",
|
||||
new DataPortalEventArgs(context));
|
||||
|
||||
// tell the business object to fetch its data
|
||||
MethodInfo method = MethodCaller.GetFetchMethod(objectType, criteria);
|
||||
if (criteria is int)
|
||||
MethodCaller.CallMethod(obj, method);
|
||||
else
|
||||
MethodCaller.CallMethod(obj, method, criteria);
|
||||
|
||||
// mark the object as old
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
obj, "MarkOld");
|
||||
|
||||
// tell the business object the DataPortal_xyz call is complete
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
obj, "DataPortal_OnDataPortalInvokeComplete",
|
||||
new DataPortalEventArgs(context));
|
||||
|
||||
// return the populated business object as a result
|
||||
return new DataPortalResult(obj);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
try
|
||||
{
|
||||
// tell the business object there was an exception
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
obj, "DataPortal_OnDataPortalException",
|
||||
new DataPortalEventArgs(context), ex);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignore exceptions from the exception handler
|
||||
}
|
||||
throw new DataPortalException(
|
||||
"DataPortal.Fetch " + Resources.FailedOnServer,
|
||||
ex, new DataPortalResult(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update a business object.
|
||||
/// </summary>
|
||||
/// <param name="obj">Business object to update.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "Csla.Server.DataPortalException.#ctor(System.String,System.Exception,Csla.Server.DataPortalResult)")]
|
||||
public DataPortalResult Update(object obj, DataPortalContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
// tell the business object we're about to make a DataPortal_xyz call
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
obj, "DataPortal_OnDataPortalInvoke",
|
||||
new DataPortalEventArgs(context));
|
||||
|
||||
// tell the business object to update itself
|
||||
if (obj is Core.BusinessBase)
|
||||
{
|
||||
Core.BusinessBase busObj = (Core.BusinessBase)obj;
|
||||
if (busObj.IsDeleted)
|
||||
{
|
||||
if (!busObj.IsNew)
|
||||
{
|
||||
// tell the object to delete itself
|
||||
MethodCaller.CallMethod(
|
||||
busObj, "DataPortal_DeleteSelf");
|
||||
}
|
||||
// mark the object as new
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
busObj, "MarkNew");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (busObj.IsNew)
|
||||
{
|
||||
// tell the object to insert itself
|
||||
MethodCaller.CallMethod(
|
||||
busObj, "DataPortal_Insert");
|
||||
}
|
||||
else
|
||||
{
|
||||
// tell the object to update itself
|
||||
MethodCaller.CallMethod(
|
||||
busObj, "DataPortal_Update");
|
||||
}
|
||||
// mark the object as old
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
busObj, "MarkOld");
|
||||
}
|
||||
}
|
||||
else if (obj is CommandBase)
|
||||
{
|
||||
// tell the object to update itself
|
||||
MethodCaller.CallMethod(
|
||||
obj, "DataPortal_Execute");
|
||||
}
|
||||
else
|
||||
{
|
||||
// this is an updatable collection or some other
|
||||
// non-BusinessBase type of object
|
||||
// tell the object to update itself
|
||||
MethodCaller.CallMethod(
|
||||
obj, "DataPortal_Update");
|
||||
// mark the object as old
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
obj, "MarkOld");
|
||||
}
|
||||
|
||||
// tell the business object the DataPortal_xyz is complete
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
obj, "DataPortal_OnDataPortalInvokeComplete",
|
||||
new DataPortalEventArgs(context));
|
||||
|
||||
return new DataPortalResult(obj);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
try
|
||||
{
|
||||
// tell the business object there was an exception
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
obj, "DataPortal_OnDataPortalException",
|
||||
new DataPortalEventArgs(context), ex);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignore exceptions from the exception handler
|
||||
}
|
||||
throw new DataPortalException(
|
||||
"DataPortal.Update " + Resources.FailedOnServer,
|
||||
ex, new DataPortalResult(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete a business object.
|
||||
/// </summary>
|
||||
/// <param name="criteria">Criteria object describing business object.</param>
|
||||
/// <param name="context">
|
||||
/// <see cref="Server.DataPortalContext" /> object passed to the server.
|
||||
/// </param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "Csla.Server.DataPortalException.#ctor(System.String,System.Exception,Csla.Server.DataPortalResult)")]
|
||||
public DataPortalResult Delete(object criteria, DataPortalContext context)
|
||||
{
|
||||
object obj = null;
|
||||
try
|
||||
{
|
||||
// create an instance of the business objet
|
||||
obj = CreateBusinessObject(criteria);
|
||||
|
||||
// tell the business object we're about to make a DataPortal_xyz call
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
obj, "DataPortal_OnDataPortalInvoke",
|
||||
new DataPortalEventArgs(context));
|
||||
|
||||
// tell the business object to delete itself
|
||||
MethodCaller.CallMethod(
|
||||
obj, "DataPortal_Delete", criteria);
|
||||
|
||||
// tell the business object the DataPortal_xyz call is complete
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
obj, "DataPortal_OnDataPortalInvokeComplete",
|
||||
new DataPortalEventArgs(context));
|
||||
|
||||
return new DataPortalResult();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
try
|
||||
{
|
||||
// tell the business object there was an exception
|
||||
MethodCaller.CallMethodIfImplemented(
|
||||
obj, "DataPortal_OnDataPortalException",
|
||||
new DataPortalEventArgs(context), ex);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignore exceptions from the exception handler
|
||||
}
|
||||
throw new DataPortalException(
|
||||
"DataPortal.Delete " + Resources.FailedOnServer,
|
||||
ex, new DataPortalResult());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Creating the business object
|
||||
|
||||
private static object CreateBusinessObject(object criteria)
|
||||
{
|
||||
Type businessType;
|
||||
if (criteria.GetType().IsSubclassOf(typeof(CriteriaBase)))
|
||||
{
|
||||
// get the type of the actual business object
|
||||
// from CriteriaBase
|
||||
businessType = ((CriteriaBase)criteria).ObjectType;
|
||||
}
|
||||
else
|
||||
{
|
||||
// get the type of the actual business object
|
||||
// based on the nested class scheme in the book
|
||||
businessType = criteria.GetType().DeclaringType;
|
||||
}
|
||||
|
||||
// create an instance of the business object
|
||||
return Activator.CreateInstance(businessType, true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
using System;
|
||||
using System.Transactions;
|
||||
|
||||
namespace Csla.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the server-side Serviced
|
||||
/// DataPortal described in Chapter 4.
|
||||
/// </summary>
|
||||
public class TransactionalDataPortal : IDataPortalServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Wraps a Create call in a TransactionScope
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This method delegates to
|
||||
/// <see cref="SimpleDataPortal">SimpleDataPortal</see>
|
||||
/// but wraps that call within a
|
||||
/// <see cref="TransactionScope">TransactionScope</see>
|
||||
/// to provide transactional support via
|
||||
/// System.Transactions.
|
||||
/// </remarks>
|
||||
/// <param name="objectType">A <see cref="Type">Type</see> object
|
||||
/// indicating the type of business object to be created.</param>
|
||||
/// <param name="criteria">A custom criteria object providing any
|
||||
/// extra information that may be required to properly create
|
||||
/// the object.</param>
|
||||
/// <param name="context">Context data from the client.</param>
|
||||
/// <returns>A populated business object.</returns>
|
||||
public DataPortalResult Create(
|
||||
System.Type objectType, object criteria, DataPortalContext context)
|
||||
{
|
||||
DataPortalResult result;
|
||||
using (TransactionScope tr = new TransactionScope())
|
||||
{
|
||||
SimpleDataPortal portal = new SimpleDataPortal();
|
||||
result = portal.Create(objectType, criteria, context);
|
||||
tr.Complete();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the client-side DataProtal to retrieve an object.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This method delegates to
|
||||
/// <see cref="SimpleDataPortal">SimpleDataPortal</see>
|
||||
/// but wraps that call within a
|
||||
/// <see cref="TransactionScope">TransactionScope</see>
|
||||
/// to provide transactional support via
|
||||
/// System.Transactions.
|
||||
/// </remarks>
|
||||
/// <param name="objectType">Type of business object to retrieve.</param>
|
||||
/// <param name="criteria">Object-specific criteria.</param>
|
||||
/// <param name="context">Object containing context data from client.</param>
|
||||
/// <returns>A populated business object.</returns>
|
||||
public DataPortalResult Fetch(Type objectType, object criteria, DataPortalContext context)
|
||||
{
|
||||
DataPortalResult result;
|
||||
using (TransactionScope tr = new TransactionScope())
|
||||
{
|
||||
SimpleDataPortal portal = new SimpleDataPortal();
|
||||
result = portal.Fetch(objectType, criteria, context);
|
||||
tr.Complete();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the client-side DataPortal to update an object.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This method delegates to
|
||||
/// <see cref="SimpleDataPortal">SimpleDataPortal</see>
|
||||
/// but wraps that call within a
|
||||
/// <see cref="TransactionScope">TransactionScope</see>
|
||||
/// to provide transactional support via
|
||||
/// System.Transactions.
|
||||
/// </remarks>
|
||||
/// <param name="obj">A reference to the object being updated.</param>
|
||||
/// <param name="context">Context data from the client.</param>
|
||||
/// <returns>A reference to the newly updated object.</returns>
|
||||
public DataPortalResult Update(object obj, DataPortalContext context)
|
||||
{
|
||||
DataPortalResult result;
|
||||
using (TransactionScope tr = new TransactionScope())
|
||||
{
|
||||
SimpleDataPortal portal = new SimpleDataPortal();
|
||||
result = portal.Update(obj, context);
|
||||
tr.Complete();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the client-side DataPortal to delete an object.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This method delegates to
|
||||
/// <see cref="SimpleDataPortal">SimpleDataPortal</see>
|
||||
/// but wraps that call within a
|
||||
/// <see cref="TransactionScope">TransactionScope</see>
|
||||
/// to provide transactional support via
|
||||
/// System.Transactions.
|
||||
/// </remarks>
|
||||
/// <param name="criteria">Object-specific criteria.</param>
|
||||
/// <param name="context">Context data from the client.</param>
|
||||
public DataPortalResult Delete(object criteria, DataPortalContext context)
|
||||
{
|
||||
DataPortalResult result;
|
||||
using (TransactionScope tr = new TransactionScope())
|
||||
{
|
||||
SimpleDataPortal portal = new SimpleDataPortal();
|
||||
result = portal.Delete(criteria, context);
|
||||
tr.Complete();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
/// <summary>
|
||||
/// Marks a DataPortal_XYZ method to run within
|
||||
/// the specified transactional context.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Each business object method may be marked with this attribute
|
||||
/// to indicate which type of transactional technology should
|
||||
/// be used by the server-side DataPortal. The possible options
|
||||
/// are listed in the
|
||||
/// <see cref="TransactionalTypes">TransactionalTypes</see> enum.
|
||||
/// </para><para>
|
||||
/// If the Transactional attribute is not applied to a
|
||||
/// DataPortal_XYZ method then the
|
||||
/// <see cref="TransactionalTypes.Manual">Manual</see> option
|
||||
/// is assumed.
|
||||
/// </para><para>
|
||||
/// If the Transactional attribute is applied with no explicit
|
||||
/// choice for transactionType then the
|
||||
/// <see cref="TransactionalTypes.EnterpriseServices">EnterpriseServices</see>
|
||||
/// option is assumed.
|
||||
/// </para><para>
|
||||
/// Both the EnterpriseServices and TransactionScope options provide
|
||||
/// 2-phase distributed transactional support.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public sealed class TransactionalAttribute : Attribute
|
||||
{
|
||||
private TransactionalTypes _type;
|
||||
|
||||
/// <summary>
|
||||
/// Marks a method to run within a COM+
|
||||
/// transactional context.
|
||||
/// </summary>
|
||||
public TransactionalAttribute()
|
||||
{
|
||||
_type = TransactionalTypes.EnterpriseServices;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Marks a method to run within the specified
|
||||
/// type of transactional context.
|
||||
/// </summary>
|
||||
/// <param name="transactionType">
|
||||
/// Specifies the transactional context within which the
|
||||
/// method should run.</param>
|
||||
public TransactionalAttribute(TransactionalTypes transactionType)
|
||||
{
|
||||
_type = transactionType;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of transaction requested by the
|
||||
/// business object method.
|
||||
/// </summary>
|
||||
public TransactionalTypes TransactionType
|
||||
{
|
||||
get { return _type; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
namespace Csla
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Provides a list of possible transactional
|
||||
/// technologies to be used by the server-side
|
||||
/// DataPortal.
|
||||
/// </summary>
|
||||
public enum TransactionalTypes
|
||||
{
|
||||
/// <summary>
|
||||
/// Causes the server-side DataPortal to
|
||||
/// use Enterprise Services (COM+) transactions.
|
||||
/// </summary>
|
||||
EnterpriseServices,
|
||||
/// <summary>
|
||||
/// Causes the server-side DataPortal to
|
||||
/// use System.Transactions TransactionScope
|
||||
/// style transactions.
|
||||
/// </summary>
|
||||
TransactionScope,
|
||||
/// <summary>
|
||||
/// Causes the server-side DataPortal to
|
||||
/// use no explicit transactional technology.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This option allows the business developer to
|
||||
/// implement their own transactions. Common options
|
||||
/// include ADO.NET transactions and System.Transactions
|
||||
/// TransactionScope.
|
||||
/// </remarks>
|
||||
Manual
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
internal static class DefaultFilter
|
||||
{
|
||||
public static bool Filter(object item, object filter)
|
||||
{
|
||||
bool result = false;
|
||||
if (item != null && filter != null)
|
||||
result = item.ToString().Contains(filter.ToString());
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Font Name="Tahoma" Size="8.25" />
|
||||
<Class Name="Csla.Security.AuthorizationRules" Collapsed="true">
|
||||
<Position X="2" Y="2" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Security\AuthorizationRules.cs</FileName>
|
||||
<HashCode>AoiCAgAAAAAhAAAQAAAIAAAAAAAAAAAAAAABACIAgAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Security.RolesForProperty" Collapsed="true">
|
||||
<Position X="3.25" Y="2.25" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Security\RolesForProperty.cs</FileName>
|
||||
<HashCode>AAgAAAAAABAAAAAABAQQBAAAAAAAAQBAAAAAECIAgAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Enum Name="Csla.Security.AccessType" Collapsed="true">
|
||||
<Position X="4.25" Y="2.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Security\AccessType.cs</FileName>
|
||||
<HashCode>AAAAAAAAABAAAAAABAAQBAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
</ClassDiagram>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Font Name="Tahoma" Size="8.25" />
|
||||
<Class Name="Csla.BusinessBase<T>" Collapsed="true">
|
||||
<Position X="2.75" Y="4.75" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>BusinessBase.cs</FileName>
|
||||
<HashCode>AAAAAIAAAAAAAAAEgAAAAAAAAAAAAIAAAAAAAAAAgBA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.BusinessListBase<T, C>" Collapsed="true">
|
||||
<Position X="5" Y="4.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>BusinessListBase.cs</FileName>
|
||||
<HashCode>AgAAAIlACAAAHAJIkAgAGAgEQACAAAEEoQIBUAAgCFA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="System.ComponentModel.BindingList<T>" Collapsed="true">
|
||||
<Position X="5" Y="3.5" Width="2" />
|
||||
<TypeIdentifier />
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Core.BusinessBase" Collapsed="true">
|
||||
<Position X="2.75" Y="3.5" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\BusinessBase.cs</FileName>
|
||||
<HashCode>FAgBAA8ACAADnCTIEAlISEiUBJHgAAEAIFKBAQAgKEA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Core.UndoableBase" Collapsed="true">
|
||||
<Position X="2.75" Y="2" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\UndoableBase.cs</FileName>
|
||||
<HashCode>AgAIAAAAAAgAAAQAAAIBEAAAAAAQAAAAAgBAEAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Core.BindableBase" Collapsed="true">
|
||||
<Position X="2.75" Y="1" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\BindableBase.cs</FileName>
|
||||
<HashCode>AAAABAAAAAAAAAACIAAAIAAAgAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
</ClassDiagram>
|
||||
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Font Name="Tahoma" Size="8.25" />
|
||||
<Class Name="Csla.BusinessBase<T>" Collapsed="true">
|
||||
<Position X="7.25" Y="5.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>BusinessBase.cs</FileName>
|
||||
<HashCode>AAAAAIAAAAAAAAAEgAAAAAAAAAAAAIAAAAAAAAAAgBA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Core.BusinessBase" Collapsed="true">
|
||||
<Position X="7.25" Y="4.25" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\BusinessBase.cs</FileName>
|
||||
<HashCode>FAgBAA8ACAADnCTIEAlISEiUBJHgAAEAIFKBAQAgKEA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Core.UndoableBase" Collapsed="true">
|
||||
<Position X="7.25" Y="2.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\UndoableBase.cs</FileName>
|
||||
<HashCode>AgAIAAAAAAAAAAQAAAIBkAAAAAAAEAAAAAhAEAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Core.BindableBase" Collapsed="true">
|
||||
<Position X="7.25" Y="1.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\BindableBase.cs</FileName>
|
||||
<HashCode>AAAABAAAAAAAAAACIAAAIAAAgAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.BusinessListBase<T, C>" Collapsed="true">
|
||||
<Position X="0.5" Y="5.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>BusinessListBase.cs</FileName>
|
||||
<HashCode>AgAAAIlACAAAHAJIEAgAGAgAAACIAAlEoQIBUAAgCFA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="System.ComponentModel.BindingList<T>" Collapsed="true">
|
||||
<Position X="2" Y="1.5" Width="2" />
|
||||
<TypeIdentifier />
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Core.ReadOnlyBindingList<C>" Collapsed="true">
|
||||
<Position X="3.25" Y="3.25" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\ReadOnlyBindingList.cs</FileName>
|
||||
<HashCode>AAAAAABAAAAABAAQAAAAAAAAQCAAAAAEIAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.NameValueListBase<K, V>" Collapsed="true">
|
||||
<Position X="5" Y="5.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>NameValueListBase.cs</FileName>
|
||||
<HashCode>BAAAAAgAAAAEBAQIEAAAAAAAAAAAAAEAAAIgAAAACFA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.CommandBase" Collapsed="true">
|
||||
<Position X="5.25" Y="6.75" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>CommandBase.cs</FileName>
|
||||
<HashCode>AAAAAAgAAAAABABAEAAAAAAAAAAAAAEAAAAAAAAACEI=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.ReadOnlyListBase<T, C>" Collapsed="true">
|
||||
<Position X="2.75" Y="5.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>ReadOnlyListBase.cs</FileName>
|
||||
<HashCode>BAAAAAgAAAAABAAIEAAAAAAAAAAAAAEAAAIAAAAACFA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.SortedBindingList<T>" Collapsed="true">
|
||||
<Position X="7.25" Y="6.75" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>SortedBindingList.cs</FileName>
|
||||
<HashCode>AGoAAEAAgUQACBAUGAAINAQAKAE4ROAIeAEQADBQIpQ=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
</ClassDiagram>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Font Name="Tahoma" Size="8.25" />
|
||||
<Class Name="Csla.BusinessBase<T>" Collapsed="true">
|
||||
<Position X="1" Y="1" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>BusinessBase.cs</FileName>
|
||||
<HashCode>AAAAAIAAAAAAAAAEgAAAAAAAAAAAAIAAAAAAAAAAgBA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.BusinessListBase<T, C>" Collapsed="true">
|
||||
<Position X="3.25" Y="1" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>BusinessListBase.cs</FileName>
|
||||
<HashCode>AgAAAIlACAAAHAJIkAgAGAgEQACAAAEEoQIBUAAgCFA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.CommandBase" Collapsed="true">
|
||||
<Position X="5.5" Y="1" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>CommandBase.cs</FileName>
|
||||
<HashCode>AAAAAAgAAAAABABAEAAAAAAAAAAAAAEAAAAAAAAACEI=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.NameValueListBase<K, V>" Collapsed="true">
|
||||
<Position X="3.25" Y="3.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>NameValueListBase.cs</FileName>
|
||||
<HashCode>BAAAAAgAAAAEBAQIEAAAAAAAAAAAAAEAAAIgAAAACFA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.ReadOnlyBase<T>" Collapsed="true">
|
||||
<Position X="1" Y="2.25" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>ReadOnlyBase.cs</FileName>
|
||||
<HashCode>AAAAAAgAAAAABABMkAAIAAAEAABAAIEAAAIAAAAAiFA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.ReadOnlyListBase<T, C>" Collapsed="true">
|
||||
<Position X="3.25" Y="2.25" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>ReadOnlyListBase.cs</FileName>
|
||||
<HashCode>BAAAAAgAAAAABAAIEAAAAAAAAAAAAAEAAAIAAAAACFA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
</ClassDiagram>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Font Name="Tahoma" Size="8.25" />
|
||||
<Class Name="Csla.Web.Design.CslaDataSourceDesigner" Collapsed="true">
|
||||
<Position X="4" Y="3" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Web\Design\CslaDataSourceDesigner.cs</FileName>
|
||||
<HashCode>EAAAAACAAAAAAQABAAAAAAAAAAAAAAACCCABAAIAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Web.Design.CslaDesignerDataSourceView" Collapsed="true">
|
||||
<Position X="4" Y="4.25" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Web\Design\CslaDesignerDataSourceView.cs</FileName>
|
||||
<HashCode>AEACgAQAAAAAAAAAABABAAAEAAAAAAAAAAABAQAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Web.Design.ObjectFieldInfo" Collapsed="true">
|
||||
<Position X="7" Y="6.25" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Web\Design\ObjectFieldInfo.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAIEAAAQgIIAAAREAAAwAEAABEAAAAAAkAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Web.Design.ObjectSchema" Collapsed="true">
|
||||
<Position X="7" Y="4.25" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Web\Design\ObjectSchema.cs</FileName>
|
||||
<HashCode>AAAAAAAAAABAAAABAAAAAAAAAAAAAAAAAAAAACAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Web.Design.ObjectViewSchema" Collapsed="true">
|
||||
<Position X="7" Y="5.25" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Web\Design\ObjectViewSchema.cs</FileName>
|
||||
<HashCode>AIAAAAAAgABAAAABAAAAAAQAAAAAQAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Web.CslaDataSource" Collapsed="true">
|
||||
<Position X="0.5" Y="3" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Web\CslaDataSource.cs</FileName>
|
||||
<HashCode>AAAAgAAAAAAkAgABIAIAEABAAAAAABEACAABAAAAAIA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Web.SelectObjectArgs" Collapsed="true">
|
||||
<Position X="4.75" Y="1.5" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Web\CslaDataSource.cs</FileName>
|
||||
<HashCode>AAAACAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Web.InsertObjectArgs" Collapsed="true">
|
||||
<Position X="7.25" Y="0.5" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Web\CslaDataSource.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAgAAAAAAAAAAAQAAAAAAAAgAAAAACA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Web.UpdateObjectArgs" Collapsed="true">
|
||||
<Position X="7.25" Y="1.5" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Web\CslaDataSource.cs</FileName>
|
||||
<HashCode>AAQQAAAAAAAAAAgACEAAAAAAAAQAAAAAAAAgAAAAACA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Web.DeleteObjectArgs" Collapsed="true">
|
||||
<Position X="4.75" Y="0.5" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Web\CslaDataSource.cs</FileName>
|
||||
<HashCode>AAQQAAAAAAAAAAgACEAAAAAAAAQAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Web.CslaDataSourceView" Collapsed="true">
|
||||
<Position X="0.5" Y="4.25" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Web\CslaDataSourceView.cs</FileName>
|
||||
<HashCode>AEACgAQAAABAAgABABAAAAAACAAAABAQAAgBAQAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
</ClassDiagram>
|
||||
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Font Name="Tahoma" Size="8.25" />
|
||||
<Class Name="Csla.DataPortal" Collapsed="true">
|
||||
<Position X="1.25" Y="2.25" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Client\DataPortal.cs</FileName>
|
||||
<HashCode>AAQAAAAAABAAAAQAAAHAAgAAIAEAAEAIAAAIAAADAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.DataPortalClient.EnterpriseServicesProxy" Collapsed="true">
|
||||
<Position X="2.75" Y="0.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Client\EnterpriseServicesProxy.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAEIAAAAAAEAAEQAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.DataPortalClient.LocalProxy" Collapsed="true">
|
||||
<Position X="2.75" Y="1.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Client\LocalProxy.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAGIAAAAAAEAAEAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.DataPortalClient.RemotingProxy" Collapsed="true">
|
||||
<Position X="2.75" Y="2.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Client\RemotingProxy.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAGIAAAAAAEAAEAAAAAAAAABAIA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.DataPortalClient.WebServicesProxy" Collapsed="true">
|
||||
<Position X="2.75" Y="3.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Client\WebServicesProxy.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAABAAAAEIAAAAACFAAEAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Server.Hosts.EnterpriseServicesPortal" Collapsed="true">
|
||||
<Position X="5" Y="0.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Hosts\EnterpriseServicesPortal.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAIAAEAAAAAAAEAAEABAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Server.Hosts.RemotingPortal" Collapsed="true">
|
||||
<Position X="5" Y="2.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Hosts\RemotingPortal.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAEAAAAAAAEAAEAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Server.Hosts.WebServicePortal" Collapsed="true">
|
||||
<Position X="5" Y="3.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Hosts\WebServicePortal.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAEAAAAAACFAAEAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Server.TransactionalDataPortal" Collapsed="true">
|
||||
<Position X="7.75" Y="3.25" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Server\TransactionalDataPortal.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAEAAAAAAAEAAEAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Server.SimpleDataPortal" Collapsed="true">
|
||||
<Position X="8.75" Y="2.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Server\SimpleDataPortal.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAEAAAAAAAEAAEAAAAAAAIAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Server.ServicedDataPortal" Collapsed="true">
|
||||
<Position X="7.75" Y="1.25" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Server\ServicedDataPortal.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAEAAAAAAAEAAEAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Server.DataPortal" Collapsed="true">
|
||||
<Position X="7.25" Y="2.25" Width="1.25" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Server\DataPortal.cs</FileName>
|
||||
<HashCode>AEQAAAAAAAIAAAAAQAEAAAAAAAEAAEAAAAQAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
</ClassDiagram>
|
||||
@@ -0,0 +1,452 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Font Name="Tahoma" Size="8.25" />
|
||||
<Class Name="Csla.BusinessBase<T>" Collapsed="true">
|
||||
<Position X="0.5" Y="5.25" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>BusinessBase.cs</FileName>
|
||||
<HashCode>AAAAAIAAAAAAAAAEgAAAAAAAAAAAAIAAAAAAAAAAgBA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Core.BusinessBase" Collapsed="true">
|
||||
<Position X="0.5" Y="4" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\BusinessBase.cs</FileName>
|
||||
<HashCode>FAgBAA8ACAATnCTIEAlISEiUBJHgAAEAIFCBAQAgKEA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Core.UndoableBase" Collapsed="true">
|
||||
<Position X="0.5" Y="2.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\UndoableBase.cs</FileName>
|
||||
<HashCode>AgAIAAAAAAgAAAQAAAIBEAAAAAAQAAAAAgBAEAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Core.BindableBase" Collapsed="true">
|
||||
<Position X="0.5" Y="1.25" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\BindableBase.cs</FileName>
|
||||
<HashCode>AAAABAAAAAAAAAACIAAAIAAAgIAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.BusinessListBase<T, C>" Collapsed="true">
|
||||
<Position X="2.75" Y="2.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>BusinessListBase.cs</FileName>
|
||||
<HashCode>AgAAAIlACAAQHAJIkAgAGAgEQACAAAEEoQABUAAgCFA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="System.ComponentModel.BindingList<T>" Collapsed="true">
|
||||
<Position X="3.75" Y="1.25" Width="2" />
|
||||
<TypeIdentifier />
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.CommandBase" Collapsed="true">
|
||||
<Position X="2.75" Y="5.25" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>CommandBase.cs</FileName>
|
||||
<HashCode>AAAAAAgAAAAABABAEAAAAAAAAAAAAAEAAAAAAAAACEI=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.NameValueListBase<K, V>" Collapsed="true">
|
||||
<Position X="5" Y="4" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>NameValueListBase.cs</FileName>
|
||||
<HashCode>BAAAAAgAAAAUBAQIEAAAAAAAAAAAAAEAAAAgAAAACFA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Core.ReadOnlyBindingList<C>" Collapsed="true">
|
||||
<Position X="6.25" Y="2.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\ReadOnlyBindingList.cs</FileName>
|
||||
<HashCode>AAAAAABAAAAABAAQAAAAAAAAQCAAAAAEIAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.NotUndoableAttribute" Collapsed="true">
|
||||
<Position X="2.75" Y="4" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>NotUndoableAttribute.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.ReadOnlyBase<T>" Collapsed="true">
|
||||
<Position X="5" Y="5.25" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>ReadOnlyBase.cs</FileName>
|
||||
<HashCode>AAAAAAgAAAAQBABMkAAIAAAEAABAAIEAAAAAAAAAiFA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.ReadOnlyListBase<T, C>" Collapsed="true">
|
||||
<Position X="7.5" Y="4" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>ReadOnlyListBase.cs</FileName>
|
||||
<HashCode>BAAAAAgAAAAQBAAIEAAAAAAAAAAAAAEAAAAAAAAACFA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.SortedBindingList<T>" Collapsed="true">
|
||||
<Position X="6.25" Y="1.25" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>SortedBindingList.cs</FileName>
|
||||
<HashCode>AGoAAEAAgUQACBAUGAAINAQAKAE4RKAIeAEQADBQIpQ=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.DataPortal" Collapsed="true">
|
||||
<Position X="0.5" Y="10.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Client\DataPortal.cs</FileName>
|
||||
<HashCode>AAQAAAAAABAAAAQAAAHAAgAAIAEAAEAIAAAIAAADAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.DataPortalClient.EnterpriseServicesProxy" Collapsed="true">
|
||||
<Position X="2.75" Y="9" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Client\EnterpriseServicesProxy.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAEIAAAAAAEAAEQAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.DataPortalClient.LocalProxy" Collapsed="true">
|
||||
<Position X="2.75" Y="10" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Client\LocalProxy.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAGIAAAAAAEAAEAAAAAAAAABAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.DataPortalClient.RemotingProxy" Collapsed="true">
|
||||
<Position X="2.75" Y="11" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Client\RemotingProxy.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAGIAAAAAAEAAEAAAAAAAAABAIA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.DataPortalClient.WebServicesProxy" Collapsed="true">
|
||||
<Position X="2.75" Y="12" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Client\WebServicesProxy.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAABAAAAEIAAAAACFAAEAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Server.Hosts.EnterpriseServicesPortal" Collapsed="true">
|
||||
<Position X="7.5" Y="9" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Hosts\EnterpriseServicesPortal.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAIAAEAAAAAAAEAAEABAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Server.Hosts.RemotingPortal" Collapsed="true">
|
||||
<Position X="7.5" Y="11" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Hosts\RemotingPortal.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAEAAAAAAAEAAEAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Server.Hosts.WebServicePortal" Collapsed="true">
|
||||
<Position X="7.5" Y="12" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Hosts\WebServicePortal.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAEAAAAAACFAAEAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Server.TransactionalDataPortal" Collapsed="true">
|
||||
<Position X="11.75" Y="11" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Server\TransactionalDataPortal.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAEAAAAAAAEAAEAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Server.SimpleDataPortal" Collapsed="true">
|
||||
<Position X="13.25" Y="10" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Server\SimpleDataPortal.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAEAAAAAAAEAAEAAAAAAAIAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Server.ServicedDataPortal" Collapsed="true">
|
||||
<Position X="11.75" Y="9" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Server\ServicedDataPortal.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAEAAAAAAAEAAEAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Server.DataPortalContext" Collapsed="true">
|
||||
<Position X="5" Y="9" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Server\DataPortalContext.cs</FileName>
|
||||
<HashCode>AAASQAAAAAAAABAAACAAAABACAAAAAAEACAAAAIAACE=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.ApplicationContext" Collapsed="true">
|
||||
<Position X="5" Y="8" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\ApplicationContext.cs</FileName>
|
||||
<HashCode>IAABAACAAAIAAABAiCIAAgBAAAAAAAAIAAAAAAJACAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Server.DataPortalResult" Collapsed="true">
|
||||
<Position X="5" Y="11" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Server\DataPortalResult.cs</FileName>
|
||||
<HashCode>AAAAQAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAEAAAAI=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Server.DataPortalException" Collapsed="true">
|
||||
<Position X="5" Y="12" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Server\DataPortalException.cs</FileName>
|
||||
<HashCode>AAAABAAAAAAAAgACAAAAAAQgAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.CriteriaBase" Collapsed="true">
|
||||
<Position X="5" Y="10" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\CriteriaBase.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAIAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.RunLocalAttribute" Collapsed="true">
|
||||
<Position X="0.5" Y="6.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\RunLocalAttribute.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Server.DataPortal" Collapsed="true">
|
||||
<Position X="9.75" Y="10" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Server\DataPortal.cs</FileName>
|
||||
<HashCode>AEQAAAAAAAIAAAAAQAEAAAAAAAEAAEAAAAQAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.TransactionalAttribute" Collapsed="true">
|
||||
<Position X="9.75" Y="12" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\TransactionalAttribute.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAEAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Core.ObjectCloner" Collapsed="true">
|
||||
<Position X="7.5" Y="6.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\ObjectCloner.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Data.SafeDataReader" Collapsed="true">
|
||||
<Position X="10" Y="5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Data\SafeDataReader.cs</FileName>
|
||||
<HashCode>BCCQIAAgMCgAAAABCAIIBCYgAAJEAEQwIBQAAACAJEA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Data.ObjectAdapter" Collapsed="true">
|
||||
<Position X="10" Y="5.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Data\ObjectAdapter.cs</FileName>
|
||||
<HashCode>AAABAAAAgGAAAAAAAAAAAAAAQAAACAAAAIAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Security.AuthorizationRules" Collapsed="true">
|
||||
<Position X="14.5" Y="4" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Security\AuthorizationRules.cs</FileName>
|
||||
<HashCode>AoiCAgAAAAAhAAAQAAAIAAAAAAAAAAAAAAABACIAgAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Security.RolesForProperty" Collapsed="true">
|
||||
<Position X="14.5" Y="4.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Security\RolesForProperty.cs</FileName>
|
||||
<HashCode>AAgAAAAAABAAAAAABAQQBAAAAAAAAQBAAAAAECIAgAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Security.BusinessPrincipalBase" Collapsed="true">
|
||||
<Position X="10" Y="6.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Security\BusinessPrincipalBase.cs</FileName>
|
||||
<HashCode>AAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAABA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Validation.CommonRules" Collapsed="true">
|
||||
<Position X="12.25" Y="5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Validation\CommonRules.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAgAAgEAAAAQA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Validation.ValidationRules" Collapsed="true">
|
||||
<Position X="12.25" Y="4" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Validation\ValidationRules.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAACAAAAggAAIIQgAEAAAAAAgAAAAAgAI=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Validation.BrokenRulesCollection" Collapsed="true">
|
||||
<Position X="10" Y="4" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Validation\BrokenRulesCollection.cs</FileName>
|
||||
<HashCode>AAIAAAAAAAAAAAAEIAAABAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Validation.BrokenRule" Collapsed="true">
|
||||
<Position X="12.25" Y="5.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Validation\BrokenRule.cs</FileName>
|
||||
<HashCode>EAAABAAAAAAgAAAEAAAAAAAABAAAAAAAAAAAAQAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Validation.ValidationException" Collapsed="true">
|
||||
<Position X="12.25" Y="7.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Validation\ValidationException.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Data.DataMapper" Collapsed="true">
|
||||
<Position X="7.5" Y="5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Data\DataMapper.cs</FileName>
|
||||
<HashCode>AAAAAAAAABAAAgAAAAAAQAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.MethodCaller" Collapsed="true">
|
||||
<Position X="14" Y="12" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\MethodCaller.cs</FileName>
|
||||
<HashCode>AAACAAAAAACAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAIA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Server.CallMethodException" Collapsed="true">
|
||||
<Position X="15.25" Y="12.25" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Server\CallMethodException.cs</FileName>
|
||||
<HashCode>AAAABAAAAAAAAgAAAAAAAAAgAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.DataPortalEventArgs" Collapsed="true">
|
||||
<Position X="2.75" Y="7.25" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\DataPortalEventArgs.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAEAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.DataPortalException" Collapsed="true">
|
||||
<Position X="2.75" Y="6.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\DataPortalException.cs</FileName>
|
||||
<HashCode>AAAADAAAAAAAAgAAAAAAAABgAAAAAAAAAAAAAAAAAEA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Validation.RuleArgs" Collapsed="true">
|
||||
<Position X="13.75" Y="7" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Validation\RuleArgs.cs</FileName>
|
||||
<HashCode>EAAAAAAAAAAgAAAEAAAAAAAAAAAAAAAAAAAAAABAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Struct Name="Csla.SmartDate" Collapsed="true">
|
||||
<Position X="7.5" Y="6" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>SmartDate.cs</FileName>
|
||||
<HashCode>AAJAAAAAACAACAQExAGCEgAAAwAAAIAhAAAACAAAB2A=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Struct>
|
||||
<Interface Name="Csla.Core.IBusinessObject" Collapsed="true">
|
||||
<Position X="11.25" Y="0.5" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\IBusinessObject.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Csla.Core.IUndoableObject" Collapsed="true">
|
||||
<Position X="8.5" Y="1.5" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\IUndoableObject.cs</FileName>
|
||||
<HashCode>AgAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Csla.Core.IEditableCollection" Collapsed="true">
|
||||
<Position X="8.5" Y="2.5" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\IEditableCollection.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Csla.Core.IReadOnlyObject" Collapsed="true">
|
||||
<Position X="10.5" Y="1.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\IReadOnlyObject.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Csla.Core.ICommandObject" Collapsed="true">
|
||||
<Position X="14.25" Y="1.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\ICommandObject.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Csla.Core.IReadOnlyCollection" Collapsed="true">
|
||||
<Position X="12.25" Y="1.5" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\IReadOnlyCollection.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Csla.Server.IDataPortalServer" Collapsed="true">
|
||||
<Position X="0.5" Y="8" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Server\IDataPortalServer.cs</FileName>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAEAAAAAAAEAAEAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Csla.DataPortalClient.IDataPortalProxy" Collapsed="true">
|
||||
<Position X="2.75" Y="8" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\Client\IDataPortalProxy.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Enum Name="Csla.TransactionalTypes" Collapsed="true">
|
||||
<Position X="11.75" Y="12.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>DataPortal\TransactionalTypes.cs</FileName>
|
||||
<HashCode>AAAAAAAgQAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Enum Name="Csla.Security.AccessType" Collapsed="true">
|
||||
<Position X="15.75" Y="5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Security\AccessType.cs</FileName>
|
||||
<HashCode>AAAAAAAAABAAAAAABAAQBAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Delegate Name="Csla.Validation.RuleHandler" Collapsed="true">
|
||||
<Position X="12.25" Y="6.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Validation\RuleHandler.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAIAAAAAAAAQAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Delegate>
|
||||
</ClassDiagram>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Font Name="Tahoma" Size="8.25" />
|
||||
<Class Name="Csla.BusinessBase<T>" Collapsed="true">
|
||||
<Position X="4.75" Y="5.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>BusinessBase.cs</FileName>
|
||||
<HashCode>AAAAAIAAAAAAAAAEgAAAAAAAAAAAAIAAAAAAAAAAgBA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Core.BusinessBase" Collapsed="true">
|
||||
<Position X="4.75" Y="4.25" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\BusinessBase.cs</FileName>
|
||||
<HashCode>FAgBAA8ACAADnCDIEAlISEiUBJHgAAEAIFKBAQAgKEA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.Core.UndoableBase" Collapsed="true">
|
||||
<Position X="4.75" Y="2.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\UndoableBase.cs</FileName>
|
||||
<HashCode>AgAAAAAAAAAAAAAAAAIAkAAAAAAAEAAAAAhAEAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Csla.NotUndoableAttribute" Collapsed="true">
|
||||
<Position X="2.25" Y="2.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>NotUndoableAttribute.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.BusinessListBase<T, C>" Collapsed="true">
|
||||
<Position X="7.25" Y="5.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>BusinessListBase.cs</FileName>
|
||||
<HashCode>AgAAAIhACAAADAJIEAgAGCgAQACIAAlEoQIBUAAgCFA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Interface Name="Csla.Core.IEditableObject" Collapsed="true">
|
||||
<Position X="7.25" Y="1.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\IEditableObject.cs</FileName>
|
||||
<HashCode>AgAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Csla.Core.IEditableCollection" Collapsed="true">
|
||||
<Position X="7.25" Y="2.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\IEditableCollection.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="System.ComponentModel.IEditableObject" Collapsed="true">
|
||||
<Position X="2.25" Y="4.25" Width="2" />
|
||||
<TypeIdentifier />
|
||||
</Interface>
|
||||
<Interface Name="Csla.Core.IBusinessObject" Collapsed="true">
|
||||
<Position X="7.25" Y="1" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Core\IBusinessObject.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
</ClassDiagram>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Font Name="Tahoma" Size="8.25" />
|
||||
<Class Name="Csla.Validation.ValidationRules" Collapsed="true">
|
||||
<Position X="1" Y="1.75" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Validation\ValidationRules.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAACAAAAggAAIIQgAEAAAAAAgAAAAAgAI=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Validation.ValidationException" Collapsed="true">
|
||||
<Position X="2.25" Y="3.5" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Validation\ValidationException.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Validation.RuleArgs" Collapsed="true">
|
||||
<Position X="2.25" Y="2.75" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Validation\RuleArgs.cs</FileName>
|
||||
<HashCode>EAAAAAAAAAAgAAAEAAAAAAAAAAAAAAAAAAAAAABAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Validation.CommonRules" Collapsed="true">
|
||||
<Position X="1" Y="4.5" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Validation\CommonRules.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAgAAgEAAAAQA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Validation.BrokenRulesCollection" Collapsed="true">
|
||||
<Position X="4.5" Y="1.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Validation\BrokenRulesCollection.cs</FileName>
|
||||
<HashCode>AAIAAAAAAAAAAAAEIAAABAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Validation.BrokenRule" Collapsed="true">
|
||||
<Position X="5.5" Y="2.25" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Validation\BrokenRule.cs</FileName>
|
||||
<HashCode>EAAABAAAAAAgAAAEAAAAAAAABAAAAAAAAAAAAQAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Csla.Validation.RuleMethod" Collapsed="true">
|
||||
<Position X="4.5" Y="3.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Validation\RuleMethod.cs</FileName>
|
||||
<HashCode>AAAAhAAAAAAIAAAEAAEAAAAARAAAAAAAAAAAAAAAAQA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Delegate Name="Csla.Validation.RuleHandler" Collapsed="true">
|
||||
<Position X="2.25" Y="2" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<FileName>Validation\RuleHandler.cs</FileName>
|
||||
<HashCode>AAAAAAAAAAAAAAIAAAAAAAAQAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
</TypeIdentifier>
|
||||
</Delegate>
|
||||
</ClassDiagram>
|
||||
@@ -0,0 +1,281 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
/// <summary>
|
||||
/// This is the base class from which collections
|
||||
/// of editable root business objects should be
|
||||
/// derived.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">
|
||||
/// Type of editable root object to contain within
|
||||
/// the collection.
|
||||
/// </typeparam>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Your subclass should implement a factory method
|
||||
/// and should override or overload
|
||||
/// DataPortal_Fetch() to implement data retrieval.
|
||||
/// </para><para>
|
||||
/// Saving (inserts or updates) of items in the collection
|
||||
/// should be handled through the SaveItem() method on
|
||||
/// the collection.
|
||||
/// </para><para>
|
||||
/// Removing an item from the collection
|
||||
/// through Remove() or RemoveAt() causes immediate deletion
|
||||
/// of the object, by calling the object's Delete() and
|
||||
/// Save() methods.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Serializable()]
|
||||
public abstract class EditableRootListBase<T> : Core.ExtendedBindingList<T>, Core.IParent
|
||||
where T : Core.IEditableBusinessObject, Core.ISavable
|
||||
{
|
||||
|
||||
#region SaveItem Methods
|
||||
|
||||
private bool _activelySaving;
|
||||
|
||||
/// <summary>
|
||||
/// Saves the specified item in the list.
|
||||
/// </summary>
|
||||
/// <param name="item">
|
||||
/// Reference to the item to be saved.
|
||||
/// </param>
|
||||
/// <remarks>
|
||||
/// This method properly saves the child item,
|
||||
/// by making sure the item in the collection
|
||||
/// is properly replaced by the result of the
|
||||
/// Save() method call.
|
||||
/// </remarks>
|
||||
public void SaveItem(T item)
|
||||
{
|
||||
|
||||
SaveItem(IndexOf(item));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Saves the specified item in the list.
|
||||
/// </summary>
|
||||
/// <param name="index">
|
||||
/// Index of the item to be saved.
|
||||
/// </param>
|
||||
/// <remarks>
|
||||
/// This method properly saves the child item,
|
||||
/// by making sure the item in the collection
|
||||
/// is properly replaced by the result of the
|
||||
/// Save() method call.
|
||||
/// </remarks>
|
||||
public virtual void SaveItem(int index)
|
||||
{
|
||||
bool raisingEvents = this.RaiseListChangedEvents;
|
||||
this.RaiseListChangedEvents = false;
|
||||
|
||||
_activelySaving = true;
|
||||
|
||||
T item = this[index];
|
||||
int editLevel = item.EditLevel;
|
||||
// commit all changes
|
||||
for (int tmp = 1; tmp <= editLevel; tmp++)
|
||||
item.AcceptChanges();
|
||||
try
|
||||
{
|
||||
// do the save
|
||||
this[index] = (T)item.Save();
|
||||
}
|
||||
finally
|
||||
{
|
||||
// restore edit level to previous level
|
||||
for (int tmp = 1; tmp <= editLevel; tmp++)
|
||||
item.CopyState();
|
||||
_activelySaving = false;
|
||||
this.RaiseListChangedEvents = raisingEvents;
|
||||
}
|
||||
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, index));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Insert, Remove, Clear
|
||||
|
||||
/// <summary>
|
||||
/// Gives the new object a parent reference to this
|
||||
/// list.
|
||||
/// </summary>
|
||||
/// <param name="index">Index at which to insert the item.</param>
|
||||
/// <param name="item">Item to insert.</param>
|
||||
protected override void InsertItem(int index, T item)
|
||||
{
|
||||
item.SetParent(this);
|
||||
base.InsertItem(index, item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes an item from the list.
|
||||
/// </summary>
|
||||
/// <param name="index">Index of the item
|
||||
/// to be removed.</param>
|
||||
protected override void RemoveItem(int index)
|
||||
{
|
||||
// delete item from database
|
||||
T item = this[index];
|
||||
|
||||
// only delete/save the item if it is not new
|
||||
if (!item.IsNew)
|
||||
{
|
||||
item.Delete();
|
||||
SaveItem(index);
|
||||
}
|
||||
|
||||
// disconnect event handler if necessary
|
||||
System.ComponentModel.INotifyPropertyChanged c = item as System.ComponentModel.INotifyPropertyChanged;
|
||||
if (c != null)
|
||||
{
|
||||
c.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler(Child_PropertyChanged);
|
||||
}
|
||||
|
||||
base.RemoveItem(index);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IParent Members
|
||||
|
||||
void Csla.Core.IParent.ApplyEditChild(Core.IEditableBusinessObject child)
|
||||
{
|
||||
if (!_activelySaving && child.EditLevel == 0)
|
||||
SaveItem((T)child);
|
||||
}
|
||||
|
||||
void Csla.Core.IParent.RemoveChild(Core.IEditableBusinessObject child)
|
||||
{
|
||||
// do nothing, removal of a child is handled by
|
||||
// the RemoveItem override
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Cascade Child events
|
||||
|
||||
private void Child_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
{
|
||||
for (int index = 0; index < this.Count; index++)
|
||||
{
|
||||
if (ReferenceEquals(this[index], sender))
|
||||
{
|
||||
OnListChanged(new System.ComponentModel.ListChangedEventArgs(System.ComponentModel.ListChangedType.ItemChanged, index));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Serialization Notification
|
||||
|
||||
[OnDeserialized()]
|
||||
private void OnDeserializedHandler(StreamingContext context)
|
||||
{
|
||||
|
||||
OnDeserialized(context);
|
||||
foreach (Core.IEditableBusinessObject child in this)
|
||||
{
|
||||
child.SetParent(this);
|
||||
System.ComponentModel.INotifyPropertyChanged c = child as System.ComponentModel.INotifyPropertyChanged;
|
||||
if (c != null)
|
||||
{
|
||||
c.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(Child_PropertyChanged);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called on a newly deserialized object
|
||||
/// after deserialization is complete.
|
||||
/// </summary>
|
||||
/// <param name="context">Serialization context object.</param>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void OnDeserialized(StreamingContext context)
|
||||
{
|
||||
|
||||
// do nothing - this is here so a subclass
|
||||
// could override if needed
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Data Access
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "criteria")]
|
||||
private void DataPortal_Create(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Properties.Resources.CreateNotSupportedException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to allow retrieval of an existing business
|
||||
/// object based on data in the database.
|
||||
/// </summary>
|
||||
/// <param name="criteria">An object containing criteria values to identify the object.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
protected virtual void DataPortal_Fetch(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Properties.Resources.FetchNotSupportedException);
|
||||
}
|
||||
|
||||
private void DataPortal_Update()
|
||||
{
|
||||
throw new NotSupportedException(Properties.Resources.UpdateNotSupportedException);
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "criteria")]
|
||||
private void DataPortal_Delete(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Properties.Resources.DeleteNotSupportedException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal prior to calling the
|
||||
/// requested DataPortal_xyz method.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member"), EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalInvoke(DataPortalEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal after calling the
|
||||
/// requested DataPortal_xyz method.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member"), EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalInvokeComplete(DataPortalEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal if an exception
|
||||
/// occurs during data access.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
/// <param name="ex">The Exception thrown during data access.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member"), EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalException(DataPortalEventArgs e, Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
using System.EnterpriseServices;
|
||||
|
||||
// EnterpriseServices settings
|
||||
[assembly: ApplicationActivation(ActivationOption.Library)]
|
||||
[assembly: ApplicationName("CSLA .NET DataPortal")]
|
||||
[assembly: Description("CSLA .NET Serviced DataPortal")]
|
||||
[assembly: ApplicationAccessControl(false)]
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the method signature for a filter
|
||||
/// provider method used by FilteredBindingList.
|
||||
/// </summary>
|
||||
/// <param name="item">The object to be filtered.</param>
|
||||
/// <param name="filter">The filter criteria.</param>
|
||||
/// <returns><see langword="true"/> if the item matches the filter.</returns>
|
||||
public delegate bool FilterProvider(object item, object filter);
|
||||
}
|
||||
@@ -0,0 +1,932 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Collections;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a filtered view into an existing IList(Of T).
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the objects contained
|
||||
/// in the original list.</typeparam>
|
||||
public class FilteredBindingList<T> :
|
||||
IList<T>, IBindingList, IEnumerable<T>,
|
||||
ICancelAddNew
|
||||
{
|
||||
|
||||
#region ListItem class
|
||||
|
||||
private class ListItem
|
||||
{
|
||||
private object _key;
|
||||
private int _baseIndex;
|
||||
|
||||
public object Key
|
||||
{
|
||||
get { return _key; }
|
||||
}
|
||||
|
||||
public int BaseIndex
|
||||
{
|
||||
get { return _baseIndex; }
|
||||
set { _baseIndex = value; }
|
||||
}
|
||||
|
||||
public ListItem(object key, int baseIndex)
|
||||
{
|
||||
_key = key;
|
||||
_baseIndex = baseIndex;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Key.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Filtered enumerator
|
||||
|
||||
private class FilteredEnumerator : IEnumerator<T>
|
||||
{
|
||||
private IList<T> _list;
|
||||
private List<ListItem> _filterIndex;
|
||||
private int _index;
|
||||
|
||||
public FilteredEnumerator(
|
||||
IList<T> list,
|
||||
List<ListItem> filterIndex)
|
||||
{
|
||||
_list = list;
|
||||
_filterIndex = filterIndex;
|
||||
Reset();
|
||||
}
|
||||
|
||||
public T Current
|
||||
{
|
||||
get { return _list[_filterIndex[_index].BaseIndex]; }
|
||||
}
|
||||
|
||||
Object System.Collections.IEnumerator.Current
|
||||
{
|
||||
get { return _list[_filterIndex[_index].BaseIndex]; }
|
||||
}
|
||||
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (_index < _filterIndex.Count - 1)
|
||||
{
|
||||
_index++;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
_index = -1;
|
||||
}
|
||||
|
||||
#region IDisposable Support
|
||||
|
||||
private bool _disposedValue = false; // To detect redundant calls.
|
||||
|
||||
// IDisposable
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!_disposedValue)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
// TODO: free unmanaged resources when explicitly called
|
||||
}
|
||||
// TODO: free shared unmanaged resources
|
||||
}
|
||||
_disposedValue = true;
|
||||
}
|
||||
|
||||
// this code added to correctly implement the disposable pattern.
|
||||
public void Dispose()
|
||||
{
|
||||
// Do not change this code. Put cleanup code in Dispose(bool disposing) above.
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
~FilteredEnumerator()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Filter/Unfilter
|
||||
|
||||
private void DoFilter()
|
||||
{
|
||||
int index = 0;
|
||||
_filterIndex.Clear();
|
||||
|
||||
if (_provider == null)
|
||||
_provider = DefaultFilter.Filter;
|
||||
|
||||
if (_filterBy == null)
|
||||
{
|
||||
foreach (T obj in _list)
|
||||
{
|
||||
if (_provider.Invoke(obj, _filter))
|
||||
_filterIndex.Add(new ListItem(obj, index));
|
||||
index++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (T obj in _list)
|
||||
{
|
||||
object tmp = _filterBy.GetValue(obj);
|
||||
if (_provider.Invoke(tmp, _filter))
|
||||
_filterIndex.Add(new ListItem(tmp, index));
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
_filtered = true;
|
||||
|
||||
OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, 0));
|
||||
|
||||
}
|
||||
|
||||
private void UnDoFilter()
|
||||
{
|
||||
_filterIndex.Clear();
|
||||
_filterBy = null;
|
||||
_filter = null;
|
||||
_filtered = false;
|
||||
|
||||
OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, 0));
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IEnumerable<T>
|
||||
|
||||
/// <summary>
|
||||
/// Gets an enumerator object.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IEnumerator<T> GetEnumerator()
|
||||
{
|
||||
if (_filtered)
|
||||
return new FilteredEnumerator(_list, _filterIndex);
|
||||
else
|
||||
return _list.GetEnumerator();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IBindingList, IList<T>
|
||||
|
||||
/// <summary>
|
||||
/// Implemented by IList source object.
|
||||
/// </summary>
|
||||
/// <param name="property">Property on which
|
||||
/// to build the index.</param>
|
||||
public void AddIndex(PropertyDescriptor property)
|
||||
{
|
||||
if (_supportsBinding)
|
||||
_bindingList.AddIndex(property);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implemented by IList source object.
|
||||
/// </summary>
|
||||
public object AddNew()
|
||||
{
|
||||
T result;
|
||||
if (_supportsBinding)
|
||||
result = (T)_bindingList.AddNew();
|
||||
else
|
||||
result = default(T);
|
||||
|
||||
//_newItem = (T)result;
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implemented by IList source object.
|
||||
/// </summary>
|
||||
public bool AllowEdit
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_supportsBinding)
|
||||
return _bindingList.AllowEdit;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implemented by IList source object.
|
||||
/// </summary>
|
||||
public bool AllowNew
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_supportsBinding)
|
||||
return _bindingList.AllowNew;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implemented by IList source object.
|
||||
/// </summary>
|
||||
public bool AllowRemove
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_supportsBinding)
|
||||
return _bindingList.AllowRemove;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sorts the list if the original list
|
||||
/// supports sorting.
|
||||
/// </summary>
|
||||
/// <param name="property">Property on which to sort.</param>
|
||||
/// <param name="direction">Direction of the sort.</param>
|
||||
public void ApplySort(
|
||||
PropertyDescriptor property, ListSortDirection direction)
|
||||
{
|
||||
if (SupportsSorting)
|
||||
_bindingList.ApplySort(property, direction);
|
||||
else
|
||||
throw new NotSupportedException("Sorting not supported.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds an item in the view
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property to search</param>
|
||||
/// <param name="key">Value to find</param>
|
||||
public int Find(string propertyName, object key)
|
||||
{
|
||||
PropertyDescriptor findProperty = null;
|
||||
|
||||
if (!String.IsNullOrEmpty(propertyName))
|
||||
{
|
||||
Type itemType = typeof(T);
|
||||
foreach (PropertyDescriptor prop in TypeDescriptor.GetProperties(itemType))
|
||||
{
|
||||
if (prop.Name == propertyName)
|
||||
{
|
||||
findProperty = prop;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Find(findProperty, key);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implemented by IList source object.
|
||||
/// </summary>
|
||||
/// <param name="key">Key value for which to search.</param>
|
||||
/// <param name="property">Property to search for the key
|
||||
/// value.</param>
|
||||
public int Find(PropertyDescriptor property, object key)
|
||||
{
|
||||
if (_supportsBinding)
|
||||
return FilteredIndex(_bindingList.Find(property, key));
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns True if the view is currently sorted.
|
||||
/// </summary>
|
||||
public bool IsSorted
|
||||
{
|
||||
get
|
||||
{
|
||||
if (SupportsSorting)
|
||||
return _bindingList.IsSorted;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raised to indicate that the list's data has changed.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This event is raised if the underling IList object's data changes
|
||||
/// (assuming the underling IList also implements the IBindingList
|
||||
/// interface). It is also raised if the filter
|
||||
/// is changed to indicate that the view's data has changed.
|
||||
/// </remarks>
|
||||
public event ListChangedEventHandler ListChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Raises the ListChanged event.
|
||||
/// </summary>
|
||||
/// <param name="e">Parameter for the event.</param>
|
||||
protected void OnListChanged(ListChangedEventArgs e)
|
||||
{
|
||||
if (ListChanged != null)
|
||||
ListChanged(this, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implemented by IList source object.
|
||||
/// </summary>
|
||||
/// <param name="property">Property for which the
|
||||
/// index should be removed.</param>
|
||||
public void RemoveIndex(PropertyDescriptor property)
|
||||
{
|
||||
if (_supportsBinding)
|
||||
_bindingList.RemoveIndex(property);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes any sort currently applied to the view.
|
||||
/// </summary>
|
||||
public void RemoveSort()
|
||||
{
|
||||
if (SupportsSorting)
|
||||
_bindingList.RemoveSort();
|
||||
else
|
||||
throw new NotSupportedException("Sorting not supported");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the direction of the current sort.
|
||||
/// </summary>
|
||||
public ListSortDirection SortDirection
|
||||
{
|
||||
get
|
||||
{
|
||||
if (SupportsSorting)
|
||||
return _bindingList.SortDirection;
|
||||
else
|
||||
return ListSortDirection.Ascending;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the PropertyDescriptor of the current sort.
|
||||
/// </summary>
|
||||
public PropertyDescriptor SortProperty
|
||||
{
|
||||
get
|
||||
{
|
||||
if (SupportsSorting)
|
||||
return _bindingList.SortProperty;
|
||||
else
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns True since this object does raise the
|
||||
/// ListChanged event.
|
||||
/// </summary>
|
||||
public bool SupportsChangeNotification
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implemented by IList source object.
|
||||
/// </summary>
|
||||
public bool SupportsSearching
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_supportsBinding)
|
||||
return _bindingList.SupportsSearching;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns True. Sorting is supported.
|
||||
/// </summary>
|
||||
public bool SupportsSorting
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_supportsBinding)
|
||||
return _bindingList.SupportsSorting;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies the contents of the list to
|
||||
/// an array.
|
||||
/// </summary>
|
||||
/// <param name="array">Array to receive the data.</param>
|
||||
/// <param name="arrayIndex">Starting array index.</param>
|
||||
public void CopyTo(T[] array, int arrayIndex)
|
||||
{
|
||||
_list.CopyTo(array, arrayIndex);
|
||||
}
|
||||
|
||||
void System.Collections.ICollection.CopyTo(System.Array array, int index)
|
||||
{
|
||||
CopyTo((T[])array, index);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of items in the list.
|
||||
/// </summary>
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_filtered)
|
||||
return _filterIndex.Count;
|
||||
else
|
||||
return _list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
bool System.Collections.ICollection.IsSynchronized
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
object System.Collections.ICollection.SyncRoot
|
||||
{
|
||||
get { return _list; }
|
||||
}
|
||||
|
||||
IEnumerator System.Collections.IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds an item to the list.
|
||||
/// </summary>
|
||||
/// <param name="item">Item to be added.</param>
|
||||
public void Add(T item)
|
||||
{
|
||||
_list.Add(item);
|
||||
}
|
||||
|
||||
int System.Collections.IList.Add(object value)
|
||||
{
|
||||
Add((T)value);
|
||||
int index = FilteredIndex(_list.Count - 1);
|
||||
if (index > -1)
|
||||
return index;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears the list.
|
||||
/// </summary>
|
||||
public void Clear()
|
||||
{
|
||||
_list.Clear();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the specified
|
||||
/// item is contained in the list.
|
||||
/// </summary>
|
||||
/// <param name="item">Item to find.</param>
|
||||
/// <returns><see langword="true"/> if the item is
|
||||
/// contained in the list.</returns>
|
||||
public bool Contains(T item)
|
||||
{
|
||||
return _list.Contains(item);
|
||||
}
|
||||
|
||||
bool System.Collections.IList.Contains(object value)
|
||||
{
|
||||
return Contains((T)value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the 0-based index of an
|
||||
/// item in the list.
|
||||
/// </summary>
|
||||
/// <param name="item">The item to find.</param>
|
||||
/// <returns>0-based index of the item
|
||||
/// in the list.</returns>
|
||||
public int IndexOf(T item)
|
||||
{
|
||||
return FilteredIndex(_list.IndexOf(item));
|
||||
}
|
||||
|
||||
int System.Collections.IList.IndexOf(object value)
|
||||
{
|
||||
return IndexOf((T)value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inserts an item into the list.
|
||||
/// </summary>
|
||||
/// <param name="index">Index at
|
||||
/// which to insert the item.</param>
|
||||
/// <param name="item">Item to insert.</param>
|
||||
public void Insert(int index, T item)
|
||||
{
|
||||
_list.Insert(index, item);
|
||||
}
|
||||
|
||||
void System.Collections.IList.Insert(int index, object value)
|
||||
{
|
||||
Insert(index, (T)value);
|
||||
}
|
||||
|
||||
bool System.Collections.IList.IsFixedSize
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the list
|
||||
/// is read-only.
|
||||
/// </summary>
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get { return _list.IsReadOnly; }
|
||||
}
|
||||
|
||||
object System.Collections.IList.this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[index] = (T)value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes an item from the list.
|
||||
/// </summary>
|
||||
/// <param name="item">Item to remove.</param>
|
||||
/// <returns><see langword="true"/> if the
|
||||
/// remove succeeds.</returns>
|
||||
public bool Remove(T item)
|
||||
{
|
||||
return _list.Remove(item);
|
||||
}
|
||||
|
||||
void System.Collections.IList.Remove(object value)
|
||||
{
|
||||
Remove((T)value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes an item from the list.
|
||||
/// </summary>
|
||||
/// <param name="index">Index of item
|
||||
/// to be removed.</param>
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
if (_filtered)
|
||||
{
|
||||
_list.RemoveAt(OriginalIndex(index));
|
||||
}
|
||||
else
|
||||
_list.RemoveAt(index);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the item at
|
||||
/// the specified index.
|
||||
/// </summary>
|
||||
/// <param name="index">Index of the item.</param>
|
||||
/// <returns>Item at the specified index.</returns>
|
||||
public T this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_filtered)
|
||||
{
|
||||
int src = OriginalIndex(index);
|
||||
return _list[src];
|
||||
}
|
||||
else
|
||||
return _list[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_filtered)
|
||||
_list[OriginalIndex(index)] = value;
|
||||
else
|
||||
_list[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private IList<T> _list;
|
||||
private bool _supportsBinding;
|
||||
private IBindingList _bindingList;
|
||||
private bool _filtered;
|
||||
private PropertyDescriptor _filterBy;
|
||||
private object _filter;
|
||||
FilterProvider _provider = null;
|
||||
private List<ListItem> _filterIndex =
|
||||
new List<ListItem>();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new view based on the provided IList object.
|
||||
/// </summary>
|
||||
/// <param name="list">The IList (collection) containing the data.</param>
|
||||
public FilteredBindingList(IList<T> list)
|
||||
{
|
||||
_list = list;
|
||||
|
||||
if (_list is IBindingList)
|
||||
{
|
||||
_supportsBinding = true;
|
||||
_bindingList = (IBindingList)_list;
|
||||
_bindingList.ListChanged +=
|
||||
new ListChangedEventHandler(SourceChanged);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new view based on the provided IList object.
|
||||
/// </summary>
|
||||
/// <param name="list">The IList (collection) containing the data.</param>
|
||||
/// <param name="filterProvider">
|
||||
/// Delegate pointer to a method that implements the filter behavior.
|
||||
/// </param>
|
||||
public FilteredBindingList(IList<T> list, FilterProvider filterProvider) : this(list)
|
||||
{
|
||||
_provider = filterProvider;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the filter provider method.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// Delegate pointer to a method that implements the filter behavior.
|
||||
/// </value>
|
||||
/// <returns>
|
||||
/// Delegate pointer to a method that implements the filter behavior.
|
||||
/// </returns>
|
||||
/// <remarks>
|
||||
/// If this value is set to Nothing (null in C#) then the default
|
||||
/// filter provider, <see cref="DefaultFilter" /> will be used.
|
||||
/// </remarks>
|
||||
public FilterProvider FilterProvider
|
||||
{
|
||||
get
|
||||
{
|
||||
return _provider;
|
||||
}
|
||||
set
|
||||
{
|
||||
_provider = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The property on which the items will be filtered.
|
||||
/// </summary>
|
||||
/// <value>A descriptor for the property on which
|
||||
/// the items in the collection will be filtered.</value>
|
||||
/// <returns></returns>
|
||||
/// <remarks></remarks>
|
||||
public PropertyDescriptor FilterProperty
|
||||
{
|
||||
get { return _filterBy; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns True if the view is currently filtered.
|
||||
/// </summary>
|
||||
public bool IsFiltered
|
||||
{
|
||||
get { return _filtered; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies a filter to the view.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">The text name of the property on which to filter.</param>
|
||||
/// <param name="filter">The filter criteria.</param>
|
||||
public void ApplyFilter(string propertyName, object filter)
|
||||
{
|
||||
_filterBy = null;
|
||||
_filter = filter;
|
||||
|
||||
if (!String.IsNullOrEmpty(propertyName))
|
||||
{
|
||||
Type itemType = typeof(T);
|
||||
foreach (PropertyDescriptor prop in
|
||||
TypeDescriptor.GetProperties(itemType))
|
||||
{
|
||||
if (prop.Name == propertyName)
|
||||
{
|
||||
_filterBy = prop;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ApplyFilter(_filterBy, filter);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies a filter to the view.
|
||||
/// </summary>
|
||||
/// <param name="property">A PropertyDescriptor for the property on which to filter.</param>
|
||||
/// <param name="filter">The filter criteria.</param>
|
||||
public void ApplyFilter(
|
||||
PropertyDescriptor property, object filter)
|
||||
{
|
||||
_filterBy = property;
|
||||
_filter = filter;
|
||||
DoFilter();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes the filter from the list,
|
||||
/// so the view reflects the state of
|
||||
/// the original list.
|
||||
/// </summary>
|
||||
public void RemoveFilter()
|
||||
{
|
||||
UnDoFilter();
|
||||
}
|
||||
|
||||
private void SourceChanged(
|
||||
object sender, ListChangedEventArgs e)
|
||||
{
|
||||
if (_filtered)
|
||||
{
|
||||
int listIndex;
|
||||
int filteredIndex = -1;
|
||||
T newItem;
|
||||
object newKey;
|
||||
switch (e.ListChangedType)
|
||||
{
|
||||
case ListChangedType.ItemAdded:
|
||||
listIndex = e.NewIndex;
|
||||
// add new value to index
|
||||
newItem = _list[listIndex];
|
||||
if (_filterBy != null)
|
||||
newKey = _filterBy.GetValue(newItem);
|
||||
else
|
||||
newKey = newItem;
|
||||
_filterIndex.Add(
|
||||
new ListItem(newKey, listIndex));
|
||||
filteredIndex = _filterIndex.Count - 1;
|
||||
// raise event
|
||||
OnListChanged(
|
||||
new ListChangedEventArgs(
|
||||
e.ListChangedType, filteredIndex));
|
||||
break;
|
||||
|
||||
case ListChangedType.ItemChanged:
|
||||
listIndex = e.NewIndex;
|
||||
// update index value
|
||||
filteredIndex = FilteredIndex(listIndex);
|
||||
if (filteredIndex != -1)
|
||||
{
|
||||
newItem = _list[listIndex];
|
||||
if (_filterBy != null)
|
||||
newKey = _filterBy.GetValue(newItem);
|
||||
else
|
||||
newKey = newItem;
|
||||
_filterIndex[filteredIndex] =
|
||||
new ListItem(newKey, listIndex);
|
||||
}
|
||||
// raise event if appropriate
|
||||
if (filteredIndex > -1)
|
||||
OnListChanged(
|
||||
new ListChangedEventArgs(
|
||||
e.ListChangedType, filteredIndex));
|
||||
break;
|
||||
|
||||
case ListChangedType.ItemDeleted:
|
||||
listIndex = e.NewIndex;
|
||||
// delete corresponding item from index
|
||||
// (if any)
|
||||
filteredIndex = FilteredIndex(listIndex);
|
||||
if (filteredIndex != -1)
|
||||
_filterIndex.RemoveAt(filteredIndex);
|
||||
// adjust index xref values
|
||||
foreach (ListItem item in _filterIndex)
|
||||
if (item.BaseIndex > e.NewIndex)
|
||||
item.BaseIndex--;
|
||||
// raise event if appropriate
|
||||
if (filteredIndex > -1)
|
||||
OnListChanged(
|
||||
new ListChangedEventArgs(
|
||||
e.ListChangedType, filteredIndex));
|
||||
break;
|
||||
|
||||
case ListChangedType.PropertyDescriptorAdded:
|
||||
case ListChangedType.PropertyDescriptorChanged:
|
||||
case ListChangedType.PropertyDescriptorDeleted:
|
||||
OnListChanged(e);
|
||||
break;
|
||||
|
||||
default:
|
||||
DoFilter();
|
||||
OnListChanged(
|
||||
new ListChangedEventArgs(
|
||||
ListChangedType.Reset, 0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
OnListChanged(e);
|
||||
}
|
||||
|
||||
private int OriginalIndex(int filteredIndex)
|
||||
{
|
||||
if (_filtered)
|
||||
return _filterIndex[filteredIndex].BaseIndex;
|
||||
else
|
||||
return filteredIndex;
|
||||
}
|
||||
|
||||
private int FilteredIndex(int originalIndex)
|
||||
{
|
||||
int result = -1;
|
||||
if (_filtered)
|
||||
{
|
||||
for (int index = 0; index < _filterIndex.Count; index++)
|
||||
{
|
||||
if (_filterIndex[index].BaseIndex == originalIndex)
|
||||
{
|
||||
result = index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
result = originalIndex;
|
||||
return result;
|
||||
}
|
||||
|
||||
#region ICancelAddNew Members
|
||||
|
||||
//private T _newItem;
|
||||
|
||||
//void ICancelAddNew.CancelNew(int itemIndex)
|
||||
//{
|
||||
// if (_newItem != null)
|
||||
// Remove(_newItem);
|
||||
//}
|
||||
|
||||
//void ICancelAddNew.EndNew(int itemIndex)
|
||||
//{
|
||||
// // do nothing
|
||||
//}
|
||||
|
||||
void ICancelAddNew.CancelNew(int itemIndex)
|
||||
{
|
||||
ICancelAddNew can = _list as ICancelAddNew;
|
||||
if (can != null)
|
||||
can.CancelNew(itemIndex);
|
||||
else
|
||||
_list.RemoveAt(itemIndex);
|
||||
}
|
||||
|
||||
void ICancelAddNew.EndNew(int itemIndex)
|
||||
{
|
||||
ICancelAddNew can = _list as ICancelAddNew;
|
||||
if (can != null)
|
||||
can.EndNew(itemIndex);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", Scope = "member", Target = "Csla.Server.DataPortalResult..ctor(System.Object)", MessageId = "0#")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", Scope = "member", Target = "Csla.Server.DataPortalException..ctor(System.String,System.Exception,Csla.Server.DataPortalResult)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", Scope = "member", Target = "Csla.Server.DataPortalException..ctor(System.String,System.Exception)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", Scope = "member", Target = "Csla.Server.DataPortalException..ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", Scope = "member", Target = "Csla.Server.CallMethodException..ctor(System.String,System.Exception)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", Scope = "member", Target = "Csla.Server.CallMethodException..ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline", Scope = "member", Target = "Csla.DataPortalClient.RemotingProxy..cctor()")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", Scope = "member", Target = "Csla.Data.ObjectAdapter.Fill(System.Data.DataSet,System.String,System.Object):System.Void")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1306:SetLocaleForDataTypes", Scope = "member", Target = "Csla.Data.ObjectAdapter.Fill(System.Data.DataSet,System.String,System.Object):System.Void")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors", Scope = "member", Target = "Csla.Core.ReadOnlyBindingList`1..ctor()")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors", Scope = "member", Target = "Csla.Core.BusinessBase..ctor()")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", Scope = "member", Target = "Csla.SmartDate.DateToString(System.DateTime,System.String,System.Boolean):System.String", MessageId = "1#")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", Scope = "member", Target = "Csla.SmartDate.DateToString(System.DateTime,System.String):System.String", MessageId = "1#")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", Scope = "member", Target = "Csla.DataPortalException..ctor(System.String,System.Object)", MessageId = "1#")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", Scope = "member", Target = "Csla.DataPortalException..ctor(System.String,System.Exception,System.Object)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", Scope = "member", Target = "Csla.DataPortalException..ctor(System.String,System.Exception,System.Object)", MessageId = "2#")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", Scope = "member", Target = "Csla.DataPortalException..ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", Scope = "member", Target = "Csla.DataPortal.Create(System.Type,System.Object):System.Object", MessageId = "Csla.DataPortalException.#ctor(System.String,System.Exception,System.Object)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Scope = "member", Target = "Csla.DataPortal.Create():T")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Scope = "member", Target = "Csla.BusinessBase`1.GetIdValue():System.Object")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "Csla.Security")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "Csla.Data")]
|
||||
@@ -0,0 +1,272 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.ComponentModel;
|
||||
using Csla.Properties;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// This is the base class from which readonly name/value
|
||||
/// collections should be derived.
|
||||
/// </summary>
|
||||
/// <typeparam name="K">Type of the key values.</typeparam>
|
||||
/// <typeparam name="V">Type of the values.</typeparam>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
|
||||
[Serializable()]
|
||||
public abstract class NameValueListBase<K, V> :
|
||||
Core.ReadOnlyBindingList<NameValueListBase<K, V>.NameValuePair>,
|
||||
ICloneable, Core.IBusinessObject
|
||||
{
|
||||
|
||||
#region Core Implementation
|
||||
|
||||
/// <summary>
|
||||
/// Returns the value corresponding to the
|
||||
/// specified key.
|
||||
/// </summary>
|
||||
/// <param name="key">Key value for which to retrieve a value.</param>
|
||||
public V Value(K key)
|
||||
{
|
||||
foreach (NameValuePair item in this)
|
||||
if (item.Key.Equals(key))
|
||||
return item.Value;
|
||||
return default(V);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the key corresponding to the
|
||||
/// first occurance of the specified value
|
||||
/// in the list.
|
||||
/// </summary>
|
||||
/// <param name="value">Value for which to retrieve the key.</param>
|
||||
public K Key(V value)
|
||||
{
|
||||
foreach (NameValuePair item in this)
|
||||
if (item.Value.Equals(value))
|
||||
return item.Key;
|
||||
return default(K);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the list contains the
|
||||
/// specified key.
|
||||
/// </summary>
|
||||
/// <param name="key">Key value for which to search.</param>
|
||||
public bool ContainsKey(K key)
|
||||
{
|
||||
foreach (NameValuePair item in this)
|
||||
if (item.Key.Equals(key))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the list contains the
|
||||
/// specified value.
|
||||
/// </summary>
|
||||
/// <param name="value">Value for which to search.</param>
|
||||
public bool ContainsValue(V value)
|
||||
{
|
||||
foreach (NameValuePair item in this)
|
||||
if (item.Value.Equals(value))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
protected NameValueListBase()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Initialize
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to set up event handlers so user
|
||||
/// code in a partial class can respond to events raised by
|
||||
/// generated code.
|
||||
/// </summary>
|
||||
protected virtual void Initialize()
|
||||
{ /* allows subclass to initialize events before any other activity occurs */ }
|
||||
|
||||
#endregion
|
||||
|
||||
#region NameValuePair class
|
||||
|
||||
/// <summary>
|
||||
/// Contains a key and value pair.
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
public class NameValuePair
|
||||
{
|
||||
private K _key;
|
||||
private V _value;
|
||||
|
||||
/// <summary>
|
||||
/// The Key or Name value.
|
||||
/// </summary>
|
||||
public K Key
|
||||
{
|
||||
get { return _key; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The Value corresponding to the key/name.
|
||||
/// </summary>
|
||||
public V Value
|
||||
{
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
/// <param name="key">The key.</param>
|
||||
/// <param name="value">The value.</param>
|
||||
public NameValuePair(K key, V value)
|
||||
{
|
||||
_key = key;
|
||||
_value = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ICloneable
|
||||
|
||||
object ICloneable.Clone()
|
||||
{
|
||||
return GetClone();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a clone of the object.
|
||||
/// </summary>
|
||||
/// <returns>A new object containing the exact data of the original object.</returns>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual object GetClone()
|
||||
{
|
||||
return Core.ObjectCloner.Clone(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a clone of the object.
|
||||
/// </summary>
|
||||
public NameValueListBase<K, V> Clone()
|
||||
{
|
||||
return (NameValueListBase<K, V>)GetClone();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Criteria
|
||||
|
||||
/// <summary>
|
||||
/// Default Criteria for retrieving simple
|
||||
/// name/value lists.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This criteria merely specifies the type of
|
||||
/// collection to be retrieved. That type information
|
||||
/// is used by the DataPortal to create the correct
|
||||
/// type of collection object during data retrieval.
|
||||
/// </remarks>
|
||||
[Serializable()]
|
||||
protected class Criteria : CriteriaBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
/// <param name="collectionType">
|
||||
/// The <see cref="Type"/> of the business
|
||||
/// collection class.
|
||||
/// </param>
|
||||
public Criteria(Type collectionType)
|
||||
: base(collectionType)
|
||||
{ }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Data Access
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "criteria")]
|
||||
private void DataPortal_Create(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Resources.CreateNotSupportedException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to allow retrieval of an existing business
|
||||
/// object based on data in the database.
|
||||
/// </summary>
|
||||
/// <param name="criteria">An object containing criteria values to identify the object.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
protected virtual void DataPortal_Fetch(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Resources.FetchNotSupportedException);
|
||||
}
|
||||
|
||||
private void DataPortal_Update()
|
||||
{
|
||||
throw new NotSupportedException(Resources.UpdateNotSupportedException);
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "criteria")]
|
||||
private void DataPortal_Delete(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Resources.DeleteNotSupportedException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal prior to calling the
|
||||
/// requested DataPortal_XYZ method.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalInvoke(DataPortalEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal after calling the
|
||||
/// requested DataPortal_XYZ method.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalInvokeComplete(DataPortalEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal if an exception
|
||||
/// occurs during data access.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
/// <param name="ex">The Exception thrown during data access.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalException(DataPortalEventArgs e, Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
/// <summary>
|
||||
/// Marks a field to indicate that the value should not
|
||||
/// be copied as part of the undo process.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Marking a variable with this attribute will cause the n-level
|
||||
/// undo process to ignore that variable's value. The value will
|
||||
/// not be included in a snapshot when BeginEdit is called, nor
|
||||
/// will it be restored when CancelEdit is called.
|
||||
/// </remarks>
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
public sealed class NotUndoableAttribute : Attribute
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("CSLA .NET")]
|
||||
[assembly: AssemblyDescription("CSLA .NET Framework")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Rockford Lhotka")]
|
||||
[assembly: AssemblyProduct("CSLA .NET")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2007 Rockford Lhotka")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Mark the assembly as CLS compliant
|
||||
[assembly: System.CLSCompliant(true)]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("43110d9d-9176-498d-95e0-2be52fcd11d2")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("2.1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,243 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>היא פעולה שגוייה Clear </value>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>הוספה היא פעולה אסורה</value>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>הסרה הוא פעולה שגוייה </value>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>אסור לשנות אלמנט</value>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>ערך הורה יכול לקבל ערך רק עבור אפיקים שהם ילדים</value>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>לא ניתן למחוק אוביקט ילד ישירות - יש להשתמש באוסף האב</value>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>פעולה שגויה על אוביקט שורש - השתמש ב- Delete במקום</value>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>לא ניתן לשמור ישירות אוביקט ישל</value>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>אוביקט עדיין במצב עריכה ולכן לא ניתן לשמור</value>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>אוביקט לא תקין ולכן לא ניתן לשמור</value>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>פעולה שגויה - לא ניתן ליצור</value>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>פעולה שגויה - לא ניתן למשוך </value>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>פעולה שגויה - לא ניתן לעדכן</value>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>פעולה שגויה - לא ניתן למחוק</value>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value> BeginEdit- פעולה שגויה על אוביקט ילד</value>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit - פעולה שגויה על אוביקט ילד</value>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplayEdit - פעולה שגויה על אוביקט ילד</value>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>לא קיים ערך:</value>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>ערך שגוי</value>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>לא ניתן להסב מחרוזת לתאריך</value>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>ערך לא במיבנה של SmartDate</value>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>No principal object should be passed to DataPortal when using Windows integrated security</value>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>Principal must be of type BusinessPrincipal, not</value>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>t</value>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>היום</value>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>y</value>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>אתמול</value>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>tom</value>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>מחר</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>כישלון</value>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>כישלון בצד השרת</value>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>כישלון בקריאה לפונקציה</value>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>לא מיוסם</value>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>פעולה שגויה - לר ניתן להריץ</value>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>פעולה אסורה - לא ניתן להוסף</value>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>אסורה החזרה Nothing בפעולת GetIdValue</value>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>לא ניתן למשוך נתונים מתְּכוּנָה</value>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>לא ניתן לבצע השמה</value>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>פרמטר חייב להיות שונה מ-"כלום"</value>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>סוג פרמטר חייב להיות פרמיטיבי</value>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>העתקת תְּכוּנָה נכשלה</value>
|
||||
</data>
|
||||
</root>
|
||||
495
PROMS/csla20cs-2.1.4-070223/csla20cs/csla20cs/Csla/Properties/Resources.Designer.cs
generated
Normal file
495
PROMS/csla20cs-2.1.4-070223/csla20cs/csla20cs/Csla/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,495 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18408
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Csla.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Csla.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Principal must be of type BusinessPrincipal, not.
|
||||
/// </summary>
|
||||
internal static string BusinessPrincipalException {
|
||||
get {
|
||||
return ResourceManager.GetString("BusinessPrincipalException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Changing an element is an invalid operation.
|
||||
/// </summary>
|
||||
internal static string ChangeInvalidException {
|
||||
get {
|
||||
return ResourceManager.GetString("ChangeInvalidException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Can not directly mark a child object for deletion - use its parent collection.
|
||||
/// </summary>
|
||||
internal static string ChildDeleteException {
|
||||
get {
|
||||
return ResourceManager.GetString("ChildDeleteException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Clear is an invalid operation.
|
||||
/// </summary>
|
||||
internal static string ClearInvalidException {
|
||||
get {
|
||||
return ResourceManager.GetString("ClearInvalidException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid operation - create not allowed.
|
||||
/// </summary>
|
||||
internal static string CreateNotSupportedException {
|
||||
get {
|
||||
return ResourceManager.GetString("CreateNotSupportedException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid operation - delete not allowed.
|
||||
/// </summary>
|
||||
internal static string DeleteNotSupportedException {
|
||||
get {
|
||||
return ResourceManager.GetString("DeleteNotSupportedException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error reading value:.
|
||||
/// </summary>
|
||||
internal static string ErrorReadingValueException {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorReadingValueException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid operation - execute not allowed.
|
||||
/// </summary>
|
||||
internal static string ExecuteNotSupportedException {
|
||||
get {
|
||||
return ResourceManager.GetString("ExecuteNotSupportedException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to failed.
|
||||
/// </summary>
|
||||
internal static string Failed {
|
||||
get {
|
||||
return ResourceManager.GetString("Failed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to failed on the server.
|
||||
/// </summary>
|
||||
internal static string FailedOnServer {
|
||||
get {
|
||||
return ResourceManager.GetString("FailedOnServer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid operation - fetch not allowed.
|
||||
/// </summary>
|
||||
internal static string FetchNotSupportedException {
|
||||
get {
|
||||
return ResourceManager.GetString("FetchNotSupportedException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to GetIdValue must not return Nothing.
|
||||
/// </summary>
|
||||
internal static string GetIdValueCantBeNull {
|
||||
get {
|
||||
return ResourceManager.GetString("GetIdValueCantBeNull", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Insert is an invalid operation.
|
||||
/// </summary>
|
||||
internal static string InsertInvalidException {
|
||||
get {
|
||||
return ResourceManager.GetString("InsertInvalidException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid operation - insert not allowed.
|
||||
/// </summary>
|
||||
internal static string InsertNotSupportedException {
|
||||
get {
|
||||
return ResourceManager.GetString("InsertNotSupportedException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid rule method (instance methods of the target object not allowed).
|
||||
/// </summary>
|
||||
internal static string InvalidRuleMethodException {
|
||||
get {
|
||||
return ResourceManager.GetString("InvalidRuleMethodException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} can not exceed {1}.
|
||||
/// </summary>
|
||||
internal static string MaxValueRule {
|
||||
get {
|
||||
return ResourceManager.GetString("MaxValueRule", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to method call failed.
|
||||
/// </summary>
|
||||
internal static string MethodCallFailed {
|
||||
get {
|
||||
return ResourceManager.GetString("MethodCallFailed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to not implemented.
|
||||
/// </summary>
|
||||
internal static string MethodNotImplemented {
|
||||
get {
|
||||
return ResourceManager.GetString("MethodNotImplemented", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} can not be less than {1}.
|
||||
/// </summary>
|
||||
internal static string MinValueRule {
|
||||
get {
|
||||
return ResourceManager.GetString("MinValueRule", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ApplyEdit is not valid on a child object.
|
||||
/// </summary>
|
||||
internal static string NoApplyEditChildException {
|
||||
get {
|
||||
return ResourceManager.GetString("NoApplyEditChildException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to BeginEdit is not valid on a child object.
|
||||
/// </summary>
|
||||
internal static string NoBeginEditChildException {
|
||||
get {
|
||||
return ResourceManager.GetString("NoBeginEditChildException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to CancelEdit is not valid on a child object.
|
||||
/// </summary>
|
||||
internal static string NoCancelEditChildException {
|
||||
get {
|
||||
return ResourceManager.GetString("NoCancelEditChildException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid for root objects - use Delete instead.
|
||||
/// </summary>
|
||||
internal static string NoDeleteRootException {
|
||||
get {
|
||||
return ResourceManager.GetString("NoDeleteRootException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No principal object should be passed to DataPortal when using Windows integrated security.
|
||||
/// </summary>
|
||||
internal static string NoPrincipalAllowedException {
|
||||
get {
|
||||
return ResourceManager.GetString("NoPrincipalAllowedException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Can not directly save a child object.
|
||||
/// </summary>
|
||||
internal static string NoSaveChildException {
|
||||
get {
|
||||
return ResourceManager.GetString("NoSaveChildException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Object is still being edited and can not be saved.
|
||||
/// </summary>
|
||||
internal static string NoSaveEditingException {
|
||||
get {
|
||||
return ResourceManager.GetString("NoSaveEditingException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Object is not valid and can not be saved.
|
||||
/// </summary>
|
||||
internal static string NoSaveInvalidException {
|
||||
get {
|
||||
return ResourceManager.GetString("NoSaveInvalidException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No such value exists:.
|
||||
/// </summary>
|
||||
internal static string NoSuchValueExistsException {
|
||||
get {
|
||||
return ResourceManager.GetString("NoSuchValueExistsException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Argument must not be Nothing.
|
||||
/// </summary>
|
||||
internal static string NothingNotValid {
|
||||
get {
|
||||
return ResourceManager.GetString("NothingNotValid", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Parent value can only be set for child objects.
|
||||
/// </summary>
|
||||
internal static string ParentSetException {
|
||||
get {
|
||||
return ResourceManager.GetString("ParentSetException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Type parameter must be a primitive type.
|
||||
/// </summary>
|
||||
internal static string PrimitiveTypeRequired {
|
||||
get {
|
||||
return ResourceManager.GetString("PrimitiveTypeRequired", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Property copy failed.
|
||||
/// </summary>
|
||||
internal static string PropertyCopyFailed {
|
||||
get {
|
||||
return ResourceManager.GetString("PropertyCopyFailed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Property get not allowed.
|
||||
/// </summary>
|
||||
internal static string PropertyGetNotAllowed {
|
||||
get {
|
||||
return ResourceManager.GetString("PropertyGetNotAllowed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Property set not allowed.
|
||||
/// </summary>
|
||||
internal static string PropertySetNotAllowed {
|
||||
get {
|
||||
return ResourceManager.GetString("PropertySetNotAllowed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} does not match regular expression.
|
||||
/// </summary>
|
||||
internal static string RegExMatchRule {
|
||||
get {
|
||||
return ResourceManager.GetString("RegExMatchRule", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Remove is an invalid operation.
|
||||
/// </summary>
|
||||
internal static string RemoveInvalidException {
|
||||
get {
|
||||
return ResourceManager.GetString("RemoveInvalidException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to t.
|
||||
/// </summary>
|
||||
internal static string SmartDateT {
|
||||
get {
|
||||
return ResourceManager.GetString("SmartDateT", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to today.
|
||||
/// </summary>
|
||||
internal static string SmartDateToday {
|
||||
get {
|
||||
return ResourceManager.GetString("SmartDateToday", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to tom.
|
||||
/// </summary>
|
||||
internal static string SmartDateTom {
|
||||
get {
|
||||
return ResourceManager.GetString("SmartDateTom", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to tomorrow.
|
||||
/// </summary>
|
||||
internal static string SmartDateTomorrow {
|
||||
get {
|
||||
return ResourceManager.GetString("SmartDateTomorrow", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to y.
|
||||
/// </summary>
|
||||
internal static string SmartDateY {
|
||||
get {
|
||||
return ResourceManager.GetString("SmartDateY", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to yesterday.
|
||||
/// </summary>
|
||||
internal static string SmartDateYesterday {
|
||||
get {
|
||||
return ResourceManager.GetString("SmartDateYesterday", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} can not exceed {1} characters.
|
||||
/// </summary>
|
||||
internal static string StringMaxLengthRule {
|
||||
get {
|
||||
return ResourceManager.GetString("StringMaxLengthRule", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} required.
|
||||
/// </summary>
|
||||
internal static string StringRequiredRule {
|
||||
get {
|
||||
return ResourceManager.GetString("StringRequiredRule", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to String value can not be converted to a date.
|
||||
/// </summary>
|
||||
internal static string StringToDateException {
|
||||
get {
|
||||
return ResourceManager.GetString("StringToDateException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Failed to load type '{0}'.
|
||||
/// </summary>
|
||||
internal static string TypeLoadException {
|
||||
get {
|
||||
return ResourceManager.GetString("TypeLoadException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid operation - update not allowed.
|
||||
/// </summary>
|
||||
internal static string UpdateNotSupportedException {
|
||||
get {
|
||||
return ResourceManager.GetString("UpdateNotSupportedException", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Value is not a SmartDate.
|
||||
/// </summary>
|
||||
internal static string ValueNotSmartDateException {
|
||||
get {
|
||||
return ResourceManager.GetString("ValueNotSmartDateException", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,243 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>Čišćenje nije dozvoljeno</value>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>Dodavanje nije dozvoljeno</value>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>Uklanjanje nije dozvoljeno</value>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Izmjena nije dozvoljena</value>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>Parent vrijednost može biti podešena samo za objekte "djecu"</value>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>Objekti "djeca" se ne mogu direktno označiti za brisanje - koristite "roditelj" kolekciju</value>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija za osnovne objekte - koristite Delete</value>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>"Dijete" objekat se ne može direktno sačuvati</value>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>Objekat se još uvijek uređuje i ne može biti sačuvan</value>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>Objekat nije ispravan i ne može biti sačuvan</value>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - kreiranje</value>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - učitavanje</value>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - ažuriranje</value>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - brisanje</value>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>BeginEdit nije važeći na "dijete" objektu</value>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit nije važeći na "dijete" objektu</value>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplyEdit nije važeći na "dijete" objektu</value>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>Ne postoji vrijednost:</value>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Greška pri čitanju vrijednosti:</value>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>String vrijednost ne može biti konvertovana u datum</value>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>Vrijednost nije tipa SmartDate</value>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>Principal objekat ne može biti proslijeđen DataPortal-u kada se koristi integrisana Windows sigurnost</value>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>Principal objekat mora biti tipa BusinessPrincipal, a ne</value>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>t</value>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>today</value>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>y</value>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>yesterday</value>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>tom</value>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>tomorrow</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>neuspješno</value>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>neuspješno na serveru</value>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>neuspješan poziv metoda</value>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>metod nije implementiran</value>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - izvršavanje</value>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - dodavanje</value>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>GetIdValue ne smije vratiti Nothing</value>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>Uzimanje osobine objekta (Property get) nije dopušteno</value>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>Podešavanje osobine objekta (Property set) nije dopušteno</value>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>Argument ne smije biti Nothing</value>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>Type parametar mora biti primitivni tip</value>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>Kopiranje osobine nije uspjelo</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,261 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>Clear és una operació invàlida</value>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>Inserir (insert) és una operació invàlida</value>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>Remove és una operació invàlida</value>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Canviar un element és una operació invàlida</value>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>El valor Parent només pot ser establert per objectes fill</value>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>No es pot marcar directament un objecte fill per a esborrar-lo - utilitzeu la col·lecció pare</value>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>Invàlid per a objectes arrel - utilitzeu Delete en el seu lloc</value>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>No es por guardar un objecte fill directament</value>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>L'objecte està en ús i no pot ser desat</value>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>L'objecte no és vàlid i no pot ser desat</value>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>Operació invàlida - no està permès crear (create)</value>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>Operació invàlida - lectura (fetch) no permesa</value>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>Operació invàlida - no està permès actualitzar (update)</value>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>Operació invàlida - no està permès esborrar (delete)</value>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>BeginEdit no és vàlid en un objecte fill</value>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit no és vàlid en un objecte fill</value>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplyEdit no és vàlid en un objecte fill</value>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>No existeix el valor:</value>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Error llegint el valor:</value>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>El valor de tipus String no pot ser convertit a una data</value>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>El valor no és un SmartDate</value>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>No s'hauria de passar un objecte principal al DataPortal quan s'utilitza la seguretat integrada de Windows</value>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>El Principal ha de ser del tipus BusinessPrincipal, no</value>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>t</value>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>today (avui)</value>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>y</value>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>yesterday (ahir)</value>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>tom</value>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>tomorrow (demà)</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>ha fallat</value>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>ha fallat en el servidor</value>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>Ha fallat la crida al mètode</value>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>no implementat</value>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>Operació invàlida - no està permès executar (execute)</value>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>Operació invàlida - no està permès inserir (insert)</value>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>GetIdValue no pot retornar un valor nul</value>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>No està permès recuperar el valor de la propietat (get)</value>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>No està permès establir un valor a la propietat (set)</value>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>L'argument no pot ser nul</value>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>El tipus del paràmetre ha de ser un tipus primitiu</value>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>Ha fallat la còpia de la propietat</value>
|
||||
</data>
|
||||
<data name="MaxValueRule" xml:space="preserve">
|
||||
<value>{0} no pot excedir de {1}</value>
|
||||
</data>
|
||||
<data name="MinValueRule" xml:space="preserve">
|
||||
<value>{0} no pot ser menor que {1}</value>
|
||||
</data>
|
||||
<data name="RegExMatchRule" xml:space="preserve">
|
||||
<value>{0} no coincideix amb l'expressió regular</value>
|
||||
</data>
|
||||
<data name="StringMaxLengthRule" xml:space="preserve">
|
||||
<value>{0} no pot excedir de {1} caràcters</value>
|
||||
</data>
|
||||
<data name="StringRequiredRule" xml:space="preserve">
|
||||
<value>{0} obligatori</value>
|
||||
</data>
|
||||
<data name="InvalidRuleMethodException" xml:space="preserve">
|
||||
<value>Regla invàlida (no està permès instanciar mètodes de l'objecte destí)</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,261 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>Clear er en ugyldig handling</value>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>Insert er en ugyldig handling</value>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>Remove er en ugyldig handling</value>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Ændring af et element er en ugyldig handling</value>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>Forældreværdi kan kun sættes i børneobjekter</value>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>Det er ikke muligt direkte at markere et børneobjekt til sletning - brug objektets forældre kollektion</value>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>Ugyldig for rodobjekter - brug Delete i stedet</value>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>Kan ikke direkte lagre et børneobjekt</value>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>Objektet er stadig ved at blive rettet og kan ikke lagres</value>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>Objektet er ikke gyldigt og kan ikke lagres</value>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>Ugyldig handling - create er ikke tilladt</value>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>Ugyldig handling - fetch er ikke tilladt</value>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>Ugyldig handling - update er ikke tilladt</value>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>Ugyldig handling - delete er ikke tilladt</value>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>BeginEdit er ikke gyldig på et børneobjekt</value>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit er ikke gyldig på børneobjekt</value>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplyEdit er ikke gyldig på et børneobjekt</value>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>Der findes ikke en sådan værdi:</value>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Fejl ved læsning af værdi:</value>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>Strengværdi kan ikke konverteres til en dato</value>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>Værdi er ikke en SmartDate</value>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>Principal objekt skal ikke overføres til DataPortal når der bruges Windows integreret sikkerhed</value>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>Principal skal være af typen BusinessPrincipal, ikke</value>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>dd</value>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>idag</value>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>ig</value>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>igår</value>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>im</value>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>imorgen</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>fejlede</value>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>fejlede på serveren</value>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>metodekald fejlede</value>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>ikke implementeret</value>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>Ugyldig handling - execute er ikke tilladt</value>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>Ugyldig handling - insert er ikke tilladt</value>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>GetIdValue må ikke returnere Nothing</value>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>Property get er ikke tilladt</value>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>Property set er ikke tilladt</value>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>Argument kan ikke være Nothing</value>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>Type parameter skal være en primitiv type</value>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>Property kopi fejlede</value>
|
||||
</data>
|
||||
<data name="InvalidRuleMethodException" xml:space="preserve">
|
||||
<value>Ugyldig regel metode (instans metoder af target objekt er ikke tilladt)</value>
|
||||
</data>
|
||||
<data name="MaxValueRule" xml:space="preserve">
|
||||
<value>{0} kan ikke være større end {1}</value>
|
||||
</data>
|
||||
<data name="MinValueRule" xml:space="preserve">
|
||||
<value>{0} kan ikke være mindre end {1}</value>
|
||||
</data>
|
||||
<data name="RegExMatchRule" xml:space="preserve">
|
||||
<value>{0} passer ikke på det regulære udtryk</value>
|
||||
</data>
|
||||
<data name="StringMaxLengthRule" xml:space="preserve">
|
||||
<value>{0} kan ikke være længere end {1} tegn</value>
|
||||
</data>
|
||||
<data name="StringRequiredRule" xml:space="preserve">
|
||||
<value>{0} er påkrævet</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,304 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>Clear ist eine ungültige Operation </value>
|
||||
<comment>Clear is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>Einfügen ist eine ungültige Operation</value>
|
||||
<comment>Insert is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>Entfernen ist eine ungültige Operation</value>
|
||||
<comment>Remove is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Ändern eines Elementes ist eine ungültige Operation</value>
|
||||
<comment>Changing an element is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>Elternwert kann nur für Kindobjekte gesetzt werden</value>
|
||||
<comment>Parent comment can only be set for child objects</comment>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>kann ein Kindobjekt nicht direkt zum Löschen markieren - benutzen Sie die Eltern Liste</value>
|
||||
<comment>Can not directly mark a child object for deletion - use its parent collection</comment>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>ungültig für Root Objekte - stattdessen löschen </value>
|
||||
<comment>Invalid for root objects - use Delete instead</comment>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>ein Kindobjekt kann nich direkt gespeichert werden</value>
|
||||
<comment>Can not directly save a child object</comment>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>Objekt wird noch editiert und kann nicht gespeichert werden</value>
|
||||
<comment>Object is still being edited and can not be saved</comment>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>Objekt ist ungültig und kann nicht gespeichert werden</value>
|
||||
<comment>Object is not valid and can not be saved</comment>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>Ungültige Operation - Erzeugen nicht erlaubt</value>
|
||||
<comment>Invalid operation - create not allowed</comment>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>Ungültige Operation - Abrufen nicht erlaubt</value>
|
||||
<comment>Invalid operation - fetch not allowed</comment>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>Ungültige Operation - Aktualisieren nicht erlaubt</value>
|
||||
<comment>Invalid operation - update not allowed</comment>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>Ungültige Operation - Löschen nicht erlaubt</value>
|
||||
<comment>Invalid operation - delete not allowed</comment>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>BeginEdit kann nicht auf ein Kindobjekt angewandt werden</value>
|
||||
<comment>BeginEdit is not valid on a child object</comment>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit kann nicht auf ein Kindobjekt angewandt werden</value>
|
||||
<comment>CancelEdit is not valid on a child object</comment>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplyEdit kann nicht auf ein Kindobjekt angewandt werden</value>
|
||||
<comment>ApplyEdit is not valid on a child object</comment>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>Wert existiert nicht:</value>
|
||||
<comment>No such comment exists:</comment>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Fehler beim Lesen des Werts:</value>
|
||||
<comment>Error reading comment:</comment>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>String Wert kann nicht zu einem Date Wert konvertiert werden</value>
|
||||
<comment>String comment can not be converted to a date</comment>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>Wert ist kein SmartDate</value>
|
||||
<comment>comment is not a SmartDate</comment>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>Bei Windows Authentifizierung sollte kein Principal Objekt zu DataPortal übergeben werden </value>
|
||||
<comment>No principal object should be passed to DataPortal when using Windows integrated security</comment>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>Principal muss vom Typ BusinessPrincipal sein, nicht</value>
|
||||
<comment>Principal must be of type BusinessPrincipal, not</comment>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>h</value>
|
||||
<comment>t</comment>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>heute</value>
|
||||
<comment>today</comment>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>g</value>
|
||||
<comment>y</comment>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>gestern</value>
|
||||
<comment>yesterday</comment>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>m</value>
|
||||
<comment>tom</comment>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>morgen</value>
|
||||
<comment>tomorrow</comment>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>fehlgeschlagen</value>
|
||||
<comment>failed</comment>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>auf dem Server fehlgeschlagen</value>
|
||||
<comment>failed on the server</comment>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>Methodenaufruf fehlgeschlagen</value>
|
||||
<comment>method call failed</comment>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>nicht implementiert</value>
|
||||
<comment>not implemented</comment>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>ungülitge Operation - Ausführen nicht erlaubt</value>
|
||||
<comment>Invalid operation - execute not allowed</comment>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>ungülitge Operation - Einfügen nicht erlaubt</value>
|
||||
<comment>Invalid operation - insert not allowed</comment>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>GetIdValue darf nicht Nothing zurückgeben</value>
|
||||
<comment>GetIdcomment must not return Nothing</comment>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>Eigenschaft get nicht erlaubt</value>
|
||||
<comment>Property get not allowed</comment>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>Eigenschaft set nicht erlaubt</value>
|
||||
<comment>Property set not allowed</comment>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>Arguement darf nicht Nothing sein</value>
|
||||
<comment>Argument must not be Nothing</comment>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>Type Parameter muss ein primitiver Typ sein</value>
|
||||
<comment>Type parameter must be a primitive type</comment>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>Eigenschaft Kopie fehlgeschlagen</value>
|
||||
<comment>Property copy failed</comment>
|
||||
</data>
|
||||
<data name="MaxValueRule" xml:space="preserve">
|
||||
<value>{0} kann nicht grösser sein als {1}</value>
|
||||
<comment>{0} can not exceed {1}</comment>
|
||||
</data>
|
||||
<data name="MinValueRule" xml:space="preserve">
|
||||
<value>{0} kann nicht geringer sein als {1}</value>
|
||||
<comment>{0} can not be less than {1}</comment>
|
||||
</data>
|
||||
<data name="StringMaxLengthRule" xml:space="preserve">
|
||||
<value>{0} kann nicht mehr als {1} Zeichen haben</value>
|
||||
<comment>{0} can not exceed {1} characters</comment>
|
||||
</data>
|
||||
<data name="StringRequiredRule" xml:space="preserve">
|
||||
<value>{0} erforderlich</value>
|
||||
<comment>{0} required</comment>
|
||||
</data>
|
||||
<data name="RegExMatchRule" xml:space="preserve">
|
||||
<value>{0} enspricht nicht den normalen Bedingungen</value>
|
||||
<comment>{0} does not match regular expression</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,261 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>Clear no es una operación válida</value>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>Insert no es una operación válida</value>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>Remove no es una operación válida</value>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Cambiar un elemento no es una operación válida</value>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>El valor Parent sólo puede ser establecido para objetos hijo</value>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>No se puede marcar directamente un objeto hijo como borrado - use su colección padre</value>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>No válido para objetos raíz - use Delete en su lugar</value>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>No se puede guardar directamente un objeto hijo</value>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>El objeto todavía está siendo editado y no puede ser guardado</value>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>El objeto no es válido y no puede ser guardado</value>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>Operación no válida - no está permitido crear (create)</value>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>Operación no válida - lectura (fetch) no permitida</value>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>Operación no válida - no está permitido actualizar (update)</value>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>Operación no válida - no está permitido borrar (delete)</value>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>BeginEdit no es válido en un objeto hijo</value>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit no es válido en un objeto hijo</value>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplyEdit no es válido en un objeto hijo</value>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>No existe tal valor:</value>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Error leyendo el valor:</value>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>El valor de tipo String no puede ser convertido a una fecha</value>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>El valor no es un SmartDate</value>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>No se debería pasar un objeto principal al DataPortal cuando se está usando la seguridad integrada de Windows</value>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>El Principal debe ser del tipo BusinessPrincipal, no</value>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>h</value>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>hoy</value>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>a</value>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>ayer</value>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>m</value>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>mañana</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>falló</value>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>falló en el servidor</value>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>la llamada al método falló</value>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>no implementado</value>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>Operación no válida - no está permitido ejecutar (execute)</value>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>Operación no válida - no está permitido insertar (insert)</value>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>GetIdValue no debe devolver Nothing</value>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>No está permitido recuperar (get) la propiedad</value>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>No está permitido establecer (set) la propiedad</value>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>El argumento no puede ser Nothing</value>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>El tipo del parámetro debe ser un tipo primitivo</value>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>la copia de la propiedad falló</value>
|
||||
</data>
|
||||
<data name="InvalidRuleMethodException" xml:space="preserve">
|
||||
<value>Método de regla no válido (no se permiten métodos de instancia del objeto de destino)</value>
|
||||
</data>
|
||||
<data name="MaxValueRule" xml:space="preserve">
|
||||
<value>{0} no puede ser superior a {1}</value>
|
||||
</data>
|
||||
<data name="MinValueRule" xml:space="preserve">
|
||||
<value>{0} no puede ser menor que {1}</value>
|
||||
</data>
|
||||
<data name="RegExMatchRule" xml:space="preserve">
|
||||
<value>{0} no coincide con una expresión regular</value>
|
||||
</data>
|
||||
<data name="StringMaxLengthRule" xml:space="preserve">
|
||||
<value>{0} no puede exceder {1} caracteres</value>
|
||||
</data>
|
||||
<data name="StringRequiredRule" xml:space="preserve">
|
||||
<value>{0} es requerido</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,243 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>Clear es una operación inválida</value>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>Insert es una operación inválida</value>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>Remove es una operación inválida</value>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Cambiar un elemento es una operación inválida</value>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>La referencia al padre sólo se puede establecer para los objetos hijo</value>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>No se puede marcar directamente a un hijo para borrarlo - use su colección padre</value>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>Inválido para objetos hijo - use "Delete" en su lugar</value>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>No se puede guardar un objeto hijo en forma directa</value>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>El objeto está siendo editado y no se puede guardar</value>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>El objeto no es válido y no se puede guardar</value>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>Operación inválida - Create no permitido</value>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>Operación inválida - Fetch no permitido</value>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>Operación inválida - Update no permitido</value>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>Operación inválida - Delete no permitido</value>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>BeginEdit no es válido en un objeto hijo</value>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit no es válido en un objeto hijo</value>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplyEdit no es válido en un objeto hijo</value>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>No existe tal valor:</value>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Error leyendo el valor:</value>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>Un valor del tipo string no se puede convertir a Date</value>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>El valor no es un SmartDate</value>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>No se debería pasar un objeto "Principal" al DataPortal cuando se usa seguridad integrada de Windows</value>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>El Principal debe ser del tipo BusinessPrincipal, no</value>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>h</value>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>hoy</value>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>a</value>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>ayer</value>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>m</value>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>mañana</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>falló</value>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>falló en el servidor</value>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>llamada al método falló</value>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>no implementado</value>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>Operación inválida - no se permite execute</value>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>Operación inválida - no se permite insert </value>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>GetIdValue no debe devolver Nothing</value>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>No se puede obtener el valor de la propiedad</value>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>No se puede establecer el valor de la propiedad</value>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>El argumento no puede ser Nothing</value>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>El parámetro Type debe ser in tipo primitivo</value>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>La copia de la propiedad falló</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,284 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>Nettoyer (clear) est une opération invalide</value>
|
||||
<comment>Clear is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>Insérer (insert) est une opération invalide</value>
|
||||
<comment>Insert is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>"Retirer" (Remove) est une opération invalide</value>
|
||||
<comment>Remove is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Changer un élément est une opération invalide</value>
|
||||
<comment>Changing an element is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>La valeur "Parent" ne peux être appliquée qu'aux objets enfant</value>
|
||||
<comment>Parent value can only be set for child objects</comment>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>Un objet enfant ne peux être directement marqué pour effacement - Utilisez la collection qui le contient</value>
|
||||
<comment>Can not directly mark a child object for deletion - use its parent collection</comment>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>Invalide pour les objets racine - Utilisez plutôt "Effacer" (Delete)</value>
|
||||
<comment>Invalid for root objects - use Delete instead</comment>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>Un objet enfant ne peux être directement sauvegardé</value>
|
||||
<comment>Can not directly save a child object</comment>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>Impossible de sauvegarder l'objet car il est en cours d'édition</value>
|
||||
<comment>Object is still being edited and can not be saved</comment>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>Impossible de sauvegarder l'objet car il possède des erreurs</value>
|
||||
<comment>Object is not valid and can not be saved</comment>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>Opération invalide - Créer (create) n'est pas permis</value>
|
||||
<comment>Invalid operation - create not allowed</comment>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>Opération invalide - Charger (fetch) n'est pas permis</value>
|
||||
<comment>Invalid operation - fetch not allowed</comment>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>Operation invalide - mise à jour (update) n'est pas permis</value>
|
||||
<comment>Invalid operation - update not allowed</comment>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>Opération invalide - Effacer (delete) n'est pas permis</value>
|
||||
<comment>Invalid operation - delete not allowed</comment>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>Opération invalide - "BeginEdit" n'est pas permis sur un objet enfant</value>
|
||||
<comment>BeginEdit is not valid on a child object</comment>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>Opération invalide - "CancelEdit" n'est pas permis sur un objet enfant</value>
|
||||
<comment>CancelEdit is not valid on a child object</comment>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>Opération invalide - "ApplyEdit" n'est pas permis sur un objet enfant</value>
|
||||
<comment>ApplyEdit is not valid on a child object</comment>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>Cette valeur n'existe pas:</value>
|
||||
<comment>No such value exists:</comment>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Erreur lors de la lecture de cette valeur:</value>
|
||||
<comment>Error reading value:</comment>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>Cette chaine de caractère ne peux être convertis en type "Date"</value>
|
||||
<comment>String value can not be converted to a date</comment>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>La valeur (Value) n'est pas du type "SmartDate"</value>
|
||||
<comment>Value is not a SmartDate</comment>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>Un objet "Principal" ne doit être passé au "DataPortal" lorsque la sécurité intégrée à Windows est utilisée</value>
|
||||
<comment>No principal object should be passed to DataPortal when using Windows integrated security</comment>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>Le "Principal" doit être du type "BusinessPrincipal" et non du type</value>
|
||||
<comment>Principal must be of type BusinessPrincipal, not</comment>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>a</value>
|
||||
<comment>t</comment>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>aujourd'hui</value>
|
||||
<comment>today</comment>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>h</value>
|
||||
<comment>y</comment>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>hier</value>
|
||||
<comment>yesterday</comment>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>d</value>
|
||||
<comment>tom</comment>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>demain</value>
|
||||
<comment>tomorrow</comment>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>a échoué</value>
|
||||
<comment>failed</comment>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>a échoué sur le serveur</value>
|
||||
<comment>failed on the server</comment>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>L'appel à la méthode a échoué</value>
|
||||
<comment>method call failed</comment>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>non implanté</value>
|
||||
<comment>not implemented</comment>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>Opération invalide - Exécuter (execute) n'est pas permis</value>
|
||||
<comment>Invalid operation - execute not allowed</comment>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>Opération invalide - Insérer (insert) n'est pas permis</value>
|
||||
<comment>Invalid operation - insert not allowed</comment>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>"GetIdValue" ne peut retourner une valeur nul (Nothing)</value>
|
||||
<comment>GetIdValue must not return Nothing</comment>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>Le "get" n'est pas permis pour cette propriété</value>
|
||||
<comment>Property get not allowed</comment>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>Le "set" n'est pas permis pour cette propriété</value>
|
||||
<comment>Property set not allowed</comment>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>Cet argument ne peut être nul (Nothing)</value>
|
||||
<comment>Argument must not be Nothing</comment>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>Le paramètre doit être d'un type primaire (primitive type)</value>
|
||||
<comment>Type parameter must be a primitive type</comment>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>La copie (copy) de cette propriété a échoué</value>
|
||||
<comment>Property copy failed</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,243 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>Principal objekt mora biti tipa BusinessPrincipal, a ne</value>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Izmjena nije dozvoljena</value>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>Objekti "djeca" se ne mogu direktno označiti za brisanje - koristite "roditelj" kolekciju</value>
|
||||
</data>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>Čišćenje nije dozvoljeno</value>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - kreiranje</value>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - brisanje</value>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Greška pri čitanju vrijednosti:</value>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - izvršavanje</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>neuspješno</value>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>neuspješno na serveru</value>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - učitavanje</value>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>GetIdValue ne smije vratiti Nothing</value>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>Dodavanje nije dozvoljeno</value>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - dodavanje</value>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>neuspješan poziv metoda</value>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>metod nije implementiran</value>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplyEdit nije važeći na "dijete" objektu</value>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>BeginEdit nije važeći na "dijete" objektu</value>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit nije važeći na "dijete" objektu</value>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija za osnovne objekte - koristite Delete</value>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>Principal objekt ne može biti proslijeđen DataPortal-u kada se koristi integrisana Windows sigurnost</value>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>"Dijete" objekt se ne može direktno sačuvati</value>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>Objekt se još uvijek uređuje i ne može biti sačuvan</value>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>Objekt nije ispravan i ne može biti sačuvan</value>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>Ne postoji vrijednost:</value>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>Argument ne smije biti Nothing</value>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>Parent vrijednost može biti podešena samo za objekte "djecu"</value>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>Type parametar mora biti primitivni tip</value>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>Kopiranje osobine nije uspjelo</value>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>Uzimanje osobine objekta (Property get) nije dopušteno</value>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>Podešavanje osobine objekta (Property set) nije dopušteno</value>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>Uklanjanje nije dozvoljeno</value>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>t</value>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>today</value>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>tom</value>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>tomorrow</value>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>y</value>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>yesterday</value>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>String vrijednost ne može biti konvertovana u datum</value>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - ažuriranje</value>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>Vrijednost nije tipa SmartDate</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,243 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>Clear è un operazione non valida</value>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>Insert è un operazione non valida</value>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>Remove è un operazione non valida</value>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Cambiare un elemento è una operazione non valida</value>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>Il Parent può essere impostato solo per gli oggetti child</value>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>Non è possibile marcare direttamente un elemento Child per la cancellazione - usare la sua collezione Parent</value>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>Non valido per oggetti root - usare invece Delete</value>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>Non è possibile salvare direttamente un oggetto child</value>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>L'oggetto è ancora in edit e non può essere salvato</value>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>L'oggetto non è valido e non può essere salvato</value>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>Operazione non valida - create non consentito</value>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>Operazione non valida - Fetch non è consentito</value>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>Operazione non valida - Update non è consentito</value>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>Operazione non valida - Delete non consentito</value>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>BeginEdit non è consentito su un oggetto child</value>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit non è consentito su un oggetto child</value>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplyEdit non è consentito su un oggetto child</value>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>Non esiste il valore:</value>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Errore durante la lettura del valore:</value>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>il valore stringa non può essere convertito in data</value>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>Value non è una SmartDate</value>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>Non si deve passare un oggetto Principal al DataPortal quando si usa l'autenticazione integrata di Windows</value>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>Principal deve essere del tipo BusinessPrincipal, non</value>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>o</value>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>oggi</value>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>i</value>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>ieri</value>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>d</value>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>domani</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>Fallito</value>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>Fallito sul server</value>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>chiamata a metodo fallita</value>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>non implementato</value>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>Operazione non valida - Execute non è consentito</value>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>Operazione non valida - Insert non è consentito</value>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>GetIdValue non può ritornare Nothing</value>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>Property get non consentito</value>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>Property set non consentito</value>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>Argument non deve essere Nothing</value>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>Il parametro Type deve essere un tipo primitivo</value>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>Copia della proprietà fallita</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,304 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>leeg maken is een ongeldige bewerking</value>
|
||||
<comment>Clear is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>toevoegen is een ongeldige bewerking</value>
|
||||
<comment>Insert is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>Verwijderen is een ongeldige bewerking</value>
|
||||
<comment>Remove is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Het wijzigen van een element is een ongeldige bewerking</value>
|
||||
<comment>Changing an element is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>Parent waarde kan alleen voor child objecten gewijzigd worden</value>
|
||||
<comment>Parent comment can only be set for child objects</comment>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>Kan geen child object markeren om te verwijderen - gebruik de parent collectie</value>
|
||||
<comment>Can not directly mark a child object for deletion - use its parent collection</comment>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>Niet toegestaan voor root objecten - gebruik verwijderen</value>
|
||||
<comment>Invalid for root objects - use Delete instead</comment>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>Het is niet toegestaan om een rechtstreeks een child object te bewaren</value>
|
||||
<comment>Can not directly save a child object</comment>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>Object wordt nog gewijzigd - bewaren is niet toegestaan</value>
|
||||
<comment>Object is still being edited and can not be saved</comment>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>Validatie van het object is niet geldig - bewaren is niet toegestaan</value>
|
||||
<comment>Object is not valid and can not be saved</comment>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>ongeldige bewerking - aanmaken is niet toegestaan</value>
|
||||
<comment>Invalid operation - create not allowed</comment>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>ongeldige bewerking - ophalen is niet toegestaan</value>
|
||||
<comment>Invalid operation - fetch not allowed</comment>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>ongeldige bewerking - wijzigen is niet toegestaan</value>
|
||||
<comment>Invalid operation - update not allowed</comment>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>ongeldige bewerking - verwijderen is niet toegestaan</value>
|
||||
<comment>Invalid operation - delete not allowed</comment>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>BeginEdit is een ongeldige bewerking voor een child object</value>
|
||||
<comment>BeginEdit is not valid on a child object</comment>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit is een ongeldige bewerking voor een child object</value>
|
||||
<comment>CancelEdit is not valid on a child object</comment>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplyEdit is een ongeldige bewerking voor een child object</value>
|
||||
<comment>ApplyEdit is not valid on a child object</comment>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>de volgende waarde bestaat niet:</value>
|
||||
<comment>No such comment exists:</comment>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Fout tijdens het lezen van de waarde:</value>
|
||||
<comment>Error reading comment:</comment>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>Een string waarde kan niet geconverteerd worden naar een datum waarde</value>
|
||||
<comment>String comment can not be converted to a date</comment>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>Waarde is geen SmartDate</value>
|
||||
<comment>comment is not a SmartDate</comment>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>Er mag geen principal object naar de DataPortal gestuurd worden wanneer men gebruik maakt van Windows integrated security</value>
|
||||
<comment>No principal object should be passed to DataPortal when using Windows integrated security</comment>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>Principal moet type BusinessPrincipal zijn, niet:</value>
|
||||
<comment>Principal must be of type BusinessPrincipal, not</comment>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>v</value>
|
||||
<comment>t</comment>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>vandaag</value>
|
||||
<comment>today</comment>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>g</value>
|
||||
<comment>y</comment>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>gisteren</value>
|
||||
<comment>yesterday</comment>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>mor</value>
|
||||
<comment>tom</comment>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>morgen</value>
|
||||
<comment>tomorrow</comment>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>mislukt</value>
|
||||
<comment>failed</comment>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>mislukt op de server</value>
|
||||
<comment>failed on the server</comment>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>methode aanroepen mislukt</value>
|
||||
<comment>method call failed</comment>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>niet geimplementeerd</value>
|
||||
<comment>not implemented</comment>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>ongeldige bewerking - uitvoeren is niet toegestaan</value>
|
||||
<comment>Invalid operation - execute not allowed</comment>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>ongeldige bewerking - toevoegen is niet toegestaan</value>
|
||||
<comment>Invalid operation - insert not allowed</comment>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>GetIdValue mag geen Nothing(leeg) retourneren</value>
|
||||
<comment>GetIdcomment must not return Nothing</comment>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>Property get is niet toegestaan</value>
|
||||
<comment>Property get not allowed</comment>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>Property set is niet toegestaan</value>
|
||||
<comment>Property set not allowed</comment>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>Argument mag niet Nothing(leeg) zijn</value>
|
||||
<comment>Argument must not be Nothing</comment>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>Type parameter mag alleen een primitief type zijn</value>
|
||||
<comment>Type parameter must be a primitive type</comment>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>Kopiëren van de property is mislukt</value>
|
||||
<comment>Property copy failed</comment>
|
||||
</data>
|
||||
<data name="MaxValueRule" xml:space="preserve">
|
||||
<value>{0} kan niet groter zijn dan {1}</value>
|
||||
<comment>{0} can not exceed {1}</comment>
|
||||
</data>
|
||||
<data name="MinValueRule" xml:space="preserve">
|
||||
<value>{0} kan niet kleiner zijn dan {1}</value>
|
||||
<comment>{0} can not be less than {1}</comment>
|
||||
</data>
|
||||
<data name="StringMaxLengthRule" xml:space="preserve">
|
||||
<value>{0} kan niet meer als {1} karakters hebben</value>
|
||||
<comment>{0} can not exceed {1} characters</comment>
|
||||
</data>
|
||||
<data name="StringRequiredRule" xml:space="preserve">
|
||||
<value>{0} verplicht</value>
|
||||
<comment>{0} required</comment>
|
||||
</data>
|
||||
<data name="RegExMatchRule" xml:space="preserve">
|
||||
<value>{0} komt niet overeen met de regular expression</value>
|
||||
<comment>{0} does not match regular expression</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,279 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>Clear (blanking) er en ugyldig operasjon</value>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>Insert (legg inn) er en ugyldig operasjon</value>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>Remove (fjern) er en ugyldig operasjon</value>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Endring av et element er en ugyldig operasjon</value>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>Parent (foreldre) verdi kan kun bli satt av Child (barne) objekter</value>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>Child (barne) objektet kan ikke markeres for sletting direkte - benytt Parent Collection (foreldrelisten)</value>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>Ugyldig for Root (rot) objekter - benytt Delete (slett) istedet</value>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>Et Child (barne) objekt kan ikke lagres direkte</value>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>Objektet redigeres fortsatt og kan ikke lagres</value>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>Objektet er ugyldig og kan ikke lagres</value>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>Ugyldig operasjon - Create (opprett) er ikke tillatt</value>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>Ugyldig operasjon - Fetch (hent) er ikke tillatt</value>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>Ugyldig operasjon - Update (oppdater) er ikke tillatt</value>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>Ugyildig operasjon - Delete (slett) er ikke tillatt</value>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>BeginEdit er ugyldig på et Child (barne) objekt</value>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit er ugyldig på et Child (barne) objekt</value>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplyEdit er ugyldig på et Child (barne) objekt</value>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>En slik verdi eksisterer ikke:</value>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Feil ved lesing av verdi:</value>
|
||||
</data>
|
||||
<data name="NoInsertReadOnlyException" xml:space="preserve">
|
||||
<value>Insert (legg inn) er ugyldig for en Read-Only Collection (uredigerbar liste)</value>
|
||||
</data>
|
||||
<data name="NoRemoveReadOnlyException" xml:space="preserve">
|
||||
<value>Remove (fjern) er ugyldig for en Read-Only Collection (uredigerbar liste)</value>
|
||||
</data>
|
||||
<data name="NoClearReadOnlyException" xml:space="preserve">
|
||||
<value>Clear (blank) er ugyldig for en Read-Only Collection (uredigerbar liste)</value>
|
||||
</data>
|
||||
<data name="NoChangeReadOnlyException" xml:space="preserve">
|
||||
<value>Verdier kan ikke endres i en Read-Only Collection (uredigerbar liste)</value>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>String-verdien kan ikke konverteres til Date (en dato)</value>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>Verdien er ikke en SmartDate</value>
|
||||
</data>
|
||||
<data name="InvalidDateException" xml:space="preserve">
|
||||
<value>Verdien må være en gyldig dato</value>
|
||||
</data>
|
||||
<data name="SortingNotSupportedException" xml:space="preserve">
|
||||
<value>Sortering er ikke støttet i denne listen</value>
|
||||
</data>
|
||||
<data name="SearchingNotSupportedException" xml:space="preserve">
|
||||
<value>Søk er ikke støttet i denne listen</value>
|
||||
</data>
|
||||
<data name="AddItemException" xml:space="preserve">
|
||||
<value>Det er ikke tillatt å legge til verdier</value>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>Ingen Principal objekter skal sendes til DataPortalen Windows Integrated Security benyttes</value>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>Principal må vaere av typen BusinessPrincipal, ikke </value>
|
||||
</data>
|
||||
<data name="NoMatchException" xml:space="preserve">
|
||||
<value>Ingen tilsvarende verdi eksisterer i listen</value>
|
||||
</data>
|
||||
<data name="SecurityDataBase" xml:space="preserve">
|
||||
<value>Sikkerhet</value>
|
||||
</data>
|
||||
<data name="SecurityStoredProcedure" xml:space="preserve">
|
||||
<value>Login</value>
|
||||
</data>
|
||||
<data name="SecurityUserParam" xml:space="preserve">
|
||||
<value>@user</value>
|
||||
</data>
|
||||
<data name="SecurityPasswordParam" xml:space="preserve">
|
||||
<value>@pw</value>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>t</value>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>today (idag)</value>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>y (år)</value>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>yesterday (igår)</value>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>tom</value>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>tomorrow (imorgen)</value>
|
||||
</data>
|
||||
<data name="BatchQueueJobCompleted" xml:space="preserve">
|
||||
<value>Batch jobben er fullført</value>
|
||||
</data>
|
||||
<data name="BatchQueueJobPrefix" xml:space="preserve">
|
||||
<value>Batch jobb:</value>
|
||||
</data>
|
||||
<data name="BatchQueueJobObjectPrefix" xml:space="preserve">
|
||||
<value>Jobb objekt:</value>
|
||||
</data>
|
||||
<data name="BatchQueueJobFailed" xml:space="preserve">
|
||||
<value>Batch-jobben ble ikke fullført pga en feil under utføringen</value>
|
||||
</data>
|
||||
<data name="BatchQueueProcStarted" xml:space="preserve">
|
||||
<value>Batchkø prosessoren har startet</value>
|
||||
</data>
|
||||
<data name="BatchQueueProcName" xml:space="preserve">
|
||||
<value>Navn:</value>
|
||||
</data>
|
||||
<data name="BatchQueueProcPort" xml:space="preserve">
|
||||
<value>Port:</value>
|
||||
</data>
|
||||
<data name="BatchQueueProcQueue" xml:space="preserve">
|
||||
<value>Koe:</value>
|
||||
</data>
|
||||
<data name="BatchQueueProcMaxJobs" xml:space="preserve">
|
||||
<value>Max antall jobber:</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>Feilet</value>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>Feilet på serveren</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,351 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>Principal deve ser do tipo BusinessPrincipal, não</value>
|
||||
<comment>Principal must be of type BusinessPrincipal, not
|
||||
</comment>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Alterar um elemento é uma operação inválida</value>
|
||||
<comment>Changing an element is an invalid operation
|
||||
</comment>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>Não se pode marcar diretamente um objeto filho para deleção - use a coleção pai dele</value>
|
||||
<comment>Can not directly mark a child object for deletion - use its parent collection
|
||||
</comment>
|
||||
</data>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>Limpar é uma operação inválida</value>
|
||||
<comment>Clear is an invalid operation
|
||||
Invalid operation - create not allowed
|
||||
</comment>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>Operação inválida - criação não permitida</value>
|
||||
<comment>Invalid operation - create not allowed
|
||||
</comment>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>Operação inválida - deleção não permitida</value>
|
||||
<comment>Invalid operation - delete not allowed
|
||||
</comment>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Erro ao ler valor:</value>
|
||||
<comment>Error reading value:
|
||||
</comment>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>Operação inválida - execução não permitida</value>
|
||||
<comment>Invalid operation - execute not allowed
|
||||
</comment>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>falhou</value>
|
||||
<comment>failed
|
||||
</comment>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>falhou no servidor</value>
|
||||
<comment>failed on the server
|
||||
</comment>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>Operação inválida - leitura não permitida</value>
|
||||
<comment>Invalid operation - fetch not allowed
|
||||
</comment>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>'Business Object' deve fornecer um valor não-nulo no GetIdValue</value>
|
||||
<comment>Business object must supply a non-null ID value in GetIdValue
|
||||
</comment>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>Inserir é uma operação inválida</value>
|
||||
<comment>Insert is an invalid operation
|
||||
</comment>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>Operação inválida - inserção não permitida</value>
|
||||
<comment>Invalid operation - insert not allowed
|
||||
</comment>
|
||||
</data>
|
||||
<data name="MaxValueRule" xml:space="preserve">
|
||||
<value>{0} não pode exceder {1}</value>
|
||||
<comment>{0} can not exceed {1}
|
||||
</comment>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>chamada do método falhou</value>
|
||||
<comment>method call failed
|
||||
</comment>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>não implementado</value>
|
||||
<comment>not implemented
|
||||
</comment>
|
||||
</data>
|
||||
<data name="MinValueRule" xml:space="preserve">
|
||||
<value>{0} não pode ser menor que {1}</value>
|
||||
<comment>{0} can not be less than {1}
|
||||
</comment>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplyEdit não é válido em um objeto filho</value>
|
||||
<comment>ApplyEdit is not valid on a child object
|
||||
</comment>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>BeginEdit não é válido em um objeto filho</value>
|
||||
<comment>BeginEdit is not valid on a child object
|
||||
</comment>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit não é válido em um objeto filho</value>
|
||||
<comment>CancelEdit is not valid on a child object
|
||||
</comment>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>Inválido para objetos raiz - use Deletar ao invés</value>
|
||||
<comment>Invalid for root objects - use Delete instead
|
||||
</comment>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>Nenhum objeto do tipo Principal deve ser passado para um DataPortal quando segurança integrada do Windows estiver sendo usada</value>
|
||||
<comment>No principal object should be passed to DataPortal when using Windows integrated security
|
||||
</comment>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>Não se pode salvar diretamente um objeto filho</value>
|
||||
<comment>Can not directly save a child object
|
||||
</comment>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>Objeto ainda está sendo editado e não pode ser salvo</value>
|
||||
<comment>Object is still being edited and can not be saved
|
||||
</comment>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>Objeto não é válido e não pode ser salvo</value>
|
||||
<comment>Object is not valid and can not be saved
|
||||
</comment>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>Tal valor não existe:</value>
|
||||
<comment>No such value exists:
|
||||
</comment>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>Argumento não pode ser nulo</value>
|
||||
<comment>Argument must not be null
|
||||
</comment>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>Valor do objeto pai só pode ser atribuido para objetos filhos</value>
|
||||
<comment>Parent value can only be set for child objects
|
||||
</comment>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>Tipo do parâmetro deve ser um tipo primitivo</value>
|
||||
<comment>Type parameter must be a primitive type
|
||||
</comment>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>Cópia da propriedade falhou</value>
|
||||
<comment>Property copy failed
|
||||
</comment>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>'Property get' não permitida</value>
|
||||
<comment>Property get not allowed
|
||||
</comment>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>'Property set' não permitida</value>
|
||||
<comment>Property set not allowed
|
||||
</comment>
|
||||
</data>
|
||||
<data name="RegExMatchRule" xml:space="preserve">
|
||||
<value>{0} não confere com 'regular expression'</value>
|
||||
<comment>{0} does not match regular expression
|
||||
</comment>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>Remover é uma operação inválida</value>
|
||||
<comment>Remove is an invalid operation
|
||||
</comment>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>t</value>
|
||||
<comment>t
|
||||
</comment>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>hoje</value>
|
||||
<comment>today
|
||||
</comment>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>tom</value>
|
||||
<comment>tom
|
||||
</comment>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>amanhã</value>
|
||||
<comment>tomorrow
|
||||
</comment>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>y</value>
|
||||
<comment>y
|
||||
</comment>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>ontem</value>
|
||||
<comment>yesterday
|
||||
</comment>
|
||||
</data>
|
||||
<data name="StringMaxLengthRule" xml:space="preserve">
|
||||
<value>{0} não pode exceder {1} caracteres</value>
|
||||
<comment>{0} can not exceed {1} characters
|
||||
</comment>
|
||||
</data>
|
||||
<data name="StringRequiredRule" xml:space="preserve">
|
||||
<value>{0} requerido</value>
|
||||
<comment>{0} required
|
||||
</comment>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>Valor do tipo string não pode ser convertido para uma data</value>
|
||||
<comment>String value can not be converted to a date
|
||||
</comment>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>Operação inválida - atualização não permitida</value>
|
||||
<comment>Invalid operation - update not allowed
|
||||
</comment>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>Valor não é uma SmartDate</value>
|
||||
<comment>Value is not a SmartDate
|
||||
</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,308 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>"Principal" tem que ser do tipo "BusinessPrincipal", não</value>
|
||||
<comment>Principal must be of type BusinessPrincipal, not</comment>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Alterar um elemento é uma operação inválida</value>
|
||||
<comment>Changing an element is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>Não pode marcar directamente um objecto filho para apagar - use a colecção pai</value>
|
||||
<comment>Can not directly mark a child object for deletion - use its parent collection</comment>
|
||||
</data>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>"Clear" é uma operação inválida</value>
|
||||
<comment>Clear is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>Operação inválida - não pode criar</value>
|
||||
<comment>Invalid operation - create not allowed</comment>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>Operação inválida - não pode apagar</value>
|
||||
<comment>Invalid operation - delete not allowed</comment>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Erro ao ler valor:</value>
|
||||
<comment>Error reading value:</comment>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>Operação inválida - não pode executar</value>
|
||||
<comment>Invalid operation - execute not allowed</comment>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>falhou</value>
|
||||
<comment>failed</comment>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>falhou no servidor</value>
|
||||
<comment>failed on the server</comment>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>Operação inválida - não pode ler</value>
|
||||
<comment>Invalid operation - fetch not allowed</comment>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>"GetIdValue" não pode devolver um ID nulo para o "business object"</value>
|
||||
<comment>Business object must supply a non-null ID value in GetIdValue</comment>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>Inserir é uma operação inválida</value>
|
||||
<comment>Insert is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>Operação inválida - não pode inserir</value>
|
||||
<comment>Invalid operation - insert not allowed</comment>
|
||||
</data>
|
||||
<data name="InvalidRuleMethodException" xml:space="preserve">
|
||||
<value>Método da regra inválido (não pode instanciar métodos do objecto alvo)</value>
|
||||
<comment>Invalid rule method (instance methods of the target object not allowed)</comment>
|
||||
</data>
|
||||
<data name="MaxValueRule" xml:space="preserve">
|
||||
<value>{0} não pode exceder {1}</value>
|
||||
<comment>{0} can not exceed {1}</comment>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>chamada ao método falhou</value>
|
||||
<comment>method call failed</comment>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>não implementado</value>
|
||||
<comment>not implemented</comment>
|
||||
</data>
|
||||
<data name="MinValueRule" xml:space="preserve">
|
||||
<value>{0} não pode ser menos que {1}</value>
|
||||
<comment>{0} can not be less than {1}</comment>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>"ApplyEdit" não é válido para um objecto filho</value>
|
||||
<comment>ApplyEdit is not valid on a child object</comment>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>"BeginEdit" não é válido para um objecto filho</value>
|
||||
<comment>BeginEdit is not valid on a child object</comment>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>"CancelEdit" não é válido para um objecto filho</value>
|
||||
<comment>CancelEdit is not valid on a child object</comment>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>Inválido para objectos raíz - em vez disso, use "apagar"</value>
|
||||
<comment>Invalid for root objects - use Delete instead</comment>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>Quando se usa a segurança integrada do Windows, nenhum objecto "Principal" deve ser passado para o "DataPortal"</value>
|
||||
<comment>No principal object should be passed to DataPortal when using Windows integrated security</comment>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>Não pode guardar objectos filho directamente</value>
|
||||
<comment>Can not directly save a child object</comment>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>O objecto está a ser editado e não pode ser guardado</value>
|
||||
<comment>Object is still being edited and can not be saved</comment>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>O objecto não é válido e não pode ser guardado</value>
|
||||
<comment>Object is not valid and can not be saved</comment>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>O valor não existe:</value>
|
||||
<comment>No such value exists:</comment>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>O argumento não pode ser nulo</value>
|
||||
<comment>Argument must not be null</comment>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>O valor "pai" só pode ser atribuído aos objectos filho</value>
|
||||
<comment>Parent value can only be set for child objects</comment>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>O parâmetro tem que ser de um tipo primário</value>
|
||||
<comment>Type parameter must be a primitive type</comment>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>A cópia da propriedade falhou</value>
|
||||
<comment>Property copy failed</comment>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>Não pode ler o valor da propriedade</value>
|
||||
<comment>Property get not allowed</comment>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>Não pode atribuir valor à propriedade</value>
|
||||
<comment>Property set not allowed</comment>
|
||||
</data>
|
||||
<data name="RegExMatchRule" xml:space="preserve">
|
||||
<value>{0} não encaixa na expressão regular</value>
|
||||
<comment>{0} does not match regular expression</comment>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>Remover é uma operação inválida</value>
|
||||
<comment>Remove is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>h</value>
|
||||
<comment>t</comment>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>hoje</value>
|
||||
<comment>today</comment>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>a</value>
|
||||
<comment>tom</comment>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>amanha</value>
|
||||
<comment>tomorrow</comment>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>o</value>
|
||||
<comment>y</comment>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>ontem</value>
|
||||
<comment>yesterday</comment>
|
||||
</data>
|
||||
<data name="StringMaxLengthRule" xml:space="preserve">
|
||||
<value>{0} não pode exceder {1} caracteres</value>
|
||||
<comment>{0} can not exceed {1} characters</comment>
|
||||
</data>
|
||||
<data name="StringRequiredRule" xml:space="preserve">
|
||||
<value>{0} exigido</value>
|
||||
<comment>{0} required</comment>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>A cadeia de caracteres não pode ser convertido numa data</value>
|
||||
<comment>String value can not be converted to a date</comment>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>Operação inválida - não pode actualizar</value>
|
||||
<comment>Invalid operation - update not allowed</comment>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>O valor não é uma "SmartDate"</value>
|
||||
<comment>Value is not a SmartDate</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,264 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>Clear is an invalid operation</value>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>Insert is an invalid operation</value>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>Remove is an invalid operation</value>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Changing an element is an invalid operation</value>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>Parent value can only be set for child objects</value>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>Can not directly mark a child object for deletion - use its parent collection</value>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>Invalid for root objects - use Delete instead</value>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>Can not directly save a child object</value>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>Object is still being edited and can not be saved</value>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>Object is not valid and can not be saved</value>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>Invalid operation - create not allowed</value>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>Invalid operation - fetch not allowed</value>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>Invalid operation - update not allowed</value>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>Invalid operation - delete not allowed</value>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>BeginEdit is not valid on a child object</value>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit is not valid on a child object</value>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplyEdit is not valid on a child object</value>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>No such value exists:</value>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Error reading value:</value>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>String value can not be converted to a date</value>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>Value is not a SmartDate</value>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>No principal object should be passed to DataPortal when using Windows integrated security</value>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>Principal must be of type BusinessPrincipal, not</value>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>t</value>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>today</value>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>y</value>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>yesterday</value>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>tom</value>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>tomorrow</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>failed</value>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>failed on the server</value>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>method call failed</value>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>not implemented</value>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>Invalid operation - execute not allowed</value>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>Invalid operation - insert not allowed</value>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>GetIdValue must not return Nothing</value>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>Property get not allowed</value>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>Property set not allowed</value>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>Argument must not be Nothing</value>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>Type parameter must be a primitive type</value>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>Property copy failed</value>
|
||||
</data>
|
||||
<data name="MaxValueRule" xml:space="preserve">
|
||||
<value>{0} can not exceed {1}</value>
|
||||
</data>
|
||||
<data name="MinValueRule" xml:space="preserve">
|
||||
<value>{0} can not be less than {1}</value>
|
||||
</data>
|
||||
<data name="StringMaxLengthRule" xml:space="preserve">
|
||||
<value>{0} can not exceed {1} characters</value>
|
||||
</data>
|
||||
<data name="StringRequiredRule" xml:space="preserve">
|
||||
<value>{0} required</value>
|
||||
</data>
|
||||
<data name="RegExMatchRule" xml:space="preserve">
|
||||
<value>{0} does not match regular expression</value>
|
||||
</data>
|
||||
<data name="InvalidRuleMethodException" xml:space="preserve">
|
||||
<value>Invalid rule method (instance methods of the target object not allowed)</value>
|
||||
</data>
|
||||
<data name="TypeLoadException" xml:space="preserve">
|
||||
<value>Failed to load type '{0}'</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,284 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>Clear este o operatie invalida</value>
|
||||
<comment>Clear is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>Insert este o operatie invalida</value>
|
||||
<comment>Insert is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>Remove nu e o peratie valida</value>
|
||||
<comment>Remove is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Schimbarea unui element este o operatie invalida</value>
|
||||
<comment>Changing an element is an invalid operation</comment>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>Valoarea Parent poate fi setata doar pentru obiectele copil</value>
|
||||
<comment>Parent value can only be set for child objects</comment>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>Nu se poate marca direct un copil pentru stergere - utilizati colectia sa parinte</value>
|
||||
<comment>Can not directly mark a child object for deletion - use its parent collection</comment>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>Invalid pentru obiecte root - utilizati Delete</value>
|
||||
<comment>Invalid for root objects - use Delete instead</comment>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>Nu se poate salva direct un obiect copil</value>
|
||||
<comment>Can not directly save a child object</comment>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>Obiectul se editeaza inca si nu poate fi salvat</value>
|
||||
<comment>Object is still being edited and can not be saved</comment>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>Obiectul nu e valid si nu poate fi salvat</value>
|
||||
<comment>Object is not valid and can not be saved</comment>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>Crearea nu e operatie permisa</value>
|
||||
<comment>Invalid operation - create not allowed</comment>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>Operatie invalida - umplerea nu e permisa</value>
|
||||
<comment>Invalid operation - fetch not allowed</comment>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>operatie invalida - update nu e permis</value>
|
||||
<comment>Invalid operation - update not allowed</comment>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>Stergerea nu e o operatie permisa</value>
|
||||
<comment>Invalid operation - delete not allowed</comment>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>BeginEdit nu e valid pe un obiect copil</value>
|
||||
<comment>BeginEdit is not valid on a child object</comment>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit nu e valid pe un obiect copil</value>
|
||||
<comment>CancelEdit is not valid on a child object</comment>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplyEdit nu e valid pe un obiect copil</value>
|
||||
<comment>ApplyEdit is not valid on a child object</comment>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>Nu exista valoarea :</value>
|
||||
<comment>No such value exists:</comment>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Eroare la citirea </value>
|
||||
<comment>Error reading value:</comment>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>valoarea stringului nu poate fi convertita la data</value>
|
||||
<comment>String value can not be converted to a date</comment>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>Valoare nu e de tipul SmartDate</value>
|
||||
<comment>Value is not a SmartDate</comment>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>Nu trebuie trecut un obiect Principal la DataProtal cind utilizati Windows Integrated security</value>
|
||||
<comment>No principal object should be passed to DataPortal when using Windows integrated security</comment>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>principal trebuie sa fie de tipul BussinesPrincipal, nu </value>
|
||||
<comment>Principal must be of type BusinessPrincipal, not</comment>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>a</value>
|
||||
<comment>t</comment>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>azi</value>
|
||||
<comment>today</comment>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>i</value>
|
||||
<comment>y</comment>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>ieri</value>
|
||||
<comment>yesterday</comment>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>miine</value>
|
||||
<comment>tom</comment>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>miine</value>
|
||||
<comment>tomorrow</comment>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>Eroare</value>
|
||||
<comment>failed</comment>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>Eroare la server</value>
|
||||
<comment>failed on the server</comment>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>Chemarea metodei a produs eroare</value>
|
||||
<comment>method call failed</comment>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>Methoda nu e implementata</value>
|
||||
<comment>not implemented</comment>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>Operatie invalida - executia nu e permisa</value>
|
||||
<comment>Invalid operation - execute not allowed</comment>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>Operatie invalida - insert nu e permis</value>
|
||||
<comment>Invalid operation - insert not allowed</comment>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>GetIdValue nu poate intoarce Nothing</value>
|
||||
<comment>GetIdValue must not return Nothing</comment>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>Proprietatea nu admite get</value>
|
||||
<comment>Property get not allowed</comment>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>Proprietatea nu admite set</value>
|
||||
<comment>Property set not allowed</comment>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>Argumetul trebuie sa nu fie Nothing</value>
|
||||
<comment>Argument must not be Nothing</comment>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>Parametru Type trebuie sa fie un type "primitiv"</value>
|
||||
<comment>Type parameter must be a primitive type</comment>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>Copierea proprietatii a dat eroare</value>
|
||||
<comment>Property copy failed</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,201 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="ResMimeType">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="Version">
|
||||
<value>1.0.0.0</value>
|
||||
</resheader>
|
||||
<resheader name="Reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="Writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" type="System.String">
|
||||
<value>Неверная операция "Clear"</value>
|
||||
</data>
|
||||
<data name="InsertInvalidException" type="System.String">
|
||||
<value>Неверная операция "Insert"</value>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" type="System.String">
|
||||
<value>Неверная операция "Remove"</value>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" type="System.String">
|
||||
<value>Редактирование элемента недопустимо</value>
|
||||
</data>
|
||||
<data name="ParentSetException" type="System.String">
|
||||
<value>Значение Parent может быть установленно только для дочерних объектов</value>
|
||||
</data>
|
||||
<data name="ChildDeleteException" type="System.String">
|
||||
<value>Невозможно напрямую пометить дочерний объект для удаления. Используйте его родительскую коллекцию</value>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" type="System.String">
|
||||
<value>Неверно для корневого объекта - используйте команду Delete </value>
|
||||
</data>
|
||||
<data name="NoSaveChildException" type="System.String">
|
||||
<value>Невозможно сохранить дочерний объект напрямую</value>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" type="System.String">
|
||||
<value>Невозможно сохранить объект находящийся в состоянии редактирования</value>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" type="System.String">
|
||||
<value>Невозможно сохранить объект с ошибками</value>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" type="System.String">
|
||||
<value>Неверная операция - создание нового объекта не разрешено</value>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" type="System.String">
|
||||
<value>Неверная операция - чтение не разрешено</value>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" type="System.String">
|
||||
<value>Неверная операция - редактирование не разрешено</value>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" type="System.String">
|
||||
<value>Неверная операция - удаление не разрешено</value>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" type="System.String">
|
||||
<value>BeginEdit не разрешено для дочернего объекта</value>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" type="System.String">
|
||||
<value>CancelEdit не разрешено для дочернего объекта</value>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" type="System.String">
|
||||
<value>ApplyEdit не разрешено для дочернего объекта</value>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" type="System.String">
|
||||
<value>Такого значения не существует:</value>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" type="System.String">
|
||||
<value>Ошибка чтения значения:</value>
|
||||
</data>
|
||||
<data name="NoInsertReadOnlyException" type="System.String">
|
||||
<value>Вставка не разрешена для коллекций "только для чтения"</value>
|
||||
</data>
|
||||
<data name="NoRemoveReadOnlyException" type="System.String">
|
||||
<value>Удаление не разрешено для коллекций "только для чтения"</value>
|
||||
</data>
|
||||
<data name="NoClearReadOnlyException" type="System.String">
|
||||
<value>Очистка коллекций "только для чтения" не разрешена</value>
|
||||
</data>
|
||||
<data name="NoChangeReadOnlyException" type="System.String">
|
||||
<value>Редактирование коллекций "только для чтения" не разрешено</value>
|
||||
</data>
|
||||
<data name="StringToDateException" type="System.String">
|
||||
<value>Строковое значение не может быть переведено в дату</value>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" type="System.String">
|
||||
<value>Тип значения не SmartDate</value>
|
||||
</data>
|
||||
<data name="InvalidDateException" type="System.String">
|
||||
<value>Значение должно быть правильной датой</value>
|
||||
</data>
|
||||
<data name="SortingNotSupportedException" type="System.String">
|
||||
<value>Сортировка не поддерживается данной коллекцией</value>
|
||||
</data>
|
||||
<data name="SearchingNotSupportedException" type="System.String">
|
||||
<value>Поиск не поддерживается данной коллекцией</value>
|
||||
</data>
|
||||
<data name="AddItemException" type="System.String">
|
||||
<value>Добавление записей не разрешено</value>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" type="System.String">
|
||||
<value>Не следует передавать объект "principal" в DataPortal при использовании интегрированной системы безопасности Windows (WIS)</value>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" type="System.String">
|
||||
<value>Объект "Principal" должен быть типа BusinessPrincipal, а не</value>
|
||||
</data>
|
||||
<data name="NoMatchException" type="System.String">
|
||||
<value>Нет соответсвующей записи в коллекции</value>
|
||||
</data>
|
||||
<data name="SecurityDataBase" type="System.String">
|
||||
<value>Security</value>
|
||||
</data>
|
||||
<data name="SecurityStoredProcedure" type="System.String">
|
||||
<value>Login</value>
|
||||
</data>
|
||||
<data name="SecurityUserParam" type="System.String">
|
||||
<value>@user</value>
|
||||
</data>
|
||||
<data name="SecurityPasswordParam" type="System.String">
|
||||
<value>@pw</value>
|
||||
</data>
|
||||
<data name="SmartDateT" type="System.String">
|
||||
<value>t</value>
|
||||
</data>
|
||||
<data name="SmartDateToday" type="System.String">
|
||||
<value>сегодня</value>
|
||||
</data>
|
||||
<data name="SmartDateY" type="System.String">
|
||||
<value>y</value>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" type="System.String">
|
||||
<value>вчера</value>
|
||||
</data>
|
||||
<data name="SmartDateTom" type="System.String">
|
||||
<value>tom</value>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" type="System.String">
|
||||
<value>завтра</value>
|
||||
</data>
|
||||
<data name="BatchQueueJobCompleted" type="System.String">
|
||||
<value>Пакетное задание окончено</value>
|
||||
</data>
|
||||
<data name="BatchQueueJobPrefix" type="System.String">
|
||||
<value>Пакетное задание:</value>
|
||||
</data>
|
||||
<data name="BatchQueueJobObjectPrefix" type="System.String">
|
||||
<value>Объект задания:</value>
|
||||
</data>
|
||||
<data name="BatchQueueJobFailed" type="System.String">
|
||||
<value>Пакетное задание не выполнено из-за ошибки выполнения</value>
|
||||
</data>
|
||||
<data name="BatchQueueProcStarted" type="System.String">
|
||||
<value>Стартовал обработчик пактной очереди</value>
|
||||
</data>
|
||||
<data name="BatchQueueProcName" type="System.String">
|
||||
<value>Имя:</value>
|
||||
</data>
|
||||
<data name="BatchQueueProcPort" type="System.String">
|
||||
<value>Port:</value>
|
||||
</data>
|
||||
<data name="BatchQueueProcQueue" type="System.String">
|
||||
<value>Очередь:</value>
|
||||
</data>
|
||||
<data name="BatchQueueProcMaxJobs" type="System.String">
|
||||
<value>Максимально заданий:</value>
|
||||
</data>
|
||||
<data name="Failed" type="System.String">
|
||||
<value>потерпел неудачу</value>
|
||||
</data>
|
||||
<data name="FailedOnServer" type="System.String">
|
||||
<value>потерпел неудачу на сервере</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,243 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>Principal objekat mora biti tipa BusinessPrincipal, a ne</value>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>Izmena nije dozvoljena</value>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>Objekti "deca" se ne mogu direktno označiti za brisanje - koristite "roditelj" kolekciju</value>
|
||||
</data>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>Čišćenje nije dozvoljeno</value>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - kreiranje</value>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - brisanje</value>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>Greška pri čitanju vrednosti:</value>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - izvršavanje</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>neuspešno</value>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>neuspešno na serveru</value>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - učitavanje</value>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>GetIdValue ne sme vratiti Nothing</value>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>Dodavanje nije dozvoljeno</value>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - dodavanje</value>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>neuspešan poziv metoda</value>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>metod nije implementiran</value>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplyEdit nije važeći na "dete" objektu</value>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>BeginEdit nije važeći na "dete" objektu</value>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit nije važeći na "dete" objektu</value>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija za osnovne objekte - koristite Delete</value>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>Principal objekat ne može biti prosleđen DataPortal-u kada se koristi integrisana Windows sigurnost</value>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>"Dete" objekat se ne može direktno sačuvati</value>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>Objekat se još uvek uređuje i ne može biti sačuvan</value>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>Objekat nije ispravan i ne može biti sačuvan</value>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>Ne postoji vrednost:</value>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>Argument ne sme biti Nothing</value>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>Parent vrednost može biti podešena samo za objekte "decu"</value>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>Type parametar mora biti primitivni tip</value>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>Kopiranje osobine nije uspelo</value>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>Uzimanje osobine objekta (Property get) nije dopušteno</value>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>Podešavanje osobine objekta (Property set) nije dopušteno</value>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>Uklanjanje nije dozvoljeno</value>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>t</value>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>today</value>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>tom</value>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>tomorrow</value>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>y</value>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>yesterday</value>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>String vrednost ne može biti konvertovana u datum</value>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>Nedozvoljena operacija - ažuriranje</value>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>Vrednost nije tipa SmartDate</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,201 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="ResMimeType">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="Version">
|
||||
<value>1.0.0.0</value>
|
||||
</resheader>
|
||||
<resheader name="Reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="Writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" type="System.String">
|
||||
<value>Rensa är en ogiltig åtgärd</value>
|
||||
</data>
|
||||
<data name="InsertInvalidException" type="System.String">
|
||||
<value>Lägga till är en ogiltig åtgärd</value>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" type="System.String">
|
||||
<value>Ta bort är en ogiltig åtgärd</value>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" type="System.String">
|
||||
<value>Ändra ett element är en ogiltig åtgärd</value>
|
||||
</data>
|
||||
<data name="ParentSetException" type="System.String">
|
||||
<value>Överordnat värde kan endast sättas på underordnade objekt</value>
|
||||
</data>
|
||||
<data name="ChildDeleteException" type="System.String">
|
||||
<value>Kan inte märka ett underordnat objekt för borttagning - använd dess överordnades kollektion</value>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" type="System.String">
|
||||
<value>Otillåtet för rotobjekt - använd ta bort istället</value>
|
||||
</data>
|
||||
<data name="NoSaveChildException" type="System.String">
|
||||
<value>Kan inte spara ett underordnat objekt direkt</value>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" type="System.String">
|
||||
<value>Objetet håller fortfarande på att ändras och kan inte sparas</value>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" type="System.String">
|
||||
<value>Objektet är inte giltigt och kan inte sparas</value>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" type="System.String">
|
||||
<value>Ogiltig åtgärd - skapa är inte tillåtet</value>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" type="System.String">
|
||||
<value>Ogiltig åtgärd - hämta är inte tillåtet</value>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" type="System.String">
|
||||
<value>Ogiltig åtgärd - uppdatera är inte tillåtet</value>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" type="System.String">
|
||||
<value>Ogiltig åtgärd - ta bort är inte tillåtet</value>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" type="System.String">
|
||||
<value>BeginEdit är inte giltigt på ett underordnat objekt</value>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" type="System.String">
|
||||
<value>CancelEdit är inte giltigt på ett underordnat objekt</value>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" type="System.String">
|
||||
<value>ApplyEdit är inte giltigt på ett underordnat objekt</value>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" type="System.String">
|
||||
<value>Värdet saknas:</value>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" type="System.String">
|
||||
<value>Fel vid läsande av värde:</value>
|
||||
</data>
|
||||
<data name="NoInsertReadOnlyException" type="System.String">
|
||||
<value>Lägga till är ogiltigt på en skrivskyddad kollektion</value>
|
||||
</data>
|
||||
<data name="NoRemoveReadOnlyException" type="System.String">
|
||||
<value>Ta bort är ogiltigt på en skrivskyddad kollektion</value>
|
||||
</data>
|
||||
<data name="NoClearReadOnlyException" type="System.String">
|
||||
<value>Rensa är ogiltigt på en skrivskyddad kollektion</value>
|
||||
</data>
|
||||
<data name="NoChangeReadOnlyException" type="System.String">
|
||||
<value>Objekt kan inte ändras i en skrivskyddad kollektion</value>
|
||||
</data>
|
||||
<data name="StringToDateException" type="System.String">
|
||||
<value>Strängvärde kan inte omvandlas till ett datum</value>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" type="System.String">
|
||||
<value>Värdet är inte ett SmartDate</value>
|
||||
</data>
|
||||
<data name="InvalidDateException" type="System.String">
|
||||
<value>Värdet måste vara ett giltigt datum</value>
|
||||
</data>
|
||||
<data name="SortingNotSupportedException" type="System.String">
|
||||
<value>Sortering stöds inte av denna kollektion</value>
|
||||
</data>
|
||||
<data name="SearchingNotSupportedException" type="System.String">
|
||||
<value>Sökning stöds inte av denna kollektion</value>
|
||||
</data>
|
||||
<data name="AddItemException" type="System.String">
|
||||
<value>Det är inte tillåtet att lägga till objekt</value>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" type="System.String">
|
||||
<value>Principal-objekt ska inte skickas med till DataPortal:en vid användande av Windows integrated security</value>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" type="System.String">
|
||||
<value>Principal måste vara av typen BusinessPrincipal, inte</value>
|
||||
</data>
|
||||
<data name="NoMatchException" type="System.String">
|
||||
<value>Inga matchande objekt i kollektionen</value>
|
||||
</data>
|
||||
<data name="SecurityDataBase" type="System.String">
|
||||
<value>Security</value>
|
||||
</data>
|
||||
<data name="SecurityStoredProcedure" type="System.String">
|
||||
<value>Login</value>
|
||||
</data>
|
||||
<data name="SecurityUserParam" type="System.String">
|
||||
<value>@user</value>
|
||||
</data>
|
||||
<data name="SecurityPasswordParam" type="System.String">
|
||||
<value>@pw</value>
|
||||
</data>
|
||||
<data name="SmartDateT" type="System.String">
|
||||
<value>t</value>
|
||||
</data>
|
||||
<data name="SmartDateToday" type="System.String">
|
||||
<value>today</value>
|
||||
</data>
|
||||
<data name="SmartDateY" type="System.String">
|
||||
<value>y</value>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" type="System.String">
|
||||
<value>yesterday</value>
|
||||
</data>
|
||||
<data name="SmartDateTom" type="System.String">
|
||||
<value>tom</value>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" type="System.String">
|
||||
<value>tomorrow</value>
|
||||
</data>
|
||||
<data name="BatchQueueJobCompleted" type="System.String">
|
||||
<value>Batch-jobb avslutat</value>
|
||||
</data>
|
||||
<data name="BatchQueueJobPrefix" type="System.String">
|
||||
<value>Batch-jobb:</value>
|
||||
</data>
|
||||
<data name="BatchQueueJobObjectPrefix" type="System.String">
|
||||
<value>Jobbobjekt:</value>
|
||||
</data>
|
||||
<data name="BatchQueueJobFailed" type="System.String">
|
||||
<value>Batch-jobb misslyckades på grund av körningsfel</value>
|
||||
</data>
|
||||
<data name="BatchQueueProcStarted" type="System.String">
|
||||
<value>Processor för batch-kö startad</value>
|
||||
</data>
|
||||
<data name="BatchQueueProcName" type="System.String">
|
||||
<value>Namn:</value>
|
||||
</data>
|
||||
<data name="BatchQueueProcPort" type="System.String">
|
||||
<value>Port:</value>
|
||||
</data>
|
||||
<data name="BatchQueueProcQueue" type="System.String">
|
||||
<value>Kö:</value>
|
||||
</data>
|
||||
<data name="BatchQueueProcMaxJobs" type="System.String">
|
||||
<value>Max antal jobb:</value>
|
||||
</data>
|
||||
<data name="Failed" type="System.String">
|
||||
<value>misslyckades</value>
|
||||
</data>
|
||||
<data name="FailedOnServer" type="System.String">
|
||||
<value>misslyckades på servern</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,243 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClearInvalidException" xml:space="preserve">
|
||||
<value>清除属非法操作</value>
|
||||
</data>
|
||||
<data name="InsertInvalidException" xml:space="preserve">
|
||||
<value>插入属非法操作</value>
|
||||
</data>
|
||||
<data name="RemoveInvalidException" xml:space="preserve">
|
||||
<value>删除属无效操作</value>
|
||||
</data>
|
||||
<data name="ChangeInvalidException" xml:space="preserve">
|
||||
<value>改变一个元素属非法操作</value>
|
||||
</data>
|
||||
<data name="ParentSetException" xml:space="preserve">
|
||||
<value>只允许给子对象赋值</value>
|
||||
</data>
|
||||
<data name="ChildDeleteException" xml:space="preserve">
|
||||
<value>不能直接将子对象标记为删除对象 – 请通过其 Parent 集合</value>
|
||||
</data>
|
||||
<data name="NoDeleteRootException" xml:space="preserve">
|
||||
<value>不能用于源对象 – 请用删除</value>
|
||||
</data>
|
||||
<data name="NoSaveChildException" xml:space="preserve">
|
||||
<value>不能直接保存子对象</value>
|
||||
</data>
|
||||
<data name="NoSaveEditingException" xml:space="preserve">
|
||||
<value>不能保存, 因为对象还在修改状态中</value>
|
||||
</data>
|
||||
<data name="NoSaveInvalidException" xml:space="preserve">
|
||||
<value>对象含无效值, 因此不能保存</value>
|
||||
</data>
|
||||
<data name="CreateNotSupportedException" xml:space="preserve">
|
||||
<value>非法操作 – 不允许创建</value>
|
||||
</data>
|
||||
<data name="FetchNotSupportedException" xml:space="preserve">
|
||||
<value>非法操作 – 不允许读取数据</value>
|
||||
</data>
|
||||
<data name="UpdateNotSupportedException" xml:space="preserve">
|
||||
<value>无效操作 –不允许更新</value>
|
||||
</data>
|
||||
<data name="DeleteNotSupportedException" xml:space="preserve">
|
||||
<value>非法操作 – 不允许删除</value>
|
||||
</data>
|
||||
<data name="NoBeginEditChildException" xml:space="preserve">
|
||||
<value>BeginEdit 在子对象上无效</value>
|
||||
</data>
|
||||
<data name="NoCancelEditChildException" xml:space="preserve">
|
||||
<value>CancelEdit 在子对象上无效</value>
|
||||
</data>
|
||||
<data name="NoApplyEditChildException" xml:space="preserve">
|
||||
<value>ApplyEdit 在子对象上无效</value>
|
||||
</data>
|
||||
<data name="NoSuchValueExistsException" xml:space="preserve">
|
||||
<value>此数值不存在:</value>
|
||||
</data>
|
||||
<data name="ErrorReadingValueException" xml:space="preserve">
|
||||
<value>读取数值出错:</value>
|
||||
</data>
|
||||
<data name="StringToDateException" xml:space="preserve">
|
||||
<value>字符串不能转化成日期</value>
|
||||
</data>
|
||||
<data name="ValueNotSmartDateException" xml:space="preserve">
|
||||
<value>数值不是SmartDate 类型</value>
|
||||
</data>
|
||||
<data name="NoPrincipalAllowedException" xml:space="preserve">
|
||||
<value>使用视窗集成的安全模式时, 不能将主名对象传送给DataPortal</value>
|
||||
</data>
|
||||
<data name="BusinessPrincipalException" xml:space="preserve">
|
||||
<value>主名必须是 BusinessPrincipal 的类型, 不能是</value>
|
||||
</data>
|
||||
<data name="SmartDateT" xml:space="preserve">
|
||||
<value>今天</value>
|
||||
</data>
|
||||
<data name="SmartDateToday" xml:space="preserve">
|
||||
<value>今天</value>
|
||||
</data>
|
||||
<data name="SmartDateY" xml:space="preserve">
|
||||
<value>昨天</value>
|
||||
</data>
|
||||
<data name="SmartDateYesterday" xml:space="preserve">
|
||||
<value>昨天</value>
|
||||
</data>
|
||||
<data name="SmartDateTom" xml:space="preserve">
|
||||
<value>明天</value>
|
||||
</data>
|
||||
<data name="SmartDateTomorrow" xml:space="preserve">
|
||||
<value>明天</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>失败</value>
|
||||
</data>
|
||||
<data name="FailedOnServer" xml:space="preserve">
|
||||
<value>伺服器出错</value>
|
||||
</data>
|
||||
<data name="MethodCallFailed" xml:space="preserve">
|
||||
<value>调用函数失败</value>
|
||||
</data>
|
||||
<data name="MethodNotImplemented" xml:space="preserve">
|
||||
<value>尚未实现</value>
|
||||
</data>
|
||||
<data name="ExecuteNotSupportedException" xml:space="preserve">
|
||||
<value>非法操作 – 不允许执行</value>
|
||||
</data>
|
||||
<data name="InsertNotSupportedException" xml:space="preserve">
|
||||
<value>非法操作 – 不允许插入</value>
|
||||
</data>
|
||||
<data name="GetIdValueCantBeNull" xml:space="preserve">
|
||||
<value>GetIdValue 返回值不能是空值 (Nothing)</value>
|
||||
</data>
|
||||
<data name="PropertyGetNotAllowed" xml:space="preserve">
|
||||
<value>不允许 get 属性</value>
|
||||
</data>
|
||||
<data name="PropertySetNotAllowed" xml:space="preserve">
|
||||
<value>不允许 set 属性</value>
|
||||
</data>
|
||||
<data name="NothingNotValid" xml:space="preserve">
|
||||
<value>参数不能是空值 (Nothing)</value>
|
||||
</data>
|
||||
<data name="PrimitiveTypeRequired" xml:space="preserve">
|
||||
<value>参数的类型必须是基本类型之一</value>
|
||||
</data>
|
||||
<data name="PropertyCopyFailed" xml:space="preserve">
|
||||
<value>拷贝属性失败</value>
|
||||
</data>
|
||||
</root>
|
||||
36
PROMS/csla20cs-2.1.4-070223/csla20cs/csla20cs/Csla/Properties/Settings.Designer.cs
generated
Normal file
36
PROMS/csla20cs-2.1.4-070223/csla20cs/csla20cs/Csla/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,36 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18408
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Csla.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("http://localhost:4804/WSPortalcs/Service.asmx")]
|
||||
public string Csla_WebServiceHost_WebServicePortal {
|
||||
get {
|
||||
return ((string)(this["Csla_WebServiceHost_WebServicePortal"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Csla.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="Csla_WebServiceHost_WebServicePortal" Type="(Web Service URL)" Scope="Application">
|
||||
<Value Profile="(Default)">http://localhost:4804/WSPortalcs/Service.asmx</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,438 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Csla.Properties;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// This is a base class from which readonly business classes
|
||||
/// can be derived.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This base class only supports data retrieve, not updating or
|
||||
/// deleting. Any business classes derived from this base class
|
||||
/// should only implement readonly properties.
|
||||
/// </remarks>
|
||||
/// <typeparam name="T">Type of the business object.</typeparam>
|
||||
[Serializable()]
|
||||
public abstract class ReadOnlyBase<T> : ICloneable, Core.IReadOnlyObject, Csla.Security.IAuthorizeReadWrite
|
||||
where T : ReadOnlyBase<T>
|
||||
{
|
||||
#region Object ID Value
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to return a unique identifying
|
||||
/// vlaue for this object.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If you can not provide a unique identifying value, it
|
||||
/// is best if you can generate such a unique value (even
|
||||
/// temporarily). If you can not do that, then return
|
||||
/// <see langword="Nothing"/> and then manually override the
|
||||
/// <see cref="Equals"/>, <see cref="GetHashCode"/> and
|
||||
/// <see cref="ToString"/> methods in your business object.
|
||||
/// </remarks>
|
||||
protected abstract object GetIdValue();
|
||||
|
||||
#endregion
|
||||
|
||||
#region System.Object Overrides
|
||||
|
||||
/// <summary>
|
||||
/// Compares this object for equality with another object, using
|
||||
/// the results of <see cref="GetIdValue"/> to determine
|
||||
/// equality.
|
||||
/// </summary>
|
||||
/// <param name="obj">The object to be compared.</param>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is T)
|
||||
{
|
||||
object id = GetIdValue();
|
||||
if (id == null)
|
||||
throw new ArgumentException(Resources.GetIdValueCantBeNull);
|
||||
return id.Equals(((T)obj).GetIdValue());
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a hash code value for this object, based on
|
||||
/// the results of <see cref="GetIdValue"/>.
|
||||
/// </summary>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
object id = GetIdValue();
|
||||
if (id == null)
|
||||
throw new ArgumentException(Resources.GetIdValueCantBeNull);
|
||||
return id.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a text representation of this object by
|
||||
/// returning the <see cref="GetIdValue"/> value
|
||||
/// in text form.
|
||||
/// </summary>
|
||||
public override string ToString()
|
||||
{
|
||||
object id = GetIdValue();
|
||||
if (id == null)
|
||||
throw new ArgumentException(Resources.GetIdValueCantBeNull);
|
||||
return id.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
protected ReadOnlyBase()
|
||||
{
|
||||
Initialize();
|
||||
AddInstanceAuthorizationRules();
|
||||
if (!Security.SharedAuthorizationRules.RulesExistFor(this.GetType()))
|
||||
{
|
||||
lock (this.GetType())
|
||||
{
|
||||
if (!Security.SharedAuthorizationRules.RulesExistFor(this.GetType()))
|
||||
AddAuthorizationRules();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Initialize
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to set up event handlers so user
|
||||
/// code in a partial class can respond to events raised by
|
||||
/// generated code.
|
||||
/// </summary>
|
||||
protected virtual void Initialize()
|
||||
{ /* allows subclass to initialize events before any other activity occurs */ }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Authorization
|
||||
|
||||
[NotUndoable()]
|
||||
[NonSerialized()]
|
||||
private Dictionary<string, bool> _readResultCache;
|
||||
[NotUndoable()]
|
||||
[NonSerialized()]
|
||||
private System.Security.Principal.IPrincipal _lastPrincipal;
|
||||
|
||||
[NotUndoable()]
|
||||
[NonSerialized()]
|
||||
private Security.AuthorizationRules _authorizationRules;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to add authorization
|
||||
/// rules for your object's properties.
|
||||
/// </summary>
|
||||
protected virtual void AddInstanceAuthorizationRules()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to add per-type
|
||||
/// authorization rules for your type's properties.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// AddSharedAuthorizationRules is automatically called by CSLA .NET
|
||||
/// when your object should associate per-type authorization roles
|
||||
/// with its properties.
|
||||
/// </remarks>
|
||||
protected virtual void AddAuthorizationRules()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the AuthorizationRules object for this
|
||||
/// object.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Use this object to add a list of allowed and denied roles for
|
||||
/// reading and writing properties of the object. Typically these
|
||||
/// values are added once when the business object is instantiated.
|
||||
/// </remarks>
|
||||
protected Security.AuthorizationRules AuthorizationRules
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_authorizationRules == null)
|
||||
_authorizationRules = new Security.AuthorizationRules(this.GetType());
|
||||
return _authorizationRules;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns <see langword="true" /> if the user is allowed to read the
|
||||
/// calling property.
|
||||
/// </summary>
|
||||
/// <returns><see langword="true" /> if read is allowed.</returns>
|
||||
/// <param name="throwOnFalse">Indicates whether a negative
|
||||
/// result should cause an exception.</param>
|
||||
[System.Runtime.CompilerServices.MethodImpl(
|
||||
System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
public bool CanReadProperty(bool throwOnFalse)
|
||||
{
|
||||
string propertyName =
|
||||
new System.Diagnostics.StackTrace().GetFrame(1).GetMethod().Name.Substring(4);
|
||||
bool result = CanReadProperty(propertyName);
|
||||
if (throwOnFalse && result == false)
|
||||
throw new System.Security.SecurityException(
|
||||
string.Format("{0} ({1})",
|
||||
Resources.PropertyGetNotAllowed, propertyName));
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns <see langword="true" /> if the user is allowed to read the
|
||||
/// calling property.
|
||||
/// </summary>
|
||||
/// <returns><see langword="true" /> if read is allowed.</returns>
|
||||
/// <param name="propertyName">Name of the property to read.</param>
|
||||
/// <param name="throwOnFalse">Indicates whether a negative
|
||||
/// result should cause an exception.</param>
|
||||
public bool CanReadProperty(string propertyName, bool throwOnFalse)
|
||||
{
|
||||
bool result = CanReadProperty(propertyName);
|
||||
if (throwOnFalse && result == false)
|
||||
throw new System.Security.SecurityException(
|
||||
string.Format("{0} ({1})",
|
||||
Resources.PropertyGetNotAllowed, propertyName));
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns <see langword="true" /> if the user is allowed to read the
|
||||
/// calling property.
|
||||
/// </summary>
|
||||
/// <returns><see langword="true" /> if read is allowed.</returns>
|
||||
public bool CanReadProperty()
|
||||
{
|
||||
string propertyName =
|
||||
new System.Diagnostics.StackTrace().GetFrame(1).GetMethod().Name.Substring(4);
|
||||
return CanReadProperty(propertyName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns <see langword="true" /> if the user is allowed to read the
|
||||
/// specified property.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property to read.</param>
|
||||
/// <returns><see langword="true" /> if read is allowed.</returns>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// If a list of allowed roles is provided then only users in those
|
||||
/// roles can read. If no list of allowed roles is provided then
|
||||
/// the list of denied roles is checked.
|
||||
/// </para><para>
|
||||
/// If a list of denied roles is provided then users in the denied
|
||||
/// roles are denied read access. All other users are allowed.
|
||||
/// </para><para>
|
||||
/// If neither a list of allowed nor denied roles is provided then
|
||||
/// all users will have read access.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
public virtual bool CanReadProperty(string propertyName)
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
VerifyAuthorizationCache();
|
||||
|
||||
if (_readResultCache.ContainsKey(propertyName))
|
||||
{
|
||||
// cache contains value - get cached value
|
||||
result = _readResultCache[propertyName];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (AuthorizationRules.HasReadAllowedRoles(propertyName))
|
||||
{
|
||||
// some users are explicitly granted read access
|
||||
// in which case all other users are denied.
|
||||
if (!AuthorizationRules.IsReadAllowed(propertyName))
|
||||
result = false;
|
||||
}
|
||||
else if (AuthorizationRules.HasReadDeniedRoles(propertyName))
|
||||
{
|
||||
// some users are explicitly denied read access.
|
||||
if (AuthorizationRules.IsReadDenied(propertyName))
|
||||
result = false;
|
||||
}
|
||||
// store value in cache
|
||||
_readResultCache[propertyName] = result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool Csla.Security.IAuthorizeReadWrite.CanWriteProperty(string propertyName)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private void VerifyAuthorizationCache()
|
||||
{
|
||||
if (_readResultCache == null)
|
||||
_readResultCache = new Dictionary<string, bool>();
|
||||
if (!ReferenceEquals(Csla.ApplicationContext.User, _lastPrincipal))
|
||||
{
|
||||
// the principal has changed - reset the cache
|
||||
_readResultCache.Clear();
|
||||
_lastPrincipal = Csla.ApplicationContext.User;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IClonable
|
||||
|
||||
object ICloneable.Clone()
|
||||
{
|
||||
return GetClone();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a clone of the object.
|
||||
/// </summary>
|
||||
/// <returns>A new object containing the exact data of the original object.</returns>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
public virtual object GetClone()
|
||||
{
|
||||
return Core.ObjectCloner.Clone(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a clone of the object.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// A new object containing the exact data of the original object.
|
||||
/// </returns>
|
||||
public T Clone()
|
||||
{
|
||||
return (T)GetClone();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Data Access
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "criteria")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
private void DataPortal_Create(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Resources.CreateNotSupportedException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to allow retrieval of an existing business
|
||||
/// object based on data in the database.
|
||||
/// </summary>
|
||||
/// <param name="criteria">An object containing criteria values to identify the object.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
protected virtual void DataPortal_Fetch(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Resources.FetchNotSupportedException);
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
private void DataPortal_Update()
|
||||
{
|
||||
throw new NotSupportedException(Resources.UpdateNotSupportedException);
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "criteria")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
private void DataPortal_Delete(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Resources.DeleteNotSupportedException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal prior to calling the
|
||||
/// requested DataPortal_xyz method.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalInvoke(DataPortalEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal after calling the
|
||||
/// requested DataPortal_xyz method.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalInvokeComplete(DataPortalEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal if an exception
|
||||
/// occurs during data access.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
/// <param name="ex">The Exception thrown during data access.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalException(DataPortalEventArgs e, Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Serialization Notification
|
||||
|
||||
[OnDeserialized()]
|
||||
private void OnDeserializedHandler(StreamingContext context)
|
||||
{
|
||||
OnDeserialized(context);
|
||||
AddInstanceAuthorizationRules();
|
||||
if (!Security.SharedAuthorizationRules.RulesExistFor(this.GetType()))
|
||||
{
|
||||
lock (this.GetType())
|
||||
{
|
||||
if (!Security.SharedAuthorizationRules.RulesExistFor(this.GetType()))
|
||||
AddAuthorizationRules();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called on a newly deserialized object
|
||||
/// after deserialization is complete.
|
||||
/// </summary>
|
||||
/// <param name="context">Serialization context object.</param>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void OnDeserialized(StreamingContext context)
|
||||
{
|
||||
// do nothing - this is here so a subclass
|
||||
// could override if needed
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Csla.Properties;
|
||||
|
||||
namespace Csla
|
||||
{
|
||||
/// <summary>
|
||||
/// This is the base class from which readonly collections
|
||||
/// of readonly objects should be derived.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Type of the list class.</typeparam>
|
||||
/// <typeparam name="C">Type of child objects contained in the list.</typeparam>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage(
|
||||
"Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
|
||||
[Serializable()]
|
||||
public abstract class ReadOnlyListBase<T, C> :
|
||||
Core.ReadOnlyBindingList<C>, Csla.Core.IReadOnlyCollection,
|
||||
ICloneable
|
||||
where T : ReadOnlyListBase<T, C>
|
||||
{
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
protected ReadOnlyListBase()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Initialize
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to set up event handlers so user
|
||||
/// code in a partial class can respond to events raised by
|
||||
/// generated code.
|
||||
/// </summary>
|
||||
protected virtual void Initialize()
|
||||
{ /* allows subclass to initialize events before any other activity occurs */ }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ICloneable
|
||||
|
||||
object ICloneable.Clone()
|
||||
{
|
||||
return GetClone();
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates a clone of the object.
|
||||
/// </summary>
|
||||
/// <returns>A new object containing the exact data of the original object.</returns>
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual object GetClone()
|
||||
{
|
||||
return Core.ObjectCloner.Clone(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a clone of the object.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// A new object containing the exact data of the original object.
|
||||
/// </returns>
|
||||
public T Clone()
|
||||
{
|
||||
return (T)GetClone();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Data Access
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "criteria")]
|
||||
private void DataPortal_Create(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Resources.CreateNotSupportedException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override this method to allow retrieval of an existing business
|
||||
/// object based on data in the database.
|
||||
/// </summary>
|
||||
/// <param name="criteria">An object containing criteria values to identify the object.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
protected virtual void DataPortal_Fetch(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Resources.FetchNotSupportedException);
|
||||
}
|
||||
|
||||
private void DataPortal_Update()
|
||||
{
|
||||
throw new NotSupportedException(Resources.UpdateNotSupportedException);
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "criteria")]
|
||||
private void DataPortal_Delete(object criteria)
|
||||
{
|
||||
throw new NotSupportedException(Resources.DeleteNotSupportedException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal prior to calling the
|
||||
/// requested DataPortal_xyz method.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalInvoke(DataPortalEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal after calling the
|
||||
/// requested DataPortal_xyz method.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalInvokeComplete(DataPortalEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by the server-side DataPortal if an exception
|
||||
/// occurs during data access.
|
||||
/// </summary>
|
||||
/// <param name="e">The DataPortalContext object passed to the DataPortal.</param>
|
||||
/// <param name="ex">The Exception thrown during data access.</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", MessageId = "Member")]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
protected virtual void DataPortal_OnDataPortalException(DataPortalEventArgs e, Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
namespace Csla.Security
|
||||
{
|
||||
/// <summary>
|
||||
/// The access types supported by authorization
|
||||
/// as discussed in Chapter 3.
|
||||
/// </summary>
|
||||
public enum AccessType
|
||||
{
|
||||
/// <summary>
|
||||
/// Roles allowed to read property.
|
||||
/// </summary>
|
||||
ReadAllowed,
|
||||
/// <summary>
|
||||
/// Roles denied read access to property.
|
||||
/// </summary>
|
||||
ReadDenied,
|
||||
/// <summary>
|
||||
/// Roles allowed to set property.
|
||||
/// </summary>
|
||||
WriteAllowed,
|
||||
/// <summary>
|
||||
/// Roles denied write access to property.
|
||||
/// </summary>
|
||||
WriteDenied
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,324 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Csla.Security
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Maintains a list of allowed and denied user roles
|
||||
/// for each property.
|
||||
/// </summary>
|
||||
/// <remarks></remarks>
|
||||
[Serializable()]
|
||||
public class AuthorizationRules
|
||||
{
|
||||
|
||||
private Type _businessObjectType;
|
||||
private AuthorizationRulesManager _typeRules;
|
||||
private AuthorizationRulesManager _instanceRules;
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object, initializing
|
||||
/// it with the business object type.
|
||||
/// </summary>
|
||||
/// <param name="businessObjectType">
|
||||
/// Type of the business object to which the rules
|
||||
/// apply.
|
||||
/// </param>
|
||||
public AuthorizationRules(Type businessObjectType)
|
||||
{
|
||||
_businessObjectType = businessObjectType;
|
||||
}
|
||||
|
||||
private AuthorizationRulesManager InstanceRules
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instanceRules == null)
|
||||
_instanceRules = new AuthorizationRulesManager();
|
||||
return _instanceRules;
|
||||
}
|
||||
}
|
||||
|
||||
private AuthorizationRulesManager TypeRules
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_typeRules == null)
|
||||
_typeRules = SharedAuthorizationRules.GetManager(_businessObjectType, true);
|
||||
return _typeRules;
|
||||
}
|
||||
}
|
||||
|
||||
#region Add Per-Instance Roles
|
||||
|
||||
/// <summary>
|
||||
/// Specify the roles allowed to read a given
|
||||
/// property.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
/// <param name="roles">List of roles granted read access.</param>
|
||||
/// <remarks>
|
||||
/// This method may be called multiple times, with the roles in
|
||||
/// each call being added to the end of the list of allowed roles.
|
||||
/// In other words, each call is cumulative, adding more roles
|
||||
/// to the list.
|
||||
/// </remarks>
|
||||
public void InstanceAllowRead(string propertyName, params string[] roles)
|
||||
{
|
||||
RolesForProperty currentRoles = InstanceRules.GetRolesForProperty(propertyName);
|
||||
foreach (string item in roles)
|
||||
currentRoles.ReadAllowed.Add(item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify the roles denied read access to
|
||||
/// a given property.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
/// <param name="roles">List of roles denied read access.</param>
|
||||
/// <remarks>
|
||||
/// This method may be called multiple times, with the roles in
|
||||
/// each call being added to the end of the list of denied roles.
|
||||
/// In other words, each call is cumulative, adding more roles
|
||||
/// to the list.
|
||||
/// </remarks>
|
||||
public void InstanceDenyRead(string propertyName, params string[] roles)
|
||||
{
|
||||
RolesForProperty currentRoles = InstanceRules.GetRolesForProperty(propertyName);
|
||||
foreach (string item in roles)
|
||||
currentRoles.ReadDenied.Add(item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify the roles allowed to write a given
|
||||
/// property.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
/// <param name="roles">List of roles granted write access.</param>
|
||||
/// <remarks>
|
||||
/// This method may be called multiple times, with the roles in
|
||||
/// each call being added to the end of the list of allowed roles.
|
||||
/// In other words, each call is cumulative, adding more roles
|
||||
/// to the list.
|
||||
/// </remarks>
|
||||
public void InstanceAllowWrite(string propertyName, params string[] roles)
|
||||
{
|
||||
RolesForProperty currentRoles = InstanceRules.GetRolesForProperty(propertyName);
|
||||
foreach (string item in roles)
|
||||
currentRoles.WriteAllowed.Add(item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify the roles denied write access to
|
||||
/// a given property.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
/// <param name="roles">List of roles denied write access.</param>
|
||||
/// <remarks>
|
||||
/// This method may be called multiple times, with the roles in
|
||||
/// each call being added to the end of the list of denied roles.
|
||||
/// In other words, each call is cumulative, adding more roles
|
||||
/// to the list.
|
||||
/// </remarks>
|
||||
public void InstanceDenyWrite(string propertyName, params string[] roles)
|
||||
{
|
||||
RolesForProperty currentRoles = InstanceRules.GetRolesForProperty(propertyName);
|
||||
foreach (string item in roles)
|
||||
currentRoles.WriteDenied.Add(item);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Add Per-Type Roles
|
||||
|
||||
/// <summary>
|
||||
/// Specify the roles allowed to read a given
|
||||
/// property.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
/// <param name="roles">List of roles granted read access.</param>
|
||||
/// <remarks>
|
||||
/// This method may be called multiple times, with the roles in
|
||||
/// each call being added to the end of the list of allowed roles.
|
||||
/// In other words, each call is cumulative, adding more roles
|
||||
/// to the list.
|
||||
/// </remarks>
|
||||
public void AllowRead(string propertyName, params string[] roles)
|
||||
{
|
||||
RolesForProperty currentRoles = TypeRules.GetRolesForProperty(propertyName);
|
||||
foreach (string item in roles)
|
||||
currentRoles.ReadAllowed.Add(item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify the roles denied read access to
|
||||
/// a given property.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
/// <param name="roles">List of roles denied read access.</param>
|
||||
/// <remarks>
|
||||
/// This method may be called multiple times, with the roles in
|
||||
/// each call being added to the end of the list of denied roles.
|
||||
/// In other words, each call is cumulative, adding more roles
|
||||
/// to the list.
|
||||
/// </remarks>
|
||||
public void DenyRead(string propertyName, params string[] roles)
|
||||
{
|
||||
RolesForProperty currentRoles = TypeRules.GetRolesForProperty(propertyName);
|
||||
foreach (string item in roles)
|
||||
currentRoles.ReadDenied.Add(item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify the roles allowed to write a given
|
||||
/// property.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
/// <param name="roles">List of roles granted write access.</param>
|
||||
/// <remarks>
|
||||
/// This method may be called multiple times, with the roles in
|
||||
/// each call being added to the end of the list of allowed roles.
|
||||
/// In other words, each call is cumulative, adding more roles
|
||||
/// to the list.
|
||||
/// </remarks>
|
||||
public void AllowWrite(string propertyName, params string[] roles)
|
||||
{
|
||||
RolesForProperty currentRoles = TypeRules.GetRolesForProperty(propertyName);
|
||||
foreach (string item in roles)
|
||||
currentRoles.WriteAllowed.Add(item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify the roles denied write access to
|
||||
/// a given property.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
/// <param name="roles">List of roles denied write access.</param>
|
||||
/// <remarks>
|
||||
/// This method may be called multiple times, with the roles in
|
||||
/// each call being added to the end of the list of denied roles.
|
||||
/// In other words, each call is cumulative, adding more roles
|
||||
/// to the list.
|
||||
/// </remarks>
|
||||
public void DenyWrite(string propertyName, params string[] roles)
|
||||
{
|
||||
RolesForProperty currentRoles = TypeRules.GetRolesForProperty(propertyName);
|
||||
foreach (string item in roles)
|
||||
currentRoles.WriteDenied.Add(item);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Check Roles
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the property has a list
|
||||
/// of roles granted read access.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
public bool HasReadAllowedRoles(string propertyName)
|
||||
{
|
||||
if (InstanceRules.GetRolesForProperty(propertyName).ReadAllowed.Count > 0)
|
||||
return true;
|
||||
return TypeRules.GetRolesForProperty(propertyName).ReadAllowed.Count > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the current user as defined by
|
||||
/// <see cref="Csla.ApplicationContext.User" />
|
||||
/// is explicitly allowed to read the property.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
public bool IsReadAllowed(string propertyName)
|
||||
{
|
||||
System.Security.Principal.IPrincipal user = ApplicationContext.User;
|
||||
if (InstanceRules.GetRolesForProperty(propertyName).IsReadAllowed(user))
|
||||
return true;
|
||||
return TypeRules.GetRolesForProperty(propertyName).IsReadAllowed(user);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the property has a list
|
||||
/// of roles denied read access.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
public bool HasReadDeniedRoles(string propertyName)
|
||||
{
|
||||
if (InstanceRules.GetRolesForProperty(propertyName).ReadDenied.Count > 0)
|
||||
return true;
|
||||
return TypeRules.GetRolesForProperty(propertyName).ReadDenied.Count > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the current user as defined by
|
||||
/// <see cref="Csla.ApplicationContext.User" />
|
||||
/// is explicitly denied read access to the property.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
public bool IsReadDenied(string propertyName)
|
||||
{
|
||||
System.Security.Principal.IPrincipal user = ApplicationContext.User;
|
||||
if (InstanceRules.GetRolesForProperty(propertyName).IsReadDenied(user))
|
||||
return true;
|
||||
return TypeRules.GetRolesForProperty(propertyName).IsReadDenied(user);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the property has a list
|
||||
/// of roles granted write access.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
public bool HasWriteAllowedRoles(string propertyName)
|
||||
{
|
||||
if (InstanceRules.GetRolesForProperty(propertyName).WriteAllowed.Count > 0)
|
||||
return true;
|
||||
return TypeRules.GetRolesForProperty(propertyName).WriteAllowed.Count > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the current user as defined by
|
||||
/// <see cref="Csla.ApplicationContext.User" />
|
||||
/// is explicitly allowed to set the property.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
public bool IsWriteAllowed(string propertyName)
|
||||
{
|
||||
System.Security.Principal.IPrincipal user = ApplicationContext.User;
|
||||
if (InstanceRules.GetRolesForProperty(propertyName).IsWriteAllowed(user))
|
||||
return true;
|
||||
return TypeRules.GetRolesForProperty(propertyName).IsWriteAllowed(user);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the property has a list
|
||||
/// of roles denied write access.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
public bool HasWriteDeniedRoles(string propertyName)
|
||||
{
|
||||
if (InstanceRules.GetRolesForProperty(propertyName).WriteDenied.Count > 0)
|
||||
return true;
|
||||
return TypeRules.GetRolesForProperty(propertyName).WriteDenied.Count > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the current user as defined by
|
||||
/// <see cref="Csla.ApplicationContext.User" />
|
||||
/// is explicitly denied write access to the property.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
public bool IsWriteDenied(string propertyName)
|
||||
{
|
||||
System.Security.Principal.IPrincipal user = ApplicationContext.User;
|
||||
if (InstanceRules.GetRolesForProperty(propertyName).IsWriteDenied(user))
|
||||
return true;
|
||||
return TypeRules.GetRolesForProperty(propertyName).IsWriteDenied(user);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Csla.Security
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Maintains authorization roles for a business object
|
||||
/// or business object type.
|
||||
/// </summary>
|
||||
public class AuthorizationRulesManager
|
||||
{
|
||||
private Dictionary<string, RolesForProperty> _rules;
|
||||
|
||||
internal Dictionary<string, RolesForProperty> RulesList
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_rules == null)
|
||||
_rules = new Dictionary<string, RolesForProperty>();
|
||||
return _rules;
|
||||
}
|
||||
}
|
||||
|
||||
#region Get Roles
|
||||
|
||||
internal RolesForProperty GetRolesForProperty(string propertyName)
|
||||
{
|
||||
RolesForProperty currentRoles = null;
|
||||
if (!RulesList.ContainsKey(propertyName))
|
||||
{
|
||||
currentRoles = new RolesForProperty();
|
||||
RulesList.Add(propertyName, currentRoles);
|
||||
}
|
||||
else
|
||||
currentRoles = RulesList[propertyName];
|
||||
return currentRoles;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Security.Principal;
|
||||
|
||||
namespace Csla.Security
|
||||
{
|
||||
/// <summary>
|
||||
/// Base class from which custom principal
|
||||
/// objects should inherit to operate
|
||||
/// properly with the data portal.
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
public class BusinessPrincipalBase : IPrincipal
|
||||
{
|
||||
private IIdentity _identity;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the user's identity object.
|
||||
/// </summary>
|
||||
public virtual IIdentity Identity
|
||||
{
|
||||
get { return _identity; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a value indicating whether the
|
||||
/// user is in a given role.
|
||||
/// </summary>
|
||||
/// <param name="role">Name of the role.</param>
|
||||
public virtual bool IsInRole(string role)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the object.
|
||||
/// </summary>
|
||||
/// <param name="identity">Identity object for the user.</param>
|
||||
protected BusinessPrincipalBase(IIdentity identity)
|
||||
{
|
||||
_identity = identity;
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user