Click here to Skip to main content
15,851,242 members

Comments by gwithey (Top 14 by date)

gwithey 29-May-15 6:05am View    
The following using the solution you linked has reduced my sort time 2 fold and enabled me to cancel with a token...

// Sort by Ascending
m_listViewItems = new ObservableCollection<renishawlistitem>(
this.Items
.AsParallel()
.WithDegreeOfParallelism(2) // Sorts 2 in parellel (Down from 6 seconds to 3 over 1.5 million)
.WithCancellation(m_cancelationTokenSource.Token) // Enables the sort to quit when token is false on dispose etc
.OrderBy(
x => (primaryTypeIsKnown)
? Convert.ChangeType(x.SubItems[sortIndex], primaryItemType,
CultureInfo.InvariantCulture)
: x.SubItems[sortIndex].ToString())
.ThenBy(
x => (secondaryTypeIsKnown)
? Convert.ChangeType(x.SubItems[columnToCompareIndex], secondaryItemType,
CultureInfo.InvariantCulture)
: x.SubItems[columnToCompareIndex].ToString()));
gwithey 29-May-15 5:23am View    
Thank you F.Xaver i will give this a try
gwithey 2-Dec-13 8:14am View    
Thanks for the help with this, it allows me to at least determine which ones are obsolete and indicate this within the UI.

I still don't know if these could be linked to and display a property grid that relates to a control instance opposed to its type. However will see what i can do.

Thanks George
gwithey 2-Dec-13 6:30am View    
I wish to display them for regression testing of these properties to display any that are currently deprecated or non brawsable within a property grid.
gwithey 2-Dec-13 6:28am View    
Hi OriginalGriff,

Thanks for this, i have looked though the documentation and it is a useful resource for showing the currently deprecated properties dlls etc in .Net.

I have been trying to query the obsolete attribute using reflection but have not yet discovered a method of doing so and could not see anything which may lead me to this within the resource =s.

I suppose my original goal may seem odd but ideally i want to display depreciated,normal and non browsable properties in separate property grids. This is to allow testing of all attributes.