示例#1
0
 private void SetSolution(ITypeDescriptorContext context)
 {
     if (context != null)
     {
         this.solution = context.TryGetService <ISolution>();
     }
     else
     {
         //If context is null try using the GlobalProvider
         this.solution = ServiceProvider.GlobalProvider.TryGetService <ISolution>();
     }
 }
 private void SetSolution(ITypeDescriptorContext context)
 {
     if (context != null)
     {
         this.solution = context.TryGetService<ISolution>();
     }
     else
     {
         //If context is null try using the GlobalProvider
         this.solution = ServiceProvider.GlobalProvider.TryGetService<ISolution>();
     }
 }