public DeepCloneOptions ForType <TType>(Action <IDeepCloneTypeOptions <TType> > action) { var type = typeof(TType); if (!TypeOptions.ContainsKey(typeof(TType))) { var typeOpts = new DeepCloneTypeOptions <TType> { CloneIdentifier = CloneIdentifierValue }; TypeOptions.Add(type, typeOpts); } action(TypeOptions[type] as IDeepCloneTypeOptions <TType>); return(this); }
public DeepCloneOptions ForTypes(IEnumerable <System.Type> types, Action <System.Type, IDeepCloneTypeOptions> action) { foreach (var type in types) { if (!TypeOptions.ContainsKey(type)) { var typeOpts = new DeepCloneTypeOptions(type) { CloneIdentifier = CloneIdentifierValue }; TypeOptions.Add(type, typeOpts); } action(type, TypeOptions[type]); } return(this); }