Saturday, November 12, 2011

Thread.QueueUserWorkItem - use to run methods in background threads simultaneously


Monitor - lock only reference type
Interlock - lock only value type
ReadWriteLock

Mutex

Monday, November 7, 2011

load Assembly



System.AppDomain
  • Load


System.Reflection.Assembly
  • Load - load assemblies in default load context that containes of assemblies found by probing:
    • the GAC
    • the host assembly store
      if the runtime is hosted (for example, in SQL Server)
    • the ApplicationBase and PrivateBinPath of the application domain.
  • LoadFrom - load assemblies in load-from context that contains assemblies that are loaded from locations that are not searched by the loader
  • ReflectionOnlyLoad - load assemblies in reflection-only context. Code in this context cannot be executed

Saturday, October 22, 2011

Service unstallation utils

util namepurpose
Installutil.exeallows you to install and uninstall windows service
Regsvcs.exeallows you to install enterprice service


I __
n |
s |ServiceProcessInstaller - to config and install group of services
t |
a |ServiceInstaller - to config and instal one service
l |
l --


C _
o |
n | ServiceController - to manipulate already installed service
f |
i |
g --

Compression

System.IO.Compression
compressiondataalgorithmfilesizecyclic redundancy
check value for
detecting data corruption
GZipStreamgzipDeflate
||
LZ77
+
Huffman coding
less then 4Gb+
DeflateStreamDeflate
||
LZ77
+
Huffman coding
less then 4Gb-