/// <summary>
 /// Initializes a new instance of the MockSlotFactory class
 /// </summary>
 public RutokenSlotFactory()
 {
     if (Platform.NativeULongSize == 4)
     {
         if (Platform.StructPackingSize == 0)
         {
             _factory = new HighLevelAPI40.Factories.RutokenSlotFactory();
         }
         else
         {
             _factory = new HighLevelAPI41.Factories.RutokenSlotFactory();
         }
     }
     else
     {
         if (Platform.StructPackingSize == 0)
         {
             _factory = new HighLevelAPI80.Factories.RutokenSlotFactory();
         }
         else
         {
             _factory = new HighLevelAPI81.Factories.RutokenSlotFactory();
         }
     }
 }
Esempio n. 2
0
 public PlaySlotCommand(ISymbolManager symbolManager, IWriter writer, ISlotFactory slotFactory, IMath mathProvider)
 {
     this.symbolManager = symbolManager;
     this.writer        = writer;
     this.slotFactory   = slotFactory;
     this.mathProvider  = mathProvider;
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes new instance of Pkcs11Factories class with custom or default factories
 /// </summary>
 /// <param name="pkcs11Factory">Custom factory for creation of IPkcs11 instances or null for the default factory</param>
 /// <param name="slotFactory">Custom factory for creation of ISlot instances or null for the default factory</param>
 /// <param name="sessionFactory">Custom factory for creation of ISession instances or null for the default factory</param>
 /// <param name="objectAttributeFactory">Custom factory for creation of IObjectAttribute instances or null for the default factory</param>
 /// <param name="objectHandleFactory">Custom factory for creation of IObjectHandle instances or null for the default factory</param>
 /// <param name="mechanismFactory">Custom factory for creation of IMechanism instances or null for the default factory</param>
 /// <param name="mechanismParamsFactory">Custom factory for creation of IMechanismParams instances or null for the default factory</param>
 public Pkcs11InteropFactories(IPkcs11Factory pkcs11Factory, ISlotFactory slotFactory, ISessionFactory sessionFactory, IObjectAttributeFactory objectAttributeFactory, IObjectHandleFactory objectHandleFactory, IMechanismFactory mechanismFactory, IMechanismParamsFactory mechanismParamsFactory)
 {
     _pkcs11Factory          = (pkcs11Factory != null) ? pkcs11Factory : new Pkcs11Factory();
     _slotFactory            = (slotFactory != null) ? slotFactory : new SlotFactory();
     _sessionFactory         = (sessionFactory != null) ? sessionFactory : new SessionFactory();
     _objectAttributeFactory = (objectAttributeFactory != null) ? objectAttributeFactory : new ObjectAttributeFactory();
     _objectHandleFactory    = (objectHandleFactory != null) ? objectHandleFactory : new ObjectHandleFactory();
     _mechanismFactory       = (mechanismFactory != null) ? mechanismFactory : new MechanismFactory();
     _mechanismParamsFactory = (mechanismParamsFactory != null) ? mechanismParamsFactory : new MechanismParamsFactory();
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes new instance of Pkcs11Factories class with default factories
 /// </summary>
 public Pkcs11InteropFactories()
 {
     _pkcs11Factory          = new Pkcs11Factory();
     _slotFactory            = new SlotFactory();
     _sessionFactory         = new SessionFactory();
     _objectAttributeFactory = new ObjectAttributeFactory();
     _objectHandleFactory    = new ObjectHandleFactory();
     _mechanismFactory       = new MechanismFactory();
     _mechanismParamsFactory = new MechanismParamsFactory();
 }