Code:
/ 4.0 / 4.0 / 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. 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
- HMAC.cs
- FindRequestContext.cs
- HttpAsyncResult.cs
- BoundColumn.cs
- EnvelopedPkcs7.cs
- AccessKeyManager.cs
- TreeViewEvent.cs
- IdleTimeoutMonitor.cs
- SamlAssertion.cs
- FileDialogCustomPlaces.cs
- AxisAngleRotation3D.cs
- DivideByZeroException.cs
- HttpServerVarsCollection.cs
- NodeLabelEditEvent.cs
- CharUnicodeInfo.cs
- RenderData.cs
- DuplicateWaitObjectException.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- HttpServerVarsCollection.cs
- FlowDocument.cs
- ChtmlMobileTextWriter.cs
- CodeStatement.cs
- PropertyEmitterBase.cs
- ContentIterators.cs
- EnvelopedSignatureTransform.cs
- ACL.cs
- InvokePatternIdentifiers.cs
- TextTreeFixupNode.cs
- HttpPostServerProtocol.cs
- CodeSnippetExpression.cs
- RuntimeArgumentHandle.cs
- Base64Encoder.cs
- DebugView.cs
- DataGridViewRowPrePaintEventArgs.cs
- PropertyStore.cs
- PointAnimationClockResource.cs
- QueryMatcher.cs
- ToolStripItem.cs
- TextBounds.cs
- Matrix3DStack.cs
- CodeTypeDeclaration.cs
- LocalFileSettingsProvider.cs
- CodePropertyReferenceExpression.cs
- GroupBoxAutomationPeer.cs
- PreservationFileReader.cs
- _LoggingObject.cs
- PrivilegedConfigurationManager.cs
- Thickness.cs
- ControlUtil.cs
- AsymmetricSignatureDeformatter.cs
- HttpRequestTraceRecord.cs
- MainMenu.cs
- EntityDataSourceWrapper.cs
- VolatileEnlistmentState.cs
- Evaluator.cs
- ResourceCategoryAttribute.cs
- DateTimeOffsetConverter.cs
- MaxSessionCountExceededException.cs
- Debug.cs
- RtfControls.cs
- CategoryNameCollection.cs
- CacheEntry.cs
- PiiTraceSource.cs
- JoinCqlBlock.cs
- HttpContextServiceHost.cs
- RewritingProcessor.cs
- ObjectPropertyMapping.cs
- PropertyTabAttribute.cs
- EmptyCollection.cs
- Normalization.cs
- IDReferencePropertyAttribute.cs
- PageParserFilter.cs
- WebEvents.cs
- ResizeBehavior.cs
- HierarchicalDataBoundControlAdapter.cs
- QueryOutputWriter.cs
- CalendarButton.cs
- EventEntry.cs
- UnionCodeGroup.cs
- XhtmlBasicValidatorAdapter.cs
- CommonProperties.cs
- UnsafeNetInfoNativeMethods.cs
- PageContentCollection.cs
- BitmapEffectDrawingContextState.cs
- ElementMarkupObject.cs
- DataGridViewRowHeaderCell.cs
- ClientTargetCollection.cs
- altserialization.cs
- DataSourceHelper.cs
- QuaternionRotation3D.cs
- DataGridViewComboBoxColumn.cs
- AuthorizationPolicyTypeElementCollection.cs
- DBConnectionString.cs
- TextBounds.cs
- Hashtable.cs
- WebPartDisplayModeEventArgs.cs
- SQLUtility.cs
- X509Certificate2Collection.cs
- MaskInputRejectedEventArgs.cs
- SecurityUtils.cs