Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media / textformatting / TextSpan.cs / 1 / TextSpan.cs
//------------------------------------------------------------------------
//
// Microsoft Windows Client Platform
// Copyright (C) Microsoft Corporation
//
// File: TextSpan.cs
//
// Contents: A simple pairing of an object of type T and a run length
//
// Spec: http://team/sites/Avalon/Specs/Text%20Formatting%20API.doc
//
// Created: 2-5-2004 Worachai Chaoweeraprasit (wchao)
//
//-----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace System.Windows.Media.TextFormatting
{
///
/// A simple pairing of an object of type T and a run length
///
public class TextSpan
{
private int _length;
private T _value;
///
/// Construct an object/length pairing
///
/// run length
/// value
public TextSpan(
int length,
T value
)
{
_length = length;
_value = value;
}
///
/// Number of characters in span
///
public int Length
{
get { return _length; }
}
///
/// Value associated with span
///
public T Value
{
get { return _value; }
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------
//
// Microsoft Windows Client Platform
// Copyright (C) Microsoft Corporation
//
// File: TextSpan.cs
//
// Contents: A simple pairing of an object of type T and a run length
//
// Spec: http://team/sites/Avalon/Specs/Text%20Formatting%20API.doc
//
// Created: 2-5-2004 Worachai Chaoweeraprasit (wchao)
//
//-----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace System.Windows.Media.TextFormatting
{
///
/// A simple pairing of an object of type T and a run length
///
public class TextSpan
{
private int _length;
private T _value;
///
/// Construct an object/length pairing
///
/// run length
/// value
public TextSpan(
int length,
T value
)
{
_length = length;
_value = value;
}
///
/// Number of characters in span
///
public int Length
{
get { return _length; }
}
///
/// Value associated with span
///
public T Value
{
get { return _value; }
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataGridViewHeaderCell.cs
- DataSourceExpression.cs
- RunWorkerCompletedEventArgs.cs
- log.cs
- input.cs
- PermissionToken.cs
- Attributes.cs
- LookupBindingPropertiesAttribute.cs
- AlignmentYValidation.cs
- DriveInfo.cs
- OracleBinary.cs
- QilValidationVisitor.cs
- DocumentPageHost.cs
- Volatile.cs
- WorkBatch.cs
- WsatServiceCertificate.cs
- RelatedCurrencyManager.cs
- DrawingBrush.cs
- FormViewInsertedEventArgs.cs
- DbConvert.cs
- MessagingDescriptionAttribute.cs
- DataGridDesigner.cs
- InternalSafeNativeMethods.cs
- TextTreeRootNode.cs
- WriteableOnDemandPackagePart.cs
- BulletedListEventArgs.cs
- PathStreamGeometryContext.cs
- FormViewPagerRow.cs
- Stylesheet.cs
- SettingsProviderCollection.cs
- HwndAppCommandInputProvider.cs
- HttpCookiesSection.cs
- FillErrorEventArgs.cs
- BufferedOutputAsyncStream.cs
- PageAsyncTaskManager.cs
- PropertyMapper.cs
- SQLByte.cs
- VScrollBar.cs
- SerialPort.cs
- NameValuePermission.cs
- CollectionBase.cs
- SqlInternalConnectionSmi.cs
- ParserStreamGeometryContext.cs
- InternalPolicyElement.cs
- DataGridViewElement.cs
- TextRange.cs
- ColorConverter.cs
- ImageEditor.cs
- DataPointer.cs
- RegexRunnerFactory.cs
- RepeaterItemEventArgs.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- ToolStripContainer.cs
- AssemblyInfo.cs
- HttpListenerRequestUriBuilder.cs
- NativeMethods.cs
- Style.cs
- DesignerDataView.cs
- HasCopySemanticsAttribute.cs
- RawTextInputReport.cs
- ExpressionTextBoxAutomationPeer.cs
- MdImport.cs
- ValidationEventArgs.cs
- ToolStripPanel.cs
- AttributeXamlType.cs
- ResourceCategoryAttribute.cs
- NumberSubstitution.cs
- Animatable.cs
- OLEDB_Util.cs
- SafeNativeMethods.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- PhoneCallDesigner.cs
- PresentationSource.cs
- DrawingImage.cs
- CommonRemoteMemoryBlock.cs
- Animatable.cs
- ComponentChangedEvent.cs
- ObfuscationAttribute.cs
- BulletedList.cs
- XmlWriterTraceListener.cs
- AddInEnvironment.cs
- ConfigurationLocationCollection.cs
- DPCustomTypeDescriptor.cs
- SplineQuaternionKeyFrame.cs
- OleServicesContext.cs
- AutomationPatternInfo.cs
- Int32KeyFrameCollection.cs
- FontDifferentiator.cs
- Cursor.cs
- WsdlWriter.cs
- ExtensibleClassFactory.cs
- SchemaLookupTable.cs
- XamlVector3DCollectionSerializer.cs
- webproxy.cs
- RuleConditionDialog.cs
- COM2ComponentEditor.cs
- ProfileGroupSettings.cs
- PiiTraceSource.cs
- XD.cs
- DragCompletedEventArgs.cs