Beispiel #1
0
        public virtual void SetData(string format, bool autoConvert, object data)
        {
            Entry entry;
            Entry e;

            entry = Entry.Find(entries, format);

            if (entry == null)
            {
                entry = new DataObject.Entry(format, data, autoConvert);
            }
            else
            {
                entry.Data = data;
                return;
            }

            lock (this) {
                if (entries == null)
                {
                    entries = entry;
                }
                else
                {
                    // Insert into the list of known/defined formats
                    e = entries;

                    while (e.next != null)
                    {
                        e = e.next;
                    }
                    e.next = entry;
                }
            }
        }
Beispiel #2
0
		public virtual void SetData(string format, bool autoConvert, object data) {
			Entry	entry;
			Entry	e;

			entry = Entry.Find(entries, format);

			if (entry == null) {
				entry = new DataObject.Entry(format, data, autoConvert);
			} else {
				entry.Data = data;
				return;
			}

			lock (this) {
				if (entries == null) {
					entries = entry;
				} else {
					// Insert into the list of known/defined formats
					e = entries;

					while (e.next != null) {
						e = e.next;
					}
					e.next = entry;
				}
			}
		}