public static bool TryFindByTypeNamespace(string typeNamespace, out LockingModelDescriptor appender) { if (typeNamespace == null) { appender = null; return(false); } return(sDescriptorsByTypeNamespace.TryGetValue(typeNamespace, out appender)); }
static LockingModelDescriptor() { Exclusive = new LockingModelDescriptor("Exclusive", "log4net.Appender.FileAppender+ExclusiveLock"); Minimal = new LockingModelDescriptor("Minimal", "log4net.Appender.FileAppender+MinimalLock"); InterProcess = new LockingModelDescriptor("Inter-Process", "log4net.Appender.FileAppender+InterProcessLock"); sDescriptorsByTypeNamespace = new Dictionary <string, LockingModelDescriptor> { { Exclusive.TypeNamespace, Exclusive }, { Minimal.TypeNamespace, Minimal }, { InterProcess.TypeNamespace, InterProcess } }; }