/// /// Copyright © 2003-2008 JetBrains s.r.o. /// You may distribute under the terms of the GNU General Public License, as published by the Free Software Foundation, version 2 (see License.txt in the repository root folder). /// using System; namespace JetBrains.Omea.OpenApiEx { /// /// Arguments that define a resource object. /// public class ResourceObjectEventArgs : EventArgs { protected readonly IResourceObject _resourceobject; public ResourceObjectEventArgs(IResourceObject resourceobject) { if(resourceobject == null) throw new ArgumentNullException("resourceobject"); _resourceobject = resourceobject; } /// /// Gets the resource object. It is guaranteed not to be Null. /// public IResourceObject ResourceObject { get { return _resourceobject; } } } /// /// Arguments that accept a resource object from the handler. /// public class ResourceObjectOutByNameEventArgs : EventArgs where T : class, IResourceObject { protected readonly string _name; protected T _resourceobject = null; public ResourceObjectOutByNameEventArgs(string name) { _name = name; } /// /// Gets the name of the resource object to be returned by the handler. /// public string Name { get { return _name; } } /// /// Gets or sets the resource object. /// May be Null if not yet set. /// Must be specified by the handler. /// public T ResourceObject { get { return _resourceobject; } set { _resourceobject = value; } } } }