Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Utility.cs / 1305376 / Utility.cs
namespace System.Workflow { using System; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; static class Utility { [SuppressMessage("Reliability", "Reliability113", Justification = "These are the core methods that should be used for all other Guid(string) calls.")] internal static Guid CreateGuid(string guidString) { bool success = false; Guid result = Guid.Empty; try { result = new Guid(guidString); success = true; } finally { if (!success) { Debug.Assert(false, "Creation of the Guid failed."); } } return result; } [SuppressMessage("Reliability", "Reliability113", Justification = "These are the core methods that should be used for all other Guid(string) calls.")] internal static bool TryCreateGuid(string guidString, out Guid result) { bool success = false; result = Guid.Empty; try { result = new Guid(guidString); success = true; } catch (ArgumentException) { // ---- this } catch (FormatException) { // ---- this } catch (OverflowException) { // ---- this } return success; } } } // 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
- Util.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- DBCommand.cs
- GetIndexBinder.cs
- FileChangeNotifier.cs
- ContextStaticAttribute.cs
- ColorDialog.cs
- FixedDocument.cs
- GridViewCommandEventArgs.cs
- EventWaitHandleSecurity.cs
- MsdtcWrapper.cs
- CopyAttributesAction.cs
- ViewGenerator.cs
- PermissionListSet.cs
- SkewTransform.cs
- BufferedGraphicsManager.cs
- SpecialNameAttribute.cs
- AvTraceFormat.cs
- OleDbInfoMessageEvent.cs
- ControlParser.cs
- Visual3D.cs
- CodeTryCatchFinallyStatement.cs
- SamlNameIdentifierClaimResource.cs
- Int32KeyFrameCollection.cs
- SessionEndedEventArgs.cs
- InputScopeNameConverter.cs
- CodeAttributeDeclaration.cs
- ParameterReplacerVisitor.cs
- precedingsibling.cs
- AssemblyAttributesGoHere.cs
- TextSpanModifier.cs
- StateItem.cs
- ButtonPopupAdapter.cs
- DifferencingCollection.cs
- StorageComplexTypeMapping.cs
- fixedPageContentExtractor.cs
- Int16Storage.cs
- WindowsFormsLinkLabel.cs
- SemanticKeyElement.cs
- WebPartConnectionCollection.cs
- HyperlinkAutomationPeer.cs
- OutgoingWebResponseContext.cs
- JsonReaderWriterFactory.cs
- ResourceExpressionEditor.cs
- DialogResultConverter.cs
- WsdlWriter.cs
- TraceEventCache.cs
- InteropBitmapSource.cs
- DataBindingList.cs
- DivideByZeroException.cs
- CodeLinePragma.cs
- MultiPartWriter.cs
- SoapSchemaExporter.cs
- InvalidAsynchronousStateException.cs
- oledbmetadatacolumnnames.cs
- ComAdminWrapper.cs
- SmiGettersStream.cs
- StringCollectionEditor.cs
- MessageBox.cs
- DataGridViewTopRowAccessibleObject.cs
- HttpCapabilitiesEvaluator.cs
- NavigatorInput.cs
- BoolExpression.cs
- HMACRIPEMD160.cs
- UnaryNode.cs
- FusionWrap.cs
- ThumbButtonInfo.cs
- X509ChainPolicy.cs
- HostedElements.cs
- ManipulationDelta.cs
- DataErrorValidationRule.cs
- TreeWalkHelper.cs
- iisPickupDirectory.cs
- FontCollection.cs
- BufferBuilder.cs
- PageCatalogPart.cs
- CodeNamespaceCollection.cs
- XmlSchemaElement.cs
- ToolStripSystemRenderer.cs
- CustomValidator.cs
- SettingsBindableAttribute.cs
- HttpVersion.cs
- BehaviorEditorPart.cs
- ClockGroup.cs
- ValueUnavailableException.cs
- recordstate.cs
- Msmq.cs
- BorderSidesEditor.cs
- ProfileServiceManager.cs
- ParseChildrenAsPropertiesAttribute.cs
- EntityTypeEmitter.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- InfoCardCryptoHelper.cs
- ControlLocalizer.cs
- MaterialCollection.cs
- ObjectSecurity.cs
- SymmetricKeyWrap.cs
- MemoryStream.cs
- PropertyGeneratedEventArgs.cs
- SchemaImporterExtension.cs