public WatchedDirectory(IEntityProvider entityLocator, ILogProvider logProvider, IDirectoryScanner directoryScanner)
 {
     _entityLocator = entityLocator;
     _log = logProvider.GetLogger(GetType());
     _acceptableExtensions = new List<string>();
     _directoryScanner = directoryScanner;
 }
        public EntityContextProvider(IEntityProvider entityProvider, IStateProvider stateProvider, ICryptoService cryptoService)
        {
            _entityProvider = entityProvider;

            _entityContext = stateProvider.CookieState("authctx", TimeSpan.Zero, false, true)
                .Signed(cryptoService, TimeSpan.Zero)
                .Jsoned<EntityContext>();
        }
Exemple #3
0
 /// <summary>
 /// See 8.2.4 Tokenization
 /// </summary>
 /// <param name="source">The source code manager.</param>
 /// <param name="resolver">The entity resolver to use.</param>
 public HtmlTokenizer(TextSource source, IEntityProvider resolver)
     : base(source)
 {
     State = HtmlParseMode.PCData;
     IsAcceptingCharacterData = false;
     IsStrictMode = false;
     _lastStartTag = String.Empty;
     _resolver = resolver;
 }
 public WatchedFile(ILog log, IEntityProvider entityLocator, IFile file, IRequestProvider requestProvider, IEnvironmentUtility environmentUtility, IDirectory directory)
 {
     // TODO: Dependency injection feels like it is bloating the constructor. Might be time to re-address the responsibility of this classes methods.
     _log = log;
     _entityLocator = entityLocator;
     _file = file;
     _requestProvider = requestProvider;
     _environmentUtility = environmentUtility;
     _directory = directory;
 }
    /// <summary>
    /// Initializes a new instance of the <see cref="DefaultOrderFactory"/> class.
    /// </summary>
    /// <param name="idGenerator">The id generator.</param>
    /// <param name="shopContext">The shop context.</param>
    /// <param name="stateConfiguration">The state configuration.</param>
    /// <param name="currencyProvider">The currency provider.</param>
    public DefaultOrderFactory([NotNull] OrderIDGenerator idGenerator, [NotNull] ShopContext shopContext, [NotNull] CoreOrderStateConfiguration stateConfiguration, [NotNull] IEntityProvider<Currency> currencyProvider)
    {
      Assert.ArgumentNotNull(idGenerator, "idGenerator");
      Assert.ArgumentNotNull(shopContext, "shopContext");
      Assert.ArgumentNotNull(stateConfiguration, "stateConfiguration");
      Assert.ArgumentNotNull(currencyProvider, "currencyProvider");

      this.idGenerator = idGenerator;
      this.shopContext = shopContext;
      this.stateConfiguration = stateConfiguration;
      this.currencyProvider = currencyProvider;
    }
Exemple #6
0
 public NorthwindWithAttributes(IEntityProvider provider)
     : base(provider)
 {
 }
Exemple #7
0
 public Northwind(IEntityProvider provider)
 {
     this.provider = provider;
 }
        public override void SetSubject(Chunk xiChunk)
        {
            if (!(xiChunk is IEntityProvider)) xiChunk = null;
              mOptionsMenu.Visible = (xiChunk != null);
              if (mSubject == xiChunk) return;
              bool lResetViewMode = true;
              if (xiChunk != null && mSubject != null && xiChunk.GetType() == mSubject.GetType())
            lResetViewMode = false;
              mSubject = (IEntityProvider)xiChunk;

              const double MOVE_SCALE = 100;

              Cursor prevCursor = mMainForm.Viewer3DRenderingSurface.Cursor;
              mMainForm.Viewer3DRenderingSurface.Cursor = Cursors.WaitCursor;
              RebuildScene();
              if (mSubject != null)
              {
            mCamera.Position = new GLTK.Point(-3 * MOVE_SCALE, -3 * MOVE_SCALE, 3 * MOVE_SCALE);
            mCamera.LookAt(new GLTK.Point(3 * MOVE_SCALE, 3 * MOVE_SCALE, 0), new GLTK.Vector(0, 0, 1));

            //set defaults
            if (lResetViewMode)
            {
              if (mSubject is TMDChunk)
              {
            LightingMode = eLightingMode.None; //qq
            MovementMode = eMovementMode.InspectMode;
            DrawNormalsMode = eDrawNormalsMode.HideNormals;
            TextureMode = eTextureMode.NormalTextures;
            SelectedMetadata = eTexMetaDataEntries.Waypoint;
              }
              else
              {
            LightingMode = eLightingMode.None;
            MovementMode = eMovementMode.FlyMode;
            DrawNormalsMode = eDrawNormalsMode.HideNormals;
            TextureMode = eTextureMode.NormalTextures;
            SelectedMetadata = eTexMetaDataEntries.Waypoint;
              }
            }

            if (MovementMode == eMovementMode.InspectMode)
            {
              mLight.Transform = mCamera.Transform;
            }

            mMainForm.ChunkTreeView.CheckBoxes = (mSubject is Level);
              }
              else
              {
            if (mMainForm.ViewerTabControl.SelectedTab == null
              || !(mMainForm.ViewerTabControl.SelectedTab.Tag is ThreeDeeEditor))
            {
              mMainForm.ChunkTreeView.CheckBoxes = false;
            }
              }
              mMainForm.Viewer3DRenderingSurface.Cursor = prevCursor;

              InvalidateViewer();
        }
Exemple #9
0
 /// <summary>
 /// Creates a new tokenizer for XML documents.
 /// </summary>
 /// <param name="source">The source code manager.</param>
 /// <param name="resolver">The entity resolver to use.</param>
 public XmlTokenizer(TextSource source, IEntityProvider resolver)
     : base(source)
 {
     _resolver = resolver;
 }
 public MySqlNorthwind(IEntityProvider provider)
     : base(provider)
 {
 }
 public ImageServer(IEntityProvider entityProvider)
 {
     _entityProvider = entityProvider;
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="providerId"></param>
 /// <param name="provider"></param>
 /// <returns></returns>
 public bool TryGetEntityProvider(Guid providerId, out IEntityProvider provider)
 {
     if (!_initialized)
     {
         Init();
     }
     return _dic.TryGetValue(providerId, out provider);
 }
 public SettingsRoot(IEntityProvider entityLocator)
 {
     _entityLocator = entityLocator;
 }
 public MultiTableContext(IEntityProvider provider)
 {
     this.provider = provider;
 }
    /// <summary>
    /// Initializes a new instance of the <see cref="DefaultPaymentProviderFactory" /> class.
    /// </summary>
    /// <param name="entityProvider">The entity provider.</param>
    public DefaultPaymentProviderFactory(IEntityProvider<DomainModel.Payments.PaymentSystem> entityProvider)
    {
      Assert.ArgumentNotNull(entityProvider, "entityProvider");

      this.entityProvider = entityProvider;
    }