GetService.
* Container.cs: Changed Dispose(bool) behaviour to match .NET, based
on patch by Tom Hindle ([email protected]). Also use ValidateName
in Add overloads on 1.0 profile by making it available as private
method. Use case-insensitive comparison of component name.
svn path=/trunk/mcs/; revision=138174
* AssemblyInfo.cs: added InternalsVisibleTo for
System.ComponentModel.DataAnnotations (needs
ReflectionPropertyDescriptor)
2009-06-23 Marek Habersack <[email protected]>
* MetaTable.cs: constructor now takes ContextConfiguration instead
of a boolean and uses the config to determine value of the
ScaffoldAllTables property. Also, if context config is present,
makes sure to register the associated type description provider
(if any) with TypeDescriptor.
* MetaModel.cs: no longer uses local cache for description
providers. Uses TypeDescriptor.{Add,Get}Provider now.
* MetaColumn.cs: fixed Scaffold to match tests - IsGenerated and
IsCustomProperty take precedence over Table.ScaffoldAllTables.
GetDataFieldAttribute doesn't use AttributeCollection indexer, as
the latter would create a default instance of the requested
attribute, which is not what we want here.
2009-06-23 Marek Habersack <[email protected]>
* ValidationAttribute.cs: error message must not ever be empty.
* UIHintAttribute.cs: do not throw NIEX from the constructor.
* DataTypeAttribute.cs: implemented correct DisplayFormat
intialization for DataType.Time.
* AssociatedMetadataTypeTypeDescriptor.cs: implemented retrieving
attributes of the associated metadata type, as well as merging of
attribute collections between metadata and main type properties.
* AssociatedMetadataTypePropertyDescriptor.cs: added. Helper class
which merges attributes from the metadata type (if any) with those
associated with property from the "main" type.
2009-06-23 Marek Habersack <[email protected]>
* System.ComponentModel.DataAnnotations.dll.sources: added
System.ComponentModel.DataAnnotations/AssociatedMetadataTypePropertyDescriptor.cs
2009-06-23 Marek Habersack <[email protected]>
* TypeDescriptor.cs: do not wrap DefaultTypeDescriptionProvider.
Implemented GetAttributes and GetProperties in
DefaultTypeDescriptor.
* AttributeCollection.cs: make sure that attrList is never null.
svn path=/trunk/mcs/; revision=136732
* WeakObjectWrapper.cs, WeakObjectWrapperComparer.cs: added - used
by TypeDescriptor for storage of type description providers.
* TypeDescriptor.cs: implemented part of the 2.0+ API which deals
with adding/removing/getting type description providers.
* AttributeCollection.cs: do not throw NREX when attrList is
null in Count.
2009-06-22 Marek Habersack <[email protected]>
* TypeDescriptorTests.cs: added tests for 2.0+ APIs which deal
with adding/removing/getting type description providers.
svn path=/trunk/mcs/; revision=136634
* System.ComponentModel/ListChangedEventArgs.cs: Fix .NET compatibility
problems (discovered from trying to run the System.Data.Linq
unit tests).
* Test/System.ComponentModel/ListChangedEventArgsTest.cs: Added; tests
for ListChangedEventArgs.
svn path=/trunk/mcs/; revision=134138
* ReflectionPropertyDescriptor.cs: Don't cache getter and
setter properties. Cache instead the PropertyInfo objects
that defined them.
PropertyInfo::Get/SetValue is faster than calling the method
throught reflection.
svn path=/trunk/mcs/; revision=128235
* AttributeCollection.cs: this [Type] shouldn't throw a NREX when
attrList is null.
* TypeDescriptor.cs: GetConverter (Type) must throw
ArgumentNullException if the passed parameter is null.
FindDefaultConverterType should gracefully cope with type being
null.
2009-02-19 Marek Habersack <[email protected]>
* TypeDescriptorTests.cs: added a test for
TypeDescriptor.GetConverter (null) case.
svn path=/trunk/mcs/; revision=127343
* BindingList.cs: Add calls InsertItem which raises OnListChanged, so
don't raise a duplicate OnListChanged in AddNewCore.
svn path=/trunk/mcs/; revision=122896
* TypeDescriptor.cs: Added support for NullableConverter.
* TypeDescriptorTests.cs: Added a test for the NullableConverter support.
svn path=/trunk/mcs/; revision=120946
* BackgroundWorker.cs: If the user sets Cancel to true, but then
throws an exception in DoWork, we need to set Cancel back to false.
[Fixes bug #328830]
svn path=/trunk/mcs/; revision=112520
2008-09-01 Rodrigo Kumpera <[email protected]>
* PropertyDescriptorTest.cs: Tests for Get/Set Value of partial
overrides of virtual properties.
In System.ComponentModel:
2008-09-01 Rodrigo Kumpera <[email protected]>
* ReflectionPropertyDescriptor.cs (SetValue, GetValue) : Lookup
the MethodInfo for accessors in parent types in case of partial
overrides of virtual properties.
svn path=/trunk/mcs/; revision=112052
* DefaultValueAttribute.cs: Fix Equals (wrt boxing) and
GetHashCode (wrt NRE on null Value).
* PropertyChangedEventArgs.cs: Property PropertyName is not
virtual for NET_2_1
svn path=/trunk/mcs/; revision=109853
* TypeDescriptor.cs: Attributes precendence (higher to lower)
should be type -> base types -> interfaces and not
type -> interfaces -> base types.
svn path=/trunk/mcs/; revision=108190
* TypeDescriptor.cs:
- Refactor the default converters table not to be a Hashtable,
because the order of the keys is not preserved.
- Fix FindDefaultConverterType to properly make use of the default
converters.
svn path=/trunk/mcs/; revision=108121
* TypeDescriptor.cs:
- Fix GetConverter (Type) overload to have same logic as the
object one.
- Object-ReferenceConverter should be the last entry in the predefined
converters table, so that when we look up we don't end up with the wrong
converter for derived types.
* TypeDescriptorTests.cs: Add a test that both GetConverter
overloads return the same converter.
svn path=/trunk/mcs/; revision=108087
Apply patch from Achille Fouilleul (achille.fouilleul at gadz dot org)
* BackgroundWorker.cs: Ensure the async object is set to null before
calling RunWorkerCompleted, as IsBusy is based off the async object.
[Fixes bug #394365]
2008-07-16 Jonathan Pobst <[email protected]>
* BackgroundWorkerTest.cs: Add some asserts for bug #364365.
svn path=/trunk/mcs/; revision=108053
Apply patches from Jordan Callicoat (MonkeeSage at gmail dot com)
* AsyncCompleteEventArgs.cs: RaiseExceptionIfNecessary should throw
TargetInvocationException if there was an exception, and IOE if
the operation was cancelled.
* BackgroundWorker.cs: Do not call RunWorkerCompleted from CancelAsync,
setting cancel_pending to true is enough.
* RunWorkerCompletedEventArgs.cs: Raise exceptions when user tries
to access the Result if there are any exceptions.
[Fixes bugs #328830 and 373153]
2008-07-16 Jonathan Pobst <[email protected]>
* BackgroundWorkerTest.cs: Add tests for bugs 328830 and 373153.
svn path=/trunk/mcs/; revision=108039
IList. Added test for String indexer.
* PropertyDescriptorCollectionTests.cs: Improved test for Find and
merged CultureInsensitiveFindTest. Improved test for Find with null
name/key. Added test for String indexer.
* EventDescriptorCollection.cs: Fixed Empty to return read-only
collection. In a read-only collection, throw NotSupportedException
instead of InvalidOperationException when attempting to modify the
collection. Fixed find to use ordinal comparison on 2.0 profile.
Fixed IList's IsFixedSize and IsReadOnly.
* PropertyDescriptorCollection.cs (Find): Use key as argument name
when name is null. Silly compatiblity fix.
svn path=/trunk/mcs/; revision=106736
* EventDescriptorCollectionTests.cs: Added tests based on tests for
PropertyDescriptorCollection.
* PropertyDescriptorCollectionTests.cs: Added tests for Sort overloads.
Improved test for Find with null key.
* EventDescriptorCollection.cs: Fixed NRE in Sort overloads when order
string array is null.
* PropertyDescriptorCollection.cs: Fixed NRE in Sort overloads when
order string array is null.
svn path=/trunk/mcs/; revision=106733
* DateTimeConverter.cs : use MM for month instead of mm.
Fixed bug #396649, patch by Andy Hume.
* DateTimeConverterTest.cs : test for bug #396649 by Andy Hume.
svn path=/trunk/mcs/; revision=105573
* MemberDescriptor.cs, PropertyDescriptor.cs,
ReflectionPropertyDescriptor.cs: Implement FillAttributes.
* MemberDescriptor.cs:
- Attributes should be checked for duplicates based on their
TypeId and not Type.
- For duplicate attributes the last one added has higher precedence.
* ReflectionPropertyDescriptor.cs: Use the property type supplied
in the ctor instead of using reflection, because this won't work if
there are more then one property with the same name.
svn path=/trunk/mcs/; revision=104696
* TypeDescriptor.cs: GetAttributes must retrieve the attributes of
the type, the base types and the interfaces the type implements.
[Fix part of bug #394310]
* TypeDescriptorTests.cs: Add test that verifies that GetAttributes
retrieves the attributes of the type, the base types and the
interfaces the type implements.
svn path=/trunk/mcs/; revision=104438
* TypeDescriptor.cs: GetProperties should not return write-only
properties. Patch by James Fitzsimons <[email protected]>.
* TypeDescriptorTests.cs: Add test for handling write-only properties.
svn path=/trunk/mcs/; revision=102535