//******************************************************************************************************
// EventArgs.cs - Gbtc
//
// Copyright © 2012, Grid Protection Alliance. All Rights Reserved.
//
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may
// not use this file except in compliance with the License. You may obtain a copy of the License at:
//
// http://www.opensource.org/licenses/MIT
//
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
// License for the specific language governing permissions and limitations.
//
// Code Modification History:
// ----------------------------------------------------------------------------------------------------
// 11/12/2004 - J. Ritchie Carroll
// Initial version of source generated.
// 09/14/2009 - Stephen C. Wills
// Added new header and license agreement.
// 05/11/2011 - J. Ritchie Carroll
// Marked classes as serializable.
// 12/14/2012 - Starlynn Danyelle Gilliam
// Modified Header.
//
//******************************************************************************************************
#region [ Contributor License Agreements ]
/**************************************************************************\
Copyright © 2009 - J. Ritchie Carroll
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\**************************************************************************/
#endregion
using System;
using System.Diagnostics.CodeAnalysis;
namespace GSF
{
///
/// Represents a generic event arguments class with one data argument.
///
/// Type of data argument for this event arguments instance.
[Serializable]
public class EventArgs : EventArgs
{
///
/// Gets or sets the data argument for the event using for its .
///
public T Argument;
///
/// Initializes a new instance of the class.
///
public EventArgs()
: this(default(T))
{
}
///
/// Initializes a new instance of the class.
///
/// The argument data for the event.
public EventArgs(T argument)
{
Argument = argument;
}
}
///
/// Represents a generic event arguments class with two data arguments.
///
/// The type of the first data argument for this event arguments instance.
/// The type of the second data argument for this event arguments instance.
[Serializable]
public class EventArgs : EventArgs
{
///
/// Gets or sets the first data argument for the event using for its .
///
public T1 Argument1;
///
/// Gets or sets the second data argument for the event using for its .
///
public T2 Argument2;
///
/// Initializes a new instance of the class.
///
public EventArgs()
: this(default(T1), default(T2))
{
}
///
/// Initializes a new instance of the class.
///
/// The first data argument for the event.
/// The second data argument for the event.
public EventArgs(T1 argument1, T2 argument2)
{
Argument1 = argument1;
Argument2 = argument2;
}
}
///
/// Represents a generic event arguments class with three data arguments.
///
/// The type of the first data argument for this event arguments instance.
/// The type of the second data argument for this event arguments instance.
/// The type of the third data argument for this event arguments instance.
[SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes"), Serializable]
public class EventArgs : EventArgs
{
///
/// Gets or sets the first data argument for the event using for its .
///
public T1 Argument1;
///
/// Gets or sets the second data argument for the event using for its .
///
public T2 Argument2;
///
/// Gets or sets the third data argument for the event using for its .
///
public T3 Argument3;
///
/// Initializes a new instance of the class.
///
public EventArgs()
: this(default(T1), default(T2), default(T3))
{
}
///
/// Initializes a new instance of the class.
///
/// The first data argument for the event.
/// The second data argument for the event.
/// The third data argument for the event.
public EventArgs(T1 argument1, T2 argument2, T3 argument3)
{
Argument1 = argument1;
Argument2 = argument2;
Argument3 = argument3;
}
}
///
/// Represents a generic event arguments class with three data arguments.
///
/// The type of the first data argument for this event arguments instance.
/// The type of the second data argument for this event arguments instance.
/// The type of the third data argument for this event arguments instance.
/// The type of the fourth data argument for this event arguments instance.
[SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes"), Serializable]
public class EventArgs : EventArgs
{
///
/// Gets or sets the first data argument for the event using for its .
///
public T1 Argument1;
///
/// Gets or sets the second data argument for the event using for its .
///
public T2 Argument2;
///
/// Gets or sets the third data argument for the event using for its .
///
public T3 Argument3;
///
/// Gets or sets the fourth data argument for the event using for its .
///
public T4 Argument4;
///
/// Initializes a new instance of the class.
///
public EventArgs()
: this(default(T1), default(T2), default(T3), default(T4))
{
}
///
/// Initializes a new instance of the class.
///
/// The first data argument for the event.
/// The second data argument for the event.
/// The third data argument for the event.
/// The fourth data argument for the event.
public EventArgs(T1 argument1, T2 argument2, T3 argument3, T4 argument4)
{
Argument1 = argument1;
Argument2 = argument2;
Argument3 = argument3;
Argument4 = argument4;
}
}
}