Class ReaderWriterSynchronizedFactory
Provides static methods for creating ReaderWriterSynchronized<TWrite, TRead> without explicitly specifying the types of the protected reader and writer.
Inheritance
Namespace: InSync
Assembly: InSync.dll
Syntax
public static class ReaderWriterSynchronizedFactory : object
Methods
Create<T>(T)
Creates a ReaderWriterSynchronized<T> with the specified object to protect. A new
Declaration
public static ReaderWriterSynchronized<T> Create<T>(T value)
where T : class
Parameters
Type | Name | Description |
---|---|---|
T | value | The object to protect. |
Returns
Type | Description |
---|---|
ReaderWriterSynchronized<T> |
Type Parameters
Name | Description |
---|---|
T | The type of object. |
Create<T>(ReaderWriterLockSlim, T)
Creates a ReaderWriterSynchronized<T> with the specified
Declaration
public static ReaderWriterSynchronized<T> Create<T>(ReaderWriterLockSlim readerWriterLockSlim, T value)
where T : class
Parameters
Type | Name | Description |
---|---|---|
ReaderWriterLockSlim | readerWriterLockSlim | The |
T | value | The object to protect. |
Returns
Type | Description |
---|---|
ReaderWriterSynchronized<T> |
Type Parameters
Name | Description |
---|---|
T | The type of object. |
Create<TWrite, TRead>(TWrite, TRead)
Creates a ReaderWriterSynchronized<TWrite, TRead> the specified writer to protect and reader to protect. A new
Declaration
public static ReaderWriterSynchronized<TWrite, TRead> Create<TWrite, TRead>(TWrite writer, TRead reader)
where TWrite : class where TRead : class
Parameters
Type | Name | Description |
---|---|---|
TWrite | writer | The writer to protect. |
TRead | reader | The reader to protect. |
Returns
Type | Description |
---|---|
ReaderWriterSynchronized<TWrite, TRead> |
Type Parameters
Name | Description |
---|---|
TWrite | The type of the writer to protect. |
TRead | The type of the reader to protect. |
Create<TWrite, TRead>(ReaderWriterLockSlim, TWrite, TRead)
Creates a ReaderWriterSynchronized<TWrite, TRead> with the specified
Declaration
public static ReaderWriterSynchronized<TWrite, TRead> Create<TWrite, TRead>(ReaderWriterLockSlim readerWriterLockSlim, TWrite writer, TRead reader)
where TWrite : class where TRead : class
Parameters
Type | Name | Description |
---|---|---|
ReaderWriterLockSlim | readerWriterLockSlim | The |
TWrite | writer | The writer to protect. |
TRead | reader | The reader to protect. |
Returns
Type | Description |
---|---|
ReaderWriterSynchronized<TWrite, TRead> |
Type Parameters
Name | Description |
---|---|
TWrite | The type of the writer to protect. |
TRead | The type of the reader to protect. |