This commit is contained in:
niko
2026-06-04 11:42:34 +02:00
parent f39ba70a9f
commit e720b98cd1
7488 changed files with 2493818 additions and 0 deletions
+151
View File
@@ -0,0 +1,151 @@
using System;
using System.Globalization;
namespace System.ComponentModel
{
/// <summary>Provides a type converter to convert <see cref="T:System.Array" /> objects to and from various other representations.</summary>
// Token: 0x02000052 RID: 82
public class ArrayConverter : CollectionConverter
{
/// <summary>Converts the given value object to the specified destination type.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the converted value.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="culture">The culture into which <paramref name="value" /> will be converted.</param>
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
/// <param name="destinationType">The <see cref="T:System.Type" /> to convert the value to. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="destinationType" /> is null. </exception>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x06000337 RID: 823 RVA: 0x0000A140 File Offset: 0x00008340
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
if (destinationType == null)
{
throw new ArgumentNullException("destinationType");
}
if (destinationType == typeof(string) && value is Array)
{
return value.GetType().Name + " Array";
}
return base.ConvertTo(context, culture, value, destinationType);
}
/// <summary>Gets a collection of properties for the type of array specified by the value parameter.</summary>
/// <returns>A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> with the properties that are exposed for an array, or null if there are no properties.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="value">An <see cref="T:System.Object" /> that specifies the type of array to get the properties for. </param>
/// <param name="attributes">An array of type <see cref="T:System.Attribute" /> that will be used as a filter. </param>
// Token: 0x06000338 RID: 824 RVA: 0x0000A19C File Offset: 0x0000839C
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
{
if (value == null)
{
throw new NullReferenceException();
}
PropertyDescriptorCollection propertyDescriptorCollection = new PropertyDescriptorCollection(null);
if (value is Array)
{
Array array = (Array)value;
for (int i = 0; i < array.Length; i++)
{
propertyDescriptorCollection.Add(new ArrayConverter.ArrayPropertyDescriptor(i, array.GetType()));
}
}
return propertyDescriptorCollection;
}
/// <summary>Gets a value indicating whether this object supports properties.</summary>
/// <returns>true because <see cref="M:System.ComponentModel.ArrayConverter.GetProperties(System.ComponentModel.ITypeDescriptorContext,System.Object,System.Attribute[])" /> should be called to find the properties of this object. This method never returns false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
// Token: 0x06000339 RID: 825 RVA: 0x0000A1FC File Offset: 0x000083FC
public override bool GetPropertiesSupported(ITypeDescriptorContext context)
{
return true;
}
// Token: 0x02000053 RID: 83
internal class ArrayPropertyDescriptor : PropertyDescriptor
{
// Token: 0x0600033A RID: 826 RVA: 0x0000A200 File Offset: 0x00008400
public ArrayPropertyDescriptor(int index, Type array_type)
: base(string.Format("[{0}]", index), null)
{
this.index = index;
this.array_type = array_type;
}
// Token: 0x170000E0 RID: 224
// (get) Token: 0x0600033B RID: 827 RVA: 0x0000A228 File Offset: 0x00008428
public override Type ComponentType
{
get
{
return this.array_type;
}
}
// Token: 0x170000E1 RID: 225
// (get) Token: 0x0600033C RID: 828 RVA: 0x0000A230 File Offset: 0x00008430
public override Type PropertyType
{
get
{
return this.array_type.GetElementType();
}
}
// Token: 0x170000E2 RID: 226
// (get) Token: 0x0600033D RID: 829 RVA: 0x0000A240 File Offset: 0x00008440
public override bool IsReadOnly
{
get
{
return false;
}
}
// Token: 0x0600033E RID: 830 RVA: 0x0000A244 File Offset: 0x00008444
public override object GetValue(object component)
{
if (component == null)
{
return null;
}
return ((Array)component).GetValue(this.index);
}
// Token: 0x0600033F RID: 831 RVA: 0x0000A260 File Offset: 0x00008460
public override void SetValue(object component, object value)
{
if (component == null)
{
return;
}
((Array)component).SetValue(value, this.index);
}
// Token: 0x06000340 RID: 832 RVA: 0x0000A27C File Offset: 0x0000847C
public override void ResetValue(object component)
{
}
// Token: 0x06000341 RID: 833 RVA: 0x0000A280 File Offset: 0x00008480
public override bool CanResetValue(object component)
{
return false;
}
// Token: 0x06000342 RID: 834 RVA: 0x0000A284 File Offset: 0x00008484
public override bool ShouldSerializeValue(object component)
{
return false;
}
// Token: 0x04000110 RID: 272
private int index;
// Token: 0x04000111 RID: 273
private Type array_type;
}
}
}
@@ -0,0 +1,83 @@
using System;
using System.Reflection;
namespace System.ComponentModel
{
/// <summary>Provides data for the MethodNameCompleted event.</summary>
// Token: 0x02000054 RID: 84
public class AsyncCompletedEventArgs : EventArgs
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.AsyncCompletedEventArgs" /> class. </summary>
/// <param name="error">Any error that occurred during the asynchronous operation.</param>
/// <param name="cancelled">A value indicating whether the asynchronous operation was canceled.</param>
/// <param name="userState">The optional user-supplied state object passed to the <see cref="M:System.ComponentModel.BackgroundWorker.RunWorkerAsync(System.Object)" /> method.</param>
// Token: 0x06000343 RID: 835 RVA: 0x0000A288 File Offset: 0x00008488
public AsyncCompletedEventArgs(Exception error, bool cancelled, object userState)
{
this._error = error;
this._cancelled = cancelled;
this._userState = userState;
}
/// <summary>Raises a user-supplied exception if an asynchronous operation failed.</summary>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.ComponentModel.AsyncCompletedEventArgs.Cancelled" /> property is true. </exception>
/// <exception cref="T:System.Reflection.TargetInvocationException">The <see cref="P:System.ComponentModel.AsyncCompletedEventArgs.Error" /> property has been set by the asynchronous operation. The <see cref="P:System.Exception.InnerException" /> property holds a reference to <see cref="P:System.ComponentModel.AsyncCompletedEventArgs.Error" />. </exception>
// Token: 0x06000344 RID: 836 RVA: 0x0000A2A8 File Offset: 0x000084A8
protected void RaiseExceptionIfNecessary()
{
if (this._error != null)
{
throw new TargetInvocationException(this._error);
}
if (this._cancelled)
{
throw new InvalidOperationException("The operation was cancelled");
}
}
/// <summary>Gets a value indicating whether an asynchronous operation has been canceled.</summary>
/// <returns>true if the background operation has been canceled; otherwise false. The default is false.</returns>
// Token: 0x170000E3 RID: 227
// (get) Token: 0x06000345 RID: 837 RVA: 0x0000A2D8 File Offset: 0x000084D8
public bool Cancelled
{
get
{
return this._cancelled;
}
}
/// <summary>Gets a value indicating which error occurred during an asynchronous operation.</summary>
/// <returns>An <see cref="T:System.Exception" /> instance, if an error occurred during an asynchronous operation; otherwise null.</returns>
// Token: 0x170000E4 RID: 228
// (get) Token: 0x06000346 RID: 838 RVA: 0x0000A2E0 File Offset: 0x000084E0
public Exception Error
{
get
{
return this._error;
}
}
/// <summary>Gets the unique identifier for the asynchronous task.</summary>
/// <returns>An object reference that uniquely identifies the asynchronous task; otherwise, null if no value has been set.</returns>
// Token: 0x170000E5 RID: 229
// (get) Token: 0x06000347 RID: 839 RVA: 0x0000A2E8 File Offset: 0x000084E8
public object UserState
{
get
{
return this._userState;
}
}
// Token: 0x04000112 RID: 274
private Exception _error;
// Token: 0x04000113 RID: 275
private bool _cancelled;
// Token: 0x04000114 RID: 276
private object _userState;
}
}
@@ -0,0 +1,11 @@
using System;
namespace System.ComponentModel
{
/// <summary>Represents the method that will handle the MethodNameCompleted event of an asynchronous operation.</summary>
/// <param name="sender">The source of the event. </param>
/// <param name="e">An <see cref="T:System.ComponentModel.AsyncCompletedEventArgs" /> that contains the event data. </param>
// Token: 0x02000321 RID: 801
// (Invoke) Token: 0x06001C5D RID: 7261
public delegate void AsyncCompletedEventHandler(object sender, AsyncCompletedEventArgs e);
}
+111
View File
@@ -0,0 +1,111 @@
using System;
using System.Threading;
namespace System.ComponentModel
{
/// <summary>Tracks the lifetime of an asynchronous operation.</summary>
// Token: 0x02000055 RID: 85
public sealed class AsyncOperation
{
// Token: 0x06000348 RID: 840 RVA: 0x0000A2F0 File Offset: 0x000084F0
internal AsyncOperation(SynchronizationContext ctx, object state)
{
this.ctx = ctx;
this.state = state;
ctx.OperationStarted();
}
// Token: 0x06000349 RID: 841 RVA: 0x0000A30C File Offset: 0x0000850C
~AsyncOperation()
{
if (!this.done && this.ctx != null)
{
this.ctx.OperationCompleted();
}
}
/// <summary>Gets the <see cref="T:System.Threading.SynchronizationContext" /> object that was passed to the constructor.</summary>
/// <returns>The <see cref="T:System.Threading.SynchronizationContext" /> object that was passed to the constructor.</returns>
// Token: 0x170000E6 RID: 230
// (get) Token: 0x0600034A RID: 842 RVA: 0x0000A364 File Offset: 0x00008564
public SynchronizationContext SynchronizationContext
{
get
{
return this.ctx;
}
}
/// <summary>Gets or sets an object used to uniquely identify an asynchronous operation.</summary>
/// <returns>The state object passed to the asynchronous method invocation.</returns>
// Token: 0x170000E7 RID: 231
// (get) Token: 0x0600034B RID: 843 RVA: 0x0000A36C File Offset: 0x0000856C
public object UserSuppliedState
{
get
{
return this.state;
}
}
/// <summary>Ends the lifetime of an asynchronous operation.</summary>
/// <exception cref="T:System.InvalidOperationException">
/// <see cref="M:System.ComponentModel.AsyncOperation.OperationCompleted" /> has been called previously for this task. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x0600034C RID: 844 RVA: 0x0000A374 File Offset: 0x00008574
public void OperationCompleted()
{
if (this.done)
{
throw new InvalidOperationException("This task is already completed. Multiple call to OperationCompleted is not allowed.");
}
this.ctx.OperationCompleted();
this.done = true;
}
/// <summary>Invokes a delegate on the thread or context appropriate for the application model.</summary>
/// <param name="d">A <see cref="T:System.Threading.SendOrPostCallback" /> object that wraps the delegate to be called when the operation ends. </param>
/// <param name="arg">An argument for the delegate contained in the <paramref name="d" /> parameter. </param>
/// <exception cref="T:System.InvalidOperationException">The <see cref="M:System.ComponentModel.AsyncOperation.PostOperationCompleted(System.Threading.SendOrPostCallback,System.Object)" /> method has been called previously for this task. </exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="d" /> is null. </exception>
// Token: 0x0600034D RID: 845 RVA: 0x0000A3AC File Offset: 0x000085AC
public void Post(SendOrPostCallback d, object arg)
{
if (this.done)
{
throw new InvalidOperationException("This task is already completed. Multiple call to Post is not allowed.");
}
this.ctx.Post(d, arg);
}
/// <summary>Ends the lifetime of an asynchronous operation.</summary>
/// <param name="d">A <see cref="T:System.Threading.SendOrPostCallback" /> object that wraps the delegate to be called when the operation ends. </param>
/// <param name="arg">An argument for the delegate contained in the <paramref name="d" /> parameter. </param>
/// <exception cref="T:System.InvalidOperationException">
/// <see cref="M:System.ComponentModel.AsyncOperation.OperationCompleted" /> has been called previously for this task. </exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="d" /> is null. </exception>
// Token: 0x0600034E RID: 846 RVA: 0x0000A3D4 File Offset: 0x000085D4
public void PostOperationCompleted(SendOrPostCallback d, object arg)
{
if (this.done)
{
throw new InvalidOperationException("This task is already completed. Multiple call to PostOperationCompleted is not allowed.");
}
this.Post(d, arg);
this.OperationCompleted();
}
// Token: 0x04000115 RID: 277
private SynchronizationContext ctx;
// Token: 0x04000116 RID: 278
private object state;
// Token: 0x04000117 RID: 279
private bool done;
}
}
@@ -0,0 +1,41 @@
using System;
using System.Threading;
namespace System.ComponentModel
{
/// <summary>Provides concurrency management for classes that support asynchronous method calls. This class cannot be inherited.</summary>
// Token: 0x02000056 RID: 86
public static class AsyncOperationManager
{
/// <summary>Gets or sets the synchronization context for the asynchronous operation.</summary>
/// <returns>The synchronization context for the asynchronous operation.</returns>
// Token: 0x170000E8 RID: 232
// (get) Token: 0x06000350 RID: 848 RVA: 0x0000A40C File Offset: 0x0000860C
// (set) Token: 0x06000351 RID: 849 RVA: 0x0000A428 File Offset: 0x00008628
[EditorBrowsable(EditorBrowsableState.Advanced)]
public static SynchronizationContext SynchronizationContext
{
get
{
if (SynchronizationContext.Current == null)
{
SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());
}
return SynchronizationContext.Current;
}
set
{
SynchronizationContext.SetSynchronizationContext(value);
}
}
/// <summary>Returns an <see cref="T:System.ComponentModel.AsyncOperation" /> for tracking the duration of a particular asynchronous operation.</summary>
/// <returns>An <see cref="T:System.ComponentModel.AsyncOperation" /> that you can use to track the duration of an asynchronous method invocation.</returns>
/// <param name="userSuppliedState">An object used to associate a piece of client state, such as a task ID, with a particular asynchronous operation. </param>
// Token: 0x06000352 RID: 850 RVA: 0x0000A430 File Offset: 0x00008630
public static AsyncOperation CreateOperation(object userSuppliedState)
{
return new AsyncOperation(AsyncOperationManager.SynchronizationContext, userSuppliedState);
}
}
}
@@ -0,0 +1,272 @@
using System;
using System.Collections;
using System.Reflection;
using System.Runtime.InteropServices;
namespace System.ComponentModel
{
/// <summary>Represents a collection of attributes.</summary>
// Token: 0x02000057 RID: 87
[ComVisible(true)]
public class AttributeCollection : ICollection, IEnumerable
{
// Token: 0x06000353 RID: 851 RVA: 0x0000A440 File Offset: 0x00008640
internal AttributeCollection(ArrayList attributes)
{
if (attributes != null)
{
this.attrList = attributes;
}
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.AttributeCollection" /> class.</summary>
/// <param name="attributes">An array of type <see cref="T:System.Attribute" /> that provides the attributes for this collection. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="attributes" /> is null.</exception>
// Token: 0x06000354 RID: 852 RVA: 0x0000A460 File Offset: 0x00008660
public AttributeCollection(params Attribute[] attributes)
{
if (attributes != null)
{
for (int i = 0; i < attributes.Length; i++)
{
this.attrList.Add(attributes[i]);
}
}
}
/// <summary>Returns an <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.IDictionary" />. </summary>
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.IDictionary" />.</returns>
// Token: 0x06000356 RID: 854 RVA: 0x0000A4B8 File Offset: 0x000086B8
IEnumerator IEnumerable.GetEnumerator()
{
return this.GetEnumerator();
}
/// <summary>Gets a value indicating whether access to the collection is synchronized (thread-safe).</summary>
/// <returns>true if access to the collection is synchronized (thread-safe); otherwise, false.</returns>
// Token: 0x170000E9 RID: 233
// (get) Token: 0x06000357 RID: 855 RVA: 0x0000A4C0 File Offset: 0x000086C0
bool ICollection.IsSynchronized
{
get
{
return this.attrList.IsSynchronized;
}
}
/// <summary>Gets an object that can be used to synchronize access to the collection.</summary>
/// <returns>An object that can be used to synchronize access to the collection.</returns>
// Token: 0x170000EA RID: 234
// (get) Token: 0x06000358 RID: 856 RVA: 0x0000A4D0 File Offset: 0x000086D0
object ICollection.SyncRoot
{
get
{
return this.attrList.SyncRoot;
}
}
/// <summary>Gets the number of elements contained in the collection.</summary>
/// <returns>The number of elements contained in the collection.</returns>
// Token: 0x170000EB RID: 235
// (get) Token: 0x06000359 RID: 857 RVA: 0x0000A4E0 File Offset: 0x000086E0
int ICollection.Count
{
get
{
return this.Count;
}
}
/// <summary>Creates a new <see cref="T:System.ComponentModel.AttributeCollection" /> from an existing <see cref="T:System.ComponentModel.AttributeCollection" />.</summary>
/// <returns>A new <see cref="T:System.ComponentModel.AttributeCollection" /> that is a copy of <paramref name="existing" />.</returns>
/// <param name="existing">An <see cref="T:System.ComponentModel.AttributeCollection" /> from which to create the copy.</param>
/// <param name="newAttributes">An array of type <see cref="T:System.Attribute" /> that provides the attributes for this collection. Can be null.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="existing" /> is null.</exception>
// Token: 0x0600035A RID: 858 RVA: 0x0000A4E8 File Offset: 0x000086E8
public static AttributeCollection FromExisting(AttributeCollection existing, params Attribute[] newAttributes)
{
if (existing == null)
{
throw new ArgumentNullException("existing");
}
AttributeCollection attributeCollection = new AttributeCollection(new Attribute[0]);
attributeCollection.attrList.AddRange(existing.attrList);
if (newAttributes != null)
{
attributeCollection.attrList.AddRange(newAttributes);
}
return attributeCollection;
}
/// <summary>Determines whether this collection of attributes has the specified attribute.</summary>
/// <returns>true if the collection contains the attribute or is the default attribute for the type of attribute; otherwise, false.</returns>
/// <param name="attribute">An <see cref="T:System.Attribute" /> to find in the collection. </param>
// Token: 0x0600035B RID: 859 RVA: 0x0000A538 File Offset: 0x00008738
public bool Contains(Attribute attr)
{
Attribute attribute = this[attr.GetType()];
return attribute != null && attr.Equals(attribute);
}
/// <summary>Determines whether this attribute collection contains all the specified attributes in the attribute array.</summary>
/// <returns>true if the collection contains all the attributes; otherwise, false.</returns>
/// <param name="attributes">An array of type <see cref="T:System.Attribute" /> to find in the collection. </param>
// Token: 0x0600035C RID: 860 RVA: 0x0000A564 File Offset: 0x00008764
public bool Contains(Attribute[] attributes)
{
if (attributes == null)
{
return true;
}
foreach (Attribute attribute in attributes)
{
if (!this.Contains(attribute))
{
return false;
}
}
return true;
}
/// <summary>Copies the collection to an array, starting at the specified index.</summary>
/// <param name="array">The <see cref="T:System.Array" /> to copy the collection to. </param>
/// <param name="index">The index to start from. </param>
// Token: 0x0600035D RID: 861 RVA: 0x0000A5A4 File Offset: 0x000087A4
public void CopyTo(Array array, int index)
{
this.attrList.CopyTo(array, index);
}
/// <summary>Gets an enumerator for this collection.</summary>
/// <returns>An enumerator of type <see cref="T:System.Collections.IEnumerator" />.</returns>
// Token: 0x0600035E RID: 862 RVA: 0x0000A5B4 File Offset: 0x000087B4
public IEnumerator GetEnumerator()
{
return this.attrList.GetEnumerator();
}
/// <summary>Determines whether a specified attribute is the same as an attribute in the collection.</summary>
/// <returns>true if the attribute is contained within the collection and has the same value as the attribute in the collection; otherwise, false.</returns>
/// <param name="attribute">An instance of <see cref="T:System.Attribute" /> to compare with the attributes in this collection. </param>
// Token: 0x0600035F RID: 863 RVA: 0x0000A5C4 File Offset: 0x000087C4
public bool Matches(Attribute attr)
{
foreach (object obj in this.attrList)
{
Attribute attribute = (Attribute)obj;
if (attribute.Match(attr))
{
return true;
}
}
return false;
}
/// <summary>Determines whether the attributes in the specified array are the same as the attributes in the collection.</summary>
/// <returns>true if all the attributes in the array are contained in the collection and have the same values as the attributes in the collection; otherwise, false.</returns>
/// <param name="attributes">An array of <see cref="T:System.CodeDom.MemberAttributes" /> to compare with the attributes in this collection. </param>
// Token: 0x06000360 RID: 864 RVA: 0x0000A644 File Offset: 0x00008844
public bool Matches(Attribute[] attributes)
{
foreach (Attribute attribute in attributes)
{
if (!this.Matches(attribute))
{
return false;
}
}
return true;
}
/// <summary>Returns the default <see cref="T:System.Attribute" /> of a given <see cref="T:System.Type" />.</summary>
/// <returns>An <see cref="T:System.Attribute" />.</returns>
/// <param name="attributeType">The <see cref="T:System.Type" /> of the attribute to retrieve. </param>
// Token: 0x06000361 RID: 865 RVA: 0x0000A67C File Offset: 0x0000887C
protected Attribute GetDefaultAttribute(Type attributeType)
{
Attribute attribute = null;
BindingFlags bindingFlags = BindingFlags.Static | BindingFlags.Public;
FieldInfo field = attributeType.GetField("Default", bindingFlags);
if (field == null)
{
ConstructorInfo constructor = attributeType.GetConstructor(Type.EmptyTypes);
if (constructor != null)
{
attribute = constructor.Invoke(null) as Attribute;
}
if (attribute != null && !attribute.IsDefaultAttribute())
{
attribute = null;
}
}
else
{
attribute = (Attribute)field.GetValue(null);
}
return attribute;
}
/// <summary>Gets the number of attributes.</summary>
/// <returns>The number of attributes.</returns>
// Token: 0x170000EC RID: 236
// (get) Token: 0x06000362 RID: 866 RVA: 0x0000A6E8 File Offset: 0x000088E8
public int Count
{
get
{
return (this.attrList == null) ? 0 : this.attrList.Count;
}
}
/// <summary>Gets the attribute with the specified type.</summary>
/// <returns>The <see cref="T:System.Attribute" /> with the specified type or, if the attribute does not exist, the default value for the attribute type.</returns>
/// <param name="attributeType">The <see cref="T:System.Type" /> of the <see cref="T:System.Attribute" /> to get from the collection. </param>
// Token: 0x170000ED RID: 237
public virtual Attribute this[Type type]
{
get
{
Attribute attribute = null;
if (this.attrList != null)
{
foreach (object obj in this.attrList)
{
Attribute attribute2 = (Attribute)obj;
if (type.IsAssignableFrom(attribute2.GetType()))
{
attribute = attribute2;
break;
}
}
}
if (attribute == null)
{
attribute = this.GetDefaultAttribute(type);
}
return attribute;
}
}
/// <summary>Gets the attribute with the specified index number.</summary>
/// <returns>The <see cref="T:System.Attribute" /> with the specified index number.</returns>
/// <param name="index">The zero-based index of <see cref="T:System.ComponentModel.AttributeCollection" />. </param>
// Token: 0x170000EE RID: 238
public virtual Attribute this[int index]
{
get
{
return (Attribute)this.attrList[index];
}
}
// Token: 0x04000118 RID: 280
private ArrayList attrList = new ArrayList();
/// <summary>Specifies an empty collection that you can use, rather than creating a new one. This field is read-only.</summary>
// Token: 0x04000119 RID: 281
public static readonly AttributeCollection Empty = new AttributeCollection(null);
}
}
+252
View File
@@ -0,0 +1,252 @@
using System;
using System.Threading;
namespace System.ComponentModel
{
/// <summary>Executes an operation on a separate thread.</summary>
// Token: 0x02000058 RID: 88
public class BackgroundWorker
{
/// <summary>Occurs when <see cref="M:System.ComponentModel.BackgroundWorker.RunWorkerAsync" /> is called.</summary>
// Token: 0x14000010 RID: 16
// (add) Token: 0x06000366 RID: 870 RVA: 0x0000A7C0 File Offset: 0x000089C0
// (remove) Token: 0x06000367 RID: 871 RVA: 0x0000A7DC File Offset: 0x000089DC
public event DoWorkEventHandler DoWork;
/// <summary>Occurs when <see cref="M:System.ComponentModel.BackgroundWorker.ReportProgress(System.Int32)" /> is called.</summary>
// Token: 0x14000011 RID: 17
// (add) Token: 0x06000368 RID: 872 RVA: 0x0000A7F8 File Offset: 0x000089F8
// (remove) Token: 0x06000369 RID: 873 RVA: 0x0000A814 File Offset: 0x00008A14
public event ProgressChangedEventHandler ProgressChanged;
/// <summary>Occurs when the background operation has completed, has been canceled, or has raised an exception.</summary>
// Token: 0x14000012 RID: 18
// (add) Token: 0x0600036A RID: 874 RVA: 0x0000A830 File Offset: 0x00008A30
// (remove) Token: 0x0600036B RID: 875 RVA: 0x0000A84C File Offset: 0x00008A4C
public event RunWorkerCompletedEventHandler RunWorkerCompleted;
/// <summary>Gets a value indicating whether the application has requested cancellation of a background operation.</summary>
/// <returns>true if the application has requested cancellation of a background operation; otherwise, false. The default is false.</returns>
// Token: 0x170000EF RID: 239
// (get) Token: 0x0600036C RID: 876 RVA: 0x0000A868 File Offset: 0x00008A68
public bool CancellationPending
{
get
{
return this.cancel_pending;
}
}
/// <summary>Gets a value indicating whether the <see cref="T:System.ComponentModel.BackgroundWorker" /> is running an asynchronous operation.</summary>
/// <returns>true, if the <see cref="T:System.ComponentModel.BackgroundWorker" /> is running an asynchronous operation; otherwise, false.</returns>
// Token: 0x170000F0 RID: 240
// (get) Token: 0x0600036D RID: 877 RVA: 0x0000A870 File Offset: 0x00008A70
public bool IsBusy
{
get
{
return this.async != null;
}
}
/// <summary>Gets or sets a value indicating whether the <see cref="T:System.ComponentModel.BackgroundWorker" /> can report progress updates.</summary>
/// <returns>true if the <see cref="T:System.ComponentModel.BackgroundWorker" /> supports progress updates; otherwise false. The default is false.</returns>
// Token: 0x170000F1 RID: 241
// (get) Token: 0x0600036E RID: 878 RVA: 0x0000A880 File Offset: 0x00008A80
// (set) Token: 0x0600036F RID: 879 RVA: 0x0000A888 File Offset: 0x00008A88
[DefaultValue(false)]
public bool WorkerReportsProgress
{
get
{
return this.report_progress;
}
set
{
this.report_progress = value;
}
}
/// <summary>Gets or sets a value indicating whether the <see cref="T:System.ComponentModel.BackgroundWorker" /> supports asynchronous cancellation.</summary>
/// <returns>true if the <see cref="T:System.ComponentModel.BackgroundWorker" /> supports cancellation; otherwise false. The default is false.</returns>
// Token: 0x170000F2 RID: 242
// (get) Token: 0x06000370 RID: 880 RVA: 0x0000A894 File Offset: 0x00008A94
// (set) Token: 0x06000371 RID: 881 RVA: 0x0000A89C File Offset: 0x00008A9C
[DefaultValue(false)]
public bool WorkerSupportsCancellation
{
get
{
return this.support_cancel;
}
set
{
this.support_cancel = value;
}
}
/// <summary>Requests cancellation of a pending background operation.</summary>
/// <exception cref="T:System.InvalidOperationException">
/// <see cref="P:System.ComponentModel.BackgroundWorker.WorkerSupportsCancellation" /> is false. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x06000372 RID: 882 RVA: 0x0000A8A8 File Offset: 0x00008AA8
public void CancelAsync()
{
if (!this.support_cancel)
{
throw new InvalidOperationException("This background worker does not support cancellation.");
}
if (!this.IsBusy)
{
return;
}
this.cancel_pending = true;
}
/// <summary>Raises the <see cref="E:System.ComponentModel.BackgroundWorker.ProgressChanged" /> event.</summary>
/// <param name="percentProgress">The percentage, from 0 to 100, of the background operation that is complete. </param>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.ComponentModel.BackgroundWorker.WorkerReportsProgress" /> property is set to false. </exception>
// Token: 0x06000373 RID: 883 RVA: 0x0000A8D4 File Offset: 0x00008AD4
public void ReportProgress(int percentProgress)
{
this.ReportProgress(percentProgress, null);
}
/// <summary>Raises the <see cref="E:System.ComponentModel.BackgroundWorker.ProgressChanged" /> event.</summary>
/// <param name="percentProgress">The percentage, from 0 to 100, of the background operation that is complete.</param>
/// <param name="userState">The state object passed to <see cref="M:System.ComponentModel.BackgroundWorker.RunWorkerAsync(System.Object)" />.</param>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.ComponentModel.BackgroundWorker.WorkerReportsProgress" /> property is set to false. </exception>
// Token: 0x06000374 RID: 884 RVA: 0x0000A8E0 File Offset: 0x00008AE0
public void ReportProgress(int percentProgress, object userState)
{
if (!this.WorkerReportsProgress)
{
throw new InvalidOperationException("This background worker does not report progress.");
}
if (!this.IsBusy)
{
return;
}
this.async.Post(delegate(object o)
{
ProgressChangedEventArgs progressChangedEventArgs = o as ProgressChangedEventArgs;
this.OnProgressChanged(progressChangedEventArgs);
}, new ProgressChangedEventArgs(percentProgress, userState));
}
/// <summary>Starts execution of a background operation.</summary>
/// <exception cref="T:System.InvalidOperationException">
/// <see cref="P:System.ComponentModel.BackgroundWorker.IsBusy" /> is true.</exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x06000375 RID: 885 RVA: 0x0000A930 File Offset: 0x00008B30
public void RunWorkerAsync()
{
this.RunWorkerAsync(null);
}
// Token: 0x06000376 RID: 886 RVA: 0x0000A93C File Offset: 0x00008B3C
private void ProcessWorker(object argument, AsyncOperation async, SendOrPostCallback callback)
{
Exception ex = null;
DoWorkEventArgs doWorkEventArgs = new DoWorkEventArgs(argument);
try
{
this.OnDoWork(doWorkEventArgs);
}
catch (Exception ex2)
{
ex = ex2;
doWorkEventArgs.Cancel = false;
}
callback(new object[]
{
new RunWorkerCompletedEventArgs(doWorkEventArgs.Result, ex, doWorkEventArgs.Cancel),
async
});
}
// Token: 0x06000377 RID: 887 RVA: 0x0000A9B0 File Offset: 0x00008BB0
private void CompleteWorker(object state)
{
object[] array = (object[])state;
RunWorkerCompletedEventArgs runWorkerCompletedEventArgs = array[0] as RunWorkerCompletedEventArgs;
AsyncOperation asyncOperation = array[1] as AsyncOperation;
SendOrPostCallback sendOrPostCallback = delegate(object darg)
{
this.async = null;
this.OnRunWorkerCompleted(darg as RunWorkerCompletedEventArgs);
};
asyncOperation.PostOperationCompleted(sendOrPostCallback, runWorkerCompletedEventArgs);
this.cancel_pending = false;
}
/// <summary>Starts execution of a background operation.</summary>
/// <param name="argument">A parameter for use by the background operation to be executed in the <see cref="E:System.ComponentModel.BackgroundWorker.DoWork" /> event handler. </param>
/// <exception cref="T:System.InvalidOperationException">
/// <see cref="P:System.ComponentModel.BackgroundWorker.IsBusy" /> is true. </exception>
// Token: 0x06000378 RID: 888 RVA: 0x0000A9F4 File Offset: 0x00008BF4
public void RunWorkerAsync(object argument)
{
if (this.IsBusy)
{
throw new InvalidOperationException("The background worker is busy.");
}
this.async = AsyncOperationManager.CreateOperation(this);
BackgroundWorker.ProcessWorkerEventHandler processWorkerEventHandler = new BackgroundWorker.ProcessWorkerEventHandler(this.ProcessWorker);
processWorkerEventHandler.BeginInvoke(argument, this.async, new SendOrPostCallback(this.CompleteWorker), null, null);
}
/// <summary>Raises the <see cref="E:System.ComponentModel.BackgroundWorker.DoWork" /> event. </summary>
/// <param name="e">An <see cref="T:System.EventArgs" /> that contains the event data.</param>
// Token: 0x06000379 RID: 889 RVA: 0x0000AA4C File Offset: 0x00008C4C
protected virtual void OnDoWork(DoWorkEventArgs e)
{
if (this.DoWork != null)
{
this.DoWork(this, e);
}
}
/// <summary>Raises the <see cref="E:System.ComponentModel.BackgroundWorker.ProgressChanged" /> event.</summary>
/// <param name="e">An <see cref="T:System.EventArgs" /> that contains the event data. </param>
// Token: 0x0600037A RID: 890 RVA: 0x0000AA68 File Offset: 0x00008C68
protected virtual void OnProgressChanged(ProgressChangedEventArgs e)
{
if (this.ProgressChanged != null)
{
this.ProgressChanged(this, e);
}
}
/// <summary>Raises the <see cref="E:System.ComponentModel.BackgroundWorker.RunWorkerCompleted" /> event.</summary>
/// <param name="e">An <see cref="T:System.EventArgs" /> that contains the event data. </param>
// Token: 0x0600037B RID: 891 RVA: 0x0000AA84 File Offset: 0x00008C84
protected virtual void OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
{
if (this.RunWorkerCompleted != null)
{
this.RunWorkerCompleted(this, e);
}
}
// Token: 0x0400011A RID: 282
private AsyncOperation async;
// Token: 0x0400011B RID: 283
private bool cancel_pending;
// Token: 0x0400011C RID: 284
private bool report_progress;
// Token: 0x0400011D RID: 285
private bool support_cancel;
// Token: 0x02000307 RID: 775
// (Invoke) Token: 0x06001BF5 RID: 7157
private delegate void ProcessWorkerEventHandler(object argument, AsyncOperation async, SendOrPostCallback callback);
}
}
@@ -0,0 +1,126 @@
using System;
using System.Globalization;
namespace System.ComponentModel
{
/// <summary>Provides a base type converter for nonfloating-point numerical types.</summary>
// Token: 0x02000059 RID: 89
public abstract class BaseNumberConverter : TypeConverter
{
// Token: 0x170000F3 RID: 243
// (get) Token: 0x0600037F RID: 895
internal abstract bool SupportHex { get; }
/// <summary>Determines if this converter can convert an object in the given source type to the native type of the converter.</summary>
/// <returns>true if this converter can perform the operation; otherwise, false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="sourceType">A <see cref="T:System.Type" /> that represents the type from which you want to convert. </param>
// Token: 0x06000380 RID: 896 RVA: 0x0000AADC File Offset: 0x00008CDC
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
}
/// <summary>Returns a value indicating whether this converter can convert an object to the given destination type using the context.</summary>
/// <returns>true if this converter can perform the operation; otherwise, false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="t">A <see cref="T:System.Type" /> that represents the type to which you want to convert. </param>
// Token: 0x06000381 RID: 897 RVA: 0x0000AAFC File Offset: 0x00008CFC
public override bool CanConvertTo(ITypeDescriptorContext context, Type t)
{
return t.IsPrimitive || base.CanConvertTo(context, t);
}
/// <summary>Converts the given object to the converter's native type.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the converted value.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="culture">A <see cref="T:System.Globalization.CultureInfo" /> that specifies the culture to represent the number. </param>
/// <param name="value">The object to convert. </param>
/// <exception cref="T:System.Exception">
/// <paramref name="value" /> is not a valid value for the target type.</exception>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x06000382 RID: 898 RVA: 0x0000AB14 File Offset: 0x00008D14
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
{
if (culture == null)
{
culture = CultureInfo.CurrentCulture;
}
string text = value as string;
if (text != null)
{
try
{
if (this.SupportHex)
{
if (text.Length >= 1 && text[0] == '#')
{
return this.ConvertFromString(text.Substring(1), 16);
}
if (text.StartsWith("0x") || text.StartsWith("0X"))
{
return this.ConvertFromString(text, 16);
}
}
NumberFormatInfo numberFormatInfo = (NumberFormatInfo)culture.GetFormat(typeof(NumberFormatInfo));
return this.ConvertFromString(text, numberFormatInfo);
}
catch (Exception ex)
{
throw new Exception(value.ToString() + " is not a valid value for " + this.InnerType.Name + ".", ex);
}
}
return base.ConvertFrom(context, culture, value);
}
/// <summary>Converts the specified object to another type.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the converted value.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="culture">A <see cref="T:System.Globalization.CultureInfo" /> that specifies the culture to represent the number. </param>
/// <param name="value">The object to convert. </param>
/// <param name="destinationType">The type to convert the object to. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="destinationType" /> is null.</exception>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x06000383 RID: 899 RVA: 0x0000AC24 File Offset: 0x00008E24
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
if (value == null)
{
throw new ArgumentNullException("value");
}
if (culture == null)
{
culture = CultureInfo.CurrentCulture;
}
if (destinationType == typeof(string) && value is IConvertible)
{
return ((IConvertible)value).ToType(destinationType, culture);
}
if (destinationType.IsPrimitive)
{
return Convert.ChangeType(value, destinationType, culture);
}
return base.ConvertTo(context, culture, value, destinationType);
}
// Token: 0x06000384 RID: 900
internal abstract string ConvertToString(object value, NumberFormatInfo format);
// Token: 0x06000385 RID: 901
internal abstract object ConvertFromString(string value, NumberFormatInfo format);
// Token: 0x06000386 RID: 902 RVA: 0x0000AC9C File Offset: 0x00008E9C
internal virtual object ConvertFromString(string value, int fromBase)
{
if (this.SupportHex)
{
throw new NotImplementedException();
}
throw new InvalidOperationException();
}
// Token: 0x04000121 RID: 289
internal Type InnerType;
}
}
+19
View File
@@ -0,0 +1,19 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies values to indicate whether a property can be bound to a data element or another property.</summary>
// Token: 0x0200005A RID: 90
public enum BindableSupport
{
/// <summary>The property is not bindable at design time.</summary>
// Token: 0x04000123 RID: 291
No,
/// <summary>The property is bindable at design time.</summary>
// Token: 0x04000124 RID: 292
Yes,
/// <summary>The property is set to the default.</summary>
// Token: 0x04000125 RID: 293
Default
}
}
+67
View File
@@ -0,0 +1,67 @@
using System;
using System.Globalization;
namespace System.ComponentModel
{
/// <summary>Provides a type converter to convert <see cref="T:System.Boolean" /> objects to and from various other representations.</summary>
// Token: 0x0200005B RID: 91
public class BooleanConverter : TypeConverter
{
/// <summary>Gets a value indicating whether this converter can convert an object in the given source type to a Boolean object using the specified context.</summary>
/// <returns>true if this object can perform the conversion; otherwise, false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="sourceType">A <see cref="T:System.Type" /> that represents the type you wish to convert from. </param>
// Token: 0x06000388 RID: 904 RVA: 0x0000ACBC File Offset: 0x00008EBC
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
}
/// <summary>Converts the given value object to a Boolean object.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="culture">A <see cref="T:System.Globalization.CultureInfo" /> that specifies the culture to which to convert.</param>
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
/// <exception cref="T:System.FormatException">
/// <paramref name="value" /> is not a valid value for the target type. </exception>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x06000389 RID: 905 RVA: 0x0000ACD8 File Offset: 0x00008ED8
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
{
if (value is string)
{
return bool.Parse((string)value);
}
return base.ConvertFrom(context, culture, value);
}
/// <summary>Gets a collection of standard values for the Boolean data type.</summary>
/// <returns>A <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> that holds a standard set of valid values.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
// Token: 0x0600038A RID: 906 RVA: 0x0000AD00 File Offset: 0x00008F00
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
bool[] array = new bool[2];
array[0] = true;
return new TypeConverter.StandardValuesCollection(array);
}
/// <summary>Gets a value indicating whether the list of standard values returned from the <see cref="M:System.ComponentModel.BooleanConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)" /> method is an exclusive list.</summary>
/// <returns>true because the <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> returned from <see cref="M:System.ComponentModel.BooleanConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)" /> is an exhaustive list of possible values. This method never returns false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
// Token: 0x0600038B RID: 907 RVA: 0x0000AD14 File Offset: 0x00008F14
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
{
return true;
}
/// <summary>Gets a value indicating whether this object supports a standard set of values that can be picked from a list.</summary>
/// <returns>true because <see cref="M:System.ComponentModel.BooleanConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)" /> can be called to find a common set of values the object supports. This method never returns false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
// Token: 0x0600038C RID: 908 RVA: 0x0000AD18 File Offset: 0x00008F18
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
{
return true;
}
}
}
@@ -0,0 +1,70 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies whether a property or event should be displayed in a Properties window.</summary>
// Token: 0x0200005C RID: 92
[AttributeUsage(AttributeTargets.All)]
public sealed class BrowsableAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.BrowsableAttribute" /> class.</summary>
/// <param name="browsable">true if a property or event can be modified at design time; otherwise, false. The default is true. </param>
// Token: 0x0600038D RID: 909 RVA: 0x0000AD1C File Offset: 0x00008F1C
public BrowsableAttribute(bool browsable)
{
this.browsable = browsable;
}
/// <summary>Gets a value indicating whether an object is browsable.</summary>
/// <returns>true if the object is browsable; otherwise, false.</returns>
// Token: 0x170000F4 RID: 244
// (get) Token: 0x0600038F RID: 911 RVA: 0x0000AD50 File Offset: 0x00008F50
public bool Browsable
{
get
{
return this.browsable;
}
}
/// <summary>Indicates whether this instance and a specified object are equal.</summary>
/// <returns>true if <paramref name="obj" /> is equal to this instance; otherwise, false.</returns>
/// <param name="obj">Another object to compare to. </param>
// Token: 0x06000390 RID: 912 RVA: 0x0000AD58 File Offset: 0x00008F58
public override bool Equals(object obj)
{
return obj is BrowsableAttribute && (obj == this || ((BrowsableAttribute)obj).Browsable == this.browsable);
}
/// <summary>Returns the hash code for this instance.</summary>
/// <returns>A 32-bit signed integer hash code.</returns>
// Token: 0x06000391 RID: 913 RVA: 0x0000AD84 File Offset: 0x00008F84
public override int GetHashCode()
{
return this.browsable.GetHashCode();
}
/// <summary>Determines if this attribute is the default.</summary>
/// <returns>true if the attribute is the default value for this attribute class; otherwise, false.</returns>
// Token: 0x06000392 RID: 914 RVA: 0x0000AD94 File Offset: 0x00008F94
public override bool IsDefaultAttribute()
{
return this.browsable == BrowsableAttribute.Default.Browsable;
}
// Token: 0x04000126 RID: 294
private bool browsable;
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.BrowsableAttribute" />, which is <see cref="F:System.ComponentModel.BrowsableAttribute.Yes" />. This static field is read-only.</summary>
// Token: 0x04000127 RID: 295
public static readonly BrowsableAttribute Default = new BrowsableAttribute(true);
/// <summary>Specifies that a property or event cannot be modified at design time. This static field is read-only.</summary>
// Token: 0x04000128 RID: 296
public static readonly BrowsableAttribute No = new BrowsableAttribute(false);
/// <summary>Specifies that a property or event can be modified at design time. This static field is read-only.</summary>
// Token: 0x04000129 RID: 297
public static readonly BrowsableAttribute Yes = new BrowsableAttribute(true);
}
}
+45
View File
@@ -0,0 +1,45 @@
using System;
using System.Globalization;
namespace System.ComponentModel
{
/// <summary>Provides a type converter to convert 8-bit unsigned integer objects to and from various other representations.</summary>
// Token: 0x0200005D RID: 93
public class ByteConverter : BaseNumberConverter
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.ByteConverter" /> class. </summary>
// Token: 0x06000393 RID: 915 RVA: 0x0000ADA8 File Offset: 0x00008FA8
public ByteConverter()
{
this.InnerType = typeof(byte);
}
// Token: 0x170000F5 RID: 245
// (get) Token: 0x06000394 RID: 916 RVA: 0x0000ADC0 File Offset: 0x00008FC0
internal override bool SupportHex
{
get
{
return true;
}
}
// Token: 0x06000395 RID: 917 RVA: 0x0000ADC4 File Offset: 0x00008FC4
internal override string ConvertToString(object value, NumberFormatInfo format)
{
return ((byte)value).ToString("G", format);
}
// Token: 0x06000396 RID: 918 RVA: 0x0000ADE8 File Offset: 0x00008FE8
internal override object ConvertFromString(string value, NumberFormatInfo format)
{
return byte.Parse(value, NumberStyles.Integer, format);
}
// Token: 0x06000397 RID: 919 RVA: 0x0000ADF8 File Offset: 0x00008FF8
internal override object ConvertFromString(string value, int fromBase)
{
return Convert.ToByte(value, fromBase);
}
}
}
+44
View File
@@ -0,0 +1,44 @@
using System;
namespace System.ComponentModel
{
/// <summary>Provides data for a cancelable event.</summary>
// Token: 0x0200005E RID: 94
public class CancelEventArgs : EventArgs
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.CancelEventArgs" /> class with the <see cref="P:System.ComponentModel.CancelEventArgs.Cancel" /> property set to false.</summary>
// Token: 0x06000398 RID: 920 RVA: 0x0000AE08 File Offset: 0x00009008
public CancelEventArgs()
{
this.cancel = false;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.CancelEventArgs" /> class with the <see cref="P:System.ComponentModel.CancelEventArgs.Cancel" /> property set to the given value.</summary>
/// <param name="cancel">true to cancel the event; otherwise, false. </param>
// Token: 0x06000399 RID: 921 RVA: 0x0000AE18 File Offset: 0x00009018
public CancelEventArgs(bool cancel)
{
this.cancel = cancel;
}
/// <summary>Gets or sets a value indicating whether the event should be canceled.</summary>
/// <returns>true if the event should be canceled; otherwise, false.</returns>
// Token: 0x170000F6 RID: 246
// (get) Token: 0x0600039A RID: 922 RVA: 0x0000AE28 File Offset: 0x00009028
// (set) Token: 0x0600039B RID: 923 RVA: 0x0000AE30 File Offset: 0x00009030
public bool Cancel
{
get
{
return this.cancel;
}
set
{
this.cancel = value;
}
}
// Token: 0x0400012A RID: 298
private bool cancel;
}
}
+473
View File
@@ -0,0 +1,473 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies the name of the category in which to group the property or event when displayed in a <see cref="T:System.Windows.Forms.PropertyGrid" /> control set to Categorized mode.</summary>
// Token: 0x0200005F RID: 95
[AttributeUsage(AttributeTargets.All)]
public class CategoryAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.CategoryAttribute" /> class using the category name Default.</summary>
// Token: 0x0600039C RID: 924 RVA: 0x0000AE3C File Offset: 0x0000903C
public CategoryAttribute()
{
this.category = "Misc";
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.CategoryAttribute" /> class using the specified category name.</summary>
/// <param name="category">The name of the category. </param>
// Token: 0x0600039D RID: 925 RVA: 0x0000AE50 File Offset: 0x00009050
public CategoryAttribute(string category)
{
this.category = category;
}
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Action category.</summary>
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the action category.</returns>
// Token: 0x170000F7 RID: 247
// (get) Token: 0x0600039F RID: 927 RVA: 0x0000AE6C File Offset: 0x0000906C
public static CategoryAttribute Action
{
get
{
if (CategoryAttribute.action != null)
{
return CategoryAttribute.action;
}
object obj = CategoryAttribute.lockobj;
lock (obj)
{
if (CategoryAttribute.action == null)
{
CategoryAttribute.action = new CategoryAttribute("Action");
}
}
return CategoryAttribute.action;
}
}
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Appearance category.</summary>
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the appearance category.</returns>
// Token: 0x170000F8 RID: 248
// (get) Token: 0x060003A0 RID: 928 RVA: 0x0000AEE8 File Offset: 0x000090E8
public static CategoryAttribute Appearance
{
get
{
if (CategoryAttribute.appearance != null)
{
return CategoryAttribute.appearance;
}
object obj = CategoryAttribute.lockobj;
lock (obj)
{
if (CategoryAttribute.appearance == null)
{
CategoryAttribute.appearance = new CategoryAttribute("Appearance");
}
}
return CategoryAttribute.appearance;
}
}
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Asynchronous category.</summary>
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the asynchronous category.</returns>
// Token: 0x170000F9 RID: 249
// (get) Token: 0x060003A1 RID: 929 RVA: 0x0000AF64 File Offset: 0x00009164
public static CategoryAttribute Asynchronous
{
get
{
if (CategoryAttribute.behaviour != null)
{
return CategoryAttribute.behaviour;
}
object obj = CategoryAttribute.lockobj;
lock (obj)
{
if (CategoryAttribute.async == null)
{
CategoryAttribute.async = new CategoryAttribute("Asynchronous");
}
}
return CategoryAttribute.async;
}
}
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Behavior category.</summary>
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the behavior category.</returns>
// Token: 0x170000FA RID: 250
// (get) Token: 0x060003A2 RID: 930 RVA: 0x0000AFE0 File Offset: 0x000091E0
public static CategoryAttribute Behavior
{
get
{
if (CategoryAttribute.behaviour != null)
{
return CategoryAttribute.behaviour;
}
object obj = CategoryAttribute.lockobj;
lock (obj)
{
if (CategoryAttribute.behaviour == null)
{
CategoryAttribute.behaviour = new CategoryAttribute("Behavior");
}
}
return CategoryAttribute.behaviour;
}
}
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Data category.</summary>
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the data category.</returns>
// Token: 0x170000FB RID: 251
// (get) Token: 0x060003A3 RID: 931 RVA: 0x0000B05C File Offset: 0x0000925C
public static CategoryAttribute Data
{
get
{
if (CategoryAttribute.data != null)
{
return CategoryAttribute.data;
}
object obj = CategoryAttribute.lockobj;
lock (obj)
{
if (CategoryAttribute.data == null)
{
CategoryAttribute.data = new CategoryAttribute("Data");
}
}
return CategoryAttribute.data;
}
}
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Default category.</summary>
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the default category.</returns>
// Token: 0x170000FC RID: 252
// (get) Token: 0x060003A4 RID: 932 RVA: 0x0000B0D8 File Offset: 0x000092D8
public static CategoryAttribute Default
{
get
{
if (CategoryAttribute.def != null)
{
return CategoryAttribute.def;
}
object obj = CategoryAttribute.lockobj;
lock (obj)
{
if (CategoryAttribute.def == null)
{
CategoryAttribute.def = new CategoryAttribute("Default");
}
}
return CategoryAttribute.def;
}
}
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Design category.</summary>
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the design category.</returns>
// Token: 0x170000FD RID: 253
// (get) Token: 0x060003A5 RID: 933 RVA: 0x0000B154 File Offset: 0x00009354
public static CategoryAttribute Design
{
get
{
if (CategoryAttribute.design != null)
{
return CategoryAttribute.design;
}
object obj = CategoryAttribute.lockobj;
lock (obj)
{
if (CategoryAttribute.design == null)
{
CategoryAttribute.design = new CategoryAttribute("Design");
}
}
return CategoryAttribute.design;
}
}
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the DragDrop category.</summary>
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the drag-and-drop category.</returns>
// Token: 0x170000FE RID: 254
// (get) Token: 0x060003A6 RID: 934 RVA: 0x0000B1D0 File Offset: 0x000093D0
public static CategoryAttribute DragDrop
{
get
{
if (CategoryAttribute.drag_drop != null)
{
return CategoryAttribute.drag_drop;
}
object obj = CategoryAttribute.lockobj;
lock (obj)
{
if (CategoryAttribute.drag_drop == null)
{
CategoryAttribute.drag_drop = new CategoryAttribute("DragDrop");
}
}
return CategoryAttribute.drag_drop;
}
}
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Focus category.</summary>
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the focus category.</returns>
// Token: 0x170000FF RID: 255
// (get) Token: 0x060003A7 RID: 935 RVA: 0x0000B24C File Offset: 0x0000944C
public static CategoryAttribute Focus
{
get
{
if (CategoryAttribute.focus != null)
{
return CategoryAttribute.focus;
}
object obj = CategoryAttribute.lockobj;
lock (obj)
{
if (CategoryAttribute.focus == null)
{
CategoryAttribute.focus = new CategoryAttribute("Focus");
}
}
return CategoryAttribute.focus;
}
}
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Format category.</summary>
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the format category.</returns>
// Token: 0x17000100 RID: 256
// (get) Token: 0x060003A8 RID: 936 RVA: 0x0000B2C8 File Offset: 0x000094C8
public static CategoryAttribute Format
{
get
{
if (CategoryAttribute.format != null)
{
return CategoryAttribute.format;
}
object obj = CategoryAttribute.lockobj;
lock (obj)
{
if (CategoryAttribute.format == null)
{
CategoryAttribute.format = new CategoryAttribute("Format");
}
}
return CategoryAttribute.format;
}
}
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Key category.</summary>
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the key category.</returns>
// Token: 0x17000101 RID: 257
// (get) Token: 0x060003A9 RID: 937 RVA: 0x0000B344 File Offset: 0x00009544
public static CategoryAttribute Key
{
get
{
if (CategoryAttribute.key != null)
{
return CategoryAttribute.key;
}
object obj = CategoryAttribute.lockobj;
lock (obj)
{
if (CategoryAttribute.key == null)
{
CategoryAttribute.key = new CategoryAttribute("Key");
}
}
return CategoryAttribute.key;
}
}
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Layout category.</summary>
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the layout category.</returns>
// Token: 0x17000102 RID: 258
// (get) Token: 0x060003AA RID: 938 RVA: 0x0000B3C0 File Offset: 0x000095C0
public static CategoryAttribute Layout
{
get
{
if (CategoryAttribute.layout != null)
{
return CategoryAttribute.layout;
}
object obj = CategoryAttribute.lockobj;
lock (obj)
{
if (CategoryAttribute.layout == null)
{
CategoryAttribute.layout = new CategoryAttribute("Layout");
}
}
return CategoryAttribute.layout;
}
}
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Mouse category.</summary>
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the mouse category.</returns>
// Token: 0x17000103 RID: 259
// (get) Token: 0x060003AB RID: 939 RVA: 0x0000B43C File Offset: 0x0000963C
public static CategoryAttribute Mouse
{
get
{
if (CategoryAttribute.mouse != null)
{
return CategoryAttribute.mouse;
}
object obj = CategoryAttribute.lockobj;
lock (obj)
{
if (CategoryAttribute.mouse == null)
{
CategoryAttribute.mouse = new CategoryAttribute("Mouse");
}
}
return CategoryAttribute.mouse;
}
}
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the WindowStyle category.</summary>
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the window style category.</returns>
// Token: 0x17000104 RID: 260
// (get) Token: 0x060003AC RID: 940 RVA: 0x0000B4B8 File Offset: 0x000096B8
public static CategoryAttribute WindowStyle
{
get
{
if (CategoryAttribute.window_style != null)
{
return CategoryAttribute.window_style;
}
object obj = CategoryAttribute.lockobj;
lock (obj)
{
if (CategoryAttribute.window_style == null)
{
CategoryAttribute.window_style = new CategoryAttribute("WindowStyle");
}
}
return CategoryAttribute.window_style;
}
}
/// <summary>Looks up the localized name of the specified category.</summary>
/// <returns>The localized name of the category, or null if a localized name does not exist.</returns>
/// <param name="value">The identifer for the category to look up. </param>
// Token: 0x060003AD RID: 941 RVA: 0x0000B534 File Offset: 0x00009734
protected virtual string GetLocalizedString(string value)
{
return global::Locale.GetText(value);
}
/// <summary>Gets the name of the category for the property or event that this attribute is applied to.</summary>
/// <returns>The name of the category for the property or event that this attribute is applied to.</returns>
// Token: 0x17000105 RID: 261
// (get) Token: 0x060003AE RID: 942 RVA: 0x0000B53C File Offset: 0x0000973C
public string Category
{
get
{
if (!this.IsLocalized)
{
this.IsLocalized = true;
string localizedString = this.GetLocalizedString(this.category);
if (localizedString != null)
{
this.category = localizedString;
}
}
return this.category;
}
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.CategoryAttribute" />..</summary>
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
/// <param name="obj">The object to test the value equality of. </param>
// Token: 0x060003AF RID: 943 RVA: 0x0000B57C File Offset: 0x0000977C
public override bool Equals(object obj)
{
return obj is CategoryAttribute && (obj == this || ((CategoryAttribute)obj).Category == this.category);
}
/// <summary>Returns the hash code for this attribute.</summary>
/// <returns>A 32-bit signed integer hash code.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x060003B0 RID: 944 RVA: 0x0000B5B8 File Offset: 0x000097B8
public override int GetHashCode()
{
return this.category.GetHashCode();
}
/// <summary>Determines if this attribute is the default.</summary>
/// <returns>true if the attribute is the default value for this attribute class; otherwise, false.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x060003B1 RID: 945 RVA: 0x0000B5C8 File Offset: 0x000097C8
public override bool IsDefaultAttribute()
{
return this.category == CategoryAttribute.Default.Category;
}
// Token: 0x0400012B RID: 299
private string category;
// Token: 0x0400012C RID: 300
private bool IsLocalized;
// Token: 0x0400012D RID: 301
private static volatile CategoryAttribute action;
// Token: 0x0400012E RID: 302
private static volatile CategoryAttribute appearance;
// Token: 0x0400012F RID: 303
private static volatile CategoryAttribute behaviour;
// Token: 0x04000130 RID: 304
private static volatile CategoryAttribute data;
// Token: 0x04000131 RID: 305
private static volatile CategoryAttribute def;
// Token: 0x04000132 RID: 306
private static volatile CategoryAttribute design;
// Token: 0x04000133 RID: 307
private static volatile CategoryAttribute drag_drop;
// Token: 0x04000134 RID: 308
private static volatile CategoryAttribute focus;
// Token: 0x04000135 RID: 309
private static volatile CategoryAttribute format;
// Token: 0x04000136 RID: 310
private static volatile CategoryAttribute key;
// Token: 0x04000137 RID: 311
private static volatile CategoryAttribute layout;
// Token: 0x04000138 RID: 312
private static volatile CategoryAttribute mouse;
// Token: 0x04000139 RID: 313
private static volatile CategoryAttribute window_style;
// Token: 0x0400013A RID: 314
private static volatile CategoryAttribute async;
// Token: 0x0400013B RID: 315
private static object lockobj = new object();
}
}
+73
View File
@@ -0,0 +1,73 @@
using System;
using System.Globalization;
namespace System.ComponentModel
{
/// <summary>Provides a type converter to convert Unicode character objects to and from various other representations.</summary>
// Token: 0x02000060 RID: 96
public class CharConverter : TypeConverter
{
/// <summary>Gets a value indicating whether this converter can convert an object in the given source type to a Unicode character object using the specified context.</summary>
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="sourceType">A <see cref="T:System.Type" /> that represents the type you want to convert from. </param>
// Token: 0x060003B3 RID: 947 RVA: 0x0000B5E8 File Offset: 0x000097E8
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
}
/// <summary>Converts the given object to a Unicode character object.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="culture">The culture into which <paramref name="value" /> will be converted.</param>
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
/// <exception cref="T:System.FormatException">
/// <paramref name="value" /> is not a valid value for the target type. </exception>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x060003B4 RID: 948 RVA: 0x0000B604 File Offset: 0x00009804
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
{
string text = value as string;
if (text == null)
{
return base.ConvertFrom(context, culture, value);
}
if (text.Length > 1)
{
text = text.Trim();
}
if (text.Length > 1)
{
throw new FormatException(string.Format("String {0} is not a valid Char: it has to be less than or equal to one char long.", text));
}
if (text.Length == 0)
{
return '\0';
}
return text[0];
}
/// <summary>Converts the given value object to a Unicode character object using the arguments.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the converted value.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="culture">The culture into which <paramref name="value" /> will be converted.</param>
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
/// <param name="destinationType">The <see cref="T:System.Type" /> to convert the value to. </param>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x060003B5 RID: 949 RVA: 0x0000B678 File Offset: 0x00009878
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
if (destinationType != typeof(string) || value == null || !(value is char))
{
return base.ConvertTo(context, culture, value, destinationType);
}
char c = (char)value;
if (c == '\0')
{
return string.Empty;
}
return new string(c, 1);
}
}
}
@@ -0,0 +1,19 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies how the collection is changed.</summary>
// Token: 0x02000061 RID: 97
public enum CollectionChangeAction
{
/// <summary>Specifies that an element was added to the collection.</summary>
// Token: 0x0400013D RID: 317
Add = 1,
/// <summary>Specifies that an element was removed from the collection.</summary>
// Token: 0x0400013E RID: 318
Remove,
/// <summary>Specifies that the entire collection has changed. This is caused by using methods that manipulate the entire collection, such as <see cref="M:System.Collections.CollectionBase.Clear" />.</summary>
// Token: 0x0400013F RID: 319
Refresh
}
}
@@ -0,0 +1,49 @@
using System;
namespace System.ComponentModel
{
/// <summary>Provides data for the <see cref="E:System.Data.DataColumnCollection.CollectionChanged" /> event.</summary>
// Token: 0x02000062 RID: 98
public class CollectionChangeEventArgs : EventArgs
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.CollectionChangeEventArgs" /> class.</summary>
/// <param name="action">One of the <see cref="T:System.ComponentModel.CollectionChangeAction" /> values that specifies how the collection changed. </param>
/// <param name="element">An <see cref="T:System.Object" /> that specifies the instance of the collection where the change occurred. </param>
// Token: 0x060003B6 RID: 950 RVA: 0x0000B6D0 File Offset: 0x000098D0
public CollectionChangeEventArgs(CollectionChangeAction action, object element)
{
this.changeAction = action;
this.theElement = element;
}
/// <summary>Gets an action that specifies how the collection changed.</summary>
/// <returns>One of the <see cref="T:System.ComponentModel.CollectionChangeAction" /> values.</returns>
// Token: 0x17000106 RID: 262
// (get) Token: 0x060003B7 RID: 951 RVA: 0x0000B6E8 File Offset: 0x000098E8
public virtual CollectionChangeAction Action
{
get
{
return this.changeAction;
}
}
/// <summary>Gets the instance of the collection with the change.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the instance of the collection with the change, or null if you refresh the collection.</returns>
// Token: 0x17000107 RID: 263
// (get) Token: 0x060003B8 RID: 952 RVA: 0x0000B6F0 File Offset: 0x000098F0
public virtual object Element
{
get
{
return this.theElement;
}
}
// Token: 0x04000140 RID: 320
private CollectionChangeAction changeAction;
// Token: 0x04000141 RID: 321
private object theElement;
}
}
@@ -0,0 +1,11 @@
using System;
namespace System.ComponentModel
{
/// <summary>Represents the method that handles the <see cref="E:System.Data.DataColumnCollection.CollectionChanged" /> event raised when adding elements to or removing elements from a collection.</summary>
/// <param name="sender">The source of the event. </param>
/// <param name="e">A <see cref="T:System.ComponentModel.CollectionChangeEventArgs" /> that contains the event data. </param>
// Token: 0x02000322 RID: 802
// (Invoke) Token: 0x06001C61 RID: 7265
public delegate void CollectionChangeEventHandler(object sender, CollectionChangeEventArgs e);
}
@@ -0,0 +1,50 @@
using System;
using System.Collections;
using System.Globalization;
namespace System.ComponentModel
{
/// <summary>Provides a type converter to convert collection objects to and from various other representations.</summary>
// Token: 0x02000063 RID: 99
public class CollectionConverter : TypeConverter
{
/// <summary>Converts the given value object to the specified destination type.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the converted value.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="culture">The culture to which <paramref name="value" /> will be converted.</param>
/// <param name="value">The <see cref="T:System.Object" /> to convert. This parameter must inherit from <see cref="T:System.Collections.ICollection" />. </param>
/// <param name="destinationType">The <see cref="T:System.Type" /> to convert the value to. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="destinationType" /> is null. </exception>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x060003BA RID: 954 RVA: 0x0000B700 File Offset: 0x00009900
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
if (destinationType == typeof(string) && value != null && value is ICollection)
{
return "(Collection)";
}
return base.ConvertTo(context, culture, value, destinationType);
}
/// <summary>Gets a collection of properties for the type of array specified by the value parameter using the specified context and attributes.</summary>
/// <returns>A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> with the properties that are exposed for this data type, or null if there are no properties. This method always returns null.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="value">An <see cref="T:System.Object" /> that specifies the type of array to get the properties for. </param>
/// <param name="attributes">An array of type <see cref="T:System.Attribute" /> that will be used as a filter. </param>
// Token: 0x060003BB RID: 955 RVA: 0x0000B738 File Offset: 0x00009938
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
{
return null;
}
/// <summary>Gets a value indicating whether this object supports properties.</summary>
/// <returns>false because <see cref="M:System.ComponentModel.CollectionConverter.GetProperties(System.ComponentModel.ITypeDescriptorContext,System.Object,System.Attribute[])" /> should not be called to find the properties of this object. This method never returns true.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
// Token: 0x060003BC RID: 956 RVA: 0x0000B73C File Offset: 0x0000993C
public override bool GetPropertiesSupported(ITypeDescriptorContext context)
{
return false;
}
}
}
+185
View File
@@ -0,0 +1,185 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel
{
/// <summary>Provides the base implementation for the <see cref="T:System.ComponentModel.IComponent" /> interface and enables object sharing between applications.</summary>
// Token: 0x02000064 RID: 100
[ClassInterface(ClassInterfaceType.AutoDispatch)]
[DesignerCategory("Component")]
[ComVisible(true)]
public class Component : MarshalByRefObject, IDisposable, IComponent
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Component" /> class. </summary>
// Token: 0x060003BD RID: 957 RVA: 0x0000B740 File Offset: 0x00009940
public Component()
{
this.event_handlers = null;
}
/// <summary>Occurs when the component is disposed by a call to the <see cref="M:System.ComponentModel.Component.Dispose" /> method. </summary>
// Token: 0x14000013 RID: 19
// (add) Token: 0x060003BE RID: 958 RVA: 0x0000B75C File Offset: 0x0000995C
// (remove) Token: 0x060003BF RID: 959 RVA: 0x0000B770 File Offset: 0x00009970
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Advanced)]
public event EventHandler Disposed
{
add
{
this.Events.AddHandler(this.disposedEvent, value);
}
remove
{
this.Events.RemoveHandler(this.disposedEvent, value);
}
}
/// <summary>Gets a value indicating whether the component can raise an event.</summary>
/// <returns>true if the component can raise events; otherwise, false. The default is true.</returns>
// Token: 0x17000108 RID: 264
// (get) Token: 0x060003C0 RID: 960 RVA: 0x0000B784 File Offset: 0x00009984
protected virtual bool CanRaiseEvents
{
get
{
return false;
}
}
/// <summary>Gets or sets the <see cref="T:System.ComponentModel.ISite" /> of the <see cref="T:System.ComponentModel.Component" />.</summary>
/// <returns>The <see cref="T:System.ComponentModel.ISite" /> associated with the <see cref="T:System.ComponentModel.Component" />, or null if the <see cref="T:System.ComponentModel.Component" /> is not encapsulated in an <see cref="T:System.ComponentModel.IContainer" />, the <see cref="T:System.ComponentModel.Component" /> does not have an <see cref="T:System.ComponentModel.ISite" /> associated with it, or the <see cref="T:System.ComponentModel.Component" /> is removed from its <see cref="T:System.ComponentModel.IContainer" />.</returns>
// Token: 0x17000109 RID: 265
// (get) Token: 0x060003C1 RID: 961 RVA: 0x0000B788 File Offset: 0x00009988
// (set) Token: 0x060003C2 RID: 962 RVA: 0x0000B790 File Offset: 0x00009990
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Browsable(false)]
public virtual ISite Site
{
get
{
return this.mySite;
}
set
{
this.mySite = value;
}
}
/// <summary>Gets the <see cref="T:System.ComponentModel.IContainer" /> that contains the <see cref="T:System.ComponentModel.Component" />.</summary>
/// <returns>The <see cref="T:System.ComponentModel.IContainer" /> that contains the <see cref="T:System.ComponentModel.Component" />, if any, or null if the <see cref="T:System.ComponentModel.Component" /> is not encapsulated in an <see cref="T:System.ComponentModel.IContainer" />.</returns>
// Token: 0x1700010A RID: 266
// (get) Token: 0x060003C3 RID: 963 RVA: 0x0000B79C File Offset: 0x0000999C
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public IContainer Container
{
get
{
if (this.mySite == null)
{
return null;
}
return this.mySite.Container;
}
}
/// <summary>Gets a value that indicates whether the <see cref="T:System.ComponentModel.Component" /> is currently in design mode.</summary>
/// <returns>true if the <see cref="T:System.ComponentModel.Component" /> is in design mode; otherwise, false.</returns>
// Token: 0x1700010B RID: 267
// (get) Token: 0x060003C4 RID: 964 RVA: 0x0000B7B8 File Offset: 0x000099B8
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Browsable(false)]
protected bool DesignMode
{
get
{
return this.mySite != null && this.mySite.DesignMode;
}
}
/// <summary>Gets the list of event handlers that are attached to this <see cref="T:System.ComponentModel.Component" />.</summary>
/// <returns>An <see cref="T:System.ComponentModel.EventHandlerList" /> that provides the delegates for this component.</returns>
// Token: 0x1700010C RID: 268
// (get) Token: 0x060003C5 RID: 965 RVA: 0x0000B7D4 File Offset: 0x000099D4
protected EventHandlerList Events
{
get
{
if (this.event_handlers == null)
{
this.event_handlers = new EventHandlerList();
}
return this.event_handlers;
}
}
/// <summary>Releases unmanaged resources and performs other cleanup operations before the <see cref="T:System.ComponentModel.Component" /> is reclaimed by garbage collection.</summary>
// Token: 0x060003C6 RID: 966 RVA: 0x0000B7F4 File Offset: 0x000099F4
~Component()
{
this.Dispose(false);
}
/// <summary>Releases all resources used by the <see cref="T:System.ComponentModel.Component" />.</summary>
// Token: 0x060003C7 RID: 967 RVA: 0x0000B830 File Offset: 0x00009A30
public void Dispose()
{
this.Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.ComponentModel.Component" /> and optionally releases the managed resources.</summary>
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
// Token: 0x060003C8 RID: 968 RVA: 0x0000B840 File Offset: 0x00009A40
protected virtual void Dispose(bool release_all)
{
if (release_all)
{
if (this.mySite != null && this.mySite.Container != null)
{
this.mySite.Container.Remove(this);
}
EventHandler eventHandler = (EventHandler)this.Events[this.disposedEvent];
if (eventHandler != null)
{
eventHandler(this, EventArgs.Empty);
}
}
}
/// <summary>Returns an object that represents a service provided by the <see cref="T:System.ComponentModel.Component" /> or by its <see cref="T:System.ComponentModel.Container" />.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents a service provided by the <see cref="T:System.ComponentModel.Component" />, or null if the <see cref="T:System.ComponentModel.Component" /> does not provide the specified service.</returns>
/// <param name="service">A service provided by the <see cref="T:System.ComponentModel.Component" />. </param>
// Token: 0x060003C9 RID: 969 RVA: 0x0000B8A8 File Offset: 0x00009AA8
protected virtual object GetService(Type service)
{
if (this.mySite != null)
{
return this.mySite.GetService(service);
}
return null;
}
/// <summary>Returns a <see cref="T:System.String" /> containing the name of the <see cref="T:System.ComponentModel.Component" />, if any. This method should not be overridden.</summary>
/// <returns>A <see cref="T:System.String" /> containing the name of the <see cref="T:System.ComponentModel.Component" />, if any, or null if the <see cref="T:System.ComponentModel.Component" /> is unnamed.</returns>
// Token: 0x060003CA RID: 970 RVA: 0x0000B8C4 File Offset: 0x00009AC4
public override string ToString()
{
if (this.mySite == null)
{
return base.GetType().ToString();
}
return string.Format("{0} [{1}]", this.mySite.Name, base.GetType().ToString());
}
// Token: 0x04000142 RID: 322
private EventHandlerList event_handlers;
// Token: 0x04000143 RID: 323
private ISite mySite;
// Token: 0x04000144 RID: 324
private object disposedEvent = new object();
}
}
@@ -0,0 +1,62 @@
using System;
using System.Collections;
using System.Runtime.InteropServices;
namespace System.ComponentModel
{
/// <summary>Provides a read-only container for a collection of <see cref="T:System.ComponentModel.IComponent" /> objects.</summary>
// Token: 0x02000065 RID: 101
[ComVisible(true)]
public class ComponentCollection : ReadOnlyCollectionBase
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.ComponentCollection" /> class using the specified array of components.</summary>
/// <param name="components">An array of <see cref="T:System.ComponentModel.IComponent" /> objects to initialize the collection with. </param>
// Token: 0x060003CB RID: 971 RVA: 0x0000B908 File Offset: 0x00009B08
public ComponentCollection(IComponent[] components)
{
base.InnerList.AddRange(components);
}
/// <summary>Gets the <see cref="T:System.ComponentModel.Component" /> in the collection at the specified collection index.</summary>
/// <returns>The <see cref="T:System.ComponentModel.IComponent" /> at the specified index.</returns>
/// <param name="index">The collection index of the <see cref="T:System.ComponentModel.Component" /> to get. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">If the specified index is not within the index range of the collection. </exception>
// Token: 0x1700010D RID: 269
public virtual IComponent this[int index]
{
get
{
return (IComponent)base.InnerList[index];
}
}
/// <summary>Gets any component in the collection matching the specified name.</summary>
/// <returns>A component with a name matching the name specified by the <paramref name="name" /> parameter, or null if the named component cannot be found in the collection.</returns>
/// <param name="name">The name of the <see cref="T:System.ComponentModel.IComponent" /> to get. </param>
// Token: 0x1700010E RID: 270
public virtual IComponent this[string name]
{
get
{
foreach (object obj in base.InnerList)
{
IComponent component = (IComponent)obj;
if (component.Site != null && component.Site.Name == name)
{
return component;
}
}
return null;
}
}
/// <summary>Copies the entire collection to an array, starting writing at the specified array index.</summary>
/// <param name="array">An <see cref="T:System.ComponentModel.IComponent" /> array to copy the objects in the collection to. </param>
/// <param name="index">The index of the <paramref name="array" /> at which copying to should begin. </param>
// Token: 0x060003CE RID: 974 RVA: 0x0000B9C4 File Offset: 0x00009BC4
public void CopyTo(IComponent[] array, int index)
{
base.InnerList.CopyTo(array, index);
}
}
}
@@ -0,0 +1,37 @@
using System;
namespace System.ComponentModel
{
/// <summary>Provides a type converter to convert components to and from various other representations.</summary>
// Token: 0x02000066 RID: 102
public class ComponentConverter : ReferenceConverter
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.ComponentConverter" /> class.</summary>
/// <param name="type">A <see cref="T:System.Type" /> that represents the type to associate with this component converter. </param>
// Token: 0x060003CF RID: 975 RVA: 0x0000B9D4 File Offset: 0x00009BD4
public ComponentConverter(Type type)
: base(type)
{
}
/// <summary>Gets a collection of properties for the type of component specified by the value parameter.</summary>
/// <returns>A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> with the properties that are exposed for the component, or null if there are no properties.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="value">An <see cref="T:System.Object" /> that specifies the type of component to get the properties for. </param>
/// <param name="attributes">An array of type <see cref="T:System.Attribute" /> that will be used as a filter. </param>
// Token: 0x060003D0 RID: 976 RVA: 0x0000B9E0 File Offset: 0x00009BE0
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
{
return TypeDescriptor.GetProperties(value, attributes);
}
/// <summary>Gets a value indicating whether this object supports properties using the specified context.</summary>
/// <returns>true because <see cref="M:System.ComponentModel.TypeConverter.GetProperties(System.Object)" /> should be called to find the properties of this object. This method never returns false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
// Token: 0x060003D1 RID: 977 RVA: 0x0000B9EC File Offset: 0x00009BEC
public override bool GetPropertiesSupported(ITypeDescriptorContext context)
{
return true;
}
}
}
+97
View File
@@ -0,0 +1,97 @@
using System;
using System.Collections;
using System.ComponentModel.Design;
using System.Reflection;
namespace System.ComponentModel
{
// Token: 0x020000D4 RID: 212
internal class ComponentInfo : Info
{
// Token: 0x06000739 RID: 1849 RVA: 0x000137E0 File Offset: 0x000119E0
public ComponentInfo(IComponent component)
: base(component.GetType())
{
this._component = component;
}
// Token: 0x0600073A RID: 1850 RVA: 0x000137F8 File Offset: 0x000119F8
public override AttributeCollection GetAttributes()
{
return base.GetAttributes(this._component);
}
// Token: 0x0600073B RID: 1851 RVA: 0x00013808 File Offset: 0x00011A08
public override EventDescriptorCollection GetEvents()
{
if (this._events != null)
{
return this._events;
}
bool flag = true;
EventInfo[] events = this._component.GetType().GetEvents();
Hashtable hashtable = new Hashtable();
foreach (EventInfo eventInfo in events)
{
hashtable[eventInfo.Name] = new ReflectionEventDescriptor(eventInfo);
}
if (this._component.Site != null)
{
global::System.ComponentModel.Design.ITypeDescriptorFilterService typeDescriptorFilterService = (global::System.ComponentModel.Design.ITypeDescriptorFilterService)this._component.Site.GetService(typeof(global::System.ComponentModel.Design.ITypeDescriptorFilterService));
if (typeDescriptorFilterService != null)
{
flag = typeDescriptorFilterService.FilterEvents(this._component, hashtable);
}
}
ArrayList arrayList = new ArrayList();
arrayList.AddRange(hashtable.Values);
EventDescriptorCollection eventDescriptorCollection = new EventDescriptorCollection(arrayList);
if (flag)
{
this._events = eventDescriptorCollection;
}
return eventDescriptorCollection;
}
// Token: 0x0600073C RID: 1852 RVA: 0x000138E8 File Offset: 0x00011AE8
public override PropertyDescriptorCollection GetProperties()
{
if (this._properties != null)
{
return this._properties;
}
bool flag = true;
PropertyInfo[] properties = this._component.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public);
Hashtable hashtable = new Hashtable();
for (int i = properties.Length - 1; i >= 0; i--)
{
hashtable[properties[i].Name] = new ReflectionPropertyDescriptor(properties[i]);
}
if (this._component.Site != null)
{
global::System.ComponentModel.Design.ITypeDescriptorFilterService typeDescriptorFilterService = (global::System.ComponentModel.Design.ITypeDescriptorFilterService)this._component.Site.GetService(typeof(global::System.ComponentModel.Design.ITypeDescriptorFilterService));
if (typeDescriptorFilterService != null)
{
flag = typeDescriptorFilterService.FilterProperties(this._component, hashtable);
}
}
PropertyDescriptor[] array = new PropertyDescriptor[hashtable.Values.Count];
hashtable.Values.CopyTo(array, 0);
PropertyDescriptorCollection propertyDescriptorCollection = new PropertyDescriptorCollection(array, true);
if (flag)
{
this._properties = propertyDescriptorCollection;
}
return propertyDescriptorCollection;
}
// Token: 0x0400020D RID: 525
private IComponent _component;
// Token: 0x0400020E RID: 526
private EventDescriptorCollection _events;
// Token: 0x0400020F RID: 527
private PropertyDescriptorCollection _properties;
}
}
@@ -0,0 +1,170 @@
using System;
using System.Collections;
using System.ComponentModel.Design.Serialization;
using System.Globalization;
using System.Reflection;
namespace System.ComponentModel
{
/// <summary>Provides a type converter to convert <see cref="T:System.Globalization.CultureInfo" /> objects to and from various other representations.</summary>
// Token: 0x02000067 RID: 103
public class CultureInfoConverter : TypeConverter
{
/// <summary>Gets a value indicating whether this converter can convert an object in the given source type to a <see cref="T:System.Globalization.CultureInfo" /> using the specified context.</summary>
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="sourceType">A <see cref="T:System.Type" /> that represents the type you wish to convert from. </param>
// Token: 0x060003D3 RID: 979 RVA: 0x0000B9F8 File Offset: 0x00009BF8
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
}
/// <summary>Gets a value indicating whether this converter can convert an object to the given destination type using the context.</summary>
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="destinationType">A <see cref="T:System.Type" /> that represents the type you wish to convert to. </param>
// Token: 0x060003D4 RID: 980 RVA: 0x0000BA14 File Offset: 0x00009C14
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
{
return destinationType == typeof(string) || destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) || base.CanConvertTo(context, destinationType);
}
/// <summary>Converts the specified value object to a <see cref="T:System.Globalization.CultureInfo" />.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the converted value.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context.</param>
/// <param name="culture">A <see cref="T:System.Globalization.CultureInfo" /> that specifies the culture to which to convert.</param>
/// <param name="value">The <see cref="T:System.Object" /> to convert.</param>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="value" /> specifies a culture that is not valid. </exception>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x060003D5 RID: 981 RVA: 0x0000BA50 File Offset: 0x00009C50
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
{
string text = value as string;
if (text == null)
{
return base.ConvertFrom(context, culture, value);
}
if (string.Compare(text, "(Default)", false) == 0)
{
return CultureInfo.InvariantCulture;
}
try
{
return new CultureInfo(text);
}
catch
{
foreach (CultureInfo cultureInfo in CultureInfo.GetCultures(CultureTypes.AllCultures))
{
if (string.Compare(cultureInfo.DisplayName, 0, text, 0, text.Length, true) == 0)
{
return cultureInfo;
}
}
}
throw new ArgumentException(string.Format("Culture {0} cannot be converted to a CultureInfo or is not available in this environment.", value));
}
/// <summary>Converts the given value object to the specified destination type.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="culture">A <see cref="T:System.Globalization.CultureInfo" /> that specifies the culture to which to convert.</param>
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
/// <param name="destinationType">The <see cref="T:System.Type" /> to convert the value to. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="destinationType" /> is null. </exception>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x060003D6 RID: 982 RVA: 0x0000BB14 File Offset: 0x00009D14
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
if (destinationType == typeof(string))
{
if (value == null || !(value is CultureInfo))
{
return "(Default)";
}
if (value == CultureInfo.InvariantCulture)
{
return "(Default)";
}
return ((CultureInfo)value).DisplayName;
}
else
{
if (destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) && value is CultureInfo)
{
CultureInfo cultureInfo = (CultureInfo)value;
ConstructorInfo constructor = typeof(CultureInfo).GetConstructor(new Type[] { typeof(int) });
return new global::System.ComponentModel.Design.Serialization.InstanceDescriptor(constructor, new object[] { cultureInfo.LCID });
}
return base.ConvertTo(context, culture, value, destinationType);
}
}
/// <summary>Gets a collection of standard values for a <see cref="T:System.Globalization.CultureInfo" /> object using the specified context.</summary>
/// <returns>A <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> containing a standard set of valid values, or null if the data type does not support a standard set of values.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
// Token: 0x060003D7 RID: 983 RVA: 0x0000BBD4 File Offset: 0x00009DD4
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
if (this._standardValues == null)
{
CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.AllCultures);
Array.Sort(cultures, new CultureInfoConverter.CultureInfoComparer());
CultureInfo[] array = new CultureInfo[cultures.Length + 1];
array[0] = CultureInfo.InvariantCulture;
Array.Copy(cultures, 0, array, 1, cultures.Length);
this._standardValues = new TypeConverter.StandardValuesCollection(array);
}
return this._standardValues;
}
/// <summary>Gets a value indicating whether the list of standard values returned from <see cref="M:System.ComponentModel.CultureInfoConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)" /> is an exhaustive list.</summary>
/// <returns>false because the <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> returned from <see cref="M:System.ComponentModel.CultureInfoConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)" /> is not an exhaustive list of possible values (that is, other values are possible). This method never returns true.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
// Token: 0x060003D8 RID: 984 RVA: 0x0000BC30 File Offset: 0x00009E30
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
{
return false;
}
/// <summary>Gets a value indicating whether this object supports a standard set of values that can be picked from a list using the specified context.</summary>
/// <returns>true because <see cref="M:System.ComponentModel.CultureInfoConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)" /> should be called to find a common set of values the object supports. This method never returns false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
// Token: 0x060003D9 RID: 985 RVA: 0x0000BC34 File Offset: 0x00009E34
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
{
return true;
}
// Token: 0x04000145 RID: 325
private TypeConverter.StandardValuesCollection _standardValues;
// Token: 0x02000068 RID: 104
private class CultureInfoComparer : IComparer
{
// Token: 0x060003DB RID: 987 RVA: 0x0000BC40 File Offset: 0x00009E40
public int Compare(object first, object second)
{
if (first == null)
{
if (second == null)
{
return 0;
}
return -1;
}
else
{
if (second == null)
{
return 1;
}
return string.Compare(((CultureInfo)first).DisplayName, ((CultureInfo)second).DisplayName, false, CultureInfo.CurrentCulture);
}
}
}
}
}
@@ -0,0 +1,174 @@
using System;
namespace System.ComponentModel
{
/// <summary>Provides a simple default implementation of the <see cref="T:System.ComponentModel.ICustomTypeDescriptor" /> interface.</summary>
// Token: 0x02000069 RID: 105
public abstract class CustomTypeDescriptor : ICustomTypeDescriptor
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.CustomTypeDescriptor" /> class.</summary>
// Token: 0x060003DC RID: 988 RVA: 0x0000BC88 File Offset: 0x00009E88
protected CustomTypeDescriptor()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.CustomTypeDescriptor" /> class using a parent custom type descriptor.</summary>
/// <param name="parent">The parent custom type descriptor.</param>
// Token: 0x060003DD RID: 989 RVA: 0x0000BC90 File Offset: 0x00009E90
protected CustomTypeDescriptor(ICustomTypeDescriptor parent)
{
this._parent = parent;
}
/// <summary>Returns a collection of custom attributes for the type represented by this type descriptor.</summary>
/// <returns>An <see cref="T:System.ComponentModel.AttributeCollection" /> containing the attributes for the type. The default is <see cref="F:System.ComponentModel.AttributeCollection.Empty" />.</returns>
// Token: 0x060003DE RID: 990 RVA: 0x0000BCA0 File Offset: 0x00009EA0
public virtual AttributeCollection GetAttributes()
{
if (this._parent != null)
{
return this._parent.GetAttributes();
}
return AttributeCollection.Empty;
}
/// <summary>Returns the fully qualified name of the class represented by this type descriptor.</summary>
/// <returns>A <see cref="T:System.String" /> containing the fully qualified class name of the type this type descriptor is describing. The default is null.</returns>
// Token: 0x060003DF RID: 991 RVA: 0x0000BCC0 File Offset: 0x00009EC0
public virtual string GetClassName()
{
if (this._parent != null)
{
return this._parent.GetClassName();
}
return null;
}
/// <summary>Returns the name of the class represented by this type descriptor.</summary>
/// <returns>A <see cref="T:System.String" /> containing the name of the component instance this type descriptor is describing. The default is null.</returns>
// Token: 0x060003E0 RID: 992 RVA: 0x0000BCDC File Offset: 0x00009EDC
public virtual string GetComponentName()
{
if (this._parent != null)
{
return this._parent.GetComponentName();
}
return null;
}
/// <summary>Returns a type converter for the type represented by this type descriptor.</summary>
/// <returns>A <see cref="T:System.ComponentModel.TypeConverter" /> for the type represented by this type descriptor. The default is a newly created <see cref="T:System.ComponentModel.TypeConverter" />.</returns>
// Token: 0x060003E1 RID: 993 RVA: 0x0000BCF8 File Offset: 0x00009EF8
public virtual TypeConverter GetConverter()
{
if (this._parent != null)
{
return this._parent.GetConverter();
}
return new TypeConverter();
}
/// <summary>Returns the event descriptor for the default event of the object represented by this type descriptor.</summary>
/// <returns>The <see cref="T:System.ComponentModel.EventDescriptor" /> for the default event on the object represented by this type descriptor. The default is null.</returns>
// Token: 0x060003E2 RID: 994 RVA: 0x0000BD18 File Offset: 0x00009F18
public virtual EventDescriptor GetDefaultEvent()
{
if (this._parent != null)
{
return this._parent.GetDefaultEvent();
}
return null;
}
/// <summary>Returns the property descriptor for the default property of the object represented by this type descriptor.</summary>
/// <returns>A <see cref="T:System.ComponentModel.PropertyDescriptor" /> for the default property on the object represented by this type descriptor. The default is null.</returns>
// Token: 0x060003E3 RID: 995 RVA: 0x0000BD34 File Offset: 0x00009F34
public virtual PropertyDescriptor GetDefaultProperty()
{
if (this._parent != null)
{
return this._parent.GetDefaultProperty();
}
return null;
}
/// <summary>Returns an editor of the specified type that is to be associated with the class represented by this type descriptor.</summary>
/// <returns>An editor of the given type that is to be associated with the class represented by this type descriptor. The default is null.</returns>
/// <param name="editorBaseType">The base type of the editor to retrieve.</param>
// Token: 0x060003E4 RID: 996 RVA: 0x0000BD50 File Offset: 0x00009F50
public virtual object GetEditor(Type editorBaseType)
{
if (this._parent != null)
{
return this._parent.GetEditor(editorBaseType);
}
return null;
}
/// <summary>Returns a collection of event descriptors for the object represented by this type descriptor.</summary>
/// <returns>An <see cref="T:System.ComponentModel.EventDescriptorCollection" /> containing the event descriptors for the object represented by this type descriptor. The default is <see cref="F:System.ComponentModel.EventDescriptorCollection.Empty" />.</returns>
// Token: 0x060003E5 RID: 997 RVA: 0x0000BD6C File Offset: 0x00009F6C
public virtual EventDescriptorCollection GetEvents()
{
if (this._parent != null)
{
return this._parent.GetEvents();
}
return EventDescriptorCollection.Empty;
}
/// <summary>Returns a filtered collection of event descriptors for the object represented by this type descriptor.</summary>
/// <returns>An <see cref="T:System.ComponentModel.EventDescriptorCollection" /> containing the event descriptions for the object represented by this type descriptor. The default is <see cref="F:System.ComponentModel.EventDescriptorCollection.Empty" />.</returns>
/// <param name="attributes">An array of attributes to use as a filter. This can be null.</param>
// Token: 0x060003E6 RID: 998 RVA: 0x0000BD8C File Offset: 0x00009F8C
public virtual EventDescriptorCollection GetEvents(Attribute[] attributes)
{
if (this._parent != null)
{
return this._parent.GetEvents(attributes);
}
return EventDescriptorCollection.Empty;
}
/// <summary>Returns a collection of property descriptors for the object represented by this type descriptor.</summary>
/// <returns>A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> containing the property descriptions for the object represented by this type descriptor. The default is <see cref="F:System.ComponentModel.PropertyDescriptorCollection.Empty" />.</returns>
// Token: 0x060003E7 RID: 999 RVA: 0x0000BDAC File Offset: 0x00009FAC
public virtual PropertyDescriptorCollection GetProperties()
{
if (this._parent != null)
{
return this._parent.GetProperties();
}
return PropertyDescriptorCollection.Empty;
}
/// <summary>Returns a filtered collection of property descriptors for the object represented by this type descriptor.</summary>
/// <returns>A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> containing the property descriptions for the object represented by this type descriptor. The default is <see cref="F:System.ComponentModel.PropertyDescriptorCollection.Empty" />.</returns>
/// <param name="attributes">An array of attributes to use as a filter. This can be null.</param>
// Token: 0x060003E8 RID: 1000 RVA: 0x0000BDCC File Offset: 0x00009FCC
public virtual PropertyDescriptorCollection GetProperties(Attribute[] attributes)
{
if (this._parent != null)
{
return this._parent.GetProperties(attributes);
}
return PropertyDescriptorCollection.Empty;
}
/// <summary>Returns an object that contains the property described by the specified property descriptor.</summary>
/// <returns>An <see cref="T:System.Object" /> that owns the given property specified by the type descriptor. The default is null.</returns>
/// <param name="pd">The property descriptor for which to retrieve the owning object.</param>
// Token: 0x060003E9 RID: 1001 RVA: 0x0000BDEC File Offset: 0x00009FEC
public virtual object GetPropertyOwner(PropertyDescriptor pd)
{
if (this._parent != null)
{
return this._parent.GetPropertyOwner(pd);
}
return null;
}
// Token: 0x04000146 RID: 326
private ICustomTypeDescriptor _parent;
}
}
+117
View File
@@ -0,0 +1,117 @@
using System;
using System.ComponentModel.Design.Serialization;
using System.Globalization;
using System.Reflection;
namespace System.ComponentModel
{
/// <summary>Provides a type converter to convert <see cref="T:System.DateTime" /> objects to and from various other representations.</summary>
// Token: 0x0200006A RID: 106
public class DateTimeConverter : TypeConverter
{
/// <summary>Gets a value indicating whether this converter can convert an object in the given source type to a <see cref="T:System.DateTime" /> using the specified context.</summary>
/// <returns>true if this object can perform the conversion; otherwise, false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="sourceType">A <see cref="T:System.Type" /> that represents the type you wish to convert from. </param>
// Token: 0x060003EB RID: 1003 RVA: 0x0000BE10 File Offset: 0x0000A010
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
}
/// <summary>Gets a value indicating whether this converter can convert an object to the given destination type using the context.</summary>
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="destinationType">A <see cref="T:System.Type" /> that represents the type you wish to convert to. </param>
// Token: 0x060003EC RID: 1004 RVA: 0x0000BE2C File Offset: 0x0000A02C
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
{
return destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) || base.CanConvertTo(context, destinationType);
}
/// <summary>Converts the given value object to a <see cref="T:System.DateTime" />.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="culture">An optional <see cref="T:System.Globalization.CultureInfo" />. If not supplied, the current culture is assumed. </param>
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
/// <exception cref="T:System.FormatException">
/// <paramref name="value" /> is not a valid value for the target type. </exception>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x060003ED RID: 1005 RVA: 0x0000BE48 File Offset: 0x0000A048
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
{
if (value is string)
{
string text = (string)value;
try
{
if (text != null && text.Trim().Length == 0)
{
return DateTime.MinValue;
}
if (culture == null)
{
return DateTime.Parse(text);
}
DateTimeFormatInfo dateTimeFormatInfo = (DateTimeFormatInfo)culture.GetFormat(typeof(DateTimeFormatInfo));
return DateTime.Parse(text, dateTimeFormatInfo);
}
catch
{
throw new FormatException(text + " is not a valid DateTime value.");
}
}
return base.ConvertFrom(context, culture, value);
}
/// <summary>Converts the given value object to a <see cref="T:System.DateTime" /> using the arguments.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="culture">An optional <see cref="T:System.Globalization.CultureInfo" />. If not supplied, the current culture is assumed. </param>
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
/// <param name="destinationType">The <see cref="T:System.Type" /> to convert the value to. </param>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x060003EE RID: 1006 RVA: 0x0000BF10 File Offset: 0x0000A110
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
if (value is DateTime)
{
DateTime dateTime = (DateTime)value;
if (destinationType == typeof(string))
{
if (culture == null)
{
culture = CultureInfo.CurrentCulture;
}
if (dateTime == DateTime.MinValue)
{
return string.Empty;
}
DateTimeFormatInfo dateTimeFormatInfo = (DateTimeFormatInfo)culture.GetFormat(typeof(DateTimeFormatInfo));
if (culture == CultureInfo.InvariantCulture)
{
if (dateTime.Equals(dateTime.Date))
{
return dateTime.ToString("yyyy-MM-dd", culture);
}
return dateTime.ToString(culture);
}
else
{
if (dateTime == dateTime.Date)
{
return dateTime.ToString(dateTimeFormatInfo.ShortDatePattern, culture);
}
return dateTime.ToString(dateTimeFormatInfo.ShortDatePattern + " " + dateTimeFormatInfo.ShortTimePattern, culture);
}
}
else if (destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor))
{
ConstructorInfo constructor = typeof(DateTime).GetConstructor(new Type[] { typeof(long) });
return new global::System.ComponentModel.Design.Serialization.InstanceDescriptor(constructor, new object[] { dateTime.Ticks });
}
}
return base.ConvertTo(context, culture, value, destinationType);
}
}
}
+71
View File
@@ -0,0 +1,71 @@
using System;
using System.ComponentModel.Design.Serialization;
using System.Globalization;
using System.Reflection;
namespace System.ComponentModel
{
/// <summary>Provides a type converter to convert <see cref="T:System.Decimal" /> objects to and from various other representations.</summary>
// Token: 0x0200006B RID: 107
public class DecimalConverter : BaseNumberConverter
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DecimalConverter" /> class. </summary>
// Token: 0x060003EF RID: 1007 RVA: 0x0000C04C File Offset: 0x0000A24C
public DecimalConverter()
{
this.InnerType = typeof(decimal);
}
// Token: 0x1700010F RID: 271
// (get) Token: 0x060003F0 RID: 1008 RVA: 0x0000C064 File Offset: 0x0000A264
internal override bool SupportHex
{
get
{
return false;
}
}
/// <summary>Gets a value indicating whether this converter can convert an object to the given destination type using the context.</summary>
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="destinationType">A <see cref="T:System.Type" /> that represents the type you wish to convert to. </param>
// Token: 0x060003F1 RID: 1009 RVA: 0x0000C068 File Offset: 0x0000A268
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
{
return destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) || base.CanConvertTo(context, destinationType);
}
/// <summary>Converts the given value object to a <see cref="T:System.Decimal" /> using the arguments.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the converted value.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="culture">An optional <see cref="T:System.Globalization.CultureInfo" />. If not supplied, the current culture is assumed. </param>
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
/// <param name="destinationType">The <see cref="T:System.Type" /> to convert the value to. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="destinationType" /> is null. </exception>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x060003F2 RID: 1010 RVA: 0x0000C084 File Offset: 0x0000A284
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
if (destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) && value is decimal)
{
decimal num = (decimal)value;
ConstructorInfo constructor = typeof(decimal).GetConstructor(new Type[] { typeof(int[]) });
return new global::System.ComponentModel.Design.Serialization.InstanceDescriptor(constructor, new object[] { decimal.GetBits(num) });
}
return base.ConvertTo(context, culture, value, destinationType);
}
// Token: 0x060003F3 RID: 1011 RVA: 0x0000C0F8 File Offset: 0x0000A2F8
internal override string ConvertToString(object value, NumberFormatInfo format)
{
return ((decimal)value).ToString("G", format);
}
// Token: 0x060003F4 RID: 1012 RVA: 0x0000C11C File Offset: 0x0000A31C
internal override object ConvertFromString(string value, NumberFormatInfo format)
{
return decimal.Parse(value, NumberStyles.Float, format);
}
}
}
@@ -0,0 +1,54 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies the default event for a component.</summary>
// Token: 0x0200006C RID: 108
[AttributeUsage(AttributeTargets.Class)]
public sealed class DefaultEventAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultEventAttribute" /> class.</summary>
/// <param name="name">The name of the default event for the component this attribute is bound to. </param>
// Token: 0x060003F5 RID: 1013 RVA: 0x0000C130 File Offset: 0x0000A330
public DefaultEventAttribute(string name)
{
this.eventName = name;
}
/// <summary>Gets the name of the default event for the component this attribute is bound to.</summary>
/// <returns>The name of the default event for the component this attribute is bound to. The default value is null.</returns>
// Token: 0x17000110 RID: 272
// (get) Token: 0x060003F7 RID: 1015 RVA: 0x0000C150 File Offset: 0x0000A350
public string Name
{
get
{
return this.eventName;
}
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DefaultEventAttribute" />.</summary>
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
/// <param name="obj">The object to test the value equality of. </param>
// Token: 0x060003F8 RID: 1016 RVA: 0x0000C158 File Offset: 0x0000A358
public override bool Equals(object o)
{
return o is DefaultEventAttribute && ((DefaultEventAttribute)o).eventName == this.eventName;
}
/// <summary>Returns the hash code for this instance.</summary>
/// <returns>A 32-bit signed integer hash code.</returns>
// Token: 0x060003F9 RID: 1017 RVA: 0x0000C180 File Offset: 0x0000A380
public override int GetHashCode()
{
return base.GetHashCode();
}
// Token: 0x04000147 RID: 327
private string eventName;
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.DefaultEventAttribute" />, which is null. This static field is read-only.</summary>
// Token: 0x04000148 RID: 328
public static readonly DefaultEventAttribute Default = new DefaultEventAttribute(null);
}
}
@@ -0,0 +1,54 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies the default property for a component.</summary>
// Token: 0x0200006D RID: 109
[AttributeUsage(AttributeTargets.Class)]
public sealed class DefaultPropertyAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultPropertyAttribute" /> class.</summary>
/// <param name="name">The name of the default property for the component this attribute is bound to. </param>
// Token: 0x060003FA RID: 1018 RVA: 0x0000C188 File Offset: 0x0000A388
public DefaultPropertyAttribute(string name)
{
this.property_name = name;
}
/// <summary>Gets the name of the default property for the component this attribute is bound to.</summary>
/// <returns>The name of the default property for the component this attribute is bound to. The default value is null.</returns>
// Token: 0x17000111 RID: 273
// (get) Token: 0x060003FC RID: 1020 RVA: 0x0000C1A8 File Offset: 0x0000A3A8
public string Name
{
get
{
return this.property_name;
}
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DefaultPropertyAttribute" />.</summary>
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
/// <param name="obj">The object to test the value equality of. </param>
// Token: 0x060003FD RID: 1021 RVA: 0x0000C1B0 File Offset: 0x0000A3B0
public override bool Equals(object o)
{
return o is DefaultPropertyAttribute && ((DefaultPropertyAttribute)o).Name == this.property_name;
}
/// <summary>Returns the hash code for this instance.</summary>
/// <returns>A 32-bit signed integer hash code.</returns>
// Token: 0x060003FE RID: 1022 RVA: 0x0000C1D8 File Offset: 0x0000A3D8
public override int GetHashCode()
{
return base.GetHashCode();
}
// Token: 0x04000149 RID: 329
private string property_name;
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.DefaultPropertyAttribute" />, which is null. This static field is read-only.</summary>
// Token: 0x0400014A RID: 330
public static readonly DefaultPropertyAttribute Default = new DefaultPropertyAttribute(null);
}
}
@@ -0,0 +1,167 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies the default value for a property.</summary>
// Token: 0x0200006E RID: 110
[AttributeUsage(AttributeTargets.All)]
public class DefaultValueAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a <see cref="T:System.Boolean" /> value.</summary>
/// <param name="value">A <see cref="T:System.Boolean" /> that is the default value. </param>
// Token: 0x060003FF RID: 1023 RVA: 0x0000C1E0 File Offset: 0x0000A3E0
public DefaultValueAttribute(bool value)
{
this.DefaultValue = value;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using an 8-bit unsigned integer.</summary>
/// <param name="value">An 8-bit unsigned integer that is the default value. </param>
// Token: 0x06000400 RID: 1024 RVA: 0x0000C1F4 File Offset: 0x0000A3F4
public DefaultValueAttribute(byte value)
{
this.DefaultValue = value;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a Unicode character.</summary>
/// <param name="value">A Unicode character that is the default value. </param>
// Token: 0x06000401 RID: 1025 RVA: 0x0000C208 File Offset: 0x0000A408
public DefaultValueAttribute(char value)
{
this.DefaultValue = value;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a double-precision floating point number.</summary>
/// <param name="value">A double-precision floating point number that is the default value. </param>
// Token: 0x06000402 RID: 1026 RVA: 0x0000C21C File Offset: 0x0000A41C
public DefaultValueAttribute(double value)
{
this.DefaultValue = value;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a 16-bit signed integer.</summary>
/// <param name="value">A 16-bit signed integer that is the default value. </param>
// Token: 0x06000403 RID: 1027 RVA: 0x0000C230 File Offset: 0x0000A430
public DefaultValueAttribute(short value)
{
this.DefaultValue = value;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a 32-bit signed integer.</summary>
/// <param name="value">A 32-bit signed integer that is the default value. </param>
// Token: 0x06000404 RID: 1028 RVA: 0x0000C244 File Offset: 0x0000A444
public DefaultValueAttribute(int value)
{
this.DefaultValue = value;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a 64-bit signed integer.</summary>
/// <param name="value">A 64-bit signed integer that is the default value. </param>
// Token: 0x06000405 RID: 1029 RVA: 0x0000C258 File Offset: 0x0000A458
public DefaultValueAttribute(long value)
{
this.DefaultValue = value;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class.</summary>
/// <param name="value">An <see cref="T:System.Object" /> that represents the default value. </param>
// Token: 0x06000406 RID: 1030 RVA: 0x0000C26C File Offset: 0x0000A46C
public DefaultValueAttribute(object value)
{
this.DefaultValue = value;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a single-precision floating point number.</summary>
/// <param name="value">A single-precision floating point number that is the default value. </param>
// Token: 0x06000407 RID: 1031 RVA: 0x0000C27C File Offset: 0x0000A47C
public DefaultValueAttribute(float value)
{
this.DefaultValue = value;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a <see cref="T:System.String" />.</summary>
/// <param name="value">A <see cref="T:System.String" /> that is the default value. </param>
// Token: 0x06000408 RID: 1032 RVA: 0x0000C290 File Offset: 0x0000A490
public DefaultValueAttribute(string value)
{
this.DefaultValue = value;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class, converting the specified value to the specified type, and using an invariant culture as the translation context.</summary>
/// <param name="type">A <see cref="T:System.Type" /> that represents the type to convert the value to. </param>
/// <param name="value">A <see cref="T:System.String" /> that can be converted to the type using the <see cref="T:System.ComponentModel.TypeConverter" /> for the type and the U.S. English culture. </param>
// Token: 0x06000409 RID: 1033 RVA: 0x0000C2A0 File Offset: 0x0000A4A0
public DefaultValueAttribute(Type type, string value)
{
try
{
if (type.IsEnum)
{
this.DefaultValue = Enum.Parse(type, value);
}
else if (type == typeof(TimeSpan))
{
this.DefaultValue = TimeSpan.Parse(value);
}
else
{
this.DefaultValue = Convert.ChangeType(value, type, null);
}
}
catch
{
}
}
/// <summary>Gets the default value of the property this attribute is bound to.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the default value of the property this attribute is bound to.</returns>
// Token: 0x17000112 RID: 274
// (get) Token: 0x0600040A RID: 1034 RVA: 0x0000C32C File Offset: 0x0000A52C
public virtual object Value
{
get
{
return this.DefaultValue;
}
}
/// <summary>Sets the default value for the property to which this attribute is bound.</summary>
/// <param name="value">The default value.</param>
// Token: 0x0600040B RID: 1035 RVA: 0x0000C334 File Offset: 0x0000A534
protected void SetValue(object value)
{
this.DefaultValue = value;
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DefaultValueAttribute" />.</summary>
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
/// <param name="obj">The object to test the value equality of. </param>
// Token: 0x0600040C RID: 1036 RVA: 0x0000C340 File Offset: 0x0000A540
public override bool Equals(object obj)
{
DefaultValueAttribute defaultValueAttribute = obj as DefaultValueAttribute;
if (defaultValueAttribute == null)
{
return false;
}
if (this.DefaultValue == null)
{
return defaultValueAttribute.Value == null;
}
return this.DefaultValue.Equals(defaultValueAttribute.Value);
}
// Token: 0x0600040D RID: 1037 RVA: 0x0000C384 File Offset: 0x0000A584
public override int GetHashCode()
{
if (this.DefaultValue == null)
{
return base.GetHashCode();
}
return this.DefaultValue.GetHashCode();
}
// Token: 0x0400014B RID: 331
private object DefaultValue;
}
}
@@ -0,0 +1,84 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies a description for a property or event.</summary>
// Token: 0x0200006F RID: 111
[AttributeUsage(AttributeTargets.All)]
public class DescriptionAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DescriptionAttribute" /> class with no parameters.</summary>
// Token: 0x0600040E RID: 1038 RVA: 0x0000C3A4 File Offset: 0x0000A5A4
public DescriptionAttribute()
{
this.desc = string.Empty;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DescriptionAttribute" /> class with a description.</summary>
/// <param name="description">The description text. </param>
// Token: 0x0600040F RID: 1039 RVA: 0x0000C3B8 File Offset: 0x0000A5B8
public DescriptionAttribute(string name)
{
this.desc = name;
}
/// <summary>Gets the description stored in this attribute.</summary>
/// <returns>The description stored in this attribute.</returns>
// Token: 0x17000113 RID: 275
// (get) Token: 0x06000411 RID: 1041 RVA: 0x0000C3D4 File Offset: 0x0000A5D4
public virtual string Description
{
get
{
return this.DescriptionValue;
}
}
/// <summary>Gets or sets the string stored as the description.</summary>
/// <returns>The string stored as the description. The default value is an empty string ("").</returns>
// Token: 0x17000114 RID: 276
// (get) Token: 0x06000412 RID: 1042 RVA: 0x0000C3DC File Offset: 0x0000A5DC
// (set) Token: 0x06000413 RID: 1043 RVA: 0x0000C3E4 File Offset: 0x0000A5E4
protected string DescriptionValue
{
get
{
return this.desc;
}
set
{
this.desc = value;
}
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DescriptionAttribute" />.</summary>
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
/// <param name="obj">The object to test the value equality of. </param>
// Token: 0x06000414 RID: 1044 RVA: 0x0000C3F0 File Offset: 0x0000A5F0
public override bool Equals(object obj)
{
return obj is DescriptionAttribute && (obj == this || ((DescriptionAttribute)obj).Description == this.desc);
}
// Token: 0x06000415 RID: 1045 RVA: 0x0000C42C File Offset: 0x0000A62C
public override int GetHashCode()
{
return this.desc.GetHashCode();
}
/// <summary>Returns a value indicating whether this is the default <see cref="T:System.ComponentModel.DescriptionAttribute" /> instance.</summary>
/// <returns>true, if this is the default <see cref="T:System.ComponentModel.DescriptionAttribute" /> instance; otherwise, false.</returns>
// Token: 0x06000416 RID: 1046 RVA: 0x0000C43C File Offset: 0x0000A63C
public override bool IsDefaultAttribute()
{
return this == DescriptionAttribute.Default;
}
// Token: 0x0400014C RID: 332
private string desc;
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.DescriptionAttribute" />, which is an empty string (""). This static field is read-only.</summary>
// Token: 0x0400014D RID: 333
public static readonly DescriptionAttribute Default = new DescriptionAttribute();
}
}
+75
View File
@@ -0,0 +1,75 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Represents a unique command identifier that consists of a numeric command ID and a GUID menu group identifier.</summary>
// Token: 0x0200003D RID: 61
[ComVisible(true)]
public class CommandID
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.CommandID" /> class using the specified menu group GUID and command ID number.</summary>
/// <param name="menuGroup">The GUID of the group that this menu command belongs to. </param>
/// <param name="commandID">The numeric identifier of this menu command. </param>
// Token: 0x0600029B RID: 667 RVA: 0x00009598 File Offset: 0x00007798
public CommandID(Guid menuGroup, int commandID)
{
this.cID = commandID;
this.guid = menuGroup;
}
/// <summary>Gets the GUID of the menu group that the menu command identified by this <see cref="T:System.ComponentModel.Design.CommandID" /> belongs to.</summary>
/// <returns>The GUID of the command group for this command.</returns>
// Token: 0x170000BC RID: 188
// (get) Token: 0x0600029C RID: 668 RVA: 0x000095B0 File Offset: 0x000077B0
public virtual Guid Guid
{
get
{
return this.guid;
}
}
/// <summary>Gets the numeric command ID.</summary>
/// <returns>The command ID number.</returns>
// Token: 0x170000BD RID: 189
// (get) Token: 0x0600029D RID: 669 RVA: 0x000095B8 File Offset: 0x000077B8
public virtual int ID
{
get
{
return this.cID;
}
}
/// <summary>Determines whether two <see cref="T:System.ComponentModel.Design.CommandID" /> instances are equal.</summary>
/// <returns>true if the specified object is equivalent to this one; otherwise, false.</returns>
/// <param name="obj">The object to compare. </param>
// Token: 0x0600029E RID: 670 RVA: 0x000095C0 File Offset: 0x000077C0
public override bool Equals(object obj)
{
return obj is CommandID && (obj == this || (((CommandID)obj).Guid.Equals(this.guid) && ((CommandID)obj).ID.Equals(this.cID)));
}
/// <returns>A hash code for the current <see cref="T:System.Object" />.</returns>
// Token: 0x0600029F RID: 671 RVA: 0x00009620 File Offset: 0x00007820
public override int GetHashCode()
{
return this.guid.GetHashCode() ^ this.cID.GetHashCode();
}
/// <summary>Returns a <see cref="T:System.String" /> that represents the current object.</summary>
/// <returns>A string that contains the command ID information, both the GUID and integer identifier. </returns>
// Token: 0x060002A0 RID: 672 RVA: 0x0000963C File Offset: 0x0000783C
public override string ToString()
{
return this.guid.ToString() + " : " + this.cID.ToString();
}
// Token: 0x040000B8 RID: 184
private int cID;
// Token: 0x040000B9 RID: 185
private Guid guid;
}
}
@@ -0,0 +1,85 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Provides data for the <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentChanged" /> event. This class cannot be inherited.</summary>
// Token: 0x0200003E RID: 62
[ComVisible(true)]
public sealed class ComponentChangedEventArgs : EventArgs
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.ComponentChangedEventArgs" /> class.</summary>
/// <param name="component">The component that was changed. </param>
/// <param name="member">A <see cref="T:System.ComponentModel.MemberDescriptor" /> that represents the member that was changed. </param>
/// <param name="oldValue">The old value of the changed member. </param>
/// <param name="newValue">The new value of the changed member. </param>
// Token: 0x060002A1 RID: 673 RVA: 0x0000966C File Offset: 0x0000786C
public ComponentChangedEventArgs(object component, MemberDescriptor member, object oldValue, object newValue)
{
this.component = component;
this.member = member;
this.oldValue = oldValue;
this.newValue = newValue;
}
/// <summary>Gets the component that was modified.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the component that was modified.</returns>
// Token: 0x170000BE RID: 190
// (get) Token: 0x060002A2 RID: 674 RVA: 0x00009694 File Offset: 0x00007894
public object Component
{
get
{
return this.component;
}
}
/// <summary>Gets the member that has been changed.</summary>
/// <returns>A <see cref="T:System.ComponentModel.MemberDescriptor" /> that indicates the member that has been changed.</returns>
// Token: 0x170000BF RID: 191
// (get) Token: 0x060002A3 RID: 675 RVA: 0x0000969C File Offset: 0x0000789C
public MemberDescriptor Member
{
get
{
return this.member;
}
}
/// <summary>Gets the new value of the changed member.</summary>
/// <returns>The new value of the changed member. This property can be null.</returns>
// Token: 0x170000C0 RID: 192
// (get) Token: 0x060002A4 RID: 676 RVA: 0x000096A4 File Offset: 0x000078A4
public object NewValue
{
get
{
return this.oldValue;
}
}
/// <summary>Gets the old value of the changed member.</summary>
/// <returns>The old value of the changed member. This property can be null.</returns>
// Token: 0x170000C1 RID: 193
// (get) Token: 0x060002A5 RID: 677 RVA: 0x000096AC File Offset: 0x000078AC
public object OldValue
{
get
{
return this.newValue;
}
}
// Token: 0x040000BA RID: 186
private object component;
// Token: 0x040000BB RID: 187
private MemberDescriptor member;
// Token: 0x040000BC RID: 188
private object oldValue;
// Token: 0x040000BD RID: 189
private object newValue;
}
}
@@ -0,0 +1,13 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Represents the method that will handle a <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentChanged" /> event.</summary>
/// <param name="sender">The source of the event. </param>
/// <param name="e">A <see cref="T:System.ComponentModel.Design.ComponentChangedEventArgs" /> that contains the event data. </param>
// Token: 0x0200031B RID: 795
// (Invoke) Token: 0x06001C45 RID: 7237
[ComVisible(true)]
public delegate void ComponentChangedEventHandler(object sender, ComponentChangedEventArgs e);
}
@@ -0,0 +1,51 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Provides data for the <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentChanging" /> event. This class cannot be inherited.</summary>
// Token: 0x0200003F RID: 63
[ComVisible(true)]
public sealed class ComponentChangingEventArgs : EventArgs
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.ComponentChangingEventArgs" /> class.</summary>
/// <param name="component">The component that is about to be changed. </param>
/// <param name="member">A <see cref="T:System.ComponentModel.MemberDescriptor" /> indicating the member of the component that is about to be changed. </param>
// Token: 0x060002A6 RID: 678 RVA: 0x000096B4 File Offset: 0x000078B4
public ComponentChangingEventArgs(object component, MemberDescriptor member)
{
this.component = component;
this.member = member;
}
/// <summary>Gets the component that is about to be changed or the component that is the parent container of the member that is about to be changed.</summary>
/// <returns>The component that is about to have a member changed.</returns>
// Token: 0x170000C2 RID: 194
// (get) Token: 0x060002A7 RID: 679 RVA: 0x000096CC File Offset: 0x000078CC
public object Component
{
get
{
return this.component;
}
}
/// <summary>Gets the member that is about to be changed.</summary>
/// <returns>A <see cref="T:System.ComponentModel.MemberDescriptor" /> indicating the member that is about to be changed, if known, or null otherwise.</returns>
// Token: 0x170000C3 RID: 195
// (get) Token: 0x060002A8 RID: 680 RVA: 0x000096D4 File Offset: 0x000078D4
public MemberDescriptor Member
{
get
{
return this.member;
}
}
// Token: 0x040000BE RID: 190
private object component;
// Token: 0x040000BF RID: 191
private MemberDescriptor member;
}
}
@@ -0,0 +1,13 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Represents the method that will handle a <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentChanging" /> event.</summary>
/// <param name="sender">The source of the event. </param>
/// <param name="e">A <see cref="T:System.ComponentModel.Design.ComponentChangingEventArgs" /> event that contains the event data. </param>
// Token: 0x0200031C RID: 796
// (Invoke) Token: 0x06001C49 RID: 7241
[ComVisible(true)]
public delegate void ComponentChangingEventHandler(object sender, ComponentChangingEventArgs e);
}
@@ -0,0 +1,34 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Provides data for the <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentAdded" />, <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentAdding" />, <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentRemoved" />, and <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentRemoving" /> events.</summary>
// Token: 0x02000040 RID: 64
[ComVisible(true)]
public class ComponentEventArgs : EventArgs
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.ComponentEventArgs" /> class.</summary>
/// <param name="component">The component that is the source of the event. </param>
// Token: 0x060002A9 RID: 681 RVA: 0x000096DC File Offset: 0x000078DC
public ComponentEventArgs(IComponent component)
{
this.icomp = component;
}
/// <summary>Gets the component associated with the event.</summary>
/// <returns>The component associated with the event.</returns>
// Token: 0x170000C4 RID: 196
// (get) Token: 0x060002AA RID: 682 RVA: 0x000096EC File Offset: 0x000078EC
public virtual IComponent Component
{
get
{
return this.icomp;
}
}
// Token: 0x040000C0 RID: 192
private IComponent icomp;
}
}
@@ -0,0 +1,13 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Represents the method that will handle the <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentAdding" />, <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentAdded" />, <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentRemoving" />, and <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentRemoved" /> events raised for component-level events.</summary>
/// <param name="sender">The source of the event. </param>
/// <param name="e">A <see cref="T:System.ComponentModel.Design.ComponentEventArgs" /> that contains the event data. </param>
// Token: 0x0200031D RID: 797
// (Invoke) Token: 0x06001C4D RID: 7245
[ComVisible(true)]
public delegate void ComponentEventHandler(object sender, ComponentEventArgs e);
}
@@ -0,0 +1,68 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Provides data for the <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentRename" /> event.</summary>
// Token: 0x02000041 RID: 65
[ComVisible(true)]
public class ComponentRenameEventArgs : EventArgs
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.ComponentRenameEventArgs" /> class.</summary>
/// <param name="component">The component to be renamed. </param>
/// <param name="oldName">The old name of the component. </param>
/// <param name="newName">The new name of the component. </param>
// Token: 0x060002AB RID: 683 RVA: 0x000096F4 File Offset: 0x000078F4
public ComponentRenameEventArgs(object component, string oldName, string newName)
{
this.component = component;
this.oldName = oldName;
this.newName = newName;
}
/// <summary>Gets the component that is being renamed.</summary>
/// <returns>The component that is being renamed.</returns>
// Token: 0x170000C5 RID: 197
// (get) Token: 0x060002AC RID: 684 RVA: 0x00009714 File Offset: 0x00007914
public object Component
{
get
{
return this.component;
}
}
/// <summary>Gets the name of the component after the rename event.</summary>
/// <returns>The name of the component after the rename event.</returns>
// Token: 0x170000C6 RID: 198
// (get) Token: 0x060002AD RID: 685 RVA: 0x0000971C File Offset: 0x0000791C
public virtual string NewName
{
get
{
return this.newName;
}
}
/// <summary>Gets the name of the component before the rename event.</summary>
/// <returns>The previous name of the component.</returns>
// Token: 0x170000C7 RID: 199
// (get) Token: 0x060002AE RID: 686 RVA: 0x00009724 File Offset: 0x00007924
public virtual string OldName
{
get
{
return this.oldName;
}
}
// Token: 0x040000C1 RID: 193
private object component;
// Token: 0x040000C2 RID: 194
private string oldName;
// Token: 0x040000C3 RID: 195
private string newName;
}
}
@@ -0,0 +1,13 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Represents the method that will handle a <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentRename" /> event.</summary>
/// <param name="sender">The source of the event. </param>
/// <param name="e">A <see cref="T:System.ComponentModel.Design.ComponentRenameEventArgs" /> that contains the event data. </param>
// Token: 0x0200031E RID: 798
// (Invoke) Token: 0x06001C51 RID: 7249
[ComVisible(true)]
public delegate void ComponentRenameEventHandler(object sender, ComponentRenameEventArgs e);
}
@@ -0,0 +1,127 @@
using System;
namespace System.ComponentModel.Design
{
/// <summary>Provides a way to group a series of design-time actions to improve performance and enable most types of changes to be undone.</summary>
// Token: 0x02000042 RID: 66
public abstract class DesignerTransaction : IDisposable
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerTransaction" /> class with no description.</summary>
// Token: 0x060002AF RID: 687 RVA: 0x0000972C File Offset: 0x0000792C
protected DesignerTransaction()
: this(string.Empty)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerTransaction" /> class using the specified transaction description.</summary>
/// <param name="description">A description for this transaction. </param>
// Token: 0x060002B0 RID: 688 RVA: 0x0000973C File Offset: 0x0000793C
protected DesignerTransaction(string description)
{
this.description = description;
this.committed = false;
this.canceled = false;
}
/// <summary>Releases all resources used by the <see cref="T:System.ComponentModel.Design.DesignerTransaction" />. </summary>
// Token: 0x060002B1 RID: 689 RVA: 0x0000975C File Offset: 0x0000795C
void IDisposable.Dispose()
{
this.Dispose(true);
}
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.ComponentModel.Design.DesignerTransaction" /> and optionally releases the managed resources.</summary>
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
// Token: 0x060002B2 RID: 690 RVA: 0x00009768 File Offset: 0x00007968
protected virtual void Dispose(bool disposing)
{
this.Cancel();
if (disposing)
{
GC.SuppressFinalize(true);
}
}
/// <summary>Raises the Cancel event.</summary>
// Token: 0x060002B3 RID: 691
protected abstract void OnCancel();
/// <summary>Performs the actual work of committing a transaction.</summary>
// Token: 0x060002B4 RID: 692
protected abstract void OnCommit();
/// <summary>Cancels the transaction and attempts to roll back the changes made by the events of the transaction.</summary>
// Token: 0x060002B5 RID: 693 RVA: 0x00009784 File Offset: 0x00007984
public void Cancel()
{
if (!this.Canceled && !this.Committed)
{
this.canceled = true;
this.OnCancel();
}
}
/// <summary>Commits this transaction.</summary>
// Token: 0x060002B6 RID: 694 RVA: 0x000097AC File Offset: 0x000079AC
public void Commit()
{
if (!this.Canceled && !this.Committed)
{
this.committed = true;
this.OnCommit();
}
}
/// <summary>Gets a value indicating whether the transaction was canceled.</summary>
/// <returns>true if the transaction was canceled; otherwise, false.</returns>
// Token: 0x170000C8 RID: 200
// (get) Token: 0x060002B7 RID: 695 RVA: 0x000097D4 File Offset: 0x000079D4
public bool Canceled
{
get
{
return this.canceled;
}
}
/// <summary>Gets a value indicating whether the transaction was committed.</summary>
/// <returns>true if the transaction was committed; otherwise, false.</returns>
// Token: 0x170000C9 RID: 201
// (get) Token: 0x060002B8 RID: 696 RVA: 0x000097DC File Offset: 0x000079DC
public bool Committed
{
get
{
return this.committed;
}
}
/// <summary>Gets a description for the transaction.</summary>
/// <returns>A description for the transaction.</returns>
// Token: 0x170000CA RID: 202
// (get) Token: 0x060002B9 RID: 697 RVA: 0x000097E4 File Offset: 0x000079E4
public string Description
{
get
{
return this.description;
}
}
/// <summary>Releases the resources associated with this object. This override commits this transaction if it was not already committed.</summary>
// Token: 0x060002BA RID: 698 RVA: 0x000097EC File Offset: 0x000079EC
~DesignerTransaction()
{
this.Dispose(false);
}
// Token: 0x040000C4 RID: 196
private string description;
// Token: 0x040000C5 RID: 197
private bool committed;
// Token: 0x040000C6 RID: 198
private bool canceled;
}
}
@@ -0,0 +1,60 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Provides data for the <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionClosed" /> and <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionClosing" /> events.</summary>
// Token: 0x02000043 RID: 67
[ComVisible(true)]
public class DesignerTransactionCloseEventArgs : EventArgs
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerTransactionCloseEventArgs" /> class. </summary>
/// <param name="commit">A value indicating whether the transaction was committed.</param>
/// <param name="lastTransaction">true if this is the last transaction to close; otherwise, false.</param>
// Token: 0x060002BB RID: 699 RVA: 0x00009828 File Offset: 0x00007A28
public DesignerTransactionCloseEventArgs(bool commit, bool lastTransaction)
{
this.commit = commit;
this.last_transaction = lastTransaction;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerTransactionCloseEventArgs" /> class, using the specified value that indicates whether the designer called <see cref="M:System.ComponentModel.Design.DesignerTransaction.Commit" /> on the transaction.</summary>
/// <param name="commit">A value indicating whether the transaction was committed.</param>
// Token: 0x060002BC RID: 700 RVA: 0x00009840 File Offset: 0x00007A40
[Obsolete("Use another constructor that indicates lastTransaction")]
public DesignerTransactionCloseEventArgs(bool commit)
{
this.commit = commit;
}
/// <summary>Gets a value indicating whether this is the last transaction to close.</summary>
/// <returns>true, if this is the last transaction to close; otherwise, false. </returns>
// Token: 0x170000CB RID: 203
// (get) Token: 0x060002BD RID: 701 RVA: 0x00009850 File Offset: 0x00007A50
public bool LastTransaction
{
get
{
return this.last_transaction;
}
}
/// <summary>Indicates whether the designer called <see cref="M:System.ComponentModel.Design.DesignerTransaction.Commit" /> on the transaction.</summary>
/// <returns>true if the designer called <see cref="M:System.ComponentModel.Design.DesignerTransaction.Commit" /> on the transaction; otherwise, false.</returns>
// Token: 0x170000CC RID: 204
// (get) Token: 0x060002BE RID: 702 RVA: 0x00009858 File Offset: 0x00007A58
public bool TransactionCommitted
{
get
{
return this.commit;
}
}
// Token: 0x040000C7 RID: 199
private bool commit;
// Token: 0x040000C8 RID: 200
private bool last_transaction;
}
}
@@ -0,0 +1,13 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Represents the method that handles the <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionClosed" /> and <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionClosing" /> events of a designer.</summary>
/// <param name="sender">The source of the event. </param>
/// <param name="e">A <see cref="T:System.ComponentModel.Design.DesignerTransactionCloseEventArgs" /> that contains the event data. </param>
// Token: 0x0200031F RID: 799
// (Invoke) Token: 0x06001C55 RID: 7253
[ComVisible(true)]
public delegate void DesignerTransactionCloseEventHandler(object sender, DesignerTransactionCloseEventArgs e);
}
@@ -0,0 +1,74 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Represents a verb that can be invoked from a designer.</summary>
// Token: 0x02000044 RID: 68
[ComVisible(true)]
public class DesignerVerb : MenuCommand
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerVerb" /> class.</summary>
/// <param name="text">The text of the menu command that is shown to the user. </param>
/// <param name="handler">The event handler that performs the actions of the verb. </param>
// Token: 0x060002BF RID: 703 RVA: 0x00009860 File Offset: 0x00007A60
public DesignerVerb(string text, EventHandler handler)
: this(text, handler, StandardCommands.VerbFirst)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerVerb" /> class.</summary>
/// <param name="text">The text of the menu command that is shown to the user. </param>
/// <param name="handler">The event handler that performs the actions of the verb. </param>
/// <param name="startCommandID">The starting command ID for this verb. By default, the designer architecture sets aside a range of command IDs for verbs. You can override this by providing a custom command ID. </param>
// Token: 0x060002C0 RID: 704 RVA: 0x00009870 File Offset: 0x00007A70
public DesignerVerb(string text, EventHandler handler, CommandID startCommandID)
: base(handler, startCommandID)
{
this.text = text;
}
/// <summary>Gets the text description for the verb command on the menu.</summary>
/// <returns>A description for the verb command.</returns>
// Token: 0x170000CD RID: 205
// (get) Token: 0x060002C1 RID: 705 RVA: 0x00009884 File Offset: 0x00007A84
public string Text
{
get
{
return this.text;
}
}
/// <summary>Gets or sets the description of the menu item for the verb.</summary>
/// <returns>A string describing the menu item. </returns>
// Token: 0x170000CE RID: 206
// (get) Token: 0x060002C2 RID: 706 RVA: 0x0000988C File Offset: 0x00007A8C
// (set) Token: 0x060002C3 RID: 707 RVA: 0x00009894 File Offset: 0x00007A94
public string Description
{
get
{
return this.description;
}
set
{
this.description = value;
}
}
/// <summary>Overrides <see cref="M:System.Object.ToString" />.</summary>
/// <returns>The verb's text, or an empty string ("") if the text field is empty.</returns>
// Token: 0x060002C4 RID: 708 RVA: 0x000098A0 File Offset: 0x00007AA0
public override string ToString()
{
return this.text + " : " + base.ToString();
}
// Token: 0x040000C9 RID: 201
private string text;
// Token: 0x040000CA RID: 202
private string description;
}
}
@@ -0,0 +1,155 @@
using System;
using System.Collections;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Represents a collection of <see cref="T:System.ComponentModel.Design.DesignerVerb" /> objects.</summary>
// Token: 0x02000045 RID: 69
[ComVisible(true)]
public class DesignerVerbCollection : CollectionBase
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerVerbCollection" /> class.</summary>
// Token: 0x060002C5 RID: 709 RVA: 0x000098B8 File Offset: 0x00007AB8
public DesignerVerbCollection()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerVerbCollection" /> class using the specified array of <see cref="T:System.ComponentModel.Design.DesignerVerb" /> objects.</summary>
/// <param name="value">A <see cref="T:System.ComponentModel.Design.DesignerVerb" /> array that indicates the verbs to contain within the collection. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="value" /> is null.</exception>
// Token: 0x060002C6 RID: 710 RVA: 0x000098C0 File Offset: 0x00007AC0
public DesignerVerbCollection(DesignerVerb[] value)
{
base.InnerList.AddRange(value);
}
/// <summary>Gets or sets the <see cref="T:System.ComponentModel.Design.DesignerVerb" /> at the specified index.</summary>
/// <returns>A <see cref="T:System.ComponentModel.Design.DesignerVerb" /> at each valid index in the collection.</returns>
/// <param name="index">The index at which to get or set the <see cref="T:System.ComponentModel.Design.DesignerVerb" />. </param>
// Token: 0x170000CF RID: 207
public DesignerVerb this[int index]
{
get
{
return (DesignerVerb)base.InnerList[index];
}
set
{
base.InnerList[index] = value;
}
}
/// <summary>Adds the specified <see cref="T:System.ComponentModel.Design.DesignerVerb" /> to the collection.</summary>
/// <returns>The index in the collection at which the verb was added.</returns>
/// <param name="value">The <see cref="T:System.ComponentModel.Design.DesignerVerb" /> to add to the collection. </param>
// Token: 0x060002C9 RID: 713 RVA: 0x000098F8 File Offset: 0x00007AF8
public int Add(DesignerVerb value)
{
return base.InnerList.Add(value);
}
/// <summary>Adds the specified set of designer verbs to the collection.</summary>
/// <param name="value">An array of <see cref="T:System.ComponentModel.Design.DesignerVerb" /> objects to add to the collection. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="value" /> is null.</exception>
// Token: 0x060002CA RID: 714 RVA: 0x00009908 File Offset: 0x00007B08
public void AddRange(DesignerVerb[] value)
{
base.InnerList.AddRange(value);
}
/// <summary>Adds the specified collection of designer verbs to the collection.</summary>
/// <param name="value">A <see cref="T:System.ComponentModel.Design.DesignerVerbCollection" /> to add to the collection. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="value" /> is null.</exception>
// Token: 0x060002CB RID: 715 RVA: 0x00009918 File Offset: 0x00007B18
public void AddRange(DesignerVerbCollection value)
{
base.InnerList.AddRange(value);
}
/// <summary>Gets a value indicating whether the specified <see cref="T:System.ComponentModel.Design.DesignerVerb" /> exists in the collection.</summary>
/// <returns>true if the specified object exists in the collection; otherwise, false.</returns>
/// <param name="value">The <see cref="T:System.ComponentModel.Design.DesignerVerb" /> to search for in the collection. </param>
// Token: 0x060002CC RID: 716 RVA: 0x00009928 File Offset: 0x00007B28
public bool Contains(DesignerVerb value)
{
return base.InnerList.Contains(value);
}
/// <summary>Copies the collection members to the specified <see cref="T:System.ComponentModel.Design.DesignerVerb" /> array beginning at the specified destination index.</summary>
/// <param name="array">The array to copy collection members to. </param>
/// <param name="index">The destination index to begin copying to. </param>
// Token: 0x060002CD RID: 717 RVA: 0x00009938 File Offset: 0x00007B38
public void CopyTo(DesignerVerb[] array, int index)
{
base.InnerList.CopyTo(array, index);
}
/// <summary>Gets the index of the specified <see cref="T:System.ComponentModel.Design.DesignerVerb" />.</summary>
/// <returns>The index of the specified object if it is found in the list; otherwise, -1.</returns>
/// <param name="value">The <see cref="T:System.ComponentModel.Design.DesignerVerb" /> whose index to get in the collection. </param>
// Token: 0x060002CE RID: 718 RVA: 0x00009948 File Offset: 0x00007B48
public int IndexOf(DesignerVerb value)
{
return base.InnerList.IndexOf(value);
}
/// <summary>Inserts the specified <see cref="T:System.ComponentModel.Design.DesignerVerb" /> at the specified index.</summary>
/// <param name="index">The index in the collection at which to insert the verb. </param>
/// <param name="value">The <see cref="T:System.ComponentModel.Design.DesignerVerb" /> to insert in the collection. </param>
// Token: 0x060002CF RID: 719 RVA: 0x00009958 File Offset: 0x00007B58
public void Insert(int index, DesignerVerb value)
{
base.InnerList.Insert(index, value);
}
/// <summary>Raises the Clear event.</summary>
// Token: 0x060002D0 RID: 720 RVA: 0x00009968 File Offset: 0x00007B68
protected override void OnClear()
{
}
/// <summary>Raises the Insert event.</summary>
/// <param name="index">The index at which to insert an item. </param>
/// <param name="value">The object to insert. </param>
// Token: 0x060002D1 RID: 721 RVA: 0x0000996C File Offset: 0x00007B6C
protected override void OnInsert(int index, object value)
{
}
/// <summary>Raises the Remove event.</summary>
/// <param name="index">The index at which to remove the item. </param>
/// <param name="value">The object to remove. </param>
// Token: 0x060002D2 RID: 722 RVA: 0x00009970 File Offset: 0x00007B70
protected override void OnRemove(int index, object value)
{
}
/// <summary>Raises the Set event.</summary>
/// <param name="index">The index at which to set the item. </param>
/// <param name="oldValue">The old object. </param>
/// <param name="newValue">The new object. </param>
// Token: 0x060002D3 RID: 723 RVA: 0x00009974 File Offset: 0x00007B74
protected override void OnSet(int index, object oldValue, object newValue)
{
}
/// <summary>Raises the Validate event.</summary>
/// <param name="value">The object to validate. </param>
// Token: 0x060002D4 RID: 724 RVA: 0x00009978 File Offset: 0x00007B78
protected override void OnValidate(object value)
{
}
/// <summary>Removes the specified <see cref="T:System.ComponentModel.Design.DesignerVerb" /> from the collection.</summary>
/// <param name="value">The <see cref="T:System.ComponentModel.Design.DesignerVerb" /> to remove from the collection. </param>
// Token: 0x060002D5 RID: 725 RVA: 0x0000997C File Offset: 0x00007B7C
public void Remove(DesignerVerb value)
{
base.InnerList.Remove(value);
}
}
}
@@ -0,0 +1,67 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Provides an interface to add and remove the event handlers for events that add, change, remove or rename components, and provides methods to raise a <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentChanged" /> or <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentChanging" /> event.</summary>
// Token: 0x02000046 RID: 70
[ComVisible(true)]
public interface IComponentChangeService
{
/// <summary>Occurs when a component has been added.</summary>
// Token: 0x14000001 RID: 1
// (add) Token: 0x060002D6 RID: 726
// (remove) Token: 0x060002D7 RID: 727
event ComponentEventHandler ComponentAdded;
/// <summary>Occurs when a component is in the process of being added.</summary>
// Token: 0x14000002 RID: 2
// (add) Token: 0x060002D8 RID: 728
// (remove) Token: 0x060002D9 RID: 729
event ComponentEventHandler ComponentAdding;
/// <summary>Occurs when a component has been changed.</summary>
// Token: 0x14000003 RID: 3
// (add) Token: 0x060002DA RID: 730
// (remove) Token: 0x060002DB RID: 731
event ComponentChangedEventHandler ComponentChanged;
/// <summary>Occurs when a component is in the process of being changed.</summary>
// Token: 0x14000004 RID: 4
// (add) Token: 0x060002DC RID: 732
// (remove) Token: 0x060002DD RID: 733
event ComponentChangingEventHandler ComponentChanging;
/// <summary>Occurs when a component has been removed.</summary>
// Token: 0x14000005 RID: 5
// (add) Token: 0x060002DE RID: 734
// (remove) Token: 0x060002DF RID: 735
event ComponentEventHandler ComponentRemoved;
/// <summary>Occurs when a component is in the process of being removed.</summary>
// Token: 0x14000006 RID: 6
// (add) Token: 0x060002E0 RID: 736
// (remove) Token: 0x060002E1 RID: 737
event ComponentEventHandler ComponentRemoving;
/// <summary>Occurs when a component is renamed.</summary>
// Token: 0x14000007 RID: 7
// (add) Token: 0x060002E2 RID: 738
// (remove) Token: 0x060002E3 RID: 739
event ComponentRenameEventHandler ComponentRename;
/// <summary>Announces to the component change service that a particular component has changed.</summary>
/// <param name="component">The component that has changed. </param>
/// <param name="member">The member that has changed. This is null if this change is not related to a single member. </param>
/// <param name="oldValue">The old value of the member. This is valid only if the member is not null. </param>
/// <param name="newValue">The new value of the member. This is valid only if the member is not null. </param>
// Token: 0x060002E4 RID: 740
void OnComponentChanged(object component, MemberDescriptor member, object oldValue, object newValue);
/// <summary>Announces to the component change service that a particular component is changing.</summary>
/// <param name="component">The component that is about to change. </param>
/// <param name="member">The member that is changing. This is null if this change is not related to a single member. </param>
// Token: 0x060002E5 RID: 741
void OnComponentChanging(object component, MemberDescriptor member);
}
}
+32
View File
@@ -0,0 +1,32 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Provides the basic framework for building a custom designer.</summary>
// Token: 0x02000047 RID: 71
[ComVisible(true)]
public interface IDesigner : IDisposable
{
/// <summary>Gets the base component that this designer is designing.</summary>
/// <returns>An <see cref="T:System.ComponentModel.IComponent" /> indicating the base component that this designer is designing.</returns>
// Token: 0x170000D0 RID: 208
// (get) Token: 0x060002E6 RID: 742
IComponent Component { get; }
/// <summary>Gets a collection of the design-time verbs supported by the designer.</summary>
/// <returns>A <see cref="T:System.ComponentModel.Design.DesignerVerbCollection" /> that contains the verbs supported by the designer, or null if the component has no verbs.</returns>
// Token: 0x170000D1 RID: 209
// (get) Token: 0x060002E7 RID: 743
DesignerVerbCollection Verbs { get; }
/// <summary>Performs the default action for this designer.</summary>
// Token: 0x060002E8 RID: 744
void DoDefaultAction();
/// <summary>Initializes the designer with the specified component.</summary>
/// <param name="component">The component to associate with this designer. </param>
// Token: 0x060002E9 RID: 745
void Initialize(IComponent component);
}
}
@@ -0,0 +1,134 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Provides an interface for managing designer transactions and components.</summary>
// Token: 0x02000048 RID: 72
[ComVisible(true)]
public interface IDesignerHost : IServiceContainer, IServiceProvider
{
/// <summary>Occurs when this designer is activated.</summary>
// Token: 0x14000008 RID: 8
// (add) Token: 0x060002EA RID: 746
// (remove) Token: 0x060002EB RID: 747
event EventHandler Activated;
/// <summary>Occurs when this designer is deactivated.</summary>
// Token: 0x14000009 RID: 9
// (add) Token: 0x060002EC RID: 748
// (remove) Token: 0x060002ED RID: 749
event EventHandler Deactivated;
/// <summary>Occurs when this designer completes loading its document.</summary>
// Token: 0x1400000A RID: 10
// (add) Token: 0x060002EE RID: 750
// (remove) Token: 0x060002EF RID: 751
event EventHandler LoadComplete;
/// <summary>Adds an event handler for the <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionClosed" /> event.</summary>
// Token: 0x1400000B RID: 11
// (add) Token: 0x060002F0 RID: 752
// (remove) Token: 0x060002F1 RID: 753
event DesignerTransactionCloseEventHandler TransactionClosed;
/// <summary>Adds an event handler for the <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionClosing" /> event.</summary>
// Token: 0x1400000C RID: 12
// (add) Token: 0x060002F2 RID: 754
// (remove) Token: 0x060002F3 RID: 755
event DesignerTransactionCloseEventHandler TransactionClosing;
/// <summary>Adds an event handler for the <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionOpened" /> event.</summary>
// Token: 0x1400000D RID: 13
// (add) Token: 0x060002F4 RID: 756
// (remove) Token: 0x060002F5 RID: 757
event EventHandler TransactionOpened;
/// <summary>Adds an event handler for the <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionOpening" /> event.</summary>
// Token: 0x1400000E RID: 14
// (add) Token: 0x060002F6 RID: 758
// (remove) Token: 0x060002F7 RID: 759
event EventHandler TransactionOpening;
/// <summary>Gets the container for this designer host.</summary>
/// <returns>The <see cref="T:System.ComponentModel.IContainer" /> for this host.</returns>
// Token: 0x170000D2 RID: 210
// (get) Token: 0x060002F8 RID: 760
IContainer Container { get; }
/// <summary>Gets a value indicating whether the designer host is currently in a transaction.</summary>
/// <returns>true if a transaction is in progress; otherwise, false.</returns>
// Token: 0x170000D3 RID: 211
// (get) Token: 0x060002F9 RID: 761
bool InTransaction { get; }
/// <summary>Gets a value indicating whether the designer host is currently loading the document.</summary>
/// <returns>true if the designer host is currently loading the document; otherwise, false.</returns>
// Token: 0x170000D4 RID: 212
// (get) Token: 0x060002FA RID: 762
bool Loading { get; }
/// <summary>Gets the instance of the base class used as the root component for the current design.</summary>
/// <returns>The instance of the root component class.</returns>
// Token: 0x170000D5 RID: 213
// (get) Token: 0x060002FB RID: 763
IComponent RootComponent { get; }
/// <summary>Gets the fully qualified name of the class being designed.</summary>
/// <returns>The fully qualified name of the base component class.</returns>
// Token: 0x170000D6 RID: 214
// (get) Token: 0x060002FC RID: 764
string RootComponentClassName { get; }
/// <summary>Gets the description of the current transaction.</summary>
/// <returns>A description of the current transaction.</returns>
// Token: 0x170000D7 RID: 215
// (get) Token: 0x060002FD RID: 765
string TransactionDescription { get; }
/// <summary>Activates the designer that this host is hosting.</summary>
// Token: 0x060002FE RID: 766
void Activate();
/// <summary>Creates a component of the specified type and adds it to the design document.</summary>
/// <returns>The newly created component.</returns>
/// <param name="componentClass">The type of the component to create. </param>
// Token: 0x060002FF RID: 767
IComponent CreateComponent(Type componentClass);
/// <summary>Creates a component of the specified type and name, and adds it to the design document.</summary>
/// <returns>The newly created component.</returns>
/// <param name="componentClass">The type of the component to create. </param>
/// <param name="name">The name for the component. </param>
// Token: 0x06000300 RID: 768
IComponent CreateComponent(Type componentClass, string name);
/// <summary>Creates a <see cref="T:System.ComponentModel.Design.DesignerTransaction" /> that can encapsulate event sequences to improve performance and enable undo and redo support functionality.</summary>
/// <returns>A new instance of <see cref="T:System.ComponentModel.Design.DesignerTransaction" />. When you complete the steps in your transaction, you should call <see cref="M:System.ComponentModel.Design.DesignerTransaction.Commit" /> on this object.</returns>
// Token: 0x06000301 RID: 769
DesignerTransaction CreateTransaction();
/// <summary>Creates a <see cref="T:System.ComponentModel.Design.DesignerTransaction" /> that can encapsulate event sequences to improve performance and enable undo and redo support functionality, using the specified transaction description.</summary>
/// <returns>A new <see cref="T:System.ComponentModel.Design.DesignerTransaction" />. When you have completed the steps in your transaction, you should call <see cref="M:System.ComponentModel.Design.DesignerTransaction.Commit" /> on this object.</returns>
/// <param name="description">A title or description for the newly created transaction. </param>
// Token: 0x06000302 RID: 770
DesignerTransaction CreateTransaction(string description);
/// <summary>Destroys the specified component and removes it from the designer container.</summary>
/// <param name="component">The component to destroy. </param>
// Token: 0x06000303 RID: 771
void DestroyComponent(IComponent component);
/// <summary>Gets the designer instance that contains the specified component.</summary>
/// <returns>An <see cref="T:System.ComponentModel.Design.IDesigner" />, or null if there is no designer for the specified component.</returns>
/// <param name="component">The <see cref="T:System.ComponentModel.IComponent" /> to retrieve the designer for. </param>
// Token: 0x06000304 RID: 772
IDesigner GetDesigner(IComponent component);
/// <summary>Gets an instance of the specified, fully qualified type name.</summary>
/// <returns>The type object for the specified type name, or null if the type cannot be found.</returns>
/// <param name="typeName">The name of the type to load. </param>
// Token: 0x06000305 RID: 773
Type GetType(string typeName);
}
}
@@ -0,0 +1,38 @@
using System;
namespace System.ComponentModel.Design
{
/// <summary>Provides an interface for obtaining references to objects within a project by name or type, obtaining the name of a specified object, and for locating the parent of a specified object within a designer project.</summary>
// Token: 0x02000049 RID: 73
public interface IReferenceService
{
/// <summary>Gets the component that contains the specified component.</summary>
/// <returns>The base <see cref="T:System.ComponentModel.IComponent" /> that contains the specified object, or null if no parent component exists.</returns>
/// <param name="reference">The object to retrieve the parent component for. </param>
// Token: 0x06000306 RID: 774
IComponent GetComponent(object reference);
/// <summary>Gets the name of the specified component.</summary>
/// <returns>The name of the object referenced, or null if the object reference is not valid.</returns>
/// <param name="reference">The object to return the name of. </param>
// Token: 0x06000307 RID: 775
string GetName(object reference);
/// <summary>Gets a reference to the component whose name matches the specified name.</summary>
/// <returns>An object the specified name refers to, or null if no reference is found.</returns>
/// <param name="name">The name of the component to return a reference to. </param>
// Token: 0x06000308 RID: 776
object GetReference(string name);
/// <summary>Gets all available references to project components.</summary>
/// <returns>An array of all objects with references available to the <see cref="T:System.ComponentModel.Design.IReferenceService" />.</returns>
// Token: 0x06000309 RID: 777
object[] GetReferences();
/// <summary>Gets all available references to components of the specified type.</summary>
/// <returns>An array of all available objects of the specified type.</returns>
/// <param name="baseType">The type of object to return references to instances of. </param>
// Token: 0x0600030A RID: 778
object[] GetReferences(Type baseType);
}
}
@@ -0,0 +1,24 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Provides support for root-level designer view technologies.</summary>
// Token: 0x0200004A RID: 74
[ComVisible(true)]
public interface IRootDesigner : IDisposable, IDesigner
{
/// <summary>Gets the set of technologies that this designer can support for its display.</summary>
/// <returns>An array of supported <see cref="T:System.ComponentModel.Design.ViewTechnology" /> values.</returns>
// Token: 0x170000D8 RID: 216
// (get) Token: 0x0600030B RID: 779
ViewTechnology[] SupportedTechnologies { get; }
/// <summary>Gets a view object for the specified view technology.</summary>
/// <returns>An object that represents the view for this designer.</returns>
/// <param name="technology">A <see cref="T:System.ComponentModel.Design.ViewTechnology" /> that indicates a particular view technology.</param>
/// <exception cref="T:System.ArgumentException">The specified view technology is not supported or does not exist. </exception>
// Token: 0x0600030C RID: 780
object GetView(ViewTechnology technology);
}
}
@@ -0,0 +1,48 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Provides a container for services.</summary>
// Token: 0x0200004B RID: 75
[ComVisible(true)]
public interface IServiceContainer : IServiceProvider
{
/// <summary>Adds the specified service to the service container.</summary>
/// <param name="serviceType">The type of service to add. </param>
/// <param name="serviceInstance">An instance of the service type to add. This object must implement or inherit from the type indicated by the <paramref name="serviceType" /> parameter. </param>
// Token: 0x0600030D RID: 781
void AddService(Type serviceType, object serviceInstance);
/// <summary>Adds the specified service to the service container.</summary>
/// <param name="serviceType">The type of service to add. </param>
/// <param name="callback">A callback object that is used to create the service. This allows a service to be declared as available, but delays the creation of the object until the service is requested. </param>
// Token: 0x0600030E RID: 782
void AddService(Type serviceType, ServiceCreatorCallback callback);
/// <summary>Adds the specified service to the service container, and optionally promotes the service to any parent service containers.</summary>
/// <param name="serviceType">The type of service to add. </param>
/// <param name="serviceInstance">An instance of the service type to add. This object must implement or inherit from the type indicated by the <paramref name="serviceType" /> parameter. </param>
/// <param name="promote">true to promote this request to any parent service containers; otherwise, false. </param>
// Token: 0x0600030F RID: 783
void AddService(Type serviceType, object serviceInstance, bool promote);
/// <summary>Adds the specified service to the service container, and optionally promotes the service to parent service containers.</summary>
/// <param name="serviceType">The type of service to add. </param>
/// <param name="callback">A callback object that is used to create the service. This allows a service to be declared as available, but delays the creation of the object until the service is requested. </param>
/// <param name="promote">true to promote this request to any parent service containers; otherwise, false. </param>
// Token: 0x06000310 RID: 784
void AddService(Type serviceType, ServiceCreatorCallback callback, bool promote);
/// <summary>Removes the specified service type from the service container.</summary>
/// <param name="serviceType">The type of service to remove. </param>
// Token: 0x06000311 RID: 785
void RemoveService(Type serviceType);
/// <summary>Removes the specified service type from the service container, and optionally promotes the service to parent service containers.</summary>
/// <param name="serviceType">The type of service to remove. </param>
/// <param name="promote">true to promote this request to any parent service containers; otherwise, false. </param>
// Token: 0x06000312 RID: 786
void RemoveService(Type serviceType, bool promote);
}
}
@@ -0,0 +1,31 @@
using System;
using System.Collections;
namespace System.ComponentModel.Design
{
/// <summary>Provides an interface to modify the set of member descriptors for a component in design mode.</summary>
// Token: 0x0200004C RID: 76
public interface ITypeDescriptorFilterService
{
/// <summary>Filters the attributes that a component exposes through a <see cref="T:System.ComponentModel.TypeDescriptor" />.</summary>
/// <returns>true if the set of filtered attributes is to be cached; false if the filter service must query again.</returns>
/// <param name="component">The component to filter the attributes of. </param>
/// <param name="attributes">A dictionary of attributes that can be modified. </param>
// Token: 0x06000313 RID: 787
bool FilterAttributes(IComponent component, IDictionary attributes);
/// <summary>Filters the events that a component exposes through a <see cref="T:System.ComponentModel.TypeDescriptor" />.</summary>
/// <returns>true if the set of filtered events is to be cached; false if the filter service must query again.</returns>
/// <param name="component">The component to filter events for. </param>
/// <param name="events">A dictionary of events that can be modified. </param>
// Token: 0x06000314 RID: 788
bool FilterEvents(IComponent component, IDictionary events);
/// <summary>Filters the properties that a component exposes through a <see cref="T:System.ComponentModel.TypeDescriptor" />.</summary>
/// <returns>true if the set of filtered properties is to be cached; false if the filter service must query again.</returns>
/// <param name="component">The component to filter properties for. </param>
/// <param name="properties">A dictionary of properties that can be modified. </param>
// Token: 0x06000315 RID: 789
bool FilterProperties(IComponent component, IDictionary properties);
}
}
@@ -0,0 +1,55 @@
using System;
using System.Reflection;
namespace System.ComponentModel.Design
{
/// <summary>Provides an interface to retrieve an assembly or type by name.</summary>
// Token: 0x0200004D RID: 77
public interface ITypeResolutionService
{
/// <summary>Gets the requested assembly.</summary>
/// <returns>An instance of the requested assembly, or null if no assembly can be located.</returns>
/// <param name="name">The name of the assembly to retrieve. </param>
// Token: 0x06000316 RID: 790
Assembly GetAssembly(AssemblyName name);
/// <summary>Gets the requested assembly.</summary>
/// <returns>An instance of the requested assembly, or null if no assembly can be located.</returns>
/// <param name="name">The name of the assembly to retrieve. </param>
/// <param name="throwOnError">true if this method should throw an exception if the assembly cannot be located; otherwise, false, and this method returns null if the assembly cannot be located. </param>
// Token: 0x06000317 RID: 791
Assembly GetAssembly(AssemblyName name, bool throwOnError);
/// <summary>Gets the path to the file from which the assembly was loaded.</summary>
/// <returns>The path to the file from which the assembly was loaded.</returns>
/// <param name="name">The name of the assembly. </param>
// Token: 0x06000318 RID: 792
string GetPathOfAssembly(AssemblyName name);
/// <summary>Loads a type with the specified name.</summary>
/// <returns>An instance of <see cref="T:System.Type" /> that corresponds to the specified name, or null if no type can be found.</returns>
/// <param name="name">The name of the type. If the type name is not a fully qualified name that indicates an assembly, this service will search its internal set of referenced assemblies. </param>
// Token: 0x06000319 RID: 793
Type GetType(string name);
/// <summary>Loads a type with the specified name.</summary>
/// <returns>An instance of <see cref="T:System.Type" /> that corresponds to the specified name, or null if no type can be found.</returns>
/// <param name="name">The name of the type. If the type name is not a fully qualified name that indicates an assembly, this service will search its internal set of referenced assemblies. </param>
/// <param name="throwOnError">true if this method should throw an exception if the assembly cannot be located; otherwise, false, and this method returns null if the assembly cannot be located. </param>
// Token: 0x0600031A RID: 794
Type GetType(string name, bool throwOnError);
/// <summary>Loads a type with the specified name.</summary>
/// <returns>An instance of <see cref="T:System.Type" /> that corresponds to the specified name, or null if no type can be found.</returns>
/// <param name="name">The name of the type. If the type name is not a fully qualified name that indicates an assembly, this service will search its internal set of referenced assemblies. </param>
/// <param name="throwOnError">true if this method should throw an exception if the assembly cannot be located; otherwise, false, and this method returns null if the assembly cannot be located. </param>
/// <param name="ignoreCase">true to ignore case when searching for types; otherwise, false. </param>
// Token: 0x0600031B RID: 795
Type GetType(string name, bool throwOnError, bool ignoreCase);
/// <summary>Adds a reference to the specified assembly.</summary>
/// <param name="name">An <see cref="T:System.Reflection.AssemblyName" /> that indicates the assembly to reference. </param>
// Token: 0x0600031C RID: 796
void ReferenceAssembly(AssemblyName name);
}
}
+225
View File
@@ -0,0 +1,225 @@
using System;
using System.Collections;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Represents a Windows menu or toolbar command item.</summary>
// Token: 0x0200004E RID: 78
[ComVisible(true)]
public class MenuCommand
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.MenuCommand" /> class.</summary>
/// <param name="handler">The event to raise when the user selects the menu item or toolbar button. </param>
/// <param name="command">The unique command ID that links this menu command to the environment's menu. </param>
// Token: 0x0600031D RID: 797 RVA: 0x0000998C File Offset: 0x00007B8C
public MenuCommand(EventHandler handler, CommandID command)
{
this.handler = handler;
this.command = command;
}
/// <summary>Occurs when the menu command changes.</summary>
// Token: 0x1400000F RID: 15
// (add) Token: 0x0600031E RID: 798 RVA: 0x000099B8 File Offset: 0x00007BB8
// (remove) Token: 0x0600031F RID: 799 RVA: 0x000099D4 File Offset: 0x00007BD4
public event EventHandler CommandChanged;
/// <summary>Gets or sets a value indicating whether this menu item is checked.</summary>
/// <returns>true if the item is checked; otherwise, false.</returns>
// Token: 0x170000D9 RID: 217
// (get) Token: 0x06000320 RID: 800 RVA: 0x000099F0 File Offset: 0x00007BF0
// (set) Token: 0x06000321 RID: 801 RVA: 0x000099F8 File Offset: 0x00007BF8
public virtual bool Checked
{
get
{
return this.ischecked;
}
set
{
if (this.ischecked != value)
{
this.ischecked = value;
this.OnCommandChanged(EventArgs.Empty);
}
}
}
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> associated with this menu command.</summary>
/// <returns>The <see cref="T:System.ComponentModel.Design.CommandID" /> associated with the menu command.</returns>
// Token: 0x170000DA RID: 218
// (get) Token: 0x06000322 RID: 802 RVA: 0x00009A18 File Offset: 0x00007C18
public virtual CommandID CommandID
{
get
{
return this.command;
}
}
/// <summary>Gets a value indicating whether this menu item is available.</summary>
/// <returns>true if the item is enabled; otherwise, false.</returns>
// Token: 0x170000DB RID: 219
// (get) Token: 0x06000323 RID: 803 RVA: 0x00009A20 File Offset: 0x00007C20
// (set) Token: 0x06000324 RID: 804 RVA: 0x00009A28 File Offset: 0x00007C28
public virtual bool Enabled
{
get
{
return this.enabled;
}
set
{
if (this.enabled != value)
{
this.enabled = value;
this.OnCommandChanged(EventArgs.Empty);
}
}
}
/// <summary>Gets the OLE command status code for this menu item.</summary>
/// <returns>An integer containing a mixture of status flags that reflect the state of this menu item.</returns>
// Token: 0x170000DC RID: 220
// (get) Token: 0x06000325 RID: 805 RVA: 0x00009A48 File Offset: 0x00007C48
[global::System.MonoTODO]
public virtual int OleStatus
{
get
{
return 3;
}
}
/// <summary>Gets the public properties associated with the <see cref="T:System.ComponentModel.Design.MenuCommand" />.</summary>
/// <returns>An <see cref="T:System.Collections.IDictionary" /> containing the public properties of the <see cref="T:System.ComponentModel.Design.MenuCommand" />. </returns>
// Token: 0x170000DD RID: 221
// (get) Token: 0x06000326 RID: 806 RVA: 0x00009A4C File Offset: 0x00007C4C
public virtual IDictionary Properties
{
get
{
if (this.properties == null)
{
this.properties = new Hashtable();
}
return this.properties;
}
}
/// <summary>Gets or sets a value indicating whether this menu item is supported.</summary>
/// <returns>true if the item is supported, which is the default; otherwise, false.</returns>
// Token: 0x170000DE RID: 222
// (get) Token: 0x06000327 RID: 807 RVA: 0x00009A6C File Offset: 0x00007C6C
// (set) Token: 0x06000328 RID: 808 RVA: 0x00009A74 File Offset: 0x00007C74
public virtual bool Supported
{
get
{
return this.issupported;
}
set
{
this.issupported = value;
}
}
/// <summary>Gets or sets a value indicating whether this menu item is visible.</summary>
/// <returns>true if the item is visible; otherwise, false.</returns>
// Token: 0x170000DF RID: 223
// (get) Token: 0x06000329 RID: 809 RVA: 0x00009A80 File Offset: 0x00007C80
// (set) Token: 0x0600032A RID: 810 RVA: 0x00009A88 File Offset: 0x00007C88
public virtual bool Visible
{
get
{
return this.visible;
}
set
{
this.visible = value;
}
}
/// <summary>Invokes the command.</summary>
// Token: 0x0600032B RID: 811 RVA: 0x00009A94 File Offset: 0x00007C94
public virtual void Invoke()
{
if (this.handler != null)
{
this.handler(this, EventArgs.Empty);
}
}
/// <summary>Invokes the command with the given parameter.</summary>
/// <param name="arg">An optional argument for use by the command.</param>
// Token: 0x0600032C RID: 812 RVA: 0x00009AB4 File Offset: 0x00007CB4
public virtual void Invoke(object arg)
{
this.Invoke();
}
/// <summary>Raises the <see cref="E:System.ComponentModel.Design.MenuCommand.CommandChanged" /> event.</summary>
/// <param name="e">An <see cref="T:System.EventArgs" /> that contains the event data. </param>
// Token: 0x0600032D RID: 813 RVA: 0x00009ABC File Offset: 0x00007CBC
protected virtual void OnCommandChanged(EventArgs e)
{
if (this.CommandChanged != null)
{
this.CommandChanged(this, e);
}
}
/// <summary>Returns a string representation of this menu command.</summary>
/// <returns>A string containing the value of the <see cref="P:System.ComponentModel.Design.MenuCommand.CommandID" /> property appended with the names of any flags that are set, separated by pipe bars (|). These flag properties include <see cref="P:System.ComponentModel.Design.MenuCommand.Checked" />, <see cref="P:System.ComponentModel.Design.MenuCommand.Enabled" />, <see cref="P:System.ComponentModel.Design.MenuCommand.Supported" />, and <see cref="P:System.ComponentModel.Design.MenuCommand.Visible" />.</returns>
// Token: 0x0600032E RID: 814 RVA: 0x00009AD8 File Offset: 0x00007CD8
public override string ToString()
{
string text = string.Empty;
if (this.command != null)
{
text = this.command.ToString();
}
text += " : ";
if (this.Supported)
{
text += "Supported";
}
if (this.Enabled)
{
text += "|Enabled";
}
if (this.Visible)
{
text += "|Visible";
}
if (this.Checked)
{
text += "|Checked";
}
return text;
}
// Token: 0x040000CB RID: 203
private EventHandler handler;
// Token: 0x040000CC RID: 204
private CommandID command;
// Token: 0x040000CD RID: 205
private bool ischecked;
// Token: 0x040000CE RID: 206
private bool enabled = true;
// Token: 0x040000CF RID: 207
private bool issupported = true;
// Token: 0x040000D0 RID: 208
private bool visible = true;
// Token: 0x040000D1 RID: 209
private Hashtable properties;
}
}
@@ -0,0 +1,115 @@
using System;
using System.Collections;
using System.IO;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.Serialization.Formatters.Binary;
namespace System.ComponentModel.Design
{
// Token: 0x0200004F RID: 79
internal class RuntimeLicenseContext : LicenseContext
{
// Token: 0x06000330 RID: 816 RVA: 0x00009B74 File Offset: 0x00007D74
private void LoadKeys()
{
if (this.keys != null)
{
return;
}
this.keys = new Hashtable();
Assembly entryAssembly = Assembly.GetEntryAssembly();
if (entryAssembly != null)
{
this.LoadAssemblyLicenses(this.keys, entryAssembly);
}
else
{
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
{
this.LoadAssemblyLicenses(this.keys, assembly);
}
}
}
// Token: 0x06000331 RID: 817 RVA: 0x00009BE8 File Offset: 0x00007DE8
private void LoadAssemblyLicenses(Hashtable targetkeys, Assembly asm)
{
if (asm is AssemblyBuilder)
{
return;
}
string fileName = Path.GetFileName(asm.Location);
string text = fileName + ".licenses";
try
{
foreach (string text2 in asm.GetManifestResourceNames())
{
if (!(text2 != text))
{
using (Stream manifestResourceStream = asm.GetManifestResourceStream(text2))
{
BinaryFormatter binaryFormatter = new BinaryFormatter();
object[] array = binaryFormatter.Deserialize(manifestResourceStream) as object[];
if (string.Compare((string)array[0], fileName, true) == 0)
{
Hashtable hashtable = (Hashtable)array[1];
foreach (object obj in hashtable)
{
DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
targetkeys.Add(dictionaryEntry.Key, dictionaryEntry.Value);
}
}
}
}
}
}
catch (InvalidCastException)
{
}
}
// Token: 0x06000332 RID: 818 RVA: 0x00009D50 File Offset: 0x00007F50
public override string GetSavedLicenseKey(Type type, Assembly resourceAssembly)
{
if (type == null)
{
throw new ArgumentNullException("type");
}
if (resourceAssembly != null)
{
if (this.extraassemblies == null)
{
this.extraassemblies = new Hashtable();
}
Hashtable hashtable = this.extraassemblies[resourceAssembly.FullName] as Hashtable;
if (hashtable == null)
{
hashtable = new Hashtable();
this.LoadAssemblyLicenses(hashtable, resourceAssembly);
this.extraassemblies[resourceAssembly.FullName] = hashtable;
}
return (string)hashtable[type.AssemblyQualifiedName];
}
this.LoadKeys();
return (string)this.keys[type.AssemblyQualifiedName];
}
// Token: 0x06000333 RID: 819 RVA: 0x00009DF8 File Offset: 0x00007FF8
public override void SetSavedLicenseKey(Type type, string key)
{
if (type == null)
{
throw new ArgumentNullException("type");
}
this.LoadKeys();
this.keys[type.AssemblyQualifiedName] = key;
}
// Token: 0x040000D3 RID: 211
private Hashtable extraassemblies;
// Token: 0x040000D4 RID: 212
private Hashtable keys;
}
}
@@ -0,0 +1,208 @@
using System;
using System.Collections;
using System.Reflection;
namespace System.ComponentModel.Design.Serialization
{
/// <summary>Provides the information necessary to create an instance of an object. This class cannot be inherited.</summary>
// Token: 0x0200003C RID: 60
public sealed class InstanceDescriptor
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.Serialization.InstanceDescriptor" /> class using the specified member information and arguments.</summary>
/// <param name="member">The member information for the descriptor. This can be a <see cref="T:System.Reflection.MethodInfo" />, <see cref="T:System.Reflection.ConstructorInfo" />, <see cref="T:System.Reflection.FieldInfo" />, or <see cref="T:System.Reflection.PropertyInfo" />. If this is a <see cref="T:System.Reflection.MethodInfo" />, <see cref="T:System.Reflection.FieldInfo" />, or <see cref="T:System.Reflection.PropertyInfo" />, it must represent a static member. </param>
/// <param name="arguments">The collection of arguments to pass to the member. This parameter can be null or an empty collection if there are no arguments. The collection can also consist of other instances of <see cref="T:System.ComponentModel.Design.Serialization.InstanceDescriptor" />. </param>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="member" /> is of type <see cref="T:System.Reflection.MethodInfo" />, <see cref="T:System.Reflection.FieldInfo" />, or <see cref="T:System.Reflection.PropertyInfo" />, and it does not represent a static member.<paramref name="member" /> is of type <see cref="T:System.Reflection.PropertyInfo" /> and is not readable.<paramref name="member" /> is of type <see cref="T:System.Reflection.MethodInfo" /> or <see cref="T:System.Reflection.ConstructorInfo" />, and the number of arguments in <paramref name="arguments" /> does not match the signature of <paramref name="member." /><paramref name="member" /> is of type <see cref="T:System.Reflection.ConstructorInfo" /> and represents a static member.<paramref name="member" /> is of type <see cref="T:System.Reflection.FieldInfo" />, and the number of arguments in <paramref name="arguments" /> is not zero. </exception>
// Token: 0x06000294 RID: 660 RVA: 0x000092DC File Offset: 0x000074DC
public InstanceDescriptor(MemberInfo member, ICollection arguments)
: this(member, arguments, true)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.Serialization.InstanceDescriptor" /> class using the specified member information, arguments, and value indicating whether the specified information completely describes the instance.</summary>
/// <param name="member">The member information for the descriptor. This can be a <see cref="T:System.Reflection.MethodInfo" />, <see cref="T:System.Reflection.ConstructorInfo" />, <see cref="T:System.Reflection.FieldInfo" />, or <see cref="T:System.Reflection.PropertyInfo" />. If this is a <see cref="T:System.Reflection.MethodInfo" />, <see cref="T:System.Reflection.FieldInfo" />, or <see cref="T:System.Reflection.PropertyInfo" />, it must represent a static member. </param>
/// <param name="arguments">The collection of arguments to pass to the member. This parameter can be null or an empty collection if there are no arguments. The collection can also consist of other instances of <see cref="T:System.ComponentModel.Design.Serialization.InstanceDescriptor" />. </param>
/// <param name="isComplete">true if the specified information completely describes the instance; otherwise, false. </param>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="member" /> is of type <see cref="T:System.Reflection.MethodInfo" />, <see cref="T:System.Reflection.FieldInfo" />, or <see cref="T:System.Reflection.PropertyInfo" />, and it does not represent a static member<paramref name="member" /> is of type <see cref="T:System.Reflection.PropertyInfo" /> and is not readable.<paramref name="member" /> is of type <see cref="T:System.Reflection.MethodInfo" /> or <see cref="T:System.Reflection.ConstructorInfo" /> and the number of arguments in <paramref name="arguments" /> does not match the signature of <paramref name="member" />.<paramref name="member" /> is of type <see cref="T:System.Reflection.ConstructorInfo" /> and represents a static member<paramref name="member" /> is of type <see cref="T:System.Reflection.FieldInfo" />, and the number of arguments in <paramref name="arguments" /> is not zero.</exception>
// Token: 0x06000295 RID: 661 RVA: 0x000092E8 File Offset: 0x000074E8
public InstanceDescriptor(MemberInfo member, ICollection arguments, bool isComplete)
{
this.isComplete = isComplete;
this.ValidateMember(member, arguments);
this.member = member;
this.arguments = arguments;
}
// Token: 0x06000296 RID: 662 RVA: 0x00009310 File Offset: 0x00007510
private void ValidateMember(MemberInfo member, ICollection arguments)
{
if (member == null)
{
return;
}
MemberTypes memberType = member.MemberType;
switch (memberType)
{
case MemberTypes.Constructor:
{
ConstructorInfo constructorInfo = (ConstructorInfo)member;
if (arguments == null && constructorInfo.GetParameters().Length != 0)
{
throw new ArgumentException("Invalid number of arguments for this constructor");
}
if (arguments.Count != constructorInfo.GetParameters().Length)
{
throw new ArgumentException("Invalid number of arguments for this constructor");
}
break;
}
default:
if (memberType != MemberTypes.Method)
{
if (memberType == MemberTypes.Property)
{
PropertyInfo propertyInfo = (PropertyInfo)member;
if (!propertyInfo.CanRead)
{
throw new ArgumentException("Parameter must be readable");
}
MethodInfo getMethod = propertyInfo.GetGetMethod();
if (!getMethod.IsStatic)
{
throw new ArgumentException("Parameter must be static");
}
}
}
else
{
MethodInfo methodInfo = (MethodInfo)member;
if (!methodInfo.IsStatic)
{
throw new ArgumentException("InstanceDescriptor only describes static (VB.Net: shared) members", "member");
}
if (arguments == null && methodInfo.GetParameters().Length != 0)
{
throw new ArgumentException("Invalid number of arguments for this method", "arguments");
}
if (arguments.Count != methodInfo.GetParameters().Length)
{
throw new ArgumentException("Invalid number of arguments for this method");
}
}
break;
case MemberTypes.Field:
{
FieldInfo fieldInfo = (FieldInfo)member;
if (!fieldInfo.IsStatic)
{
throw new ArgumentException("Parameter must be static");
}
if (arguments != null && arguments.Count != 0)
{
throw new ArgumentException("Field members do not take any arguments");
}
break;
}
}
}
/// <summary>Gets the collection of arguments that can be used to reconstruct an instance of the object that this instance descriptor represents.</summary>
/// <returns>An <see cref="T:System.Collections.ICollection" /> of arguments that can be used to create the object.</returns>
// Token: 0x170000B9 RID: 185
// (get) Token: 0x06000297 RID: 663 RVA: 0x0000948C File Offset: 0x0000768C
public ICollection Arguments
{
get
{
if (this.arguments == null)
{
return new object[0];
}
return this.arguments;
}
}
/// <summary>Gets a value indicating whether the contents of this <see cref="T:System.ComponentModel.Design.Serialization.InstanceDescriptor" /> completely identify the instance.</summary>
/// <returns>true if the instance is completely described; otherwise, false.</returns>
// Token: 0x170000BA RID: 186
// (get) Token: 0x06000298 RID: 664 RVA: 0x000094A8 File Offset: 0x000076A8
public bool IsComplete
{
get
{
return this.isComplete;
}
}
/// <summary>Gets the member information that describes the instance this descriptor is associated with.</summary>
/// <returns>A <see cref="T:System.Reflection.MemberInfo" /> that describes the instance that this object is associated with.</returns>
// Token: 0x170000BB RID: 187
// (get) Token: 0x06000299 RID: 665 RVA: 0x000094B0 File Offset: 0x000076B0
public MemberInfo MemberInfo
{
get
{
return this.member;
}
}
/// <summary>Invokes this instance descriptor and returns the object the descriptor describes.</summary>
/// <returns>The object this instance descriptor describes.</returns>
// Token: 0x0600029A RID: 666 RVA: 0x000094B8 File Offset: 0x000076B8
public object Invoke()
{
if (this.member == null)
{
return null;
}
object[] array;
if (this.arguments == null)
{
array = new object[0];
}
else
{
array = new object[this.arguments.Count];
this.arguments.CopyTo(array, 0);
}
MemberTypes memberType = this.member.MemberType;
switch (memberType)
{
case MemberTypes.Constructor:
{
ConstructorInfo constructorInfo = (ConstructorInfo)this.member;
return constructorInfo.Invoke(array);
}
default:
{
if (memberType == MemberTypes.Method)
{
MethodInfo methodInfo = (MethodInfo)this.member;
return methodInfo.Invoke(null, array);
}
if (memberType != MemberTypes.Property)
{
return null;
}
PropertyInfo propertyInfo = (PropertyInfo)this.member;
return propertyInfo.GetValue(null, array);
}
case MemberTypes.Field:
{
FieldInfo fieldInfo = (FieldInfo)this.member;
return fieldInfo.GetValue(null);
}
}
}
// Token: 0x040000B5 RID: 181
private MemberInfo member;
// Token: 0x040000B6 RID: 182
private ICollection arguments;
// Token: 0x040000B7 RID: 183
private bool isComplete;
}
}
@@ -0,0 +1,14 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Provides a callback mechanism that can create an instance of a service on demand.</summary>
/// <returns>The service specified by <paramref name="serviceType" />, or null if the service could not be created. </returns>
/// <param name="container">The service container that requested the creation of the service. </param>
/// <param name="serviceType">The type of service to create. </param>
// Token: 0x02000320 RID: 800
// (Invoke) Token: 0x06001C59 RID: 7257
[ComVisible(true)]
public delegate object ServiceCreatorCallback(IServiceContainer container, Type serviceType);
}
@@ -0,0 +1,291 @@
using System;
namespace System.ComponentModel.Design
{
/// <summary>Defines identifiers for the standard set of commands that are available to most applications.</summary>
// Token: 0x02000050 RID: 80
public class StandardCommands
{
// Token: 0x06000335 RID: 821 RVA: 0x00009E2C File Offset: 0x0000802C
static StandardCommands()
{
Guid guid = new Guid("5efc7975-14bc-11cf-9b2b-00aa00573819");
Guid guid2 = new Guid("74d21313-2aee-11d1-8bfb-00a0c90f26f7");
StandardCommands.AlignBottom = new CommandID(guid, 1);
StandardCommands.AlignHorizontalCenters = new CommandID(guid, 2);
StandardCommands.AlignLeft = new CommandID(guid, 3);
StandardCommands.AlignRight = new CommandID(guid, 4);
StandardCommands.AlignToGrid = new CommandID(guid, 5);
StandardCommands.AlignTop = new CommandID(guid, 6);
StandardCommands.AlignVerticalCenters = new CommandID(guid, 7);
StandardCommands.ArrangeBottom = new CommandID(guid, 8);
StandardCommands.ArrangeIcons = new CommandID(guid2, 12298);
StandardCommands.ArrangeRight = new CommandID(guid, 9);
StandardCommands.BringForward = new CommandID(guid, 10);
StandardCommands.BringToFront = new CommandID(guid, 11);
StandardCommands.CenterHorizontally = new CommandID(guid, 12);
StandardCommands.CenterVertically = new CommandID(guid, 13);
StandardCommands.Copy = new CommandID(guid, 15);
StandardCommands.Cut = new CommandID(guid, 16);
StandardCommands.Delete = new CommandID(guid, 17);
StandardCommands.F1Help = new CommandID(guid, 377);
StandardCommands.Group = new CommandID(guid, 20);
StandardCommands.HorizSpaceConcatenate = new CommandID(guid, 21);
StandardCommands.HorizSpaceDecrease = new CommandID(guid, 22);
StandardCommands.HorizSpaceIncrease = new CommandID(guid, 23);
StandardCommands.HorizSpaceMakeEqual = new CommandID(guid, 24);
StandardCommands.LineupIcons = new CommandID(guid2, 12299);
StandardCommands.LockControls = new CommandID(guid, 369);
StandardCommands.MultiLevelRedo = new CommandID(guid, 30);
StandardCommands.MultiLevelUndo = new CommandID(guid, 44);
StandardCommands.Paste = new CommandID(guid, 26);
StandardCommands.Properties = new CommandID(guid, 28);
StandardCommands.PropertiesWindow = new CommandID(guid, 235);
StandardCommands.Redo = new CommandID(guid, 29);
StandardCommands.Replace = new CommandID(guid, 230);
StandardCommands.SelectAll = new CommandID(guid, 31);
StandardCommands.SendBackward = new CommandID(guid, 32);
StandardCommands.SendToBack = new CommandID(guid, 33);
StandardCommands.ShowGrid = new CommandID(guid, 103);
StandardCommands.ShowLargeIcons = new CommandID(guid2, 12300);
StandardCommands.SizeToControl = new CommandID(guid, 35);
StandardCommands.SizeToControlHeight = new CommandID(guid, 36);
StandardCommands.SizeToControlWidth = new CommandID(guid, 37);
StandardCommands.SizeToFit = new CommandID(guid, 38);
StandardCommands.SizeToGrid = new CommandID(guid, 39);
StandardCommands.SnapToGrid = new CommandID(guid, 40);
StandardCommands.TabOrder = new CommandID(guid, 41);
StandardCommands.Undo = new CommandID(guid, 43);
StandardCommands.Ungroup = new CommandID(guid, 45);
StandardCommands.VerbFirst = new CommandID(guid2, 8192);
StandardCommands.VerbLast = new CommandID(guid2, 8448);
StandardCommands.VertSpaceConcatenate = new CommandID(guid, 46);
StandardCommands.VertSpaceDecrease = new CommandID(guid, 47);
StandardCommands.VertSpaceIncrease = new CommandID(guid, 48);
StandardCommands.VertSpaceMakeEqual = new CommandID(guid, 49);
StandardCommands.ViewGrid = new CommandID(guid, 125);
StandardCommands.DocumentOutline = new CommandID(guid, 239);
StandardCommands.ViewCode = new CommandID(guid, 333);
}
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the AlignBottom command. This field is read-only.</summary>
// Token: 0x040000D5 RID: 213
public static readonly CommandID AlignBottom;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the AlignHorizontalCenters command. This field is read-only.</summary>
// Token: 0x040000D6 RID: 214
public static readonly CommandID AlignHorizontalCenters;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the AlignLeft command. This field is read-only.</summary>
// Token: 0x040000D7 RID: 215
public static readonly CommandID AlignLeft;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the AlignRight command. This field is read-only.</summary>
// Token: 0x040000D8 RID: 216
public static readonly CommandID AlignRight;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the AlignToGrid command. This field is read-only.</summary>
// Token: 0x040000D9 RID: 217
public static readonly CommandID AlignToGrid;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the AlignTop command. This field is read-only.</summary>
// Token: 0x040000DA RID: 218
public static readonly CommandID AlignTop;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the AlignVerticalCenters command. This field is read-only.</summary>
// Token: 0x040000DB RID: 219
public static readonly CommandID AlignVerticalCenters;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the ArrangeBottom command. This field is read-only.</summary>
// Token: 0x040000DC RID: 220
public static readonly CommandID ArrangeBottom;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the ArrangeIcons command. This field is read-only.</summary>
// Token: 0x040000DD RID: 221
public static readonly CommandID ArrangeIcons;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the ArrangeRight command. This field is read-only.</summary>
// Token: 0x040000DE RID: 222
public static readonly CommandID ArrangeRight;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the BringForward command. This field is read-only.</summary>
// Token: 0x040000DF RID: 223
public static readonly CommandID BringForward;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the BringToFront command. This field is read-only.</summary>
// Token: 0x040000E0 RID: 224
public static readonly CommandID BringToFront;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the CenterHorizontally command. This field is read-only.</summary>
// Token: 0x040000E1 RID: 225
public static readonly CommandID CenterHorizontally;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the CenterVertically command. This field is read-only.</summary>
// Token: 0x040000E2 RID: 226
public static readonly CommandID CenterVertically;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Copy command. This field is read-only.</summary>
// Token: 0x040000E3 RID: 227
public static readonly CommandID Copy;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Cut command. This field is read-only.</summary>
// Token: 0x040000E4 RID: 228
public static readonly CommandID Cut;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Delete command. This field is read-only.</summary>
// Token: 0x040000E5 RID: 229
public static readonly CommandID Delete;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the F1Help command. This field is read-only.</summary>
// Token: 0x040000E6 RID: 230
public static readonly CommandID F1Help;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Group command. This field is read-only.</summary>
// Token: 0x040000E7 RID: 231
public static readonly CommandID Group;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the HorizSpaceConcatenate command. This field is read-only.</summary>
// Token: 0x040000E8 RID: 232
public static readonly CommandID HorizSpaceConcatenate;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the HorizSpaceDecrease command. This field is read-only.</summary>
// Token: 0x040000E9 RID: 233
public static readonly CommandID HorizSpaceDecrease;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the HorizSpaceIncrease command. This field is read-only.</summary>
// Token: 0x040000EA RID: 234
public static readonly CommandID HorizSpaceIncrease;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the HorizSpaceMakeEqual command. This field is read-only.</summary>
// Token: 0x040000EB RID: 235
public static readonly CommandID HorizSpaceMakeEqual;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the LineupIcons command. This field is read-only.</summary>
// Token: 0x040000EC RID: 236
public static readonly CommandID LineupIcons;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the LockControls command. This field is read-only.</summary>
// Token: 0x040000ED RID: 237
public static readonly CommandID LockControls;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the MultiLevelRedo command. This field is read-only.</summary>
// Token: 0x040000EE RID: 238
public static readonly CommandID MultiLevelRedo;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the MultiLevelUndo command. This field is read-only.</summary>
// Token: 0x040000EF RID: 239
public static readonly CommandID MultiLevelUndo;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Paste command. This field is read-only.</summary>
// Token: 0x040000F0 RID: 240
public static readonly CommandID Paste;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Properties command. This field is read-only.</summary>
// Token: 0x040000F1 RID: 241
public static readonly CommandID Properties;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the PropertiesWindow command. This field is read-only.</summary>
// Token: 0x040000F2 RID: 242
public static readonly CommandID PropertiesWindow;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Redo command. This field is read-only.</summary>
// Token: 0x040000F3 RID: 243
public static readonly CommandID Redo;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Replace command. This field is read-only.</summary>
// Token: 0x040000F4 RID: 244
public static readonly CommandID Replace;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SelectAll command. This field is read-only.</summary>
// Token: 0x040000F5 RID: 245
public static readonly CommandID SelectAll;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SendBackward command. This field is read-only.</summary>
// Token: 0x040000F6 RID: 246
public static readonly CommandID SendBackward;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SendToBack command. This field is read-only.</summary>
// Token: 0x040000F7 RID: 247
public static readonly CommandID SendToBack;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the ShowGrid command. This field is read-only.</summary>
// Token: 0x040000F8 RID: 248
public static readonly CommandID ShowGrid;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the ShowLargeIcons command. This field is read-only.</summary>
// Token: 0x040000F9 RID: 249
public static readonly CommandID ShowLargeIcons;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SizeToControl command. This field is read-only.</summary>
// Token: 0x040000FA RID: 250
public static readonly CommandID SizeToControl;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SizeToControlHeight command. This field is read-only.</summary>
// Token: 0x040000FB RID: 251
public static readonly CommandID SizeToControlHeight;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SizeToControlWidth command. This field is read-only.</summary>
// Token: 0x040000FC RID: 252
public static readonly CommandID SizeToControlWidth;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SizeToFit command. This field is read-only.</summary>
// Token: 0x040000FD RID: 253
public static readonly CommandID SizeToFit;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SizeToGrid command. This field is read-only.</summary>
// Token: 0x040000FE RID: 254
public static readonly CommandID SizeToGrid;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SnapToGrid command. This field is read-only.</summary>
// Token: 0x040000FF RID: 255
public static readonly CommandID SnapToGrid;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the TabOrder command. This field is read-only.</summary>
// Token: 0x04000100 RID: 256
public static readonly CommandID TabOrder;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Undo command. This field is read-only.</summary>
// Token: 0x04000101 RID: 257
public static readonly CommandID Undo;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Ungroup command. This field is read-only.</summary>
// Token: 0x04000102 RID: 258
public static readonly CommandID Ungroup;
/// <summary>Gets the first of a set of verbs. This field is read-only.</summary>
// Token: 0x04000103 RID: 259
public static readonly CommandID VerbFirst;
/// <summary>Gets the last of a set of verbs. This field is read-only.</summary>
// Token: 0x04000104 RID: 260
public static readonly CommandID VerbLast;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the VertSpaceConcatenate command. This field is read-only.</summary>
// Token: 0x04000105 RID: 261
public static readonly CommandID VertSpaceConcatenate;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the VertSpaceDecrease command. This field is read-only.</summary>
// Token: 0x04000106 RID: 262
public static readonly CommandID VertSpaceDecrease;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the VertSpaceIncrease command. This field is read-only.</summary>
// Token: 0x04000107 RID: 263
public static readonly CommandID VertSpaceIncrease;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the VertSpaceMakeEqual command. This field is read-only.</summary>
// Token: 0x04000108 RID: 264
public static readonly CommandID VertSpaceMakeEqual;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the ViewGrid command. This field is read-only.</summary>
// Token: 0x04000109 RID: 265
public static readonly CommandID ViewGrid;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Document Outline command. This field is read-only.</summary>
// Token: 0x0400010A RID: 266
public static readonly CommandID DocumentOutline;
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the ViewCode command. This field is read-only.</summary>
// Token: 0x0400010B RID: 267
public static readonly CommandID ViewCode;
}
}
@@ -0,0 +1,23 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Defines identifiers for a set of technologies that designer hosts support.</summary>
// Token: 0x02000051 RID: 81
[ComVisible(true)]
public enum ViewTechnology
{
/// <summary>Represents a mode in which the view object is passed directly to the development environment. </summary>
// Token: 0x0400010D RID: 269
[Obsolete("Use ViewTechnology.Default.")]
Passthrough,
/// <summary>Represents a mode in which a Windows Forms control object provides the display for the root designer. </summary>
// Token: 0x0400010E RID: 270
[Obsolete("Use ViewTechnology.Default.")]
WindowsForms,
/// <summary>Specifies the default view technology support. </summary>
// Token: 0x0400010F RID: 271
Default
}
}
@@ -0,0 +1,68 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies whether a property can only be set at design time.</summary>
// Token: 0x02000070 RID: 112
[AttributeUsage(AttributeTargets.All)]
public sealed class DesignOnlyAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignOnlyAttribute" /> class.</summary>
/// <param name="isDesignOnly">true if a property can be set only at design time; false if the property can be set at design time and at run time. </param>
// Token: 0x06000417 RID: 1047 RVA: 0x0000C448 File Offset: 0x0000A648
public DesignOnlyAttribute(bool design_only)
{
this.design_only = design_only;
}
/// <summary>Gets a value indicating whether a property can be set only at design time.</summary>
/// <returns>true if a property can be set only at design time; otherwise, false.</returns>
// Token: 0x17000115 RID: 277
// (get) Token: 0x06000419 RID: 1049 RVA: 0x0000C47C File Offset: 0x0000A67C
public bool IsDesignOnly
{
get
{
return this.design_only;
}
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DesignOnlyAttribute" />.</summary>
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
/// <param name="obj">The object to test the value equality of. </param>
// Token: 0x0600041A RID: 1050 RVA: 0x0000C484 File Offset: 0x0000A684
public override bool Equals(object obj)
{
return obj is DesignOnlyAttribute && (obj == this || ((DesignOnlyAttribute)obj).IsDesignOnly == this.design_only);
}
// Token: 0x0600041B RID: 1051 RVA: 0x0000C4B0 File Offset: 0x0000A6B0
public override int GetHashCode()
{
return this.design_only.GetHashCode();
}
/// <summary>Determines if this attribute is the default.</summary>
/// <returns>true if the attribute is the default value for this attribute class; otherwise, false.</returns>
// Token: 0x0600041C RID: 1052 RVA: 0x0000C4C0 File Offset: 0x0000A6C0
public override bool IsDefaultAttribute()
{
return this.design_only == DesignOnlyAttribute.Default.IsDesignOnly;
}
// Token: 0x0400014E RID: 334
private bool design_only;
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.DesignOnlyAttribute" />, which is <see cref="F:System.ComponentModel.DesignOnlyAttribute.No" />. This static field is read-only.</summary>
// Token: 0x0400014F RID: 335
public static readonly DesignOnlyAttribute Default = new DesignOnlyAttribute(false);
/// <summary>Specifies that a property can be set at design time or at run time. This static field is read-only.</summary>
// Token: 0x04000150 RID: 336
public static readonly DesignOnlyAttribute No = new DesignOnlyAttribute(false);
/// <summary>Specifies that a property can be set only at design time. This static field is read-only.</summary>
// Token: 0x04000151 RID: 337
public static readonly DesignOnlyAttribute Yes = new DesignOnlyAttribute(true);
}
}
@@ -0,0 +1,74 @@
using System;
namespace System.ComponentModel
{
/// <summary>
/// <see cref="T:System.ComponentModel.DesignTimeVisibleAttribute" /> marks a component's visibility. If <see cref="F:System.ComponentModel.DesignTimeVisibleAttribute.Yes" /> is present, a visual designer can show this component on a designer.</summary>
// Token: 0x02000071 RID: 113
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)]
public sealed class DesignTimeVisibleAttribute : Attribute
{
/// <summary>Creates a new <see cref="T:System.ComponentModel.DesignTimeVisibleAttribute" /> set to the default value of false.</summary>
// Token: 0x0600041D RID: 1053 RVA: 0x0000C4D4 File Offset: 0x0000A6D4
public DesignTimeVisibleAttribute()
: this(true)
{
}
/// <summary>Creates a new <see cref="T:System.ComponentModel.DesignTimeVisibleAttribute" /> with the <see cref="P:System.ComponentModel.DesignTimeVisibleAttribute.Visible" /> property set to the given value in <paramref name="visible" />.</summary>
/// <param name="visible">The value that the <see cref="P:System.ComponentModel.DesignTimeVisibleAttribute.Visible" /> property will be set against. </param>
// Token: 0x0600041E RID: 1054 RVA: 0x0000C4E0 File Offset: 0x0000A6E0
public DesignTimeVisibleAttribute(bool visible)
{
this.visible = visible;
}
/// <summary>Gets or sets whether the component should be shown at design time.</summary>
/// <returns>true if this component should be shown at design time, or false if it shouldn't.</returns>
// Token: 0x17000116 RID: 278
// (get) Token: 0x06000420 RID: 1056 RVA: 0x0000C514 File Offset: 0x0000A714
public bool Visible
{
get
{
return this.visible;
}
}
/// <param name="obj">The object to compare.</param>
// Token: 0x06000421 RID: 1057 RVA: 0x0000C51C File Offset: 0x0000A71C
public override bool Equals(object obj)
{
return obj is DesignTimeVisibleAttribute && (obj == this || ((DesignTimeVisibleAttribute)obj).Visible == this.visible);
}
// Token: 0x06000422 RID: 1058 RVA: 0x0000C548 File Offset: 0x0000A748
public override int GetHashCode()
{
return this.visible.GetHashCode();
}
/// <summary>Gets a value indicating if this instance is equal to the <see cref="F:System.ComponentModel.DesignTimeVisibleAttribute.Default" /> value.</summary>
/// <returns>true, if this instance is equal to the <see cref="F:System.ComponentModel.DesignTimeVisibleAttribute.Default" /> value; otherwise, false.</returns>
// Token: 0x06000423 RID: 1059 RVA: 0x0000C558 File Offset: 0x0000A758
public override bool IsDefaultAttribute()
{
return this.visible == DesignTimeVisibleAttribute.Default.Visible;
}
// Token: 0x04000152 RID: 338
private bool visible;
/// <summary>The default visibility which is Yes.</summary>
// Token: 0x04000153 RID: 339
public static readonly DesignTimeVisibleAttribute Default = new DesignTimeVisibleAttribute(true);
/// <summary>Marks a component as not visible in a visual designer.</summary>
// Token: 0x04000154 RID: 340
public static readonly DesignTimeVisibleAttribute No = new DesignTimeVisibleAttribute(false);
/// <summary>Marks a component as visible in a visual designer.</summary>
// Token: 0x04000155 RID: 341
public static readonly DesignTimeVisibleAttribute Yes = new DesignTimeVisibleAttribute(true);
}
}
+127
View File
@@ -0,0 +1,127 @@
using System;
using System.ComponentModel.Design;
namespace System.ComponentModel
{
/// <summary>Specifies the class used to implement design-time services for a component.</summary>
// Token: 0x02000072 RID: 114
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = true, Inherited = true)]
public sealed class DesignerAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerAttribute" /> class using the name of the type that provides design-time services.</summary>
/// <param name="designerTypeName">The concatenation of the fully qualified name of the type that provides design-time services for the component this attribute is bound to, and the name of the assembly this type resides in. </param>
// Token: 0x06000424 RID: 1060 RVA: 0x0000C56C File Offset: 0x0000A76C
public DesignerAttribute(string designerTypeName)
{
if (designerTypeName == null)
{
throw new NullReferenceException();
}
this.name = designerTypeName;
this.basetypename = typeof(global::System.ComponentModel.Design.IDesigner).FullName;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerAttribute" /> class using the type that provides design-time services.</summary>
/// <param name="designerType">A <see cref="T:System.Type" /> that represents the class that provides design-time services for the component this attribute is bound to. </param>
// Token: 0x06000425 RID: 1061 RVA: 0x0000C5A8 File Offset: 0x0000A7A8
public DesignerAttribute(Type designerType)
: this(designerType.AssemblyQualifiedName)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerAttribute" /> class, using the name of the designer class and the base class for the designer.</summary>
/// <param name="designerTypeName">The concatenation of the fully qualified name of the type that provides design-time services for the component this attribute is bound to, and the name of the assembly this type resides in. </param>
/// <param name="designerBaseType">A <see cref="T:System.Type" /> that represents the base class to associate with the <paramref name="designerTypeName" />. </param>
// Token: 0x06000426 RID: 1062 RVA: 0x0000C5B8 File Offset: 0x0000A7B8
public DesignerAttribute(string designerTypeName, Type designerBaseType)
: this(designerTypeName, designerBaseType.AssemblyQualifiedName)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerAttribute" /> class using the types of the designer and designer base class.</summary>
/// <param name="designerType">A <see cref="T:System.Type" /> that represents the class that provides design-time services for the component this attribute is bound to. </param>
/// <param name="designerBaseType">A <see cref="T:System.Type" /> that represents the base class to associate with the <paramref name="designerType" />. </param>
// Token: 0x06000427 RID: 1063 RVA: 0x0000C5C8 File Offset: 0x0000A7C8
public DesignerAttribute(Type designerType, Type designerBaseType)
: this(designerType.AssemblyQualifiedName, designerBaseType.AssemblyQualifiedName)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerAttribute" /> class using the designer type and the base class for the designer.</summary>
/// <param name="designerTypeName">The concatenation of the fully qualified name of the type that provides design-time services for the component this attribute is bound to, and the name of the assembly this type resides in. </param>
/// <param name="designerBaseTypeName">The fully qualified name of the base class to associate with the designer class. </param>
// Token: 0x06000428 RID: 1064 RVA: 0x0000C5DC File Offset: 0x0000A7DC
public DesignerAttribute(string designerTypeName, string designerBaseTypeName)
{
if (designerTypeName == null)
{
throw new NullReferenceException();
}
this.name = designerTypeName;
this.basetypename = designerBaseTypeName;
}
/// <summary>Gets the name of the base type of this designer.</summary>
/// <returns>The name of the base type of this designer.</returns>
// Token: 0x17000117 RID: 279
// (get) Token: 0x06000429 RID: 1065 RVA: 0x0000C60C File Offset: 0x0000A80C
public string DesignerBaseTypeName
{
get
{
return this.basetypename;
}
}
/// <summary>Gets the name of the designer type associated with this designer attribute.</summary>
/// <returns>The name of the designer type associated with this designer attribute.</returns>
// Token: 0x17000118 RID: 280
// (get) Token: 0x0600042A RID: 1066 RVA: 0x0000C614 File Offset: 0x0000A814
public string DesignerTypeName
{
get
{
return this.name;
}
}
/// <summary>Gets a unique ID for this attribute type.</summary>
/// <returns>A unique ID for this attribute type.</returns>
// Token: 0x17000119 RID: 281
// (get) Token: 0x0600042B RID: 1067 RVA: 0x0000C61C File Offset: 0x0000A81C
public override object TypeId
{
get
{
string text = this.basetypename;
int num = text.IndexOf(',');
if (num != -1)
{
text = text.Substring(0, num);
}
return base.GetType().ToString() + text;
}
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DesignerAttribute" />.</summary>
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
/// <param name="obj">The object to test the value equality of. </param>
// Token: 0x0600042C RID: 1068 RVA: 0x0000C65C File Offset: 0x0000A85C
public override bool Equals(object obj)
{
return obj is DesignerAttribute && ((DesignerAttribute)obj).DesignerBaseTypeName.Equals(this.basetypename) && ((DesignerAttribute)obj).DesignerTypeName.Equals(this.name);
}
// Token: 0x0600042D RID: 1069 RVA: 0x0000C6AC File Offset: 0x0000A8AC
public override int GetHashCode()
{
return (this.name + this.basetypename).GetHashCode();
}
// Token: 0x04000156 RID: 342
private string name;
// Token: 0x04000157 RID: 343
private string basetypename;
}
}
@@ -0,0 +1,93 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies that the designer for a class belongs to a certain category.</summary>
// Token: 0x02000073 RID: 115
[AttributeUsage(AttributeTargets.Class)]
public sealed class DesignerCategoryAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerCategoryAttribute" /> class with an empty string ("").</summary>
// Token: 0x0600042E RID: 1070 RVA: 0x0000C6C4 File Offset: 0x0000A8C4
public DesignerCategoryAttribute()
{
this.category = string.Empty;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerCategoryAttribute" /> class with the given category name.</summary>
/// <param name="category">The name of the category. </param>
// Token: 0x0600042F RID: 1071 RVA: 0x0000C6D8 File Offset: 0x0000A8D8
public DesignerCategoryAttribute(string category)
{
this.category = category;
}
/// <summary>Gets a unique identifier for this attribute.</summary>
/// <returns>An <see cref="T:System.Object" /> that is a unique identifier for the attribute.</returns>
// Token: 0x1700011A RID: 282
// (get) Token: 0x06000431 RID: 1073 RVA: 0x0000C734 File Offset: 0x0000A934
public override object TypeId
{
get
{
return base.GetType();
}
}
/// <summary>Gets the name of the category.</summary>
/// <returns>The name of the category.</returns>
// Token: 0x1700011B RID: 283
// (get) Token: 0x06000432 RID: 1074 RVA: 0x0000C73C File Offset: 0x0000A93C
public string Category
{
get
{
return this.category;
}
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DesignOnlyAttribute" />.</summary>
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
/// <param name="obj">The object to test the value equality of. </param>
// Token: 0x06000433 RID: 1075 RVA: 0x0000C744 File Offset: 0x0000A944
public override bool Equals(object obj)
{
return obj is DesignerCategoryAttribute && (obj == this || ((DesignerCategoryAttribute)obj).Category == this.category);
}
/// <summary>Returns the hash code for this instance.</summary>
/// <returns>A 32-bit signed integer hash code.</returns>
// Token: 0x06000434 RID: 1076 RVA: 0x0000C780 File Offset: 0x0000A980
public override int GetHashCode()
{
return this.category.GetHashCode();
}
/// <summary>Determines if this attribute is the default.</summary>
/// <returns>true if the attribute is the default value for this attribute class; otherwise, false.</returns>
// Token: 0x06000435 RID: 1077 RVA: 0x0000C790 File Offset: 0x0000A990
public override bool IsDefaultAttribute()
{
return this.category == DesignerCategoryAttribute.Default.Category;
}
// Token: 0x04000158 RID: 344
private string category;
/// <summary>Specifies that a component marked with this category use a component designer. This field is read-only.</summary>
// Token: 0x04000159 RID: 345
public static readonly DesignerCategoryAttribute Component = new DesignerCategoryAttribute("Component");
/// <summary>Specifies that a component marked with this category use a form designer. This static field is read-only.</summary>
// Token: 0x0400015A RID: 346
public static readonly DesignerCategoryAttribute Form = new DesignerCategoryAttribute("Form");
/// <summary>Specifies that a component marked with this category use a generic designer. This static field is read-only.</summary>
// Token: 0x0400015B RID: 347
public static readonly DesignerCategoryAttribute Generic = new DesignerCategoryAttribute("Designer");
/// <summary>Specifies that a component marked with this category cannot use a visual designer. This static field is read-only.</summary>
// Token: 0x0400015C RID: 348
public static readonly DesignerCategoryAttribute Default = new DesignerCategoryAttribute(string.Empty);
}
}
@@ -0,0 +1,21 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel
{
/// <summary>Specifies the visibility a property has to the design-time serializer.</summary>
// Token: 0x02000074 RID: 116
[ComVisible(true)]
public enum DesignerSerializationVisibility
{
/// <summary>The code generator does not produce code for the object.</summary>
// Token: 0x0400015E RID: 350
Hidden,
/// <summary>The code generator produces code for the object.</summary>
// Token: 0x0400015F RID: 351
Visible,
/// <summary>The code generator produces code for the contents of the object, rather than for the object itself.</summary>
// Token: 0x04000160 RID: 352
Content
}
}
@@ -0,0 +1,74 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies the type of persistence to use when serializing a property on a component at design time.</summary>
// Token: 0x02000075 RID: 117
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event)]
public sealed class DesignerSerializationVisibilityAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerSerializationVisibilityAttribute" /> class using the specified <see cref="T:System.ComponentModel.DesignerSerializationVisibility" /> value.</summary>
/// <param name="visibility">One of the <see cref="T:System.ComponentModel.DesignerSerializationVisibility" /> values. </param>
// Token: 0x06000436 RID: 1078 RVA: 0x0000C7A8 File Offset: 0x0000A9A8
public DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility vis)
{
this.visibility = vis;
}
/// <summary>Gets a value indicating the basic serialization mode a serializer should use when determining whether and how to persist the value of a property.</summary>
/// <returns>One of the <see cref="T:System.ComponentModel.DesignerSerializationVisibility" /> values. The default is <see cref="F:System.ComponentModel.DesignerSerializationVisibility.Visible" />.</returns>
// Token: 0x1700011C RID: 284
// (get) Token: 0x06000438 RID: 1080 RVA: 0x0000C7F4 File Offset: 0x0000A9F4
public DesignerSerializationVisibility Visibility
{
get
{
return this.visibility;
}
}
/// <summary>Indicates whether this instance and a specified object are equal.</summary>
/// <returns>true if <paramref name="obj" /> is equal to this instance; otherwise, false.</returns>
/// <param name="obj">Another object to compare to. </param>
// Token: 0x06000439 RID: 1081 RVA: 0x0000C7FC File Offset: 0x0000A9FC
public override bool Equals(object obj)
{
return obj is DesignerSerializationVisibilityAttribute && (obj == this || ((DesignerSerializationVisibilityAttribute)obj).Visibility == this.visibility);
}
/// <summary>Returns the hash code for this object.</summary>
/// <returns>A 32-bit signed integer hash code.</returns>
// Token: 0x0600043A RID: 1082 RVA: 0x0000C828 File Offset: 0x0000AA28
public override int GetHashCode()
{
return this.visibility.GetHashCode();
}
/// <summary>Gets a value indicating whether the current value of the attribute is the default value for the attribute.</summary>
/// <returns>true if the attribute is set to the default value; otherwise, false.</returns>
// Token: 0x0600043B RID: 1083 RVA: 0x0000C83C File Offset: 0x0000AA3C
public override bool IsDefaultAttribute()
{
return this.visibility == DesignerSerializationVisibilityAttribute.Default.Visibility;
}
// Token: 0x04000161 RID: 353
private DesignerSerializationVisibility visibility;
/// <summary>Specifies the default value, which is <see cref="F:System.ComponentModel.DesignerSerializationVisibilityAttribute.Visible" />, that is, a visual designer uses default rules to generate the value of a property. This static field is read-only.</summary>
// Token: 0x04000162 RID: 354
public static readonly DesignerSerializationVisibilityAttribute Default = new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible);
/// <summary>Specifies that a serializer should serialize the contents of the property, rather than the property itself. This field is read-only.</summary>
// Token: 0x04000163 RID: 355
public static readonly DesignerSerializationVisibilityAttribute Content = new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Content);
/// <summary>Specifies that a serializer should not serialize the value of the property. This static field is read-only.</summary>
// Token: 0x04000164 RID: 356
public static readonly DesignerSerializationVisibilityAttribute Hidden = new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden);
/// <summary>Specifies that a serializer should be allowed to serialize the value of the property. This static field is read-only.</summary>
// Token: 0x04000165 RID: 357
public static readonly DesignerSerializationVisibilityAttribute Visible = new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible);
}
}
@@ -0,0 +1,91 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies the display name for a property, event, or public void method which takes no arguments. </summary>
// Token: 0x02000076 RID: 118
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event)]
public class DisplayNameAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DisplayNameAttribute" /> class.</summary>
// Token: 0x0600043C RID: 1084 RVA: 0x0000C850 File Offset: 0x0000AA50
public DisplayNameAttribute()
{
this.attributeDisplayName = string.Empty;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DisplayNameAttribute" /> class using the display name.</summary>
/// <param name="displayName">The display name.</param>
// Token: 0x0600043D RID: 1085 RVA: 0x0000C864 File Offset: 0x0000AA64
public DisplayNameAttribute(string displayName)
{
this.attributeDisplayName = displayName;
}
/// <summary>Determines if this attribute is the default.</summary>
/// <returns>true if the attribute is the default value for this attribute class; otherwise, false.</returns>
// Token: 0x0600043F RID: 1087 RVA: 0x0000C880 File Offset: 0x0000AA80
public override bool IsDefaultAttribute()
{
return this.attributeDisplayName != null && this.attributeDisplayName.Length == 0;
}
/// <summary>Returns the hash code for this instance.</summary>
/// <returns>A hash code for the current <see cref="T:System.ComponentModel.DisplayNameAttribute" />.</returns>
// Token: 0x06000440 RID: 1088 RVA: 0x0000C8A0 File Offset: 0x0000AAA0
public override int GetHashCode()
{
return this.attributeDisplayName.GetHashCode();
}
/// <summary>Determines whether two <see cref="T:System.ComponentModel.DisplayNameAttribute" /> instances are equal.</summary>
/// <returns>true if the value of the given object is equal to that of the current object; otherwise, false.</returns>
/// <param name="obj">The <see cref="T:System.ComponentModel.DisplayNameAttribute" /> to test the value equality of.</param>
// Token: 0x06000441 RID: 1089 RVA: 0x0000C8B0 File Offset: 0x0000AAB0
public override bool Equals(object obj)
{
if (obj == this)
{
return true;
}
DisplayNameAttribute displayNameAttribute = obj as DisplayNameAttribute;
return displayNameAttribute != null && displayNameAttribute.DisplayName == this.attributeDisplayName;
}
/// <summary>Gets the display name for a property, event, or public void method that takes no arguments stored in this attribute.</summary>
/// <returns>The display name.</returns>
// Token: 0x1700011D RID: 285
// (get) Token: 0x06000442 RID: 1090 RVA: 0x0000C8E8 File Offset: 0x0000AAE8
public virtual string DisplayName
{
get
{
return this.attributeDisplayName;
}
}
/// <summary>Gets or sets the display name.</summary>
/// <returns>The display name.</returns>
// Token: 0x1700011E RID: 286
// (get) Token: 0x06000443 RID: 1091 RVA: 0x0000C8F0 File Offset: 0x0000AAF0
// (set) Token: 0x06000444 RID: 1092 RVA: 0x0000C8F8 File Offset: 0x0000AAF8
protected string DisplayNameValue
{
get
{
return this.attributeDisplayName;
}
set
{
this.attributeDisplayName = value;
}
}
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.DisplayNameAttribute" />. This field is read-only.</summary>
// Token: 0x04000166 RID: 358
public static readonly DisplayNameAttribute Default = new DisplayNameAttribute();
// Token: 0x04000167 RID: 359
private string attributeDisplayName;
}
}
+70
View File
@@ -0,0 +1,70 @@
using System;
namespace System.ComponentModel
{
/// <summary>Provides data for the <see cref="E:System.ComponentModel.BackgroundWorker.DoWork" /> event handler.</summary>
// Token: 0x02000077 RID: 119
public class DoWorkEventArgs : EventArgs
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DoWorkEventArgs" /> class.</summary>
/// <param name="argument">Specifies an argument for an asynchronous operation.</param>
// Token: 0x06000445 RID: 1093 RVA: 0x0000C904 File Offset: 0x0000AB04
public DoWorkEventArgs(object argument)
{
this.arg = argument;
}
/// <summary>Gets a value that represents the argument of an asynchronous operation.</summary>
/// <returns>An <see cref="T:System.Object" /> representing the argument of an asynchronous operation.</returns>
// Token: 0x1700011F RID: 287
// (get) Token: 0x06000446 RID: 1094 RVA: 0x0000C914 File Offset: 0x0000AB14
public object Argument
{
get
{
return this.arg;
}
}
/// <summary>Gets or sets a value that represents the result of an asynchronous operation.</summary>
/// <returns>An <see cref="T:System.Object" /> representing the result of an asynchronous operation.</returns>
// Token: 0x17000120 RID: 288
// (get) Token: 0x06000447 RID: 1095 RVA: 0x0000C91C File Offset: 0x0000AB1C
// (set) Token: 0x06000448 RID: 1096 RVA: 0x0000C924 File Offset: 0x0000AB24
public object Result
{
get
{
return this.result;
}
set
{
this.result = value;
}
}
// Token: 0x17000121 RID: 289
// (get) Token: 0x06000449 RID: 1097 RVA: 0x0000C930 File Offset: 0x0000AB30
// (set) Token: 0x0600044A RID: 1098 RVA: 0x0000C938 File Offset: 0x0000AB38
public bool Cancel
{
get
{
return this.cancel;
}
set
{
this.cancel = value;
}
}
// Token: 0x04000168 RID: 360
private object arg;
// Token: 0x04000169 RID: 361
private object result;
// Token: 0x0400016A RID: 362
private bool cancel;
}
}
@@ -0,0 +1,11 @@
using System;
namespace System.ComponentModel
{
/// <summary>Represents the method that will handle the <see cref="E:System.ComponentModel.BackgroundWorker.DoWork" /> event. This class cannot be inherited.</summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">A <see cref="T:System.ComponentModel.DoWorkEventArgs" /> that contains the event data.</param>
// Token: 0x02000323 RID: 803
// (Invoke) Token: 0x06001C65 RID: 7269
public delegate void DoWorkEventHandler(object sender, DoWorkEventArgs e);
}
+39
View File
@@ -0,0 +1,39 @@
using System;
using System.Globalization;
namespace System.ComponentModel
{
/// <summary>Provides a type converter to convert double-precision, floating point number objects to and from various other representations.</summary>
// Token: 0x02000078 RID: 120
public class DoubleConverter : BaseNumberConverter
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DoubleConverter" /> class. </summary>
// Token: 0x0600044B RID: 1099 RVA: 0x0000C944 File Offset: 0x0000AB44
public DoubleConverter()
{
this.InnerType = typeof(double);
}
// Token: 0x17000122 RID: 290
// (get) Token: 0x0600044C RID: 1100 RVA: 0x0000C95C File Offset: 0x0000AB5C
internal override bool SupportHex
{
get
{
return false;
}
}
// Token: 0x0600044D RID: 1101 RVA: 0x0000C960 File Offset: 0x0000AB60
internal override string ConvertToString(object value, NumberFormatInfo format)
{
return ((double)value).ToString("R", format);
}
// Token: 0x0600044E RID: 1102 RVA: 0x0000C984 File Offset: 0x0000AB84
internal override object ConvertFromString(string value, NumberFormatInfo format)
{
return double.Parse(value, NumberStyles.Float, format);
}
}
}
+102
View File
@@ -0,0 +1,102 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies the editor to use to change a property. This class cannot be inherited.</summary>
// Token: 0x02000079 RID: 121
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
public sealed class EditorAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorAttribute" /> class with the default editor, which is no editor.</summary>
// Token: 0x0600044F RID: 1103 RVA: 0x0000C998 File Offset: 0x0000AB98
public EditorAttribute()
{
this.name = string.Empty;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorAttribute" /> class with the type name and base type name of the editor.</summary>
/// <param name="typeName">The fully qualified type name of the editor. </param>
/// <param name="baseTypeName">The fully qualified type name of the base class or interface to use as a lookup key for the editor. This class must be or derive from <see cref="T:System.Drawing.Design.UITypeEditor" />. </param>
// Token: 0x06000450 RID: 1104 RVA: 0x0000C9AC File Offset: 0x0000ABAC
public EditorAttribute(string typeName, string baseTypeName)
{
this.name = typeName;
this.basename = baseTypeName;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorAttribute" /> class with the type name and the base type.</summary>
/// <param name="typeName">The fully qualified type name of the editor. </param>
/// <param name="baseType">The <see cref="T:System.Type" /> of the base class or interface to use as a lookup key for the editor. This class must be or derive from <see cref="T:System.Drawing.Design.UITypeEditor" />. </param>
// Token: 0x06000451 RID: 1105 RVA: 0x0000C9C4 File Offset: 0x0000ABC4
public EditorAttribute(string typeName, Type baseType)
: this(typeName, baseType.AssemblyQualifiedName)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorAttribute" /> class with the type and the base type.</summary>
/// <param name="type">A <see cref="T:System.Type" /> that represents the type of the editor. </param>
/// <param name="baseType">The <see cref="T:System.Type" /> of the base class or interface to use as a lookup key for the editor. This class must be or derive from <see cref="T:System.Drawing.Design.UITypeEditor" />. </param>
// Token: 0x06000452 RID: 1106 RVA: 0x0000C9D4 File Offset: 0x0000ABD4
public EditorAttribute(Type type, Type baseType)
: this(type.AssemblyQualifiedName, baseType.AssemblyQualifiedName)
{
}
/// <summary>Gets the name of the base class or interface serving as a lookup key for this editor.</summary>
/// <returns>The name of the base class or interface serving as a lookup key for this editor.</returns>
// Token: 0x17000123 RID: 291
// (get) Token: 0x06000453 RID: 1107 RVA: 0x0000C9E8 File Offset: 0x0000ABE8
public string EditorBaseTypeName
{
get
{
return this.basename;
}
}
/// <summary>Gets the name of the editor class in the <see cref="P:System.Type.AssemblyQualifiedName" /> format.</summary>
/// <returns>The name of the editor class in the <see cref="P:System.Type.AssemblyQualifiedName" /> format.</returns>
// Token: 0x17000124 RID: 292
// (get) Token: 0x06000454 RID: 1108 RVA: 0x0000C9F0 File Offset: 0x0000ABF0
public string EditorTypeName
{
get
{
return this.name;
}
}
/// <summary>Gets a unique ID for this attribute type.</summary>
/// <returns>A unique ID for this attribute type.</returns>
// Token: 0x17000125 RID: 293
// (get) Token: 0x06000455 RID: 1109 RVA: 0x0000C9F8 File Offset: 0x0000ABF8
public override object TypeId
{
get
{
return base.GetType();
}
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.EditorAttribute" />.</summary>
/// <returns>true if the value of the given object is equal to that of the current object; otherwise, false.</returns>
/// <param name="obj">The object to test the value equality of. </param>
// Token: 0x06000456 RID: 1110 RVA: 0x0000CA00 File Offset: 0x0000AC00
public override bool Equals(object obj)
{
return obj is EditorAttribute && ((EditorAttribute)obj).EditorBaseTypeName.Equals(this.basename) && ((EditorAttribute)obj).EditorTypeName.Equals(this.name);
}
// Token: 0x06000457 RID: 1111 RVA: 0x0000CA50 File Offset: 0x0000AC50
public override int GetHashCode()
{
return (this.name + this.basename).GetHashCode();
}
// Token: 0x0400016B RID: 363
private string name;
// Token: 0x0400016C RID: 364
private string basename;
}
}
@@ -0,0 +1,55 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies that a property or method is viewable in an editor. This class cannot be inherited.</summary>
// Token: 0x0200007A RID: 122
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate)]
public sealed class EditorBrowsableAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorBrowsableAttribute" /> class with <see cref="P:System.ComponentModel.EditorBrowsableAttribute.State" /> set to the default state.</summary>
// Token: 0x06000458 RID: 1112 RVA: 0x0000CA68 File Offset: 0x0000AC68
public EditorBrowsableAttribute()
{
this.state = EditorBrowsableState.Always;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorBrowsableAttribute" /> class with an <see cref="T:System.ComponentModel.EditorBrowsableState" />.</summary>
/// <param name="state">The <see cref="T:System.ComponentModel.EditorBrowsableState" /> to set <see cref="P:System.ComponentModel.EditorBrowsableAttribute.State" /> to. </param>
// Token: 0x06000459 RID: 1113 RVA: 0x0000CA78 File Offset: 0x0000AC78
public EditorBrowsableAttribute(EditorBrowsableState state)
{
this.state = state;
}
/// <summary>Gets the browsable state of the property or method.</summary>
/// <returns>An <see cref="T:System.ComponentModel.EditorBrowsableState" /> that is the browsable state of the property or method.</returns>
// Token: 0x17000126 RID: 294
// (get) Token: 0x0600045A RID: 1114 RVA: 0x0000CA88 File Offset: 0x0000AC88
public EditorBrowsableState State
{
get
{
return this.state;
}
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.EditorBrowsableAttribute" />.</summary>
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
/// <param name="obj">The object to test the value equality of. </param>
// Token: 0x0600045B RID: 1115 RVA: 0x0000CA90 File Offset: 0x0000AC90
public override bool Equals(object obj)
{
return obj is EditorBrowsableAttribute && (obj == this || ((EditorBrowsableAttribute)obj).State == this.state);
}
// Token: 0x0600045C RID: 1116 RVA: 0x0000CABC File Offset: 0x0000ACBC
public override int GetHashCode()
{
return this.state.GetHashCode();
}
// Token: 0x0400016D RID: 365
private EditorBrowsableState state;
}
}
@@ -0,0 +1,19 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies the browsable state of a property or method from within an editor.</summary>
// Token: 0x0200007B RID: 123
public enum EditorBrowsableState
{
/// <summary>The property or method is always browsable from within an editor.</summary>
// Token: 0x0400016F RID: 367
Always,
/// <summary>The property or method is never browsable from within an editor.</summary>
// Token: 0x04000170 RID: 368
Never,
/// <summary>The property or method is a feature that only advanced users should see. An editor can either show or hide such properties.</summary>
// Token: 0x04000171 RID: 369
Advanced
}
}
+311
View File
@@ -0,0 +1,311 @@
using System;
using System.Collections;
using System.ComponentModel.Design.Serialization;
using System.Globalization;
using System.Reflection;
namespace System.ComponentModel
{
/// <summary>Provides a type converter to convert <see cref="T:System.Enum" /> objects to and from various other representations.</summary>
// Token: 0x0200007C RID: 124
public class EnumConverter : TypeConverter
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EnumConverter" /> class for the given type.</summary>
/// <param name="type">A <see cref="T:System.Type" /> that represents the type of enumeration to associate with this enumeration converter. </param>
// Token: 0x0600045D RID: 1117 RVA: 0x0000CAD0 File Offset: 0x0000ACD0
public EnumConverter(Type type)
{
this.type = type;
}
/// <summary>Gets a value indicating whether this converter can convert an object to the given destination type using the context.</summary>
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="destinationType">A <see cref="T:System.Type" /> that represents the type you wish to convert to. </param>
// Token: 0x0600045E RID: 1118 RVA: 0x0000CAE0 File Offset: 0x0000ACE0
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
{
return destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) || destinationType == typeof(Enum[]) || base.CanConvertTo(context, destinationType);
}
/// <summary>Converts the given value object to the specified destination type.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="culture">An optional <see cref="T:System.Globalization.CultureInfo" />. If not supplied, the current culture is assumed. </param>
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
/// <param name="destinationType">The <see cref="T:System.Type" /> to convert the value to. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="destinationType" /> is null. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="value" /> is not a valid value for the enumeration. </exception>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x0600045F RID: 1119 RVA: 0x0000CB1C File Offset: 0x0000AD1C
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
if (destinationType != typeof(string) || value == null)
{
if (destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) && value != null)
{
string text = base.ConvertToString(context, culture, value);
if (this.IsFlags && text.IndexOf(",") != -1)
{
if (value is IConvertible)
{
Type underlyingType = Enum.GetUnderlyingType(this.type);
object obj = ((IConvertible)value).ToType(underlyingType, culture);
MethodInfo method = typeof(Enum).GetMethod("ToObject", new Type[]
{
typeof(Type),
underlyingType
});
return new global::System.ComponentModel.Design.Serialization.InstanceDescriptor(method, new object[] { this.type, obj });
}
}
else
{
FieldInfo field = this.type.GetField(text);
if (field != null)
{
return new global::System.ComponentModel.Design.Serialization.InstanceDescriptor(field, null);
}
}
}
else if (destinationType == typeof(Enum[]) && value != null)
{
if (!this.IsFlags)
{
return new Enum[] { (Enum)Enum.ToObject(this.type, value) };
}
long num = Convert.ToInt64((Enum)value, culture);
Array values = Enum.GetValues(this.type);
long[] array = new long[values.Length];
for (int i = 0; i < values.Length; i++)
{
array[i] = Convert.ToInt64(values.GetValue(i));
}
ArrayList arrayList = new ArrayList();
bool flag = false;
while (!flag)
{
flag = true;
foreach (long num2 in array)
{
if ((num2 != 0L && (num2 & num) == num2) || num2 == num)
{
arrayList.Add(Enum.ToObject(this.type, num2));
num &= ~num2;
flag = false;
}
}
if (num == 0L)
{
flag = true;
}
}
if (num != 0L)
{
arrayList.Add(Enum.ToObject(this.type, num));
}
return arrayList.ToArray(typeof(Enum));
}
return base.ConvertTo(context, culture, value, destinationType);
}
if (value is IConvertible)
{
Type underlyingType2 = Enum.GetUnderlyingType(this.type);
if (underlyingType2 != value.GetType())
{
value = ((IConvertible)value).ToType(underlyingType2, culture);
}
}
if (!this.IsFlags && !this.IsValid(context, value))
{
throw this.CreateValueNotValidException(value);
}
return Enum.Format(this.type, value, "G");
}
/// <summary>Gets a value indicating whether this converter can convert an object in the given source type to an enumeration object using the specified context.</summary>
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="sourceType">A <see cref="T:System.Type" /> that represents the type you wish to convert from. </param>
// Token: 0x06000460 RID: 1120 RVA: 0x0000CDC8 File Offset: 0x0000AFC8
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string) || sourceType == typeof(Enum[]) || base.CanConvertFrom(context, sourceType);
}
/// <summary>Converts the specified value object to an enumeration object.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="culture">An optional <see cref="T:System.Globalization.CultureInfo" />. If not supplied, the current culture is assumed. </param>
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
/// <exception cref="T:System.FormatException">
/// <paramref name="value" /> is not a valid value for the target type. </exception>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x06000461 RID: 1121 RVA: 0x0000CE04 File Offset: 0x0000B004
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
{
if (value is string)
{
string text = value as string;
try
{
if (text.IndexOf(',') == -1)
{
return Enum.Parse(this.type, text, true);
}
long num = 0L;
string[] array = text.Split(new char[] { ',' });
foreach (string text2 in array)
{
Enum @enum = (Enum)Enum.Parse(this.type, text2, true);
num |= Convert.ToInt64(@enum, culture);
}
return Enum.ToObject(this.type, num);
}
catch (Exception ex)
{
throw new FormatException(text + " is not a valid value for " + this.type.Name, ex);
}
}
if (value is Enum[])
{
long num2 = 0L;
foreach (Enum enum2 in (Enum[])value)
{
num2 |= Convert.ToInt64(enum2, culture);
}
return Enum.ToObject(this.type, num2);
}
return base.ConvertFrom(context, culture, value);
}
/// <summary>Gets a value indicating whether the given object value is valid for this type.</summary>
/// <returns>true if the specified value is valid for this object; otherwise, false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="value">The <see cref="T:System.Object" /> to test. </param>
// Token: 0x06000462 RID: 1122 RVA: 0x0000CF54 File Offset: 0x0000B154
public override bool IsValid(ITypeDescriptorContext context, object value)
{
return Enum.IsDefined(this.type, value);
}
/// <summary>Gets a value indicating whether this object supports a standard set of values that can be picked from a list using the specified context.</summary>
/// <returns>true because <see cref="M:System.ComponentModel.TypeConverter.GetStandardValues" /> should be called to find a common set of values the object supports. This method never returns false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
// Token: 0x06000463 RID: 1123 RVA: 0x0000CF64 File Offset: 0x0000B164
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
{
return true;
}
/// <summary>Gets a value indicating whether the list of standard values returned from <see cref="M:System.ComponentModel.TypeConverter.GetStandardValues" /> is an exclusive list using the specified context.</summary>
/// <returns>true if the <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> returned from <see cref="M:System.ComponentModel.TypeConverter.GetStandardValues" /> is an exhaustive list of possible values; false if other values are possible.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
// Token: 0x06000464 RID: 1124 RVA: 0x0000CF68 File Offset: 0x0000B168
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
{
return !this.IsFlags;
}
/// <summary>Gets a collection of standard values for the data type this validator is designed for.</summary>
/// <returns>A <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> that holds a standard set of valid values, or null if the data type does not support a standard set of values.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
// Token: 0x06000465 RID: 1125 RVA: 0x0000CF74 File Offset: 0x0000B174
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
if (this.stdValues == null)
{
Array values = Enum.GetValues(this.type);
Array.Sort(values);
this.stdValues = new TypeConverter.StandardValuesCollection(values);
}
return this.stdValues;
}
/// <summary>Gets an <see cref="T:System.Collections.IComparer" /> that can be used to sort the values of the enumeration.</summary>
/// <returns>An <see cref="T:System.Collections.IComparer" /> for sorting the enumeration values.</returns>
// Token: 0x17000127 RID: 295
// (get) Token: 0x06000466 RID: 1126 RVA: 0x0000CFB0 File Offset: 0x0000B1B0
protected virtual IComparer Comparer
{
get
{
return new EnumConverter.EnumComparer();
}
}
/// <summary>Specifies the type of the enumerator this converter is associated with.</summary>
/// <returns>The type of the enumerator this converter is associated with.</returns>
// Token: 0x17000128 RID: 296
// (get) Token: 0x06000467 RID: 1127 RVA: 0x0000CFB8 File Offset: 0x0000B1B8
protected Type EnumType
{
get
{
return this.type;
}
}
/// <summary>Gets or sets a <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> that specifies the possible values for the enumeration.</summary>
/// <returns>A <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> that specifies the possible values for the enumeration.</returns>
// Token: 0x17000129 RID: 297
// (get) Token: 0x06000468 RID: 1128 RVA: 0x0000CFC0 File Offset: 0x0000B1C0
// (set) Token: 0x06000469 RID: 1129 RVA: 0x0000CFC8 File Offset: 0x0000B1C8
protected TypeConverter.StandardValuesCollection Values
{
get
{
return this.stdValues;
}
set
{
this.stdValues = value;
}
}
// Token: 0x0600046A RID: 1130 RVA: 0x0000CFD4 File Offset: 0x0000B1D4
private ArgumentException CreateValueNotValidException(object value)
{
string text = string.Format(CultureInfo.InvariantCulture, "The value '{0}' is not a valid value for the enum '{1}'", new object[]
{
value,
this.type.Name
});
return new ArgumentException(text);
}
// Token: 0x1700012A RID: 298
// (get) Token: 0x0600046B RID: 1131 RVA: 0x0000D010 File Offset: 0x0000B210
private bool IsFlags
{
get
{
return this.type.IsDefined(typeof(FlagsAttribute), false);
}
}
// Token: 0x04000172 RID: 370
private Type type;
// Token: 0x04000173 RID: 371
private TypeConverter.StandardValuesCollection stdValues;
// Token: 0x0200007D RID: 125
private class EnumComparer : IComparer
{
// Token: 0x0600046D RID: 1133 RVA: 0x0000D030 File Offset: 0x0000B230
int IComparer.Compare(object compareObject1, object compareObject2)
{
string text = compareObject1 as string;
string text2 = compareObject2 as string;
if (text == null || text2 == null)
{
return global::System.Collections.Comparer.Default.Compare(compareObject1, compareObject2);
}
return CultureInfo.InvariantCulture.CompareInfo.Compare(text, text2);
}
}
}
}
+67
View File
@@ -0,0 +1,67 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel
{
/// <summary>Provides information about an event.</summary>
// Token: 0x0200007E RID: 126
[ComVisible(true)]
public abstract class EventDescriptor : MemberDescriptor
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EventDescriptor" /> class with the name and attributes in the specified <see cref="T:System.ComponentModel.MemberDescriptor" />.</summary>
/// <param name="descr">A <see cref="T:System.ComponentModel.MemberDescriptor" /> that contains the name of the event and its attributes. </param>
// Token: 0x0600046E RID: 1134 RVA: 0x0000D078 File Offset: 0x0000B278
protected EventDescriptor(MemberDescriptor desc)
: base(desc)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EventDescriptor" /> class with the name in the specified <see cref="T:System.ComponentModel.MemberDescriptor" /> and the attributes in both the <see cref="T:System.ComponentModel.MemberDescriptor" /> and the <see cref="T:System.Attribute" /> array.</summary>
/// <param name="descr">A <see cref="T:System.ComponentModel.MemberDescriptor" /> that has the name of the member and its attributes. </param>
/// <param name="attrs">An <see cref="T:System.Attribute" /> array with the attributes you want to add to this event description. </param>
// Token: 0x0600046F RID: 1135 RVA: 0x0000D084 File Offset: 0x0000B284
protected EventDescriptor(MemberDescriptor desc, Attribute[] attrs)
: base(desc, attrs)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EventDescriptor" /> class with the specified name and attribute array.</summary>
/// <param name="name">The name of the event. </param>
/// <param name="attrs">An array of type <see cref="T:System.Attribute" /> that contains the event attributes. </param>
// Token: 0x06000470 RID: 1136 RVA: 0x0000D090 File Offset: 0x0000B290
protected EventDescriptor(string str, Attribute[] attrs)
: base(str, attrs)
{
}
/// <summary>When overridden in a derived class, binds the event to the component.</summary>
/// <param name="component">A component that provides events to the delegate. </param>
/// <param name="value">A delegate that represents the method that handles the event. </param>
// Token: 0x06000471 RID: 1137
public abstract void AddEventHandler(object component, Delegate value);
/// <summary>When overridden in a derived class, unbinds the delegate from the component so that the delegate will no longer receive events from the component.</summary>
/// <param name="component">The component that the delegate is bound to. </param>
/// <param name="value">The delegate to unbind from the component. </param>
// Token: 0x06000472 RID: 1138
public abstract void RemoveEventHandler(object component, Delegate value);
/// <summary>When overridden in a derived class, gets the type of component this event is bound to.</summary>
/// <returns>A <see cref="T:System.Type" /> that represents the type of component the event is bound to.</returns>
// Token: 0x1700012B RID: 299
// (get) Token: 0x06000473 RID: 1139
public abstract Type ComponentType { get; }
/// <summary>When overridden in a derived class, gets the type of delegate for the event.</summary>
/// <returns>A <see cref="T:System.Type" /> that represents the type of delegate for the event.</returns>
// Token: 0x1700012C RID: 300
// (get) Token: 0x06000474 RID: 1140
public abstract Type EventType { get; }
/// <summary>When overridden in a derived class, gets a value indicating whether the event delegate is a multicast delegate.</summary>
/// <returns>true if the event delegate is multicast; otherwise, false.</returns>
// Token: 0x1700012D RID: 301
// (get) Token: 0x06000475 RID: 1141
public abstract bool IsMulticast { get; }
}
}
@@ -0,0 +1,511 @@
using System;
using System.Collections;
using System.Runtime.InteropServices;
namespace System.ComponentModel
{
/// <summary>Represents a collection of <see cref="T:System.ComponentModel.EventDescriptor" /> objects.</summary>
// Token: 0x0200007F RID: 127
[ComVisible(true)]
public class EventDescriptorCollection : ICollection, IEnumerable, IList
{
// Token: 0x06000476 RID: 1142 RVA: 0x0000D09C File Offset: 0x0000B29C
private EventDescriptorCollection()
{
}
// Token: 0x06000477 RID: 1143 RVA: 0x0000D0B0 File Offset: 0x0000B2B0
internal EventDescriptorCollection(ArrayList list)
{
this.eventList = list;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EventDescriptorCollection" /> class with the given array of <see cref="T:System.ComponentModel.EventDescriptor" /> objects.</summary>
/// <param name="events">An array of type <see cref="T:System.ComponentModel.EventDescriptor" /> that provides the events for this collection. </param>
// Token: 0x06000478 RID: 1144 RVA: 0x0000D0CC File Offset: 0x0000B2CC
public EventDescriptorCollection(EventDescriptor[] events)
: this(events, false)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EventDescriptorCollection" /> class with the given array of <see cref="T:System.ComponentModel.EventDescriptor" /> objects. The collection is optionally read-only.</summary>
/// <param name="events">An array of type <see cref="T:System.ComponentModel.EventDescriptor" /> that provides the events for this collection. </param>
/// <param name="readOnly">true to specify a read-only collection; otherwise, false.</param>
// Token: 0x06000479 RID: 1145 RVA: 0x0000D0D8 File Offset: 0x0000B2D8
public EventDescriptorCollection(EventDescriptor[] events, bool readOnly)
{
this.isReadOnly = readOnly;
if (events == null)
{
return;
}
for (int i = 0; i < events.Length; i++)
{
this.Add(events[i]);
}
}
/// <summary>Removes all the items from the collection.</summary>
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
// Token: 0x0600047B RID: 1147 RVA: 0x0000D134 File Offset: 0x0000B334
void IList.Clear()
{
this.Clear();
}
/// <summary>Returns an enumerator that iterates through a collection.</summary>
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> that can be used to iterate through the collection.</returns>
// Token: 0x0600047C RID: 1148 RVA: 0x0000D13C File Offset: 0x0000B33C
IEnumerator IEnumerable.GetEnumerator()
{
return this.GetEnumerator();
}
/// <summary>Removes the item at the specified index.</summary>
/// <param name="index">The zero-based index of the item to remove.</param>
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
// Token: 0x0600047D RID: 1149 RVA: 0x0000D144 File Offset: 0x0000B344
void IList.RemoveAt(int index)
{
this.RemoveAt(index);
}
/// <summary>Gets the number of elements contained in the collection.</summary>
/// <returns>The number of elements contained in the collection.</returns>
// Token: 0x1700012E RID: 302
// (get) Token: 0x0600047E RID: 1150 RVA: 0x0000D150 File Offset: 0x0000B350
int ICollection.Count
{
get
{
return this.Count;
}
}
/// <summary>Adds an item to the collection.</summary>
/// <returns>The position into which the new element was inserted.</returns>
/// <param name="value">The <see cref="T:System.Object" /> to add to the collection.</param>
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
// Token: 0x0600047F RID: 1151 RVA: 0x0000D158 File Offset: 0x0000B358
int IList.Add(object value)
{
return this.Add((EventDescriptor)value);
}
/// <summary>Determines whether the collection contains a specific value.</summary>
/// <returns>true if the <see cref="T:System.Object" /> is found in the collection; otherwise, false.</returns>
/// <param name="value">The <see cref="T:System.Object" /> to locate in the collection.</param>
// Token: 0x06000480 RID: 1152 RVA: 0x0000D168 File Offset: 0x0000B368
bool IList.Contains(object value)
{
return this.Contains((EventDescriptor)value);
}
/// <summary>Determines the index of a specific item in the collection.</summary>
/// <returns>The index of <paramref name="value" /> if found in the list; otherwise, -1.</returns>
/// <param name="value">The <see cref="T:System.Object" /> to locate in the collection.</param>
// Token: 0x06000481 RID: 1153 RVA: 0x0000D178 File Offset: 0x0000B378
int IList.IndexOf(object value)
{
return this.IndexOf((EventDescriptor)value);
}
/// <summary>Inserts an item to the collection at the specified index.</summary>
/// <param name="index">The zero-based index at which <paramref name="value" /> should be inserted.</param>
/// <param name="value">The <see cref="T:System.Object" /> to insert into the collection.</param>
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
// Token: 0x06000482 RID: 1154 RVA: 0x0000D188 File Offset: 0x0000B388
void IList.Insert(int index, object value)
{
this.Insert(index, (EventDescriptor)value);
}
/// <summary>Removes the first occurrence of a specific object from the collection.</summary>
/// <param name="value">The <see cref="T:System.Object" /> to remove from the collection.</param>
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
// Token: 0x06000483 RID: 1155 RVA: 0x0000D198 File Offset: 0x0000B398
void IList.Remove(object value)
{
this.Remove((EventDescriptor)value);
}
/// <summary>Gets a value indicating whether the collection has a fixed size.</summary>
/// <returns>true if the collection has a fixed size; otherwise, false.</returns>
// Token: 0x1700012F RID: 303
// (get) Token: 0x06000484 RID: 1156 RVA: 0x0000D1A8 File Offset: 0x0000B3A8
bool IList.IsFixedSize
{
get
{
return this.isReadOnly;
}
}
/// <summary>Gets a value indicating whether the collection is read-only.</summary>
/// <returns>true if the collection is read-only; otherwise, false.</returns>
// Token: 0x17000130 RID: 304
// (get) Token: 0x06000485 RID: 1157 RVA: 0x0000D1B0 File Offset: 0x0000B3B0
bool IList.IsReadOnly
{
get
{
return this.isReadOnly;
}
}
/// <summary>Gets or sets the element at the specified index.</summary>
/// <returns>The element at the specified index.</returns>
/// <param name="index">The zero-based index of the element to get or set.</param>
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
/// <exception cref="T:System.IndexOutOfRangeException">
/// <paramref name="index" /> is less than 0. -or-<paramref name="index" /> is equal to or greater than <see cref="P:System.ComponentModel.EventDescriptorCollection.Count" />.</exception>
// Token: 0x17000131 RID: 305
object IList.this[int index]
{
get
{
return this.eventList[index];
}
set
{
if (this.isReadOnly)
{
throw new NotSupportedException("The collection is read-only");
}
this.eventList[index] = value;
}
}
/// <summary>Copies the elements of the collection to an <see cref="T:System.Array" />, starting at a particular <see cref="T:System.Array" /> index.</summary>
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from collection. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins.</param>
// Token: 0x06000488 RID: 1160 RVA: 0x0000D1F0 File Offset: 0x0000B3F0
void ICollection.CopyTo(Array array, int index)
{
this.eventList.CopyTo(array, index);
}
/// <summary>Gets a value indicating whether access to the collection is synchronized.</summary>
/// <returns>true if access to the collection is synchronized; otherwise, false.</returns>
// Token: 0x17000132 RID: 306
// (get) Token: 0x06000489 RID: 1161 RVA: 0x0000D200 File Offset: 0x0000B400
bool ICollection.IsSynchronized
{
get
{
return false;
}
}
/// <summary>Gets an object that can be used to synchronize access to the collection.</summary>
/// <returns>An object that can be used to synchronize access to the collection.</returns>
// Token: 0x17000133 RID: 307
// (get) Token: 0x0600048A RID: 1162 RVA: 0x0000D204 File Offset: 0x0000B404
object ICollection.SyncRoot
{
get
{
return null;
}
}
/// <summary>Adds an <see cref="T:System.ComponentModel.EventDescriptor" /> to the end of the collection.</summary>
/// <returns>The position of the <see cref="T:System.ComponentModel.EventDescriptor" /> within the collection.</returns>
/// <param name="value">An <see cref="T:System.ComponentModel.EventDescriptor" /> to add to the collection. </param>
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
// Token: 0x0600048B RID: 1163 RVA: 0x0000D208 File Offset: 0x0000B408
public int Add(EventDescriptor value)
{
if (this.isReadOnly)
{
throw new NotSupportedException("The collection is read-only");
}
return this.eventList.Add(value);
}
/// <summary>Removes all objects from the collection.</summary>
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
// Token: 0x0600048C RID: 1164 RVA: 0x0000D238 File Offset: 0x0000B438
public void Clear()
{
if (this.isReadOnly)
{
throw new NotSupportedException("The collection is read-only");
}
this.eventList.Clear();
}
/// <summary>Returns whether the collection contains the given <see cref="T:System.ComponentModel.EventDescriptor" />.</summary>
/// <returns>true if the collection contains the <paramref name="value" /> parameter given; otherwise, false.</returns>
/// <param name="value">The <see cref="T:System.ComponentModel.EventDescriptor" /> to find within the collection. </param>
// Token: 0x0600048D RID: 1165 RVA: 0x0000D25C File Offset: 0x0000B45C
public bool Contains(EventDescriptor value)
{
return this.eventList.Contains(value);
}
/// <summary>Gets the description of the event with the specified name in the collection.</summary>
/// <returns>The <see cref="T:System.ComponentModel.EventDescriptor" /> with the specified name, or null if the event does not exist.</returns>
/// <param name="name">The name of the event to get from the collection. </param>
/// <param name="ignoreCase">true if you want to ignore the case of the event; otherwise, false. </param>
// Token: 0x0600048E RID: 1166 RVA: 0x0000D26C File Offset: 0x0000B46C
public virtual EventDescriptor Find(string name, bool ignoreCase)
{
foreach (object obj in this.eventList)
{
EventDescriptor eventDescriptor = (EventDescriptor)obj;
if (ignoreCase)
{
if (string.Compare(name, eventDescriptor.Name, StringComparison.OrdinalIgnoreCase) == 0)
{
return eventDescriptor;
}
}
else if (string.Compare(name, eventDescriptor.Name, StringComparison.Ordinal) == 0)
{
return eventDescriptor;
}
}
return null;
}
/// <summary>Gets an enumerator for this <see cref="T:System.ComponentModel.EventDescriptorCollection" />.</summary>
/// <returns>An enumerator that implements <see cref="T:System.Collections.IEnumerator" />.</returns>
// Token: 0x0600048F RID: 1167 RVA: 0x0000D314 File Offset: 0x0000B514
public IEnumerator GetEnumerator()
{
return this.eventList.GetEnumerator();
}
/// <summary>Returns the index of the given <see cref="T:System.ComponentModel.EventDescriptor" />.</summary>
/// <returns>The index of the given <see cref="T:System.ComponentModel.EventDescriptor" /> within the collection.</returns>
/// <param name="value">The <see cref="T:System.ComponentModel.EventDescriptor" /> to find within the collection. </param>
// Token: 0x06000490 RID: 1168 RVA: 0x0000D324 File Offset: 0x0000B524
public int IndexOf(EventDescriptor value)
{
return this.eventList.IndexOf(value);
}
/// <summary>Inserts an <see cref="T:System.ComponentModel.EventDescriptor" /> to the collection at a specified index.</summary>
/// <param name="index">The index within the collection in which to insert the <paramref name="value" /> parameter. </param>
/// <param name="value">An <see cref="T:System.ComponentModel.EventDescriptor" /> to insert into the collection. </param>
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
// Token: 0x06000491 RID: 1169 RVA: 0x0000D334 File Offset: 0x0000B534
public void Insert(int index, EventDescriptor value)
{
if (this.isReadOnly)
{
throw new NotSupportedException("The collection is read-only");
}
this.eventList.Insert(index, value);
}
/// <summary>Removes the specified <see cref="T:System.ComponentModel.EventDescriptor" /> from the collection.</summary>
/// <param name="value">The <see cref="T:System.ComponentModel.EventDescriptor" /> to remove from the collection. </param>
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
// Token: 0x06000492 RID: 1170 RVA: 0x0000D35C File Offset: 0x0000B55C
public void Remove(EventDescriptor value)
{
if (this.isReadOnly)
{
throw new NotSupportedException("The collection is read-only");
}
this.eventList.Remove(value);
}
/// <summary>Removes the <see cref="T:System.ComponentModel.EventDescriptor" /> at the specified index from the collection.</summary>
/// <param name="index">The index of the <see cref="T:System.ComponentModel.EventDescriptor" /> to remove. </param>
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
// Token: 0x06000493 RID: 1171 RVA: 0x0000D38C File Offset: 0x0000B58C
public void RemoveAt(int index)
{
if (this.isReadOnly)
{
throw new NotSupportedException("The collection is read-only");
}
this.eventList.RemoveAt(index);
}
/// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />, using the default sort for this collection, which is usually alphabetical.</summary>
/// <returns>The new <see cref="T:System.ComponentModel.EventDescriptorCollection" />.</returns>
// Token: 0x06000494 RID: 1172 RVA: 0x0000D3BC File Offset: 0x0000B5BC
public virtual EventDescriptorCollection Sort()
{
EventDescriptorCollection eventDescriptorCollection = this.CloneCollection();
eventDescriptorCollection.InternalSort(null);
return eventDescriptorCollection;
}
/// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />, using the specified <see cref="T:System.Collections.IComparer" />.</summary>
/// <returns>The new <see cref="T:System.ComponentModel.EventDescriptorCollection" />.</returns>
/// <param name="comparer">An <see cref="T:System.Collections.IComparer" /> to use to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in this collection. </param>
// Token: 0x06000495 RID: 1173 RVA: 0x0000D3D8 File Offset: 0x0000B5D8
public virtual EventDescriptorCollection Sort(IComparer comparer)
{
EventDescriptorCollection eventDescriptorCollection = this.CloneCollection();
eventDescriptorCollection.InternalSort(comparer);
return eventDescriptorCollection;
}
/// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />, given a specified sort order.</summary>
/// <returns>The new <see cref="T:System.ComponentModel.EventDescriptorCollection" />.</returns>
/// <param name="names">An array of strings describing the order in which to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in the collection. </param>
// Token: 0x06000496 RID: 1174 RVA: 0x0000D3F4 File Offset: 0x0000B5F4
public virtual EventDescriptorCollection Sort(string[] order)
{
EventDescriptorCollection eventDescriptorCollection = this.CloneCollection();
eventDescriptorCollection.InternalSort(order);
return eventDescriptorCollection;
}
/// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />, given a specified sort order and an <see cref="T:System.Collections.IComparer" />.</summary>
/// <returns>The new <see cref="T:System.ComponentModel.EventDescriptorCollection" />.</returns>
/// <param name="names">An array of strings describing the order in which to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in the collection. </param>
/// <param name="comparer">An <see cref="T:System.Collections.IComparer" /> to use to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in this collection. </param>
// Token: 0x06000497 RID: 1175 RVA: 0x0000D410 File Offset: 0x0000B610
public virtual EventDescriptorCollection Sort(string[] order, IComparer comparer)
{
EventDescriptorCollection eventDescriptorCollection = this.CloneCollection();
if (order != null)
{
ArrayList arrayList = eventDescriptorCollection.ExtractItems(order);
eventDescriptorCollection.InternalSort(comparer);
arrayList.AddRange(eventDescriptorCollection.eventList);
eventDescriptorCollection.eventList = arrayList;
}
else
{
eventDescriptorCollection.InternalSort(comparer);
}
return eventDescriptorCollection;
}
/// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />, using the specified <see cref="T:System.Collections.IComparer" />.</summary>
/// <param name="sorter">A comparer to use to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in this collection. </param>
// Token: 0x06000498 RID: 1176 RVA: 0x0000D45C File Offset: 0x0000B65C
protected void InternalSort(IComparer comparer)
{
if (comparer == null)
{
comparer = MemberDescriptor.DefaultComparer;
}
this.eventList.Sort(comparer);
}
/// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />. The specified order is applied first, followed by the default sort for this collection, which is usually alphabetical.</summary>
/// <param name="names">An array of strings describing the order in which to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in this collection. </param>
// Token: 0x06000499 RID: 1177 RVA: 0x0000D478 File Offset: 0x0000B678
protected void InternalSort(string[] order)
{
if (order != null)
{
ArrayList arrayList = this.ExtractItems(order);
this.InternalSort(null);
arrayList.AddRange(this.eventList);
this.eventList = arrayList;
}
else
{
this.InternalSort(null);
}
}
// Token: 0x0600049A RID: 1178 RVA: 0x0000D4BC File Offset: 0x0000B6BC
private ArrayList ExtractItems(string[] names)
{
ArrayList arrayList = new ArrayList(this.eventList.Count);
object[] array = new object[names.Length];
for (int i = 0; i < this.eventList.Count; i++)
{
EventDescriptor eventDescriptor = (EventDescriptor)this.eventList[i];
int num = Array.IndexOf<string>(names, eventDescriptor.Name);
if (num != -1)
{
array[num] = eventDescriptor;
this.eventList.RemoveAt(i);
i--;
}
}
foreach (object obj in array)
{
if (obj != null)
{
arrayList.Add(obj);
}
}
return arrayList;
}
// Token: 0x0600049B RID: 1179 RVA: 0x0000D570 File Offset: 0x0000B770
private EventDescriptorCollection CloneCollection()
{
return new EventDescriptorCollection
{
eventList = (ArrayList)this.eventList.Clone()
};
}
// Token: 0x0600049C RID: 1180 RVA: 0x0000D59C File Offset: 0x0000B79C
internal EventDescriptorCollection Filter(Attribute[] attributes)
{
EventDescriptorCollection eventDescriptorCollection = new EventDescriptorCollection();
foreach (object obj in this.eventList)
{
EventDescriptor eventDescriptor = (EventDescriptor)obj;
if (eventDescriptor.Attributes.Contains(attributes))
{
eventDescriptorCollection.eventList.Add(eventDescriptor);
}
}
return eventDescriptorCollection;
}
/// <summary>Gets the number of event descriptors in the collection.</summary>
/// <returns>The number of event descriptors in the collection.</returns>
// Token: 0x17000134 RID: 308
// (get) Token: 0x0600049D RID: 1181 RVA: 0x0000D62C File Offset: 0x0000B82C
public int Count
{
get
{
return this.eventList.Count;
}
}
/// <summary>Gets or sets the event with the specified name.</summary>
/// <returns>The <see cref="T:System.ComponentModel.EventDescriptor" /> with the specified name, or null if the event does not exist.</returns>
/// <param name="name">The name of the <see cref="T:System.ComponentModel.EventDescriptor" /> to get or set. </param>
// Token: 0x17000135 RID: 309
public virtual EventDescriptor this[string name]
{
get
{
return this.Find(name, false);
}
}
/// <summary>Gets or sets the event with the specified index number.</summary>
/// <returns>The <see cref="T:System.ComponentModel.EventDescriptor" /> with the specified index number.</returns>
/// <param name="index">The zero-based index number of the <see cref="T:System.ComponentModel.EventDescriptor" /> to get or set. </param>
/// <exception cref="T:System.IndexOutOfRangeException">
/// <paramref name="index" /> is not a valid index for <see cref="P:System.ComponentModel.EventDescriptorCollection.Item(System.Int32)" />. </exception>
// Token: 0x17000136 RID: 310
public virtual EventDescriptor this[int index]
{
get
{
return (EventDescriptor)this.eventList[index];
}
}
// Token: 0x04000174 RID: 372
private ArrayList eventList = new ArrayList();
// Token: 0x04000175 RID: 373
private bool isReadOnly;
/// <summary>Specifies an empty collection to use, rather than creating a new one with no items. This static field is read-only.</summary>
// Token: 0x04000176 RID: 374
public static readonly EventDescriptorCollection Empty = new EventDescriptorCollection(null, true);
}
}
+117
View File
@@ -0,0 +1,117 @@
using System;
namespace System.ComponentModel
{
/// <summary>Provides a simple list of delegates. This class cannot be inherited.</summary>
// Token: 0x02000081 RID: 129
public sealed class EventHandlerList : IDisposable
{
/// <summary>Gets or sets the delegate for the specified object.</summary>
/// <returns>The delegate for the specified key, or null if a delegate does not exist.</returns>
/// <param name="key">An object to find in the list. </param>
// Token: 0x17000137 RID: 311
public Delegate this[object key]
{
get
{
if (key == null)
{
return this.null_entry;
}
ListEntry listEntry = this.FindEntry(key);
if (listEntry != null)
{
return listEntry.value;
}
return null;
}
set
{
this.AddHandler(key, value);
}
}
/// <summary>Adds a delegate to the list.</summary>
/// <param name="key">The object that owns the event. </param>
/// <param name="value">The delegate to add to the list. </param>
// Token: 0x060004A4 RID: 1188 RVA: 0x0000D6A8 File Offset: 0x0000B8A8
public void AddHandler(object key, Delegate value)
{
if (key == null)
{
this.null_entry = Delegate.Combine(this.null_entry, value);
return;
}
ListEntry listEntry = this.FindEntry(key);
if (listEntry == null)
{
listEntry = new ListEntry();
listEntry.key = key;
listEntry.value = null;
listEntry.next = this.entries;
this.entries = listEntry;
}
listEntry.value = Delegate.Combine(listEntry.value, value);
}
/// <summary>Adds a list of delegates to the current list.</summary>
/// <param name="listToAddFrom">The list to add.</param>
// Token: 0x060004A5 RID: 1189 RVA: 0x0000D718 File Offset: 0x0000B918
public void AddHandlers(EventHandlerList listToAddFrom)
{
if (listToAddFrom == null)
{
return;
}
for (ListEntry next = listToAddFrom.entries; next != null; next = next.next)
{
this.AddHandler(next.key, next.value);
}
}
/// <summary>Removes a delegate from the list.</summary>
/// <param name="key">The object that owns the event. </param>
/// <param name="value">The delegate to remove from the list. </param>
// Token: 0x060004A6 RID: 1190 RVA: 0x0000D758 File Offset: 0x0000B958
public void RemoveHandler(object key, Delegate value)
{
if (key == null)
{
this.null_entry = Delegate.Remove(this.null_entry, value);
return;
}
ListEntry listEntry = this.FindEntry(key);
if (listEntry == null)
{
return;
}
listEntry.value = Delegate.Remove(listEntry.value, value);
}
/// <summary>Disposes the delegate list.</summary>
// Token: 0x060004A7 RID: 1191 RVA: 0x0000D7A0 File Offset: 0x0000B9A0
public void Dispose()
{
this.entries = null;
}
// Token: 0x060004A8 RID: 1192 RVA: 0x0000D7AC File Offset: 0x0000B9AC
private ListEntry FindEntry(object key)
{
for (ListEntry next = this.entries; next != null; next = next.next)
{
if (next.key == key)
{
return next;
}
}
return null;
}
// Token: 0x0400017A RID: 378
private ListEntry entries;
// Token: 0x0400017B RID: 379
private Delegate null_entry;
}
}
@@ -0,0 +1,10 @@
using System;
namespace System.ComponentModel
{
/// <summary>Provides a type converter to convert expandable objects to and from various other representations.</summary>
// Token: 0x02000082 RID: 130
public class ExpandableObjectConverter : TypeConverter
{
}
}
+84
View File
@@ -0,0 +1,84 @@
using System;
using System.ComponentModel.Design.Serialization;
using System.Globalization;
using System.Reflection;
namespace System.ComponentModel
{
/// <summary>Provides a type converter to convert <see cref="T:System.Guid" /> objects to and from various other representations.</summary>
// Token: 0x02000083 RID: 131
public class GuidConverter : TypeConverter
{
/// <summary>Gets a value indicating whether this converter can convert an object in the given source type to a GUID object using the context.</summary>
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="sourceType">A <see cref="T:System.Type" /> that represents the type you wish to convert from. </param>
// Token: 0x060004AB RID: 1195 RVA: 0x0000D7F4 File Offset: 0x0000B9F4
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
}
/// <summary>Gets a value indicating whether this converter can convert an object to the given destination type using the context.</summary>
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="destinationType">A <see cref="T:System.Type" /> that represents the type you wish to convert to. </param>
// Token: 0x060004AC RID: 1196 RVA: 0x0000D810 File Offset: 0x0000BA10
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
{
return destinationType == typeof(string) || destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) || base.CanConvertTo(context, destinationType);
}
/// <summary>Converts the given object to a GUID object.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
/// <param name="culture">An optional <see cref="T:System.Globalization.CultureInfo" />. If not supplied, the current culture is assumed. </param>
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x060004AD RID: 1197 RVA: 0x0000D84C File Offset: 0x0000BA4C
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
{
if (value.GetType() == typeof(string))
{
string text = (string)value;
try
{
return new Guid(text);
}
catch
{
throw new FormatException(text + "is not a valid GUID.");
}
}
return base.ConvertFrom(context, culture, value);
}
/// <summary>Converts the given object to another type.</summary>
/// <returns>The converted object.</returns>
/// <param name="context">A formatter context. </param>
/// <param name="culture">The culture into which <paramref name="value" /> will be converted.</param>
/// <param name="value">The object to convert. </param>
/// <param name="destinationType">The type to convert the object to. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="destinationType" /> is null.</exception>
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
// Token: 0x060004AE RID: 1198 RVA: 0x0000D8CC File Offset: 0x0000BACC
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
if (value is Guid)
{
Guid guid = (Guid)value;
if (destinationType == typeof(string) && value != null)
{
return guid.ToString("D");
}
if (destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor))
{
ConstructorInfo constructor = typeof(Guid).GetConstructor(new Type[] { typeof(string) });
return new global::System.ComponentModel.Design.Serialization.InstanceDescriptor(constructor, new object[] { guid.ToString("D") });
}
}
return base.ConvertTo(context, culture, value, destinationType);
}
}
}
+116
View File
@@ -0,0 +1,116 @@
using System;
using System.Collections;
namespace System.ComponentModel
{
/// <summary>Provides the features required to support both complex and simple scenarios when binding to a data source.</summary>
// Token: 0x02000084 RID: 132
public interface IBindingList : ICollection, IEnumerable, IList
{
/// <summary>Occurs when the list changes or an item in the list changes.</summary>
// Token: 0x14000014 RID: 20
// (add) Token: 0x060004AF RID: 1199
// (remove) Token: 0x060004B0 RID: 1200
event ListChangedEventHandler ListChanged;
/// <summary>Adds the <see cref="T:System.ComponentModel.PropertyDescriptor" /> to the indexes used for searching.</summary>
/// <param name="property">The <see cref="T:System.ComponentModel.PropertyDescriptor" /> to add to the indexes used for searching. </param>
// Token: 0x060004B1 RID: 1201
void AddIndex(PropertyDescriptor property);
/// <summary>Adds a new item to the list.</summary>
/// <returns>The item added to the list.</returns>
/// <exception cref="T:System.NotSupportedException">
/// <see cref="P:System.ComponentModel.IBindingList.AllowNew" /> is false. </exception>
// Token: 0x060004B2 RID: 1202
object AddNew();
/// <summary>Sorts the list based on a <see cref="T:System.ComponentModel.PropertyDescriptor" /> and a <see cref="T:System.ComponentModel.ListSortDirection" />.</summary>
/// <param name="property">The <see cref="T:System.ComponentModel.PropertyDescriptor" /> to sort by. </param>
/// <param name="direction">One of the <see cref="T:System.ComponentModel.ListSortDirection" /> values. </param>
/// <exception cref="T:System.NotSupportedException">
/// <see cref="P:System.ComponentModel.IBindingList.SupportsSorting" /> is false. </exception>
// Token: 0x060004B3 RID: 1203
void ApplySort(PropertyDescriptor property, ListSortDirection direction);
/// <summary>Returns the index of the row that has the given <see cref="T:System.ComponentModel.PropertyDescriptor" />.</summary>
/// <returns>The index of the row that has the given <see cref="T:System.ComponentModel.PropertyDescriptor" />.</returns>
/// <param name="property">The <see cref="T:System.ComponentModel.PropertyDescriptor" /> to search on. </param>
/// <param name="key">The value of the <paramref name="property" /> parameter to search for. </param>
/// <exception cref="T:System.NotSupportedException">
/// <see cref="P:System.ComponentModel.IBindingList.SupportsSearching" /> is false. </exception>
// Token: 0x060004B4 RID: 1204
int Find(PropertyDescriptor property, object key);
/// <summary>Removes the <see cref="T:System.ComponentModel.PropertyDescriptor" /> from the indexes used for searching.</summary>
/// <param name="property">The <see cref="T:System.ComponentModel.PropertyDescriptor" /> to remove from the indexes used for searching. </param>
// Token: 0x060004B5 RID: 1205
void RemoveIndex(PropertyDescriptor property);
/// <summary>Removes any sort applied using <see cref="M:System.ComponentModel.IBindingList.ApplySort(System.ComponentModel.PropertyDescriptor,System.ComponentModel.ListSortDirection)" />.</summary>
/// <exception cref="T:System.NotSupportedException">
/// <see cref="P:System.ComponentModel.IBindingList.SupportsSorting" /> is false. </exception>
// Token: 0x060004B6 RID: 1206
void RemoveSort();
/// <summary>Gets whether you can update items in the list.</summary>
/// <returns>true if you can update the items in the list; otherwise, false.</returns>
// Token: 0x17000138 RID: 312
// (get) Token: 0x060004B7 RID: 1207
bool AllowEdit { get; }
/// <summary>Gets whether you can add items to the list using <see cref="M:System.ComponentModel.IBindingList.AddNew" />.</summary>
/// <returns>true if you can add items to the list using <see cref="M:System.ComponentModel.IBindingList.AddNew" />; otherwise, false.</returns>
// Token: 0x17000139 RID: 313
// (get) Token: 0x060004B8 RID: 1208
bool AllowNew { get; }
/// <summary>Gets whether you can remove items from the list, using <see cref="M:System.Collections.IList.Remove(System.Object)" /> or <see cref="M:System.Collections.IList.RemoveAt(System.Int32)" />.</summary>
/// <returns>true if you can remove items from the list; otherwise, false.</returns>
// Token: 0x1700013A RID: 314
// (get) Token: 0x060004B9 RID: 1209
bool AllowRemove { get; }
/// <summary>Gets whether the items in the list are sorted.</summary>
/// <returns>true if <see cref="M:System.ComponentModel.IBindingList.ApplySort(System.ComponentModel.PropertyDescriptor,System.ComponentModel.ListSortDirection)" /> has been called and <see cref="M:System.ComponentModel.IBindingList.RemoveSort" /> has not been called; otherwise, false.</returns>
/// <exception cref="T:System.NotSupportedException">
/// <see cref="P:System.ComponentModel.IBindingList.SupportsSorting" /> is false. </exception>
// Token: 0x1700013B RID: 315
// (get) Token: 0x060004BA RID: 1210
bool IsSorted { get; }
/// <summary>Gets the direction of the sort.</summary>
/// <returns>One of the <see cref="T:System.ComponentModel.ListSortDirection" /> values.</returns>
/// <exception cref="T:System.NotSupportedException">
/// <see cref="P:System.ComponentModel.IBindingList.SupportsSorting" /> is false. </exception>
// Token: 0x1700013C RID: 316
// (get) Token: 0x060004BB RID: 1211
ListSortDirection SortDirection { get; }
/// <summary>Gets the <see cref="T:System.ComponentModel.PropertyDescriptor" /> that is being used for sorting.</summary>
/// <returns>The <see cref="T:System.ComponentModel.PropertyDescriptor" /> that is being used for sorting.</returns>
/// <exception cref="T:System.NotSupportedException">
/// <see cref="P:System.ComponentModel.IBindingList.SupportsSorting" /> is false. </exception>
// Token: 0x1700013D RID: 317
// (get) Token: 0x060004BC RID: 1212
PropertyDescriptor SortProperty { get; }
/// <summary>Gets whether a <see cref="E:System.ComponentModel.IBindingList.ListChanged" /> event is raised when the list changes or an item in the list changes.</summary>
/// <returns>true if a <see cref="E:System.ComponentModel.IBindingList.ListChanged" /> event is raised when the list changes or when an item changes; otherwise, false.</returns>
// Token: 0x1700013E RID: 318
// (get) Token: 0x060004BD RID: 1213
bool SupportsChangeNotification { get; }
/// <summary>Gets whether the list supports searching using the <see cref="M:System.ComponentModel.IBindingList.Find(System.ComponentModel.PropertyDescriptor,System.Object)" /> method.</summary>
/// <returns>true if the list supports searching using the <see cref="M:System.ComponentModel.IBindingList.Find(System.ComponentModel.PropertyDescriptor,System.Object)" /> method; otherwise, false.</returns>
// Token: 0x1700013F RID: 319
// (get) Token: 0x060004BE RID: 1214
bool SupportsSearching { get; }
/// <summary>Gets whether the list supports sorting.</summary>
/// <returns>true if the list supports sorting; otherwise, false.</returns>
// Token: 0x17000140 RID: 320
// (get) Token: 0x060004BF RID: 1215
bool SupportsSorting { get; }
}
}
+44
View File
@@ -0,0 +1,44 @@
using System;
using System.Collections;
namespace System.ComponentModel
{
/// <summary>Extends the <see cref="T:System.ComponentModel.IBindingList" /> interface by providing advanced sorting and filtering capabilities.</summary>
// Token: 0x02000085 RID: 133
public interface IBindingListView : ICollection, IEnumerable, IList, IBindingList
{
/// <summary>Gets or sets the filter to be used to exclude items from the collection of items returned by the data source</summary>
/// <returns>The string used to filter items out in the item collection returned by the data source. </returns>
// Token: 0x17000141 RID: 321
// (get) Token: 0x060004C0 RID: 1216
// (set) Token: 0x060004C1 RID: 1217
string Filter { get; set; }
/// <summary>Gets the collection of sort descriptions currently applied to the data source.</summary>
/// <returns>The <see cref="T:System.ComponentModel.ListSortDescriptionCollection" /> currently applied to the data source.</returns>
// Token: 0x17000142 RID: 322
// (get) Token: 0x060004C2 RID: 1218
ListSortDescriptionCollection SortDescriptions { get; }
/// <summary>Gets a value indicating whether the data source supports advanced sorting. </summary>
/// <returns>true if the data source supports advanced sorting; otherwise, false. </returns>
// Token: 0x17000143 RID: 323
// (get) Token: 0x060004C3 RID: 1219
bool SupportsAdvancedSorting { get; }
/// <summary>Gets a value indicating whether the data source supports filtering. </summary>
/// <returns>true if the data source supports filtering; otherwise, false. </returns>
// Token: 0x17000144 RID: 324
// (get) Token: 0x060004C4 RID: 1220
bool SupportsFiltering { get; }
/// <summary>Sorts the data source based on the given <see cref="T:System.ComponentModel.ListSortDescriptionCollection" />.</summary>
/// <param name="sorts">The <see cref="T:System.ComponentModel.ListSortDescriptionCollection" /> containing the sorts to apply to the data source.</param>
// Token: 0x060004C5 RID: 1221
void ApplySort(ListSortDescriptionCollection sorts);
/// <summary>Removes the current filter applied to the data source.</summary>
// Token: 0x060004C6 RID: 1222
void RemoveFilter();
}
}
+19
View File
@@ -0,0 +1,19 @@
using System;
namespace System.ComponentModel
{
/// <summary>Defines the mechanism for querying the object for changes and resetting of the changed status.</summary>
// Token: 0x02000086 RID: 134
public interface IChangeTracking
{
/// <summary>Gets the object's changed status.</summary>
/// <returns>true if the objects content has changed since the last call to <see cref="M:System.ComponentModel.IChangeTracking.AcceptChanges" />; otherwise, false.</returns>
// Token: 0x17000145 RID: 325
// (get) Token: 0x060004C7 RID: 1223
bool IsChanged { get; }
/// <summary>Resets the objects state to unchanged by accepting the modifications.</summary>
// Token: 0x060004C8 RID: 1224
void AcceptChanges();
}
}
@@ -0,0 +1,54 @@
using System;
namespace System.ComponentModel
{
/// <summary>Top level mapping layer between a COM object and TypeDescriptor.</summary>
// Token: 0x02000087 RID: 135
[Obsolete("Use TypeDescriptionProvider and TypeDescriptor.ComObjectType instead")]
public interface IComNativeDescriptorHandler
{
// Token: 0x060004C9 RID: 1225
AttributeCollection GetAttributes(object component);
// Token: 0x060004CA RID: 1226
string GetClassName(object component);
// Token: 0x060004CB RID: 1227
TypeConverter GetConverter(object component);
// Token: 0x060004CC RID: 1228
EventDescriptor GetDefaultEvent(object component);
// Token: 0x060004CD RID: 1229
PropertyDescriptor GetDefaultProperty(object component);
// Token: 0x060004CE RID: 1230
object GetEditor(object component, Type baseEditorType);
// Token: 0x060004CF RID: 1231
EventDescriptorCollection GetEvents(object component);
// Token: 0x060004D0 RID: 1232
EventDescriptorCollection GetEvents(object component, Attribute[] attributes);
// Token: 0x060004D1 RID: 1233
string GetName(object component);
// Token: 0x060004D2 RID: 1234
PropertyDescriptorCollection GetProperties(object component, Attribute[] attributes);
/// <summary>Retrieves the value of the property that has the specified dispatch identifier.</summary>
/// <param name="component">The object to which the property belongs.</param>
/// <param name="dispid">The dispatch identifier.</param>
/// <param name="success">A <see cref="T:System.Boolean" />, passed by reference, that represents whether or not the property was retrieved. </param>
// Token: 0x060004D3 RID: 1235
object GetPropertyValue(object component, int dispid, ref bool success);
/// <summary>Retrieves the value of the property that has the specified name.</summary>
/// <param name="component">The object to which the property belongs.</param>
/// <param name="propertyName">The name of the property.</param>
/// <param name="success">A <see cref="T:System.Boolean" />, passed by reference, that represents whether or not the property was retrieved. </param>
// Token: 0x060004D4 RID: 1236
object GetPropertyValue(object component, string propertyName, ref bool success);
}
}
+22
View File
@@ -0,0 +1,22 @@
using System;
namespace System.ComponentModel
{
/// <summary>Provides functionality required by all components. </summary>
// Token: 0x02000088 RID: 136
public interface IComponent : IDisposable
{
/// <summary>Represents the method that handles the <see cref="E:System.ComponentModel.IComponent.Disposed" /> event of a component.</summary>
// Token: 0x14000015 RID: 21
// (add) Token: 0x060004D5 RID: 1237
// (remove) Token: 0x060004D6 RID: 1238
event EventHandler Disposed;
/// <summary>Gets or sets the <see cref="T:System.ComponentModel.ISite" /> associated with the <see cref="T:System.ComponentModel.IComponent" />.</summary>
/// <returns>The <see cref="T:System.ComponentModel.ISite" /> object associated with the component; or null, if the component does not have a site.</returns>
// Token: 0x17000146 RID: 326
// (get) Token: 0x060004D7 RID: 1239
// (set) Token: 0x060004D8 RID: 1240
ISite Site { get; set; }
}
}
+33
View File
@@ -0,0 +1,33 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel
{
/// <summary>Provides functionality for containers. Containers are objects that logically contain zero or more components.</summary>
// Token: 0x02000089 RID: 137
[ComVisible(true)]
public interface IContainer : IDisposable
{
/// <summary>Gets all the components in the <see cref="T:System.ComponentModel.IContainer" />.</summary>
/// <returns>A collection of <see cref="T:System.ComponentModel.IComponent" /> objects that represents all the components in the <see cref="T:System.ComponentModel.IContainer" />.</returns>
// Token: 0x17000147 RID: 327
// (get) Token: 0x060004D9 RID: 1241
ComponentCollection Components { get; }
/// <summary>Adds the specified <see cref="T:System.ComponentModel.IComponent" /> to the <see cref="T:System.ComponentModel.IContainer" /> at the end of the list.</summary>
/// <param name="component">The <see cref="T:System.ComponentModel.IComponent" /> to add. </param>
// Token: 0x060004DA RID: 1242
void Add(IComponent component);
/// <summary>Adds the specified <see cref="T:System.ComponentModel.IComponent" /> to the <see cref="T:System.ComponentModel.IContainer" /> at the end of the list, and assigns a name to the component.</summary>
/// <param name="component">The <see cref="T:System.ComponentModel.IComponent" /> to add. </param>
/// <param name="name">The unique, case-insensitive name to assign to the component.-or- null that leaves the component unnamed. </param>
// Token: 0x060004DB RID: 1243
void Add(IComponent component, string name);
/// <summary>Removes a component from the <see cref="T:System.ComponentModel.IContainer" />.</summary>
/// <param name="component">The <see cref="T:System.ComponentModel.IComponent" /> to remove. </param>
// Token: 0x060004DC RID: 1244
void Remove(IComponent component);
}
}
@@ -0,0 +1,73 @@
using System;
namespace System.ComponentModel
{
/// <summary>Provides an interface that supplies dynamic custom type information for an object.</summary>
// Token: 0x0200008A RID: 138
public interface ICustomTypeDescriptor
{
/// <summary>Returns a collection of custom attributes for this instance of a component.</summary>
/// <returns>An <see cref="T:System.ComponentModel.AttributeCollection" /> containing the attributes for this object.</returns>
// Token: 0x060004DD RID: 1245
AttributeCollection GetAttributes();
/// <summary>Returns the class name of this instance of a component.</summary>
/// <returns>The class name of the object, or null if the class does not have a name.</returns>
// Token: 0x060004DE RID: 1246
string GetClassName();
/// <summary>Returns the name of this instance of a component.</summary>
/// <returns>The name of the object, or null if the object does not have a name.</returns>
// Token: 0x060004DF RID: 1247
string GetComponentName();
/// <summary>Returns a type converter for this instance of a component.</summary>
/// <returns>A <see cref="T:System.ComponentModel.TypeConverter" /> that is the converter for this object, or null if there is no <see cref="T:System.ComponentModel.TypeConverter" /> for this object.</returns>
// Token: 0x060004E0 RID: 1248
TypeConverter GetConverter();
/// <summary>Returns the default event for this instance of a component.</summary>
/// <returns>An <see cref="T:System.ComponentModel.EventDescriptor" /> that represents the default event for this object, or null if this object does not have events.</returns>
// Token: 0x060004E1 RID: 1249
EventDescriptor GetDefaultEvent();
/// <summary>Returns the default property for this instance of a component.</summary>
/// <returns>A <see cref="T:System.ComponentModel.PropertyDescriptor" /> that represents the default property for this object, or null if this object does not have properties.</returns>
// Token: 0x060004E2 RID: 1250
PropertyDescriptor GetDefaultProperty();
/// <summary>Returns an editor of the specified type for this instance of a component.</summary>
/// <returns>An <see cref="T:System.Object" /> of the specified type that is the editor for this object, or null if the editor cannot be found.</returns>
/// <param name="editorBaseType">A <see cref="T:System.Type" /> that represents the editor for this object. </param>
// Token: 0x060004E3 RID: 1251
object GetEditor(Type editorBaseType);
/// <summary>Returns the events for this instance of a component.</summary>
/// <returns>An <see cref="T:System.ComponentModel.EventDescriptorCollection" /> that represents the events for this component instance.</returns>
// Token: 0x060004E4 RID: 1252
EventDescriptorCollection GetEvents();
/// <summary>Returns the events for this instance of a component using the specified attribute array as a filter.</summary>
/// <returns>An <see cref="T:System.ComponentModel.EventDescriptorCollection" /> that represents the filtered events for this component instance.</returns>
/// <param name="attributes">An array of type <see cref="T:System.Attribute" /> that is used as a filter. </param>
// Token: 0x060004E5 RID: 1253
EventDescriptorCollection GetEvents(Attribute[] arr);
/// <summary>Returns the properties for this instance of a component.</summary>
/// <returns>A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> that represents the properties for this component instance.</returns>
// Token: 0x060004E6 RID: 1254
PropertyDescriptorCollection GetProperties();
/// <summary>Returns the properties for this instance of a component using the attribute array as a filter.</summary>
/// <returns>A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> that represents the filtered properties for this component instance.</returns>
/// <param name="attributes">An array of type <see cref="T:System.Attribute" /> that is used as a filter. </param>
// Token: 0x060004E7 RID: 1255
PropertyDescriptorCollection GetProperties(Attribute[] arr);
/// <summary>Returns an object that contains the property described by the specified property descriptor.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the owner of the specified property.</returns>
/// <param name="pd">A <see cref="T:System.ComponentModel.PropertyDescriptor" /> that represents the property whose owner is to be found. </param>
// Token: 0x060004E8 RID: 1256
object GetPropertyOwner(PropertyDescriptor pd);
}
}
+21
View File
@@ -0,0 +1,21 @@
using System;
namespace System.ComponentModel
{
/// <summary>Provides the functionality to offer custom error information that a user interface can bind to.</summary>
// Token: 0x0200008B RID: 139
public interface IDataErrorInfo
{
/// <summary>Gets an error message indicating what is wrong with this object.</summary>
/// <returns>An error message indicating what is wrong with this object. The default is an empty string ("").</returns>
// Token: 0x17000148 RID: 328
// (get) Token: 0x060004E9 RID: 1257
string Error { get; }
/// <summary>Gets the error message for the property with the given name.</summary>
/// <returns>The error message for the property. The default is an empty string ("").</returns>
/// <param name="columnName">The name of the property whose error message to get. </param>
// Token: 0x17000149 RID: 329
string this[string columnName] { get; }
}
}
+21
View File
@@ -0,0 +1,21 @@
using System;
namespace System.ComponentModel
{
/// <summary>Provides functionality to commit or rollback changes to an object that is used as a data source.</summary>
// Token: 0x0200008C RID: 140
public interface IEditableObject
{
/// <summary>Begins an edit on an object.</summary>
// Token: 0x060004EB RID: 1259
void BeginEdit();
/// <summary>Discards changes since the last <see cref="M:System.ComponentModel.IEditableObject.BeginEdit" /> call.</summary>
// Token: 0x060004EC RID: 1260
void CancelEdit();
/// <summary>Pushes changes since the last <see cref="M:System.ComponentModel.IEditableObject.BeginEdit" /> or <see cref="M:System.ComponentModel.IBindingList.AddNew" /> call into the underlying object.</summary>
// Token: 0x060004ED RID: 1261
void EndEdit();
}
}
+23
View File
@@ -0,0 +1,23 @@
using System;
using System.Collections;
namespace System.ComponentModel
{
/// <summary>Provides functionality to an object to return a list that can be bound to a data source.</summary>
// Token: 0x0200008D RID: 141
[TypeConverter("System.Windows.Forms.Design.DataSourceConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[MergableProperty(false)]
public interface IListSource
{
/// <summary>Returns an <see cref="T:System.Collections.IList" /> that can be bound to a data source from an object that does not implement an <see cref="T:System.Collections.IList" /> itself.</summary>
/// <returns>An <see cref="T:System.Collections.IList" /> that can be bound to a data source from the object.</returns>
// Token: 0x060004EE RID: 1262
IList GetList();
/// <summary>Gets a value indicating whether the collection is a collection of <see cref="T:System.Collections.IList" /> objects.</summary>
/// <returns>true if the collection is a collection of <see cref="T:System.Collections.IList" /> objects; otherwise, false.</returns>
// Token: 0x1700014A RID: 330
// (get) Token: 0x060004EF RID: 1263
bool ContainsListCollection { get; }
}
}
@@ -0,0 +1,15 @@
using System;
namespace System.ComponentModel
{
/// <summary>Notifies clients that a property value has changed.</summary>
// Token: 0x0200008E RID: 142
public interface INotifyPropertyChanged
{
/// <summary>Occurs when a property value changes.</summary>
// Token: 0x14000016 RID: 22
// (add) Token: 0x060004F0 RID: 1264
// (remove) Token: 0x060004F1 RID: 1265
event PropertyChangedEventHandler PropertyChanged;
}
}
@@ -0,0 +1,13 @@
using System;
namespace System.ComponentModel
{
/// <summary>Provides support for rolling back the changes</summary>
// Token: 0x0200008F RID: 143
public interface IRevertibleChangeTracking : IChangeTracking
{
/// <summary>Resets the objects state to unchanged by rejecting the modifications.</summary>
// Token: 0x060004F2 RID: 1266
void RejectChanges();
}
}
+36
View File
@@ -0,0 +1,36 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel
{
/// <summary>Provides functionality required by sites.</summary>
// Token: 0x02000090 RID: 144
[ComVisible(true)]
public interface ISite : IServiceProvider
{
/// <summary>Gets the component associated with the <see cref="T:System.ComponentModel.ISite" /> when implemented by a class.</summary>
/// <returns>The <see cref="T:System.ComponentModel.IComponent" /> instance associated with the <see cref="T:System.ComponentModel.ISite" />.</returns>
// Token: 0x1700014B RID: 331
// (get) Token: 0x060004F3 RID: 1267
IComponent Component { get; }
/// <summary>Gets the <see cref="T:System.ComponentModel.IContainer" /> associated with the <see cref="T:System.ComponentModel.ISite" /> when implemented by a class.</summary>
/// <returns>The <see cref="T:System.ComponentModel.IContainer" /> instance associated with the <see cref="T:System.ComponentModel.ISite" />.</returns>
// Token: 0x1700014C RID: 332
// (get) Token: 0x060004F4 RID: 1268
IContainer Container { get; }
/// <summary>Determines whether the component is in design mode when implemented by a class.</summary>
/// <returns>true if the component is in design mode; otherwise, false.</returns>
// Token: 0x1700014D RID: 333
// (get) Token: 0x060004F5 RID: 1269
bool DesignMode { get; }
/// <summary>Gets or sets the name of the component associated with the <see cref="T:System.ComponentModel.ISite" /> when implemented by a class.</summary>
/// <returns>The name of the component associated with the <see cref="T:System.ComponentModel.ISite" />; or null, if no name is assigned to the component.</returns>
// Token: 0x1700014E RID: 334
// (get) Token: 0x060004F6 RID: 1270
// (set) Token: 0x060004F7 RID: 1271
string Name { get; set; }
}
}
@@ -0,0 +1,17 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies that this object supports a simple, transacted notification for batch initialization.</summary>
// Token: 0x02000091 RID: 145
public interface ISupportInitialize
{
/// <summary>Signals the object that initialization is starting.</summary>
// Token: 0x060004F8 RID: 1272
void BeginInit();
/// <summary>Signals the object that initialization is complete.</summary>
// Token: 0x060004F9 RID: 1273
void EndInit();
}
}
@@ -0,0 +1,21 @@
using System;
namespace System.ComponentModel
{
/// <summary>Allows coordination of initialization for a component and its dependent properties.</summary>
// Token: 0x02000092 RID: 146
public interface ISupportInitializeNotification : ISupportInitialize
{
/// <summary>Occurs when initialization of the component is completed.</summary>
// Token: 0x14000017 RID: 23
// (add) Token: 0x060004FA RID: 1274
// (remove) Token: 0x060004FB RID: 1275
event EventHandler Initialized;
/// <summary>Gets a value indicating whether the component is initialized.</summary>
/// <returns>true to indicate the component has completed initialization; otherwise, false. </returns>
// Token: 0x1700014F RID: 335
// (get) Token: 0x060004FC RID: 1276
bool IsInitialized { get; }
}
}
@@ -0,0 +1,35 @@
using System;
namespace System.ComponentModel
{
/// <summary>Provides a way to synchronously or asynchronously execute a delegate.</summary>
// Token: 0x02000093 RID: 147
public interface ISynchronizeInvoke
{
/// <summary>Gets a value indicating whether the caller must call <see cref="M:System.ComponentModel.ISynchronizeInvoke.Invoke(System.Delegate,System.Object[])" /> when calling an object that implements this interface.</summary>
/// <returns>true if the caller must call <see cref="M:System.ComponentModel.ISynchronizeInvoke.Invoke(System.Delegate,System.Object[])" />; otherwise, false.</returns>
// Token: 0x17000150 RID: 336
// (get) Token: 0x060004FD RID: 1277
bool InvokeRequired { get; }
/// <summary>Asynchronously executes the delegate on the thread that created this object.</summary>
/// <returns>An <see cref="T:System.IAsyncResult" /> interface that represents the asynchronous operation started by calling this method.</returns>
/// <param name="method">A <see cref="T:System.Delegate" /> to a method that takes parameters of the same number and type that are contained in <paramref name="args" />. </param>
/// <param name="args">An array of type <see cref="T:System.Object" /> to pass as arguments to the given method. This can be null if no arguments are needed. </param>
// Token: 0x060004FE RID: 1278
IAsyncResult BeginInvoke(Delegate method, object[] args);
/// <summary>Waits until the process started by calling <see cref="M:System.ComponentModel.ISynchronizeInvoke.BeginInvoke(System.Delegate,System.Object[])" /> completes, and then returns the value generated by the process.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the return value generated by the asynchronous operation.</returns>
/// <param name="result">An <see cref="T:System.IAsyncResult" /> interface that represents the asynchronous operation started by calling <see cref="M:System.ComponentModel.ISynchronizeInvoke.BeginInvoke(System.Delegate,System.Object[])" />. </param>
// Token: 0x060004FF RID: 1279
object EndInvoke(IAsyncResult result);
/// <summary>Synchronously executes the delegate on the thread that created this object and marshals the call to the creating thread.</summary>
/// <returns>An <see cref="T:System.Object" /> that represents the return value from the delegate being invoked, or null if the delegate has no return value.</returns>
/// <param name="method">A <see cref="T:System.Delegate" /> that contains a method to call, in the context of the thread for the control. </param>
/// <param name="args">An array of type <see cref="T:System.Object" /> that represents the arguments to pass to the given method. This can be null if no arguments are needed. </param>
// Token: 0x06000500 RID: 1280
object Invoke(Delegate method, object[] args);
}
}
@@ -0,0 +1,38 @@
using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel
{
/// <summary>Provides contextual information about a component, such as its container and property descriptor.</summary>
// Token: 0x02000094 RID: 148
[ComVisible(true)]
public interface ITypeDescriptorContext : IServiceProvider
{
/// <summary>Gets the container representing this <see cref="T:System.ComponentModel.TypeDescriptor" /> request.</summary>
/// <returns>An <see cref="T:System.ComponentModel.IContainer" /> with the set of objects for this <see cref="T:System.ComponentModel.TypeDescriptor" />; otherwise, null if there is no container or if the <see cref="T:System.ComponentModel.TypeDescriptor" /> does not use outside objects.</returns>
// Token: 0x17000151 RID: 337
// (get) Token: 0x06000501 RID: 1281
IContainer Container { get; }
/// <summary>Gets the object that is connected with this type descriptor request.</summary>
/// <returns>The object that invokes the method on the <see cref="T:System.ComponentModel.TypeDescriptor" />; otherwise, null if there is no object responsible for the call.</returns>
// Token: 0x17000152 RID: 338
// (get) Token: 0x06000502 RID: 1282
object Instance { get; }
/// <summary>Gets the <see cref="T:System.ComponentModel.PropertyDescriptor" /> that is associated with the given context item.</summary>
/// <returns>The <see cref="T:System.ComponentModel.PropertyDescriptor" /> that describes the given context item; otherwise, null if there is no <see cref="T:System.ComponentModel.PropertyDescriptor" /> responsible for the call.</returns>
// Token: 0x17000153 RID: 339
// (get) Token: 0x06000503 RID: 1283
PropertyDescriptor PropertyDescriptor { get; }
/// <summary>Raises the <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentChanged" /> event.</summary>
// Token: 0x06000504 RID: 1284
void OnComponentChanged();
/// <summary>Raises the <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentChanging" /> event.</summary>
/// <returns>true if this object can be changed; otherwise, false.</returns>
// Token: 0x06000505 RID: 1285
bool OnComponentChanging();
}
}
+21
View File
@@ -0,0 +1,21 @@
using System;
namespace System.ComponentModel
{
/// <summary>Provides functionality to discover the schema for a bindable list, where the properties available for binding differ from the public properties of the object to bind to. </summary>
// Token: 0x02000095 RID: 149
public interface ITypedList
{
/// <summary>Returns the <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> that represents the properties on each item used to bind data.</summary>
/// <returns>The <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> that represents the properties on each item used to bind data.</returns>
/// <param name="listAccessors">An array of <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects to find in the collection as bindable. This can be null. </param>
// Token: 0x06000506 RID: 1286
PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[] listAccessors);
/// <summary>Returns the name of the list.</summary>
/// <returns>The name of the list.</returns>
/// <param name="listAccessors">An array of <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects, for which the list name is returned. This can be null. </param>
// Token: 0x06000507 RID: 1287
string GetListName(PropertyDescriptor[] listAccessors);
}
}
@@ -0,0 +1,69 @@
using System;
namespace System.ComponentModel
{
/// <summary>Specifies that an object has no subproperties capable of being edited. This class cannot be inherited.</summary>
// Token: 0x02000096 RID: 150
[AttributeUsage(AttributeTargets.All)]
public sealed class ImmutableObjectAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.ImmutableObjectAttribute" /> class.</summary>
/// <param name="immutable">true if the object is immutable; otherwise, false. </param>
// Token: 0x06000508 RID: 1288 RVA: 0x0000D96C File Offset: 0x0000BB6C
public ImmutableObjectAttribute(bool immutable)
{
this.immutable = immutable;
}
/// <summary>Gets whether the object is immutable.</summary>
/// <returns>true if the object is immutable; otherwise, false.</returns>
// Token: 0x17000154 RID: 340
// (get) Token: 0x0600050A RID: 1290 RVA: 0x0000D9A0 File Offset: 0x0000BBA0
public bool Immutable
{
get
{
return this.immutable;
}
}
/// <returns>true if <paramref name="obj" /> equals the type and value of this instance; otherwise, false.</returns>
/// <param name="obj">An <see cref="T:System.Object" /> to compare with this instance or null. </param>
// Token: 0x0600050B RID: 1291 RVA: 0x0000D9A8 File Offset: 0x0000BBA8
public override bool Equals(object obj)
{
return obj is ImmutableObjectAttribute && (obj == this || ((ImmutableObjectAttribute)obj).Immutable == this.immutable);
}
/// <summary>Returns the hash code for this instance.</summary>
/// <returns>A hash code for the current <see cref="T:System.ComponentModel.ImmutableObjectAttribute" />.</returns>
// Token: 0x0600050C RID: 1292 RVA: 0x0000D9D4 File Offset: 0x0000BBD4
public override int GetHashCode()
{
return this.immutable.GetHashCode();
}
/// <summary>Indicates whether the value of this instance is the default value.</summary>
/// <returns>true if this instance is the default attribute for the class; otherwise, false.</returns>
// Token: 0x0600050D RID: 1293 RVA: 0x0000D9E4 File Offset: 0x0000BBE4
public override bool IsDefaultAttribute()
{
return this.immutable == ImmutableObjectAttribute.Default.Immutable;
}
// Token: 0x0400017C RID: 380
private bool immutable;
/// <summary>Represents the default value for <see cref="T:System.ComponentModel.ImmutableObjectAttribute" />.</summary>
// Token: 0x0400017D RID: 381
public static readonly ImmutableObjectAttribute Default = new ImmutableObjectAttribute(false);
/// <summary>Specifies that an object has at least one editable subproperty. This static field is read-only.</summary>
// Token: 0x0400017E RID: 382
public static readonly ImmutableObjectAttribute No = new ImmutableObjectAttribute(false);
/// <summary>Specifies that an object has no subproperties that can be edited. This static field is read-only.</summary>
// Token: 0x0400017F RID: 383
public static readonly ImmutableObjectAttribute Yes = new ImmutableObjectAttribute(true);
}
}
+171
View File
@@ -0,0 +1,171 @@
using System;
using System.Collections;
using System.ComponentModel.Design;
namespace System.ComponentModel
{
// Token: 0x020000D3 RID: 211
internal abstract class Info
{
// Token: 0x0600072F RID: 1839 RVA: 0x00013460 File Offset: 0x00011660
public Info(Type infoType)
{
this._infoType = infoType;
}
// Token: 0x06000730 RID: 1840
public abstract AttributeCollection GetAttributes();
// Token: 0x06000731 RID: 1841
public abstract EventDescriptorCollection GetEvents();
// Token: 0x06000732 RID: 1842
public abstract PropertyDescriptorCollection GetProperties();
// Token: 0x170001BC RID: 444
// (get) Token: 0x06000733 RID: 1843 RVA: 0x00013470 File Offset: 0x00011670
public Type InfoType
{
get
{
return this._infoType;
}
}
// Token: 0x06000734 RID: 1844 RVA: 0x00013478 File Offset: 0x00011678
public EventDescriptorCollection GetEvents(Attribute[] attributes)
{
EventDescriptorCollection events = this.GetEvents();
if (attributes == null)
{
return events;
}
return events.Filter(attributes);
}
// Token: 0x06000735 RID: 1845 RVA: 0x0001349C File Offset: 0x0001169C
public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
{
PropertyDescriptorCollection properties = this.GetProperties();
if (attributes == null)
{
return properties;
}
return properties.Filter(attributes);
}
// Token: 0x06000736 RID: 1846 RVA: 0x000134C0 File Offset: 0x000116C0
public EventDescriptor GetDefaultEvent()
{
if (this._gotDefaultEvent)
{
return this._defaultEvent;
}
DefaultEventAttribute defaultEventAttribute = (DefaultEventAttribute)this.GetAttributes()[typeof(DefaultEventAttribute)];
if (defaultEventAttribute == null || defaultEventAttribute.Name == null)
{
this._defaultEvent = null;
}
else
{
EventDescriptorCollection events = this.GetEvents();
this._defaultEvent = events[defaultEventAttribute.Name];
}
this._gotDefaultEvent = true;
return this._defaultEvent;
}
// Token: 0x06000737 RID: 1847 RVA: 0x00013540 File Offset: 0x00011740
public PropertyDescriptor GetDefaultProperty()
{
if (this._gotDefaultProperty)
{
return this._defaultProperty;
}
DefaultPropertyAttribute defaultPropertyAttribute = (DefaultPropertyAttribute)this.GetAttributes()[typeof(DefaultPropertyAttribute)];
if (defaultPropertyAttribute == null || defaultPropertyAttribute.Name == null)
{
this._defaultProperty = null;
}
else
{
PropertyDescriptorCollection properties = this.GetProperties();
this._defaultProperty = properties[defaultPropertyAttribute.Name];
}
this._gotDefaultProperty = true;
return this._defaultProperty;
}
// Token: 0x06000738 RID: 1848 RVA: 0x000135C0 File Offset: 0x000117C0
protected AttributeCollection GetAttributes(IComponent comp)
{
if (this._attributes != null)
{
return this._attributes;
}
bool flag = true;
ArrayList arrayList = new ArrayList();
foreach (Attribute attribute in this._infoType.GetCustomAttributes(false))
{
arrayList.Add(attribute);
}
Type type = this._infoType.BaseType;
while (type != null && type != typeof(object))
{
foreach (Attribute attribute2 in type.GetCustomAttributes(false))
{
arrayList.Add(attribute2);
}
type = type.BaseType;
}
foreach (Type type2 in this._infoType.GetInterfaces())
{
foreach (object obj in TypeDescriptor.GetAttributes(type2))
{
Attribute attribute3 = (Attribute)obj;
arrayList.Add(attribute3);
}
}
Hashtable hashtable = new Hashtable();
for (int l = arrayList.Count - 1; l >= 0; l--)
{
Attribute attribute4 = (Attribute)arrayList[l];
hashtable[attribute4.TypeId] = attribute4;
}
if (comp != null && comp.Site != null)
{
global::System.ComponentModel.Design.ITypeDescriptorFilterService typeDescriptorFilterService = (global::System.ComponentModel.Design.ITypeDescriptorFilterService)comp.Site.GetService(typeof(global::System.ComponentModel.Design.ITypeDescriptorFilterService));
if (typeDescriptorFilterService != null)
{
flag = typeDescriptorFilterService.FilterAttributes(comp, hashtable);
}
}
Attribute[] array = new Attribute[hashtable.Values.Count];
hashtable.Values.CopyTo(array, 0);
AttributeCollection attributeCollection = new AttributeCollection(array);
if (flag)
{
this._attributes = attributeCollection;
}
return attributeCollection;
}
// Token: 0x04000207 RID: 519
private Type _infoType;
// Token: 0x04000208 RID: 520
private EventDescriptor _defaultEvent;
// Token: 0x04000209 RID: 521
private bool _gotDefaultEvent;
// Token: 0x0400020A RID: 522
private PropertyDescriptor _defaultProperty;
// Token: 0x0400020B RID: 523
private bool _gotDefaultProperty;
// Token: 0x0400020C RID: 524
private AttributeCollection _attributes;
}
}
+45
View File
@@ -0,0 +1,45 @@
using System;
using System.Globalization;
namespace System.ComponentModel
{
/// <summary>Provides a type converter to convert 16-bit signed integer objects to and from other representations.</summary>
// Token: 0x02000097 RID: 151
public class Int16Converter : BaseNumberConverter
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Int16Converter" /> class. </summary>
// Token: 0x0600050E RID: 1294 RVA: 0x0000D9F8 File Offset: 0x0000BBF8
public Int16Converter()
{
this.InnerType = typeof(short);
}
// Token: 0x17000155 RID: 341
// (get) Token: 0x0600050F RID: 1295 RVA: 0x0000DA10 File Offset: 0x0000BC10
internal override bool SupportHex
{
get
{
return true;
}
}
// Token: 0x06000510 RID: 1296 RVA: 0x0000DA14 File Offset: 0x0000BC14
internal override string ConvertToString(object value, NumberFormatInfo format)
{
return ((short)value).ToString("G", format);
}
// Token: 0x06000511 RID: 1297 RVA: 0x0000DA38 File Offset: 0x0000BC38
internal override object ConvertFromString(string value, NumberFormatInfo format)
{
return short.Parse(value, NumberStyles.Integer, format);
}
// Token: 0x06000512 RID: 1298 RVA: 0x0000DA48 File Offset: 0x0000BC48
internal override object ConvertFromString(string value, int fromBase)
{
return Convert.ToInt16(value, fromBase);
}
}
}
+45
View File
@@ -0,0 +1,45 @@
using System;
using System.Globalization;
namespace System.ComponentModel
{
/// <summary>Provides a type converter to convert 32-bit signed integer objects to and from other representations.</summary>
// Token: 0x02000098 RID: 152
public class Int32Converter : BaseNumberConverter
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Int32Converter" /> class. </summary>
// Token: 0x06000513 RID: 1299 RVA: 0x0000DA58 File Offset: 0x0000BC58
public Int32Converter()
{
this.InnerType = typeof(int);
}
// Token: 0x17000156 RID: 342
// (get) Token: 0x06000514 RID: 1300 RVA: 0x0000DA70 File Offset: 0x0000BC70
internal override bool SupportHex
{
get
{
return true;
}
}
// Token: 0x06000515 RID: 1301 RVA: 0x0000DA74 File Offset: 0x0000BC74
internal override string ConvertToString(object value, NumberFormatInfo format)
{
return ((int)value).ToString("G", format);
}
// Token: 0x06000516 RID: 1302 RVA: 0x0000DA98 File Offset: 0x0000BC98
internal override object ConvertFromString(string value, NumberFormatInfo format)
{
return int.Parse(value, NumberStyles.Integer, format);
}
// Token: 0x06000517 RID: 1303 RVA: 0x0000DAA8 File Offset: 0x0000BCA8
internal override object ConvertFromString(string value, int fromBase)
{
return Convert.ToInt32(value, fromBase);
}
}
}

Some files were not shown because too many files have changed in this diff Show More