private void Fill <TObject>( IFiller <TObject> filler, PdfDictionary node ) { PdfArray kidsObject = (PdfArray)node.Resolve(PdfName.Kids); if (kidsObject == null) // Leaf node. { PdfArray namesObject = (PdfArray)node.Resolve(pairsKey); for ( int index = 0, length = namesObject.Count; index < length; index += 2 ) { filler.Add(namesObject, index); } } else // Intermediate node. { foreach (PdfDirectObject kidObject in kidsObject) { Fill(filler, (PdfDictionary)kidObject.Resolve()); } } }
public override int Subtract(IFiller other) { if (other is NumberFiller o) { return((int)(value - o.Value)); } return(0); }
public override int Subtract(IFiller other) { if (other is DateFiller o) { return(value.Subtract(o.Value).Days); } return(0); }
public override int Subtract(IFiller other) { if (other is AlphaNumericFiller o) { return(value - o.Value); } return(0); }
//fill method public DataContext(IFiller filler) //interface //pass value bool (1) { // if (1) nie można utworzyć typów, bo są nieznane, bo tworzyłyby odniesienia do warstwy wyżej (referencja) Books = new List <tBook>(); Clients = new List <tClient>(); Suppliers = new List <tSupplier>(); Events = new List <tEvent>(); this.Filler = filler; Fill(); }
/// <summary> /// Provider Contstrutor /// </summary> /// <param name="uri">Uri to get Feeds</param> /// <param name="filler">filler that fill feed data to other object</param> protected Provider(Uri uri, IFiller filler) { if (filler == null) { throw new ArgumentNullException("filler"); } // TODO: Complete member initialization this.Uri = uri; this.Filler = filler; }
public void RSSProvider_ConstructorTest() { Provider provider = new RSSProvider(new Uri("rss://"), new FillerMock(new ObservableCollection <int>())); Assert.IsNotNull(provider); Assert.AreEqual <string>(new Uri("rss://").AbsolutePath, provider.Uri.AbsolutePath); Parser parser = provider.Parser; Assert.IsNotNull(parser); IFiller filler = provider.Filler; Assert.IsNotNull(filler); }
private static TimeSpan MeasureFill(IFiller filler, byte[] array, byte value) { // measure var elapsed = Measure(() => filler.Fill(array, value)); #if DEBUG // validate var equalityComparer = EqualityComparer <byte> .Default; for (var i = 0; i < array.Length; i++) { if (!equalityComparer.Equals(array[i], value)) { throw new Exception("Validation failed."); } } #endif return(elapsed); }
private void Fill <TObject>( IFiller <TObject> filler, PdfReference nodeReference ) { PdfDictionary node = (PdfDictionary)nodeReference.DataObject; File.ResolvedObject <PdfArray> kidsObject = File.Resolve <PdfArray>( node[PdfName.Kids], nodeReference ); if (kidsObject == null) // Leaf node. { File.ResolvedObject <PdfArray> namesObject = File.Resolve <PdfArray>( node[PdfName.Names], nodeReference ); for ( int index = 0, length = namesObject.DataObject.Count; index < length; index += 2 ) { filler.Add( namesObject.DataObject, index, namesObject.Container ); } } else // Intermediate node. { foreach (PdfDirectObject kidObject in kidsObject.DataObject) { Fill(filler, (PdfReference)kidObject); } } }
private int Analyze(TableCell first, TableCell second, out IFiller filler) { filler = GetFiller(first); if (filler == null) { return(0); } var filler2 = GetFiller(second); if (filler2 == null) { return(1); } if (filler2.Type != filler.Type) { return(0); } // filler..filler2 is presumed progression return(filler2.Subtract(filler)); }
public DataRepository(IFiller filler) { _filler = filler; filler.Fill(_kontekstDanych); }
public TEDBlogProvider(IFiller filler) : base(new Uri("http://feeds.feedburner.com/tedblog"), filler) { }
/// <summary> /// Constrcutor /// </summary> /// <param name="uri">uri of RSS feed</param> /// <param name="filler">filler fills collection</param> public AtomFeedProvider(Uri uri, IFiller filler) : base(uri, filler) { }
internal static void Register <T>(IFiller entityBuilder) where T : struct, IEntityComponent { var location = EntityComponentID <T> .ID.Data = GlobalTypeID.NextID <T>(); TYPE_IDS.AddAt(location, entityBuilder); }
public abstract int Subtract(IFiller other);
public BalloonsGameEngine GameFieldFiller(IFiller matrixFiller) { this.engineContext.GameFieldFiller = matrixFiller; return this; }
public DataRepository(IFiller filler) { data = new DataContext(); this.filler = filler; this.filler.Fill(this); }
public TEDVideoProvider(IFiller filler) : base(new Uri("http://feeds.feedburner.com/TEDTalks_video"), filler) { }
public MyExecutorService(IFiller filler, ITestDataModelRetriever retriever, IExecutor executor) { _filler = filler; _retriever = retriever; _executor = executor; }
public Baza(IFiller fillIt) : this() { this.Filler = fillIt; UseFiller(); }
/// <summary> /// Constrcutor /// </summary> /// <param name="uri">uri of RSS feed</param> /// <param name="filler">filler fills collection</param> public RSSProvider(Uri uri, IFiller filler) : base(uri, filler) { }
public ControlWindow(IFiller filler) { InitializeComponent(); this.filler = filler; }
public void SetFiller(IFiller filler) { this.Filler = filler; }
public override int Subtract(IFiller other) { return(0); }
public Baza(IFiller fillIt, ISerializer serial) : this(fillIt) { Serializer = serial; }
public PopupHandler(IFiller filler) { this.filler = filler; }
public UserProfileManager() { _matrixManager = new MatrixManager(); }
public DataRepository(IFiller filler) { filler.FillData(DataContext); }