public void Initialize(bool beforeFieldInit) { if (_initialized) { return; } _initialized = true; if (String.IsNullOrEmpty(Name)) { ChoProfile.WriteLine("Missing Name"); return; } using (ChoBufferProfile profile = ChoBufferProfile.DelayedAutoStart(new ChoBufferProfile(true, Name, "Loading property handler..."))) { try { _customPropertyReplaceHandler = new ChoCallbackObj(Type, Method).CreateDelegate <ChoCustomPropertyReplaceHandler>() as ChoCustomPropertyReplaceHandler; } catch (Exception ex) { profile.AppendLine(String.Format("{0}: {1}", Name, ex.ToString())); } } }
public ChoCustomPropertyReplacer(string name, ChoCustomPropertyReplaceHandler customPropertyReplaceHandler) { ChoGuard.ArgumentNotNull(name, "name"); ChoGuard.ArgumentNotNull(customPropertyReplaceHandler, "CustomPropertyReplaceHandler"); _name = name; _customPropertyReplaceHandler = customPropertyReplaceHandler; }
public ChoCustomPropertyHandlerReplacer(string name, int priority, ChoCustomPropertyReplaceHandler customPropertyReplaceHandler) { ChoGuard.ArgumentNotNull(name, "name"); ChoGuard.ArgumentNotNull(customPropertyReplaceHandler, "CustomPropertyReplaceHandler"); Name = name; Priority = priority; _customPropertyReplaceHandler = customPropertyReplaceHandler; }
internal ChoCustomPropertyHandlerReplacer(ChoCustomPropertyReplaceHandler customPropertyReplaceHandler) { Name = String.Format("CustomPropertyHandlerReplacer_{0}", ChoRandom.NextRandom().ToString()); Priority = 0; _customPropertyReplaceHandler = customPropertyReplaceHandler; }
public ChoCustomPropertyReplacer(ChoCustomPropertyReplaceHandler customPropertyReplaceHandler) : this(String.Format("CustomPropertyReplacer_{0}", ChoRandom.NextRandom().ToString()), customPropertyReplaceHandler) { }