ExternalRandomGenerator MembersNFX Class Library

[This is preliminary documentation and is subject to change.]

The ExternalRandomGenerator type exposes the following members.
Constructors

  NameDescription
Public methodExternalRandomGenerator
Create new instance of ExternalRandomGenerator. Create new instances only if you need to use different sample ring buffers. In majority of cases use ExternalRandomGenerator.Instance to use default instance instead of creating a new instance. Default instance is thread-safe for process-wide use
Back to Top
Methods

  NameDescription
Public methodOnlineEquals
Determines whether the specified object is equal to the current object.
(Inherited from OnlineObject.)
Public methodFeedExternalEntropySample
Introduces external entropy into the generation sequence by adding a sample into the ring buffer. Call this method from places that have true entropy values, i.e. a network-related code may have good entropy sources in server applications. External entropy sources may rely on user-dependent actions, i.e.: number of bytes/requests received per second, dollar(or cent remainders) amount of purchases made (on a server), zip codes of customers, IP addresses of site visitors, average noise level sampled on an open WAVE device(microphone), mouse position (i.e. in GUI app) etc...
Protected methodOnlineFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from OnlineObject.)
Public methodOnlineGetHashCode
Serves as the default hash function.
(Inherited from OnlineObject.)
Public methodOnlineGetType
Gets the OnlineType of the current instance.
(Inherited from OnlineObject.)
Protected methodOnlineMemberwiseClone
Creates a shallow copy of the current OnlineObject.
(Inherited from OnlineObject.)
Public methodNextRandomBytes(Int32)
Generates a random buffer of bytes
Public methodNextRandomBytes(Int32, Int32)
Generates a random buffer of bytes
Public methodNextRandomSecureBuffer(Int32)
Generates a random secure buffer of bytes
Public methodNextRandomSecureBuffer(Int32, Int32)
Generates a random secure buffer of bytes
Public methodNextRandomWebSafeSecureBuffer
Generates a random secure buffer of chars which are safe for the use on the web - a string that only contains "a-z"/"A-Z" and "0-9" and "-"/"_" chars, i.e.: "bo7O0EFasZe-wEty9w0__JiOKk81". The length of the string can not be less than 4 and more than 1024 chars
Public methodNextRandomWebSafeString
Generates a random string of chars which are safe for the use on the web - a string that only contains "a-z"/"A-Z" and "0-9" and "-"/"_" chars, i.e.: "bo7O0EFasZe-wEty9w0__JiOKk81". The length of the string can not be less than 4 and more than 1024 chars
Public methodNextScaledRandomDouble
Generates random double number in min..max range
Public methodNextScaledRandomInteger
Generates random number in min..max range
Public methodOnlineToString
Returns a string that represents the current object.
(Inherited from OnlineObject.)
Back to Top
Extension Methods

  NameDescription
Public Extension MethodAsBool (Defined by ObjectValueConversion.)
Public Extension MethodAsByte (Defined by ObjectValueConversion.)
Public Extension MethodAsChar (Defined by ObjectValueConversion.)
Public Extension MethodAsDateTime Overloaded. (Defined by ObjectValueConversion.)
Public Extension MethodAsDateTime(DateTime, ConvertErrorHandling)Overloaded. (Defined by ObjectValueConversion.)
Public Extension MethodAsDecimal (Defined by ObjectValueConversion.)
Public Extension MethodAsDouble (Defined by ObjectValueConversion.)
Public Extension MethodAsEnum TEnum  (Defined by ObjectValueConversion.)
Public Extension MethodAsFloat (Defined by ObjectValueConversion.)
Public Extension MethodAsGDID Overloaded. (Defined by ObjectValueConversion.)
Public Extension MethodAsGDID(GDID, ConvertErrorHandling)Overloaded. (Defined by ObjectValueConversion.)
Public Extension MethodAsGDIDSymbol Overloaded. (Defined by ObjectValueConversion.)
Public Extension MethodAsGDIDSymbol(GDIDSymbol, ConvertErrorHandling)Overloaded. (Defined by ObjectValueConversion.)
Public Extension MethodAsGUID (Defined by ObjectValueConversion.)
Public Extension MethodAsInt (Defined by ObjectValueConversion.)
Public Extension MethodAsJSONConfig (Defined by ObjectValueConversion.)
Public Extension MethodAsLaconicConfig (Defined by ObjectValueConversion.)
Public Extension MethodAsLong (Defined by ObjectValueConversion.)
Public Extension MethodAsNonNullOrEmptyString (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableBool (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableByte (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableChar (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableDateTime (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableDecimal (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableDouble (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableEnum TEnum  (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableFloat (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableGDID (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableGDIDSymbol (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableGUID (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableInt (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableLong (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableSByte (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableShort (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableTimeSpan (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableUInt (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableULong (Defined by ObjectValueConversion.)
Public Extension MethodAsNullableUShort (Defined by ObjectValueConversion.)
Public Extension MethodAsSByte (Defined by ObjectValueConversion.)
Public Extension MethodAsShort (Defined by ObjectValueConversion.)
Public Extension MethodAsString (Defined by ObjectValueConversion.)
Public Extension MethodAsTimeSpan Overloaded. (Defined by ObjectValueConversion.)
Public Extension MethodAsTimeSpan(TimeSpan, ConvertErrorHandling)Overloaded. (Defined by ObjectValueConversion.)
Public Extension MethodAsUInt (Defined by ObjectValueConversion.)
Public Extension MethodAsULong (Defined by ObjectValueConversion.)
Public Extension MethodAsUri (Defined by ObjectValueConversion.)
Public Extension MethodAsUShort (Defined by ObjectValueConversion.)
Public Extension MethodAsXMLConfig (Defined by ObjectValueConversion.)
Public Extension MethodToErlObject Overloaded.
Try to convert .NET native object type to corresponding Erlang term. Throw exception if conversion is not possible
(Defined by ErlObject.)
Public Extension MethodToErlObject(ErlTypeOrder, Boolean)Overloaded.
Try to convert .NET native object type to corresponding Erlang term of given type. Throw exception if conversion is not possible
(Defined by ErlObject.)
Public Extension MethodToJSON(JSONWritingOptions)Overloaded.
Serializes object into JSON string
(Defined by JSONExtensions.)
Public Extension MethodToJSON(TextWriter, JSONWritingOptions)Overloaded.
Serializes object into JSON format using provided TextWriter
(Defined by JSONExtensions.)
Public Extension MethodToJSON(Stream, JSONWritingOptions, Encoding)Overloaded.
Serializes object into JSON format using provided stream and optional encoding
(Defined by JSONExtensions.)
Back to Top
Properties

  NameDescription
Public propertyStatic memberInstance
Returns the default instance of the generator. This instance is thread-safe
Public propertyNextRandom16Bytes
Generates random byte[16] buffer
Public propertyNextRandomDouble
Returns 0..1 random double
Public propertyNextRandomInteger
Generates next random integer in the Int32.MinValue..Int32.MaxValue diapason
Public propertyNextRandomUnsignedInteger
Generates next random integer in the Uint32.MinValue..Uint32.MaxValue diapason
Public propertyNextRandomUnsignedLong
Generates next random ulong in the Uint64.MinValue..Uint64.MaxValue range
Back to Top
See Also