private ICustomFieldManager Create(IKernel kernel, CreationContext context)
 {
     if (context.Handler.ComponentModel.Name == typeof(PublicController).FullName
         || context.Handler.ComponentModel.Name == typeof(DataFileController).FullName
         || context.Handler.ComponentModel.Name == typeof(CustomFieldController).FullName)
     {
         return kernel.Resolve<PublicFieldManager>();
     }
     else if (context.Handler.ComponentModel.Name == typeof(PrivateHealthController).FullName)
     {
         return kernel.Resolve<PrivateHealthFieldManager>();
     }
     throw new InvalidOperationException(string.Format("Cannot resolve {0} using given {1}.", typeof(ICustomFieldManager).Name, context.GetType().Name));
 }
 private ICustomFieldManager Create(IKernel kernel, CreationContext context)
 {
     if (context.Handler.ComponentModel.Name == typeof(PublicController).FullName ||
         context.Handler.ComponentModel.Name == typeof(DataFileController).FullName ||
         context.Handler.ComponentModel.Name == typeof(CustomFieldController).FullName)
     {
         return(kernel.Resolve <PublicFieldManager>());
     }
     else if (context.Handler.ComponentModel.Name == typeof(PrivateHealthController).FullName)
     {
         return(kernel.Resolve <PrivateHealthFieldManager>());
     }
     throw new InvalidOperationException(string.Format("Cannot resolve {0} using given {1}.", typeof(ICustomFieldManager).Name, context.GetType().Name));
 }