• Performance
  • API Documentation
  • Source Code
Show / Hide Table of Contents
  • InSync
    • AsyncSynchronized
    • AsyncSynchronized<T>
    • GuardedValue<T>
    • IAsyncSynchronized<T>
    • IBareAsyncLock
    • IBareAsyncLock<T>
    • IBareLock
    • IBareLock<T>
    • ISynchronized<T>
    • LockException
    • MultiSync
    • ReaderSynchronized<TRead>
    • ReaderWriterSynchronized<T>
    • ReaderWriterSynchronized<TWrite, TRead>
    • ReaderWriterSynchronizedFactory
    • Synchronized
    • Synchronized<T>
    • TimingMethod
    • UnlockException
    • UpgradeableReaderSynchronized<TRead>
    • ValueContainer<T>

Class ReaderWriterSynchronizedFactory

Provides static methods for creating ReaderWriterSynchronized<TWrite, TRead> without explicitly specifying the types of the protected reader and writer.

Inheritance
System.Object
ReaderWriterSynchronizedFactory
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 is created with default property values and used.

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>

A new ReaderWriterSynchronized<T>

Type Parameters
Name Description
T

The type of object.

Create<T>(ReaderWriterLockSlim, T)

Creates a ReaderWriterSynchronized<T> with the specified and object to protect.

Declaration
public static ReaderWriterSynchronized<T> Create<T>(ReaderWriterLockSlim readerWriterLockSlim, T value)
    where T : class
Parameters
Type Name Description
ReaderWriterLockSlim readerWriterLockSlim

The for synchronization.

T value

The object to protect.

Returns
Type Description
ReaderWriterSynchronized<T>

A new 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 is created with default property values and used.

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>

A new 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 , writer to protect and reader to protect.

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 for synchronization.

TWrite writer

The writer to protect.

TRead reader

The reader to protect.

Returns
Type Description
ReaderWriterSynchronized<TWrite, TRead>

A new ReaderWriterSynchronized<TWrite, TRead>

Type Parameters
Name Description
TWrite

The type of the writer to protect.

TRead

The type of the reader to protect.

In This Article
Back to top Generated by DocFX