Ejemplo n.º 1
0
 public void SetConfiguration(DisplayControllerSettings configuration)
 {
     if (configuration is ParallelDisplayControllerSettings pcfg)
     {
         this.SetConfiguration(pcfg);
     }
     else
     {
         throw new ArgumentException("Must pass an instance whose type matches the interface type.");
     }
 }
Ejemplo n.º 2
0
            public void SetConfiguration(DisplayControllerSettings configuration)
            {
                switch (this.Interface)
                {
                case DisplayInterface.Parallel when configuration is ParallelDisplayControllerSettings pcfg:
                    this.SetConfiguration(pcfg);
                    break;

                case DisplayInterface.Spi when configuration is SpiDisplayControllerSettings scfg:
                    this.SetConfiguration(scfg);
                    break;

                case DisplayInterface.I2c when configuration is I2cDisplayControllerSettings icfg:
                    this.SetConfiguration(icfg);
                    break;

                default:
                    throw new ArgumentException("Must pass an instance whose type matches the interface type.");
                }
            }
Ejemplo n.º 3
0
 void IDisplayControllerProvider.SetConfiguration(DisplayControllerSettings configuration)
 {
 }