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
- SelectionEditingBehavior.cs
- SecurityDocument.cs
- ZoneButton.cs
- FieldCollectionEditor.cs
- oledbconnectionstring.cs
- GridViewPageEventArgs.cs
- UserPersonalizationStateInfo.cs
- CultureNotFoundException.cs
- BitmapVisualManager.cs
- ZipArchive.cs
- LockedBorderGlyph.cs
- StickyNote.cs
- DeclaredTypeElement.cs
- CustomErrorCollection.cs
- XmlSerializerVersionAttribute.cs
- Models.cs
- ResolveResponse.cs
- Trace.cs
- FromRequest.cs
- DataGridViewHitTestInfo.cs
- CrossAppDomainChannel.cs
- CodeArrayCreateExpression.cs
- DocumentPageView.cs
- AttachedProperty.cs
- ActivitiesCollection.cs
- TraceUtils.cs
- TextRangeSerialization.cs
- IsolatedStorageFilePermission.cs
- EntityRecordInfo.cs
- MasterPageBuildProvider.cs
- VisualTarget.cs
- RunInstallerAttribute.cs
- StrokeIntersection.cs
- MessageSmuggler.cs
- GridLength.cs
- SinglePageViewer.cs
- SystemIPGlobalStatistics.cs
- SqlDataSourceDesigner.cs
- XpsFixedPageReaderWriter.cs
- XmlDownloadManager.cs
- FileDialogCustomPlaces.cs
- RequestCache.cs
- PackageRelationshipCollection.cs
- WebPartConnectVerb.cs
- PropertyCollection.cs
- ChangeToolStripParentVerb.cs
- TransactionTable.cs
- DefaultTypeArgumentAttribute.cs
- SqlDataReaderSmi.cs
- DataGridViewAccessibleObject.cs
- NeutralResourcesLanguageAttribute.cs
- GuidelineSet.cs
- SmiMetaDataProperty.cs
- ElementInit.cs
- PersonalizableTypeEntry.cs
- QueryContinueDragEventArgs.cs
- TextTabProperties.cs
- ASCIIEncoding.cs
- SEHException.cs
- CodeVariableDeclarationStatement.cs
- TypeContext.cs
- SocketException.cs
- Ray3DHitTestResult.cs
- ChildDocumentBlock.cs
- _Events.cs
- HttpWebResponse.cs
- TdsParserStateObject.cs
- Int32Rect.cs
- Column.cs
- SelectionHighlightInfo.cs
- HandlerMappingMemo.cs
- SystemSounds.cs
- unitconverter.cs
- Vector3DAnimationUsingKeyFrames.cs
- DecoderReplacementFallback.cs
- HuffModule.cs
- ReadOnlyTernaryTree.cs
- FilterableAttribute.cs
- BasicCellRelation.cs
- EntityClientCacheKey.cs
- ForeignKeyConstraint.cs
- AdCreatedEventArgs.cs
- UserThread.cs
- Profiler.cs
- DeflateStream.cs
- RepeatButton.cs
- XmlSchemaObject.cs
- ExternalException.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- BrowserCapabilitiesCodeGenerator.cs
- ToolStripOverflowButton.cs
- RSACryptoServiceProvider.cs
- MultiSelectRootGridEntry.cs
- PermissionListSet.cs
- BitmapMetadataEnumerator.cs
- webproxy.cs
- ScrollChrome.cs
- SafeRightsManagementPubHandle.cs
- HostedElements.cs
- GridViewUpdatedEventArgs.cs