Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Markup / BamlBinaryWriter.cs / 1 / BamlBinaryWriter.cs
/****************************************************************************\ * * File: BamlBinaryWriter.cs * * Purpose: Subclass BinaryWriter. * * Copyright (C) 2006 by Microsoft Corporation. All rights reserved. * \***************************************************************************/ using System; using System.IO; using System.Text; #if PBTCOMPILER namespace MS.Internal.Markup #else namespace System.Windows.Markup #endif { internal class BamlBinaryWriter: BinaryWriter { public BamlBinaryWriter(Stream stream, Encoding code) :base(stream, code) { } public new void Write7BitEncodedInt(int value) { base.Write7BitEncodedInt(value); } public static int SizeOf7bitEncodedSize(int size) { const int _7bits = 0x7F; const int _14bits = ( _7bits << 7) | _7bits; const int _21bits = (_14bits << 7) | _7bits; const int _28bits = (_21bits << 7) | _7bits; if (0 == (size & ~_7bits)) return 1; if (0 == (size & ~_14bits)) return 2; if (0 == (size & ~_21bits)) return 3; if (0 == (size & ~_28bits)) return 4; return 5; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. /****************************************************************************\ * * File: BamlBinaryWriter.cs * * Purpose: Subclass BinaryWriter. * * Copyright (C) 2006 by Microsoft Corporation. All rights reserved. * \***************************************************************************/ using System; using System.IO; using System.Text; #if PBTCOMPILER namespace MS.Internal.Markup #else namespace System.Windows.Markup #endif { internal class BamlBinaryWriter: BinaryWriter { public BamlBinaryWriter(Stream stream, Encoding code) :base(stream, code) { } public new void Write7BitEncodedInt(int value) { base.Write7BitEncodedInt(value); } public static int SizeOf7bitEncodedSize(int size) { const int _7bits = 0x7F; const int _14bits = ( _7bits << 7) | _7bits; const int _21bits = (_14bits << 7) | _7bits; const int _28bits = (_21bits << 7) | _7bits; if (0 == (size & ~_7bits)) return 1; if (0 == (size & ~_14bits)) return 2; if (0 == (size & ~_21bits)) return 3; if (0 == (size & ~_28bits)) return 4; return 5; } } } // 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
- EmptyImpersonationContext.cs
- PersonalizationState.cs
- TableRowCollection.cs
- Underline.cs
- Imaging.cs
- ParallelDesigner.cs
- ArraySegment.cs
- CellCreator.cs
- SafeReadContext.cs
- TransactionFilter.cs
- ArgumentsParser.cs
- DiscoveryServerProtocol.cs
- SqlReorderer.cs
- DesignTimeTemplateParser.cs
- InvokePatternIdentifiers.cs
- TextTreeText.cs
- SharedUtils.cs
- _IPv4Address.cs
- AppSettingsExpressionBuilder.cs
- RuleInfoComparer.cs
- ResourceContainerWrapper.cs
- BamlTreeUpdater.cs
- RelativeSource.cs
- SecurityPolicySection.cs
- XmlCountingReader.cs
- DbConnectionFactory.cs
- ReachDocumentSequenceSerializer.cs
- ListView.cs
- PropertyEmitter.cs
- RequestQueryProcessor.cs
- UIElementCollection.cs
- UpDownBaseDesigner.cs
- MatrixAnimationUsingPath.cs
- EntityCommandDefinition.cs
- HtmlButton.cs
- ConnectionAcceptor.cs
- MatchingStyle.cs
- DesignTimeXamlWriter.cs
- BulletedListEventArgs.cs
- DragDrop.cs
- XPathAxisIterator.cs
- WebMessageFormatHelper.cs
- HttpProfileGroupBase.cs
- WorkflowEventArgs.cs
- Sql8ExpressionRewriter.cs
- MultiDataTrigger.cs
- GeneralTransformGroup.cs
- NativeMethods.cs
- SqlParameter.cs
- DrawingBrush.cs
- TypeSemantics.cs
- SByteStorage.cs
- XmlNodeReader.cs
- SessionPageStateSection.cs
- NamespaceImport.cs
- RequestCachePolicy.cs
- MetadataItem_Static.cs
- TypeDescriptorContext.cs
- DirtyTextRange.cs
- BindingContext.cs
- AdornerHitTestResult.cs
- GeneralTransform2DTo3D.cs
- XmlDictionaryReaderQuotas.cs
- DesigntimeLicenseContextSerializer.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- ObjectIDGenerator.cs
- PointConverter.cs
- ControlCachePolicy.cs
- EditorZone.cs
- UserControlAutomationPeer.cs
- OutputCacheSettings.cs
- UnsafeNativeMethods.cs
- ForwardPositionQuery.cs
- LinkTarget.cs
- PatternMatcher.cs
- LineServicesRun.cs
- DataRowExtensions.cs
- PropertyChangingEventArgs.cs
- BasicBrowserDialog.cs
- EntityDataSourceReferenceGroup.cs
- MD5HashHelper.cs
- CorrelationHandle.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- TextTreeObjectNode.cs
- XPathDocumentBuilder.cs
- WmlTextViewAdapter.cs
- PngBitmapDecoder.cs
- AnnotationDocumentPaginator.cs
- ExtensibleSyndicationObject.cs
- IgnoreDataMemberAttribute.cs
- columnmapkeybuilder.cs
- NavigateUrlConverter.cs
- TypeExtensionConverter.cs
- Metafile.cs
- SqlNodeTypeOperators.cs
- SafeNativeMethods.cs
- xdrvalidator.cs
- MethodSignatureGenerator.cs
- RangeContentEnumerator.cs
- SqlInternalConnection.cs