Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / ListSortDescriptionCollection.cs / 1 / ListSortDescriptionCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.ComponentModel {
using System.Collections;
using System.Security.Permissions;
///
/// [To be supplied.]
///
[HostProtection(SharedState = true)]
public class ListSortDescriptionCollection : IList {
ArrayList sorts = new ArrayList();
///
/// [To be supplied.]
///
public ListSortDescriptionCollection() {
}
///
/// [To be supplied.]
///
public ListSortDescriptionCollection(ListSortDescription[] sorts) {
if (sorts != null) {
for (int i = 0; i < sorts.Length; i ++) {
this.sorts.Add(sorts[i]);
}
}
}
///
/// [To be supplied.]
///
public ListSortDescription this[int index] {
get {
return (ListSortDescription) sorts[index];
}
set {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
}
// IList implementation
//
///
/// [To be supplied.]
///
bool IList.IsFixedSize {
get {
return true;
}
}
///
/// [To be supplied.]
///
bool IList.IsReadOnly {
get {
return true;
}
}
///
/// [To be supplied.]
///
object IList.this[int index] {
get {
return this[index];
}
set {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
}
///
/// [To be supplied.]
///
int IList.Add(object value) {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
///
/// [To be supplied.]
///
void IList.Clear() {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
///
/// [To be supplied.]
///
public bool Contains(object value) {
return ((IList)this.sorts).Contains(value);
}
///
/// [To be supplied.]
///
public int IndexOf(object value) {
return ((IList)this.sorts).IndexOf(value);
}
///
/// [To be supplied.]
///
void IList.Insert(int index, object value) {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
///
/// [To be supplied.]
///
void IList.Remove(object value) {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
///
/// [To be supplied.]
///
void IList.RemoveAt(int index) {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
// ICollection
//
///
/// [To be supplied.]
///
public int Count {
get {
return this.sorts.Count;
}
}
///
/// [To be supplied.]
///
bool ICollection.IsSynchronized {
get {
// true because after the constructor finished running the ListSortDescriptionCollection is Read Only
return true;
}
}
///
/// [To be supplied.]
///
object ICollection.SyncRoot {
get {
return this;
}
}
///
/// [To be supplied.]
///
public void CopyTo(Array array, int index) {
this.sorts.CopyTo(array, index);
}
// IEnumerable
//
///
/// [To be supplied.]
///
IEnumerator IEnumerable.GetEnumerator() {
return this.sorts.GetEnumerator();
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.ComponentModel {
using System.Collections;
using System.Security.Permissions;
///
/// [To be supplied.]
///
[HostProtection(SharedState = true)]
public class ListSortDescriptionCollection : IList {
ArrayList sorts = new ArrayList();
///
/// [To be supplied.]
///
public ListSortDescriptionCollection() {
}
///
/// [To be supplied.]
///
public ListSortDescriptionCollection(ListSortDescription[] sorts) {
if (sorts != null) {
for (int i = 0; i < sorts.Length; i ++) {
this.sorts.Add(sorts[i]);
}
}
}
///
/// [To be supplied.]
///
public ListSortDescription this[int index] {
get {
return (ListSortDescription) sorts[index];
}
set {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
}
// IList implementation
//
///
/// [To be supplied.]
///
bool IList.IsFixedSize {
get {
return true;
}
}
///
/// [To be supplied.]
///
bool IList.IsReadOnly {
get {
return true;
}
}
///
/// [To be supplied.]
///
object IList.this[int index] {
get {
return this[index];
}
set {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
}
///
/// [To be supplied.]
///
int IList.Add(object value) {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
///
/// [To be supplied.]
///
void IList.Clear() {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
///
/// [To be supplied.]
///
public bool Contains(object value) {
return ((IList)this.sorts).Contains(value);
}
///
/// [To be supplied.]
///
public int IndexOf(object value) {
return ((IList)this.sorts).IndexOf(value);
}
///
/// [To be supplied.]
///
void IList.Insert(int index, object value) {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
///
/// [To be supplied.]
///
void IList.Remove(object value) {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
///
/// [To be supplied.]
///
void IList.RemoveAt(int index) {
throw new InvalidOperationException(SR.GetString(SR.CantModifyListSortDescriptionCollection));
}
// ICollection
//
///
/// [To be supplied.]
///
public int Count {
get {
return this.sorts.Count;
}
}
///
/// [To be supplied.]
///
bool ICollection.IsSynchronized {
get {
// true because after the constructor finished running the ListSortDescriptionCollection is Read Only
return true;
}
}
///
/// [To be supplied.]
///
object ICollection.SyncRoot {
get {
return this;
}
}
///
/// [To be supplied.]
///
public void CopyTo(Array array, int index) {
this.sorts.CopyTo(array, index);
}
// IEnumerable
//
///
/// [To be supplied.]
///
IEnumerator IEnumerable.GetEnumerator() {
return this.sorts.GetEnumerator();
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XamlFigureLengthSerializer.cs
- XmlAggregates.cs
- DomainUpDown.cs
- MultiByteCodec.cs
- BitmapSource.cs
- InOutArgumentConverter.cs
- RtType.cs
- FixUp.cs
- DesignTimeTemplateParser.cs
- TdsParser.cs
- SqlConnectionStringBuilder.cs
- SecurityManager.cs
- BooleanFacetDescriptionElement.cs
- TransformGroup.cs
- FixedFindEngine.cs
- ResourceDictionary.cs
- controlskin.cs
- ButtonField.cs
- Schema.cs
- WebPartConnectionsDisconnectVerb.cs
- Padding.cs
- DoubleLinkListEnumerator.cs
- SoapConverter.cs
- LocalizedNameDescriptionPair.cs
- MissingFieldException.cs
- HttpHandlerAction.cs
- documentsequencetextcontainer.cs
- ProcessHostFactoryHelper.cs
- MappingModelBuildProvider.cs
- GB18030Encoding.cs
- SqlDataReader.cs
- MessageParameterAttribute.cs
- DependencyPropertyHelper.cs
- ExtendedPropertyDescriptor.cs
- SqlDependencyUtils.cs
- NameValueConfigurationElement.cs
- XmlSchemaSimpleContent.cs
- Exception.cs
- FaultContractInfo.cs
- Constants.cs
- ExpressionBuilder.cs
- UnderstoodHeaders.cs
- JournalEntryListConverter.cs
- FilteredReadOnlyMetadataCollection.cs
- AnimationTimeline.cs
- MethodExpr.cs
- ConvertTextFrag.cs
- ListItemViewAttribute.cs
- ItemMap.cs
- HttpCapabilitiesEvaluator.cs
- Internal.cs
- DataGridCheckBoxColumn.cs
- ChangeDirector.cs
- CharUnicodeInfo.cs
- ResourceType.cs
- DropShadowBitmapEffect.cs
- RequestCacheValidator.cs
- XmlCustomFormatter.cs
- WebPartZoneBase.cs
- DataGridViewRowPrePaintEventArgs.cs
- ImageSource.cs
- CursorConverter.cs
- WaitHandleCannotBeOpenedException.cs
- BindingListCollectionView.cs
- CellTreeNode.cs
- HostProtectionPermission.cs
- RuntimeHelpers.cs
- ObjectDataSourceView.cs
- ComplexBindingPropertiesAttribute.cs
- XmlDataCollection.cs
- GenericIdentity.cs
- DataGridViewComboBoxEditingControl.cs
- DataGridViewSelectedColumnCollection.cs
- Version.cs
- DocumentOrderQuery.cs
- DesignerGenericWebPart.cs
- SystemFonts.cs
- Encoding.cs
- SchemaNamespaceManager.cs
- XamlParser.cs
- XmlRawWriter.cs
- ExpressionConverter.cs
- CollectionViewGroupRoot.cs
- OdbcFactory.cs
- EntityDataSourceDataSelectionPanel.cs
- ipaddressinformationcollection.cs
- SqlCacheDependencyDatabaseCollection.cs
- SafeFindHandle.cs
- CheckBox.cs
- ArraySortHelper.cs
- indexingfiltermarshaler.cs
- DragEvent.cs
- PermissionRequestEvidence.cs
- Soap.cs
- HttpClientCertificate.cs
- RolePrincipal.cs
- CodeTypeDelegate.cs
- ComplexType.cs
- SudsWriter.cs
- LocalFileSettingsProvider.cs