public void Add( PdfName key, Action value ) { BaseDataObject.Add(key, value.BaseObject); }
public bool ContainsKey( PdfName key ) { return(BaseDataObject.ContainsKey(key) || (PdfName.A.Equals(key) && parent.BaseDataObject.ContainsKey(key))); }
public void Insert( int index, Annotation value ) { BaseDataObject.Insert(index, value.BaseObject); }
public xObjects::XObject ToXObject( Document context ) { xObjects::FormXObject form; { form = new xObjects::FormXObject(context, Box); form.Resources = (Resources)(context.Equals(Document) ? Resources // Same document: reuses the existing resources. : Resources.Clone(context) // Alien document: clones the resources. ); // Body (contents). { IBuffer formBody = form.BaseDataObject.Body; PdfDataObject contentsDataObject = BaseDataObject.Resolve(PdfName.Contents); if (contentsDataObject is PdfStream) { formBody.Append(((PdfStream)contentsDataObject).Body); } else { foreach (PdfDirectObject contentStreamObject in (PdfArray)contentsDataObject) { formBody.Append(((PdfStream)contentStreamObject.Resolve()).Body); } } } } return(form); }
public void Add( PdfName key, object value ) { BaseDataObject.Add(key, PdfSimpleObject <object> .Get(value)); }
public static void GetDataSetStream(IDataSetRenderer renderer, DataObjectForStreaming dataStream, TextWriter streamResponse) { EndpointSettings DataObjConfiguration = dataStream.Configuration; IDataStructureObject kf = dataStream.structure.DataStructures.First(); //DataObjectForStreaming SDMXWSFunction op = SDMXWSFunction.GetCompactData; //DataObjConfiguration bool cross = (DataObjConfiguration._TypeEndpoint == EndpointType.V21 || DataObjConfiguration._TypeEndpoint == EndpointType.REST) ? NsiClientHelper.DataflowDsdIsCrossSectional(kf) : !Utils.IsTimeSeries(kf); if (cross) { op = SDMXWSFunction.GetCrossSectionalData; } var ser = new JavaScriptSerializer(); ser.MaxJsonLength = int.MaxValue; try { IGetSDMX GetSDMXObject = WebServiceSelector.GetSdmxImplementation(DataObjConfiguration); BaseDataObject BDO = new BaseDataObject(DataObjConfiguration, @"c:\pippo.txt"); //GetSDMXObject.ExecuteQuery(BDO.CreateQueryBean(_ df, kf, Criterias), op, FileTmpData); //GetSDMXObject.ExecuteQuery(BDO.CreateQueryBean(, kf, Criterias), op, FileTmpData); } catch (Exception ex) { } //throw new NotImplementedException(); }
protected void overridePageTitleAndMetaTags(BaseDataObject dataObj) { //methode is alleen geldig voor dataDeatilsmodules //als data vanuit user komt, title op pagina overschrijven met item titel if (Request.QueryString["dataid"] != null && dataObj != null) { if (dataObj.Title != "" && dataObj.Title != null) { this.Page.Title = dataObj.Title; } if (dataObj.MetaDescription != "" && dataObj.MetaDescription != null) { HtmlGenericControl metaDescriptionCtl = (HtmlGenericControl)FindControlRecursive(this.Page, "MetaDescription"); if (metaDescriptionCtl != null) { metaDescriptionCtl.Attributes["Content"] = dataObj.MetaDescription; } } if (dataObj.MetaKeywords != "" && dataObj.MetaKeywords != null) { HtmlGenericControl metaKeywordsCtl = (HtmlGenericControl)FindControlRecursive(this.Page, "MetaKeywords"); if (metaKeywordsCtl != null) { metaKeywordsCtl.Attributes["Content"] = dataObj.MetaKeywords; } } } }
public void Add( Function value ) { Validate(value); BaseDataObject.Add(value.BaseObject); }
public static Row Deserialize(FrontendInstanceBase fib, byte[] chunkID, BaseDataObject baseDataObject, byte[] buffer) { using (System.IO.MemoryStream MS = new System.IO.MemoryStream(buffer)) { using (System.IO.BinaryReader BR = new System.IO.BinaryReader(MS)) { byte[] id = BR.ReadBytes(32); Table table = ((FrontendInstance)fib).GetTableByID(BR.ReadBytes(32)); byte columnSetCount = BR.ReadByte(); Dictionary <int, ColumnSet> columnSets = new Dictionary <int, ColumnSet> (); for (int columnSetIndex = 0; columnSetIndex != columnSetCount; columnSetIndex++) { ColumnSet columnSet = ((FrontendInstance)fib).GetColumnSetByID(BR.ReadBytes(32)); columnSets.Add(columnSetIndex, columnSet); } //int previousVersionCount = BR.ReadInt32 (); Dictionary <int, object[]> objs = new Dictionary <int, object[]> (); for (int n = 0; n != columnSetCount; n++) { objs.Add(n, columnSets [n].DeserializeObjects(BR.ReadBytes(BR.ReadInt32()))); } Row R = new Row(id, chunkID, baseDataObject, table, columnSets, objs); return(R); } } }
/// <summary> /// ä¸šåŠ¡å®žä½“æ˜ å°„EF实体 /// </summary> /// <typeparam name="T">EF实体类型</typeparam> /// <param name="dataObj">业务实体对象</param> /// <returns></returns> public static T ToEntity <T>(this BaseDataObject dataObj) where T : IBaseModel, new() { var o = new T(); AutoMapper.Mapper.DynamicMap(dataObj, o, dataObj.GetType(), typeof(T)); return(o); }
public OrderEditPage(BaseDataObject dataObject) { this.InitializeComponent(); this.ViewModel.DataFormView = this; if (dataObject != null) { switch (dataObject) { case Product product: this.ViewModel.SelectedOrder = new Order { ProductId = product.Id }; break; case Customer customer: this.ViewModel.SelectedOrder = new Order { CustomerId = customer.Id }; break; case Employee employee: this.ViewModel.SelectedOrder = new Order { EmployeeId = employee.Id }; break; case Order order: this.ViewModel.IsNewOrder = false; this.ViewModel.SelectedOrder = order; break; } } }
internal TextStringWrapper(ContentScanner scanner, bool scan = true) : base((ShowText)scanner.Current) { Context = scanner.ContentContext; Context.Strings.Add(this); textChars = new List <TextChar>(); { GraphicsState state = scanner.State; style = new TextStyle( state.Font, state.FontSize * state.TextState.Tm.ScaleY, state.RenderMode, state.StrokeColor, state.StrokeColorSpace, state.FillColor, state.FillColorSpace, state.Scale * state.TextState.Tm.ScaleX, state.TextState.Tm.ScaleY ); if (scan) { BaseDataObject.Scan( state, new ShowTextScanner(this) ); } } }
public bool Remove( PdfName key ) { OnChange(key); return(BaseDataObject.Remove(key)); }
public virtual SKTypeface GetTypeface() { if (typeface != null) { return(typeface); } var fontDescription = GetFontDescription(); if (fontDescription != null) { if (fontDescription.Resolve(PdfName.FontFile) is PdfStream stream) { return(typeface = GetTypeface(fontDescription, stream)); } if (fontDescription.Resolve(PdfName.FontFile2) is PdfStream stream2) { return(typeface = GetTypeface(fontDescription, stream2)); } if (fontDescription.Resolve(PdfName.FontFile3) is PdfStream stream3) { return(typeface = GetTypeface(fontDescription, stream3)); } if (fontDescription.Resolve(PdfName.FontName) is PdfName fontName) { return(typeface = ParseName(fontName.StringValue, fontDescription)); } } else if (BaseDataObject.Resolve(PdfName.BaseFont) is PdfName baseFont) { return(typeface = ParseName(baseFont.StringValue, Dictionary)); } return(null); }
/** * <summary>Gets whether this is the first bead in its thread.</summary> */ public bool IsHead( ) { PdfDictionary thread = (PdfDictionary)BaseDataObject.Resolve(PdfName.T); return(thread != null && BaseObject.Equals(thread[PdfName.F])); }
public void Add( ChoiceItem value ) { BaseDataObject.Add(value.BaseObject); value.Items = this; }
public virtual void Insert( int index, TItem item ) { BaseDataObject.Insert(index, item.BaseObject); }
private object GetEntry <T, TPdf>( PdfName key ) where TPdf : PdfAtomicObject <T> { TPdf entry = (TPdf)BaseDataObject.Resolve(key); return(entry == null ? null : entry.Value); }
protected override PdfDataObject GetDescriptorValue( PdfName key ) { PdfDictionary fontDescriptor = (PdfDictionary)BaseDataObject.Resolve(PdfName.FontDescriptor); return(fontDescriptor != null?fontDescriptor.Resolve(key) : null); }
public void Insert( int index, Function value ) { Validate(value); BaseDataObject.Insert(index, value.BaseObject); }
public void Insert( int index, ChoiceItem value ) { BaseDataObject.Insert(index, value.BaseObject); value.Items = this; }
public Row CreateRow(Table table, IDictionary <int, ColumnSet> columnSets, IDictionary <int, object[]> objects) { BaseDataObject bdo = new BaseDataObject(FrontendInstance, null); Row r = new Row(null, null, bdo, table, columnSets, objects); rows.Add(r.ID, r); perTableRows [table].Add(r.ID, r); return(r); }
public void Add( Annotation value ) { // Assign the annotation to the page! value.BaseDataObject[PdfName.P] = value.BaseObject; BaseDataObject.Add(value.BaseObject); }
public DataWidget(GetDataObject dataObj, SessionImplObject sessionObj, bool useAttr) { DataObj = dataObj; SessionObj = sessionObj; GetSDMXObject = WebServiceSelector.GetSdmxImplementation(this.DataObj.Configuration); BDO = new BaseDataObject(dataObj.Configuration, System.IO.Path.GetTempFileName()); this._useAttr = useAttr; }
public bool Remove( KeyValuePair <PdfName, Action> entry ) { return(BaseDataObject.Remove( new KeyValuePair <PdfName, PdfDirectObject>( entry.Key, entry.Value.BaseObject ) )); }
public Field this[ string key ] { get { /* * TODO: It is possible for different field dictionaries to have the SAME fully qualified field * name if they are descendants of a common ancestor with that name and have no * partial field names (T entries) of their own. Such field dictionaries are different * representations of the same underlying field; they should differ only in properties * that specify their visual appearance. In particular, field dictionaries with the same * fully qualified field name must have the same field type (FT), value (V), and default * value (DV). */ PdfReference valueFieldReference = null; { IEnumerator partialNamesIterator = key.Split('.').GetEnumerator(); IEnumerator <PdfDirectObject> fieldObjectsIterator = BaseDataObject.GetEnumerator(); while (partialNamesIterator.MoveNext()) { string partialName = (string)partialNamesIterator.Current; valueFieldReference = null; while (fieldObjectsIterator != null && fieldObjectsIterator.MoveNext()) { PdfReference fieldReference = (PdfReference)fieldObjectsIterator.Current; PdfDictionary fieldDictionary = (PdfDictionary)fieldReference.DataObject; PdfTextString fieldName = (PdfTextString)fieldDictionary[PdfName.T]; if (fieldName != null && fieldName.Value.Equals(partialName)) { valueFieldReference = fieldReference; PdfArray kidFieldObjects = (PdfArray)fieldDictionary.Resolve(PdfName.Kids); fieldObjectsIterator = (kidFieldObjects == null ? null : kidFieldObjects.GetEnumerator()); break; } } if (valueFieldReference == null) { break; } } } return(Field.Wrap(valueFieldReference)); } set { throw new NotImplementedException(); /* * TODO:put the field into the correct position, based on the full name (key)!!! */ } }
private static object getFieldValue(BaseDataObject dataObj, string mappingField) { System.Reflection.PropertyInfo prop = dataObj.GetType().GetProperty(mappingField); if (prop == null) { return(null); } Object returnValue = prop.GetValue(dataObj, null); return(returnValue); }
public static RowDrop Deserialize(DataContext dataContext, byte[] id, byte[] chunkID, BaseDataObject baseDataObject, byte[] buffer) { using (MemoryStream MS = new MemoryStream(buffer)) { using (BinaryReader BR = new BinaryReader(MS)) { return(new RowDrop(id, chunkID, baseDataObject, dataContext.GetRowByID(BR.ReadBytes(32)))); } } }
private void SetEntry <T, TPdf>( PdfName key, T value ) where TPdf : PdfAtomicObject <T>, new() { if (!BaseDataObject.ContainsKey(key)) { BaseDataObject[key] = new TPdf(); } ((TPdf)File.Resolve(BaseDataObject[key])).Value = value; }
public void Clear( ) { // Low-level definition. BaseDataObject.Clear(); // High-level definition. foreach (LayerState item in items) { item.Detach(); } items.Clear(); }