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
- BitmapEffectCollection.cs
- GcSettings.cs
- URLIdentityPermission.cs
- LinearGradientBrush.cs
- SchemaImporter.cs
- RC2.cs
- ThreadInterruptedException.cs
- DrawingAttributeSerializer.cs
- NameValuePermission.cs
- BypassElementCollection.cs
- PrePostDescendentsWalker.cs
- indexingfiltermarshaler.cs
- XhtmlConformanceSection.cs
- HostProtectionPermission.cs
- XmlDesignerDataSourceView.cs
- WebPartMenu.cs
- SHA1Managed.cs
- DesignBindingPropertyDescriptor.cs
- OdbcConnectionOpen.cs
- AutoResetEvent.cs
- ProfilePropertySettingsCollection.cs
- BooleanStorage.cs
- AccessControlList.cs
- EdmToObjectNamespaceMap.cs
- CompoundFileReference.cs
- _NetRes.cs
- AdRotator.cs
- CloseCollectionAsyncResult.cs
- ThreadPool.cs
- SecureStringHasher.cs
- PKCS1MaskGenerationMethod.cs
- SystemPens.cs
- BinaryCommonClasses.cs
- SettingsPropertyCollection.cs
- DataGridViewAdvancedBorderStyle.cs
- ToolStrip.cs
- ClientTargetSection.cs
- XmlRootAttribute.cs
- MessageSecurityOverMsmq.cs
- InvalidOperationException.cs
- DashStyle.cs
- NameValueSectionHandler.cs
- ThicknessAnimationBase.cs
- XamlUtilities.cs
- FilterQueryOptionExpression.cs
- NullRuntimeConfig.cs
- InternalControlCollection.cs
- Claim.cs
- DataRowComparer.cs
- ListSourceHelper.cs
- QueryCoreOp.cs
- wgx_render.cs
- VSWCFServiceContractGenerator.cs
- XmlSignatureProperties.cs
- ModelVisual3D.cs
- UshortList2.cs
- invalidudtexception.cs
- XPathAxisIterator.cs
- RegisteredExpandoAttribute.cs
- MenuTracker.cs
- SecUtil.cs
- NonClientArea.cs
- TabControlCancelEvent.cs
- HwndTarget.cs
- SimplePropertyEntry.cs
- ProxyWebPartManagerDesigner.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- ListViewUpdatedEventArgs.cs
- Compiler.cs
- LabelDesigner.cs
- Quaternion.cs
- RequestCacheManager.cs
- Rfc2898DeriveBytes.cs
- WorkflowOwnerAsyncResult.cs
- Floater.cs
- XmlSortKey.cs
- AnnouncementDispatcherAsyncResult.cs
- safePerfProviderHandle.cs
- FastPropertyAccessor.cs
- EmbossBitmapEffect.cs
- mediaclock.cs
- CssStyleCollection.cs
- TextBoxRenderer.cs
- DataRecordInternal.cs
- TypedTableHandler.cs
- TemplatedMailWebEventProvider.cs
- DocumentOrderComparer.cs
- uribuilder.cs
- PortCache.cs
- IPAddressCollection.cs
- BrowserCapabilitiesFactoryBase.cs
- StringDictionaryWithComparer.cs
- RegularExpressionValidator.cs
- EdmSchemaError.cs
- ConnectionPointCookie.cs
- DrawingState.cs
- _IPv4Address.cs
- RegexReplacement.cs
- InputScope.cs
- PartialTrustHelpers.cs