Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / TransactionBridge / Microsoft / Transactions / Wsat / Recovery / LogEntryHeaderv1Deserializer.cs / 1 / LogEntryHeaderv1Deserializer.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- // This file contains the class that represents a deserialized log entry using System; using System.Diagnostics; using System.IO; using Microsoft.Transactions.Bridge; using Microsoft.Transactions.Wsat.InputOutput; using Microsoft.Transactions.Wsat.Messaging; namespace Microsoft.Transactions.Wsat.Recovery { class LogEntryHeaderv1Deserializer : LogEntryHeaderDeserializer { Guid localTransactionId; public LogEntryHeaderv1Deserializer(MemoryStream mem, Guid localTransactionId) : base(mem) { this.localTransactionId = localTransactionId; } public override LogEntry DeserializeHeader() { // Flags LogEntryHeaderv1Flags flags = (LogEntryHeaderv1Flags) SerializationUtils.ReadByte(this.mem); if (DebugTrace.Verbose) { DebugTrace.Trace(TraceLevel.Verbose, "DeserializeHeader flags: {0}", flags); } CheckFlags(flags); // Remote transaction id string remoteTransactionId; if ((flags & LogEntryHeaderv1Flags.StandardRemoteTransactionId) == 0) { remoteTransactionId = SerializationUtils.ReadString(mem); } else { remoteTransactionId = CoordinationContext.CreateNativeIdentifier(this.localTransactionId); } // Local enlistmentId Guid localEnlistmentId = SerializationUtils.ReadGuid(this.mem); return new LogEntry(remoteTransactionId, this.localTransactionId, localEnlistmentId); } void CheckFlags(LogEntryHeaderv1Flags flags) { const LogEntryHeaderv1Flags allFlags = LogEntryHeaderv1Flags.StandardRemoteTransactionId; if ((flags | allFlags) != allFlags) { // Enum validation-- only one value is accepted. If a different value is // used, we can't trust the data and the safest thing to do is crash. DiagnosticUtility.FailFast("Invalid LogEntryHeaderv1Flags"); } } } } // 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
- PolyQuadraticBezierSegment.cs
- Converter.cs
- SqlInfoMessageEvent.cs
- WorkflowViewElement.cs
- Math.cs
- Condition.cs
- PnrpPermission.cs
- XsltException.cs
- FormsAuthenticationTicket.cs
- SoapObjectReader.cs
- log.cs
- EqualityComparer.cs
- NetworkAddressChange.cs
- XmlBoundElement.cs
- OdbcErrorCollection.cs
- StreamingContext.cs
- LambdaCompiler.cs
- ConstructorNeedsTagAttribute.cs
- ZipIOFileItemStream.cs
- _ProxyRegBlob.cs
- PenContexts.cs
- StyleBamlRecordReader.cs
- SmiConnection.cs
- SourceItem.cs
- Expressions.cs
- XamlGridLengthSerializer.cs
- SafeEventHandle.cs
- ChildDocumentBlock.cs
- HighContrastHelper.cs
- DecoderFallback.cs
- RelationshipConstraintValidator.cs
- ClientRuntimeConfig.cs
- NavigationProperty.cs
- UnicodeEncoding.cs
- ImageDesigner.cs
- PersistenceTypeAttribute.cs
- StandardOleMarshalObject.cs
- CqlIdentifiers.cs
- BindingExpression.cs
- SchemaNames.cs
- ServiceRouteHandler.cs
- IdleTimeoutMonitor.cs
- DragEventArgs.cs
- ElementNotEnabledException.cs
- ModelService.cs
- WeakEventManager.cs
- Descriptor.cs
- GridViewDesigner.cs
- IntSecurity.cs
- SimpleHandlerFactory.cs
- OutOfMemoryException.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- DoubleAnimationUsingKeyFrames.cs
- HtmlTableCell.cs
- IdentitySection.cs
- PointF.cs
- SymmetricAlgorithm.cs
- DataSourceHelper.cs
- SoapCodeExporter.cs
- UIElementParaClient.cs
- MethodImplAttribute.cs
- TdsEnums.cs
- TextMetrics.cs
- SizeIndependentAnimationStorage.cs
- validationstate.cs
- FixedNode.cs
- BeginStoryboard.cs
- CurrentChangedEventManager.cs
- XmlValueConverter.cs
- TableSectionStyle.cs
- XmlSortKeyAccumulator.cs
- CustomErrorCollection.cs
- SQLUtility.cs
- NamespaceQuery.cs
- ListViewItem.cs
- ItemsControl.cs
- DoubleConverter.cs
- BinHexEncoder.cs
- StackOverflowException.cs
- Html32TextWriter.cs
- ObjectItemCachedAssemblyLoader.cs
- HwndStylusInputProvider.cs
- DataContractSet.cs
- Matrix3D.cs
- ItemDragEvent.cs
- InvokeHandlers.cs
- TextSelectionProcessor.cs
- AtlasWeb.Designer.cs
- ViewStateException.cs
- FunctionQuery.cs
- TableColumn.cs
- MemberInfoSerializationHolder.cs
- EntityDataSourceContextDisposingEventArgs.cs
- SelectorItemAutomationPeer.cs
- IncrementalCompileAnalyzer.cs
- OdbcConnectionString.cs
- ControlOperationBehavior.cs
- BitmapDecoder.cs
- X509ClientCertificateAuthenticationElement.cs
- ToolStripControlHost.cs