private void InitializeIfNecessary() { if (currentOwnerInstance != this) { currentOwnerInstance = this; UnManagedStaticClass.Initialize(initParameters); UnManagedStaticClass.Settings = settings; } }
public MyWrapper(InitParameters p) { lock (lockRoot) { if (!initialized) { UnManagedStaticClass.Initialize(p); initialized = true; } } }
static Test() { UnManagedStaticClass.Initialize(); UnManagedStaticClass.Settings = ...; }
static MyWrapper() { UnManagedStaticClass.Initialize(); }
static Test() { UnManagedStaticClass.Initialize(); }
static MyWrapper() { UnManagedStaticClass.Initialize(); UnManagedStaticClass.Settings = ...; }