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
- DbConnectionStringCommon.cs
- HtmlListAdapter.cs
- ConstantCheck.cs
- FontSource.cs
- Base64Decoder.cs
- SettingsPropertyValue.cs
- SafeRsaProviderHandle.cs
- HttpRuntime.cs
- PingReply.cs
- ModelTypeConverter.cs
- ConsumerConnectionPoint.cs
- safesecurityhelperavalon.cs
- XmlSchemas.cs
- TraceFilter.cs
- BindingListCollectionView.cs
- Assembly.cs
- _DigestClient.cs
- CultureInfo.cs
- DataDocumentXPathNavigator.cs
- Asn1IntegerConverter.cs
- FolderBrowserDialogDesigner.cs
- ResourceDisplayNameAttribute.cs
- KerberosReceiverSecurityToken.cs
- ISSmlParser.cs
- PersonalizationProvider.cs
- InputBinding.cs
- ClipboardData.cs
- BuildProviderUtils.cs
- XmlNotation.cs
- ExpressionWriter.cs
- OdbcException.cs
- ReadOnlyAttribute.cs
- BitmapFrameDecode.cs
- RequestUriProcessor.cs
- ZipIOLocalFileDataDescriptor.cs
- LogArchiveSnapshot.cs
- NodeInfo.cs
- DataGridViewCellStyleChangedEventArgs.cs
- ImageList.cs
- TemplatePartAttribute.cs
- HeaderCollection.cs
- BitmapCacheBrush.cs
- AssociationSetEnd.cs
- XmlTextReaderImplHelpers.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- COAUTHINFO.cs
- validation.cs
- BamlLocalizer.cs
- EventProviderWriter.cs
- MembershipPasswordException.cs
- SecurityKeyType.cs
- SystemNetHelpers.cs
- cookieexception.cs
- XmlQualifiedName.cs
- DataGridViewColumnStateChangedEventArgs.cs
- NativeCppClassAttribute.cs
- MaterializeFromAtom.cs
- MethodBody.cs
- PackageStore.cs
- EndPoint.cs
- WizardPanel.cs
- TransformedBitmap.cs
- ConfigPathUtility.cs
- PassportIdentity.cs
- AssemblyInfo.cs
- UnsafeNativeMethods.cs
- SimpleTypeResolver.cs
- FontDriver.cs
- SchemaMapping.cs
- MetafileHeaderWmf.cs
- RestClientProxyHandler.cs
- SQLMembershipProvider.cs
- PersonalizationProviderHelper.cs
- DoubleCollectionConverter.cs
- TreeChangeInfo.cs
- RegexWorker.cs
- WebEventCodes.cs
- Clause.cs
- XmlSchemaRedefine.cs
- ChannelManagerBase.cs
- ThicknessAnimationBase.cs
- TypeUsageBuilder.cs
- SqlDataSource.cs
- CustomAttribute.cs
- RefType.cs
- SecurityResources.cs
- DummyDataSource.cs
- TimeoutException.cs
- SerializationSectionGroup.cs
- ToolboxItemAttribute.cs
- TreeNodeStyle.cs
- TableHeaderCell.cs
- HwndTarget.cs
- XsdDataContractImporter.cs
- ExpandableObjectConverter.cs
- WebScriptClientGenerator.cs
- HelloMessageCD1.cs
- Compiler.cs
- UserControl.cs
- AssemblyUtil.cs