コード例 #1
0
        private static IPropertyChooserPolicy GetPropertyChooser(IBuilderContext context, string idToBuild, Type typeToBuild)
        {
            IPropertyChooserPolicy chooser =
                context.Policies.Get <IPropertyChooserPolicy>(typeToBuild, idToBuild);

            if (chooser == null)
            {
                chooser = new DefaultPropertyChooserPolicy();
                context.Policies.Set(chooser, typeToBuild, idToBuild);
            }
            return(chooser);
        }
コード例 #2
0
 private static IPropertyChooserPolicy GetPropertyChooser(IBuilderContext context, string idToBuild, Type typeToBuild)
 {
     IPropertyChooserPolicy chooser =
         context.Policies.Get<IPropertyChooserPolicy>(typeToBuild, idToBuild);
     if (chooser == null)
     {
         chooser = new DefaultPropertyChooserPolicy();
         context.Policies.Set(chooser, typeToBuild, idToBuild);
     }
     return chooser;
 }