This commit is contained in:
2018-06-29 19:47:36 +00:00
commit be7f501333
3769 changed files with 1425961 additions and 0 deletions

View File

@@ -0,0 +1 @@
CSLA.Core.BindableBase.xml

View File

@@ -0,0 +1,60 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// 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.Core.BindableBase")]
[assembly: AssemblyDescription("CSLA .NET framework MODIFIED FROM ORIGINAL SIGNIFICANTLY")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Rockford Lhotka MODIFIED FROM ORIGINAL SIGNIFICANTLY")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("Copyright 2003 Rockford Lhotka. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// 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("7.5.0.0")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto WorkorderService
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("..\\..\\..\\..\\..\\keys\\AyaNova.snk")]
//[assembly: AssemblyKeyName("")]
//[assembly:System.CLSCompliant(true)]
[assembly: AssemblyFileVersionAttribute("7.5.0.0")]

View File

@@ -0,0 +1,27 @@
using System;
namespace CSLA.Core
{
/// <summary>
/// This base class declares the IsDirtyChanged event
/// to be NonSerialized so serialization will work.
/// </summary>
[Serializable()]
public abstract class BindableBase
{
/// <summary>
/// Declares a serialization-safe IsDirtyChanged event.
/// </summary>
[field: NonSerialized]
public event EventHandler IsDirtyChanged;
/// <summary>
/// Call this method to raise the IsDirtyChanged event.
/// </summary>
virtual protected void OnIsDirtyChanged()
{
if (IsDirtyChanged != null)
IsDirtyChanged(this, EventArgs.Empty);
}
}
}

View File

@@ -0,0 +1,242 @@
using System;
using System.Collections;
using System.ComponentModel;
namespace CSLA.Core
{
/// <summary>
/// This is a base class that exposes an implementation
/// of IBindableList that does nothing other than
/// create a nonserialized version of the listchanged
/// event.
/// </summary>
[Serializable]
public abstract class BindableCollectionBase : CollectionBase, IBindingList
{
#region Protected control variables
/// <summary>
/// Set this to True to allow data binding to add new
/// child objects to the collection.
/// </summary>
/// <remarks>
/// If you set this to True, you must also override the OnAddNew
/// method. You must also set AllowEdit to True.
/// </remarks>
protected bool AllowNew = false;
/// <summary>
/// Set this to True to allow data binding to do in-place
/// editing of child objects in a grid control.
/// </summary>
protected bool AllowEdit = false;
/// <summary>
/// Set this to True to allow data binding to automatically
/// remove child objects from the collection.
/// </summary>
protected bool AllowRemove = false;
/// <summary>
/// Set this to True to allow this collection to be sorted.
/// </summary>
/// <remarks>
/// <para>
/// There is an overhead cost to enabling sorting. Specifically,
/// the collection must contain an internal collection containing
/// the original order of the items in the collection, so the order
/// can be reset if the sort is removed.
/// </para><para>
/// This overhead is only incurred if AllowSort is set to True, and is
/// only a major concern if you are using a remote DataPortal. The concern
/// there is that this extra collection must also be serialized, thus
/// increasing the overall amount of data sent across the wire.
/// </para>
/// </remarks>
protected bool AllowSort = false;
/// <summary>
/// Set this to True to allow this collection to be
/// searched.
/// </summary>
protected bool AllowFind = false;
#endregion
#region ListChanged event
/// <summary>
/// Declares a serialization-safe ListChanged event.
/// </summary>
[field: NonSerialized]
public event System.ComponentModel.ListChangedEventHandler ListChanged;
/// <summary>
/// Call this method to raise the ListChanged event.
/// </summary>
virtual protected void OnListChanged(System.ComponentModel.ListChangedEventArgs e)
{
if (ListChanged != null)
ListChanged(this, e);
}
#endregion
#region Collection events
// *******************************************************************
/// <summary>
/// Ensures that the OnListChanged event is raised when a
/// new child is inserted.
/// </summary>
override protected void OnInsertComplete(int index, object value)
{
OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, index));
}
/// <summary>
/// Ensures that the OnListChanged event is raised when the
/// list is cleared.
/// </summary>
override protected void OnClearComplete()
{
OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, 0));
}
/// <summary>
/// Ensures that the OnListChanged event is raised when an
/// item is removed.
/// </summary>
override protected void OnRemoveComplete(int index, object value)
{
OnListChanged(new ListChangedEventArgs(ListChangedType.ItemDeleted, index));
}
/// <summary>
/// Ensures that the OnListChanged event is raised when an
/// item is changed.
/// </summary>
override protected void OnSetComplete(int index, object oldValue, object newValue)
{
OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, index));
}
#endregion
#region IBindingList interface
// *******************************************************************
// This is most of the IBindingList interface.
// Notice that each of these implementations merely
// calls a virtual method, so subclasses can override those
// methods and provide the actual implementation of the interface
object IBindingList.AddNew() { return OnAddNew(); }
bool IBindingList.AllowEdit { get { return AllowEdit; } }
bool IBindingList.AllowNew { get { return AllowNew; } }
bool IBindingList.AllowRemove { get { return AllowRemove; } }
bool IBindingList.SupportsSearching { get { return AllowFind; } }
bool IBindingList.SupportsSorting { get { return AllowSort; } }
bool IBindingList.SupportsChangeNotification { get { return true; } }
int IBindingList.Find(System.ComponentModel.PropertyDescriptor property, object key)
{
return IBindingList_Find(property, key);
}
void IBindingList.AddIndex(System.ComponentModel.PropertyDescriptor property) {}
void IBindingList.RemoveIndex(System.ComponentModel.PropertyDescriptor property) {}
void IBindingList.ApplySort(System.ComponentModel.PropertyDescriptor property, System.ComponentModel.ListSortDirection direction)
{
IBindingList_ApplySort(property, direction);
}
void IBindingList.RemoveSort()
{
IBindingList_RemoveSort();
}
bool IBindingList.IsSorted { get { return IBindingList_IsSorted; } }
System.ComponentModel.ListSortDirection IBindingList.SortDirection { get { return IBindingList_SortDirection; } }
System.ComponentModel.PropertyDescriptor IBindingList.SortProperty { get { return IBindingList_SortProperty; } }
#endregion
#region OnAddNew
// *******************************************************************
// The following methods allow a subclass to actually provide
// the implementation of adding a new child object
/// <summary>
/// Override this method to allow data binding to automatically
/// add new child objects to a collection.
/// </summary>
/// <returns></returns>
virtual protected object OnAddNew() { return null; }
#endregion
#region Search/Find
// *******************************************************************
// The following methods allow a subclass to actually provide
// the implementation of IBindingList searching
/// <summary>
/// Override this method to implement search/find functionality
/// for the collection.
/// </summary>
/// <param name="property">The property to search.</param>
/// <param name="key">The value to searched for.</param>
/// <returns></returns>
protected virtual int IBindingList_Find(PropertyDescriptor property, object key)
{
return -1;
}
#endregion
#region Sorting
// *******************************************************************
// The following methods allow a subclass to actually provide
// the implementation of IBindingList sorting
/// <summary>
/// Override this method to indicate whether your collection
/// is currently sorted. This returns False by default.
/// </summary>
protected virtual bool IBindingList_IsSorted
{ get{ return false;}}
/// <summary>
/// Override this method to return the property by which
/// the collection is sorted (if you implement sorting).
/// </summary>
protected virtual System.ComponentModel.PropertyDescriptor IBindingList_SortProperty
{ get{ return null;}}
/// <summary>
/// Override this method to return the current sort direction
/// (if you implement sorting).
/// </summary>
protected virtual ListSortDirection IBindingList_SortDirection
{ get{ return ListSortDirection.Ascending;}}
/// <summary>
/// Override this method to provide sorting functionality
/// (if you implement sorting).
/// </summary>
/// <param name="property">The property on which to sort.</param>
/// <param name="direction">The sort direction.</param>
protected virtual void IBindingList_ApplySort(PropertyDescriptor property, ListSortDirection direction) {}
/// <summary>
/// Override this method to remove any existing sort
/// (if you implement sorting).
/// </summary>
protected virtual void IBindingList_RemoveSort() {}
#endregion
}
}

View File

@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{C2392355-12A9-4197-A1D3-603C390B1E62}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>CSLA.Core.Bindablebase</AssemblyName>
<AssemblyOriginatorKeyFile>..\..\..\keys\AyaNova.snk</AssemblyOriginatorKeyFile>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<RootNamespace>CSLA.Core.Bindablebase</RootNamespace>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<SignAssembly>true</SignAssembly>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DocumentationFile>CSLA.Core.BindableBase.xml</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
<NoWarn>
</NoWarn>
<Optimize>false</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>false</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
<NoWarn>
</NoWarn>
<Optimize>true</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RELEASE AND DEPLOY BUILD|AnyCPU' ">
<OutputPath>bin\RELEASE AND DEPLOY BUILD\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<Optimize>true</Optimize>
<DebugType>
</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Name>System</Name>
</Reference>
<Reference Include="System.Data">
<Name>System.Data</Name>
</Reference>
<Reference Include="System.Xml">
<Name>System.XML</Name>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="BindableBase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="BindableCollectionBase.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\keys\AyaNova.snk">
<Link>AyaNova.snk</Link>
</None>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastOpenVersion>7.10.3077</LastOpenVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ReferencePath>
</ReferencePath>
<CopyProjectDestinationFolder>
</CopyProjectDestinationFolder>
<CopyProjectUncPath>
</CopyProjectUncPath>
<CopyProjectOption>0</CopyProjectOption>
<ProjectView>ProjectFiles</ProjectView>
<ProjectTrust>0</ProjectTrust>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<EnableASPDebugging>false</EnableASPDebugging>
<EnableASPXDebugging>false</EnableASPXDebugging>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
<RemoteDebugEnabled>false</RemoteDebugEnabled>
<RemoteDebugMachine>
</RemoteDebugMachine>
<StartAction>Project</StartAction>
<StartArguments>
</StartArguments>
<StartPage>
</StartPage>
<StartProgram>
</StartProgram>
<StartURL>
</StartURL>
<StartWorkingDirectory>
</StartWorkingDirectory>
<StartWithIE>false</StartWithIE>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<EnableASPDebugging>false</EnableASPDebugging>
<EnableASPXDebugging>false</EnableASPXDebugging>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
<RemoteDebugEnabled>false</RemoteDebugEnabled>
<RemoteDebugMachine>
</RemoteDebugMachine>
<StartAction>Project</StartAction>
<StartArguments>
</StartArguments>
<StartPage>
</StartPage>
<StartProgram>
</StartProgram>
<StartURL>
</StartURL>
<StartWorkingDirectory>
</StartWorkingDirectory>
<StartWithIE>false</StartWithIE>
</PropertyGroup>
</Project>