Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Security / Cryptography / RandomNumberGenerator.cs / 1305376 / RandomNumberGenerator.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //[....] // // // RandomNumberGenerator.cs // namespace System.Security.Cryptography { #if !FEATURE_CORECLR && !SILVERLIGHT [System.Runtime.InteropServices.ComVisible(true)] #endif // !FEATURE_CORECLR && !SILVERLIGHT public abstract class RandomNumberGenerator // On Orcas RandomNumberGenerator is not disposable, so we cannot add the IDisposable implementation to the // CoreCLR mscorlib. However, this type does need to be disposable since subtypes can and do hold onto // native resources. Therefore, on desktop mscorlibs we add an IDisposable implementation. #if !FEATURE_CORECLR : IDisposable #endif // !FEATURE_CORECLR { protected RandomNumberGenerator() { } // // public methods // #if !FEATURE_CORECLR && !SILVERLIGHT && !CORIOLIS [System.Security.SecuritySafeCritical] // auto-generated static public RandomNumberGenerator Create() { return Create("System.Security.Cryptography.RandomNumberGenerator"); } [System.Security.SecuritySafeCritical] // auto-generated static public RandomNumberGenerator Create(String rngName) { return (RandomNumberGenerator) CryptoConfig.CreateFromName(rngName); } #endif // !FEATURE_CORECLR && !SILVERLIGHT && !CORIOLIS public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose(bool disposing) { return; } public abstract void GetBytes(byte[] data); #if !FEATURE_CORECLR && !SILVERLIGHT public abstract void GetNonZeroBytes(byte[] data); #endif // !FEATURE_CORECLR && !SILVERLIGHT } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //[....] // // // RandomNumberGenerator.cs // namespace System.Security.Cryptography { #if !FEATURE_CORECLR && !SILVERLIGHT [System.Runtime.InteropServices.ComVisible(true)] #endif // !FEATURE_CORECLR && !SILVERLIGHT public abstract class RandomNumberGenerator // On Orcas RandomNumberGenerator is not disposable, so we cannot add the IDisposable implementation to the // CoreCLR mscorlib. However, this type does need to be disposable since subtypes can and do hold onto // native resources. Therefore, on desktop mscorlibs we add an IDisposable implementation. #if !FEATURE_CORECLR : IDisposable #endif // !FEATURE_CORECLR { protected RandomNumberGenerator() { } // // public methods // #if !FEATURE_CORECLR && !SILVERLIGHT && !CORIOLIS [System.Security.SecuritySafeCritical] // auto-generated static public RandomNumberGenerator Create() { return Create("System.Security.Cryptography.RandomNumberGenerator"); } [System.Security.SecuritySafeCritical] // auto-generated static public RandomNumberGenerator Create(String rngName) { return (RandomNumberGenerator) CryptoConfig.CreateFromName(rngName); } #endif // !FEATURE_CORECLR && !SILVERLIGHT && !CORIOLIS public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose(bool disposing) { return; } public abstract void GetBytes(byte[] data); #if !FEATURE_CORECLR && !SILVERLIGHT public abstract void GetNonZeroBytes(byte[] data); #endif // !FEATURE_CORECLR && !SILVERLIGHT } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StringConverter.cs
- SafeThemeHandle.cs
- Profiler.cs
- MachineKeyConverter.cs
- MemoryStream.cs
- LineServices.cs
- BrowserInteropHelper.cs
- XamlStyleSerializer.cs
- BindingsCollection.cs
- PrintPreviewControl.cs
- XmlNamedNodeMap.cs
- ElasticEase.cs
- TailPinnedEventArgs.cs
- BindMarkupExtensionSerializer.cs
- DesignerVerb.cs
- ImpersonationContext.cs
- SemanticAnalyzer.cs
- XmlNamespaceMappingCollection.cs
- ISAPIRuntime.cs
- OleDbRowUpdatingEvent.cs
- SqlException.cs
- AliasGenerator.cs
- Vector3dCollection.cs
- ProcessThread.cs
- VirtualDirectoryMapping.cs
- XmlStreamStore.cs
- CurrencyManager.cs
- ParserHooks.cs
- GetLedgerEntryForRecipientRequest.cs
- ObjectViewFactory.cs
- HashStream.cs
- HttpUnhandledOperationInvoker.cs
- RequestQueryProcessor.cs
- TdsParser.cs
- MutableAssemblyCacheEntry.cs
- RewritingProcessor.cs
- SocketException.cs
- Drawing.cs
- ExclusiveTcpTransportManager.cs
- TwoPhaseCommitProxy.cs
- SoapIgnoreAttribute.cs
- HandlerBase.cs
- Pair.cs
- RegexBoyerMoore.cs
- ProxyHwnd.cs
- CapabilitiesPattern.cs
- CodeAccessSecurityEngine.cs
- ProviderUtil.cs
- WebBrowserSiteBase.cs
- DependentTransaction.cs
- WarningException.cs
- StaticDataManager.cs
- CallbackException.cs
- MatrixConverter.cs
- CurrentChangingEventArgs.cs
- RouteParametersHelper.cs
- TickBar.cs
- ImageFormatConverter.cs
- WebPartVerbCollection.cs
- FormatSelectingMessageInspector.cs
- Freezable.cs
- UrlPropertyAttribute.cs
- ValidationRule.cs
- NGCPageContentCollectionSerializerAsync.cs
- Comparer.cs
- AuthenticationModuleElement.cs
- TableRow.cs
- TemplatedMailWebEventProvider.cs
- DbConnectionStringBuilder.cs
- SiteMapNodeItemEventArgs.cs
- RowTypePropertyElement.cs
- TraceSection.cs
- VisualTreeHelper.cs
- DBSchemaTable.cs
- CheckBoxRenderer.cs
- FigureParagraph.cs
- XmlWrappingReader.cs
- COM2PropertyDescriptor.cs
- ControlCollection.cs
- BitmapFrameDecode.cs
- RelationshipEndCollection.cs
- MetroSerializationManager.cs
- SetterBaseCollection.cs
- FixUp.cs
- ParseHttpDate.cs
- DataGridViewCellEventArgs.cs
- MessageAction.cs
- PageTheme.cs
- Encoder.cs
- DataTablePropertyDescriptor.cs
- System.Data_BID.cs
- FixedPageStructure.cs
- ListItemCollection.cs
- IteratorFilter.cs
- ObsoleteAttribute.cs
- CursorConverter.cs
- BinaryKeyIdentifierClause.cs
- CompareInfo.cs
- SerialPinChanges.cs
- CodeLinePragma.cs