public bool Contains(ReplicationCursor cursor)
        {
            if (cursor == null)
                throw new ArgumentNullException("cursor");

            return InnerList.Contains(cursor);
        }
		internal void AddHelper(string partition, object cursors, bool advanced, IntPtr info)
		{
			int num;
			IntPtr intPtr;
			if (!advanced)
			{
				num = ((DS_REPL_CURSORS)cursors).cNumCursors;
			}
			else
			{
				num = ((DS_REPL_CURSORS_3)cursors).cNumCursors;
			}
			for (int i = 0; i < num; i++)
			{
				if (!advanced)
				{
					intPtr = (IntPtr)((long)info + (long)(Marshal.SizeOf(typeof(int)) * 2) + (long)(i * Marshal.SizeOf(typeof(DS_REPL_CURSOR))));
					DS_REPL_CURSOR dSREPLCURSOR = new DS_REPL_CURSOR();
					Marshal.PtrToStructure(intPtr, dSREPLCURSOR);
					ReplicationCursor replicationCursor = new ReplicationCursor(this.server, partition, dSREPLCURSOR.uuidSourceDsaInvocationID, dSREPLCURSOR.usnAttributeFilter);
					this.Add(replicationCursor);
				}
				else
				{
					intPtr = (IntPtr)((long)info + (long)(Marshal.SizeOf(typeof(int)) * 2) + (long)(i * Marshal.SizeOf(typeof(DS_REPL_CURSOR_3))));
					DS_REPL_CURSOR_3 dSREPLCURSOR3 = new DS_REPL_CURSOR_3();
					Marshal.PtrToStructure(intPtr, dSREPLCURSOR3);
					ReplicationCursor replicationCursor1 = new ReplicationCursor(this.server, partition, dSREPLCURSOR3.uuidSourceDsaInvocationID, dSREPLCURSOR3.usnAttributeFilter, dSREPLCURSOR3.ftimeLastSyncSuccess, dSREPLCURSOR3.pszSourceDsaDN);
					this.Add(replicationCursor1);
				}
			}
		}
Example #3
0
        internal void AddHelper(string partition, object cursors, bool advanced, IntPtr info)
        {
            int    num;
            IntPtr intPtr;

            if (!advanced)
            {
                num = ((DS_REPL_CURSORS)cursors).cNumCursors;
            }
            else
            {
                num = ((DS_REPL_CURSORS_3)cursors).cNumCursors;
            }
            for (int i = 0; i < num; i++)
            {
                if (!advanced)
                {
                    intPtr = (IntPtr)((long)info + (long)(Marshal.SizeOf(typeof(int)) * 2) + (long)(i * Marshal.SizeOf(typeof(DS_REPL_CURSOR))));
                    DS_REPL_CURSOR dSREPLCURSOR = new DS_REPL_CURSOR();
                    Marshal.PtrToStructure(intPtr, dSREPLCURSOR);
                    ReplicationCursor replicationCursor = new ReplicationCursor(this.server, partition, dSREPLCURSOR.uuidSourceDsaInvocationID, dSREPLCURSOR.usnAttributeFilter);
                    this.Add(replicationCursor);
                }
                else
                {
                    intPtr = (IntPtr)((long)info + (long)(Marshal.SizeOf(typeof(int)) * 2) + (long)(i * Marshal.SizeOf(typeof(DS_REPL_CURSOR_3))));
                    DS_REPL_CURSOR_3 dSREPLCURSOR3 = new DS_REPL_CURSOR_3();
                    Marshal.PtrToStructure(intPtr, dSREPLCURSOR3);
                    ReplicationCursor replicationCursor1 = new ReplicationCursor(this.server, partition, dSREPLCURSOR3.uuidSourceDsaInvocationID, dSREPLCURSOR3.usnAttributeFilter, dSREPLCURSOR3.ftimeLastSyncSuccess, dSREPLCURSOR3.pszSourceDsaDN);
                    this.Add(replicationCursor1);
                }
            }
        }
Example #4
0
        internal void AddHelper(string partition, object cursors, bool advanced, IntPtr info)
        {
            int cNumCursors = 0;

            if (advanced)
            {
                cNumCursors = ((DS_REPL_CURSORS_3)cursors).cNumCursors;
            }
            else
            {
                cNumCursors = ((DS_REPL_CURSORS)cursors).cNumCursors;
            }
            IntPtr zero = IntPtr.Zero;

            for (int i = 0; i < cNumCursors; i++)
            {
                if (advanced)
                {
                    zero = (IntPtr)((((long)info) + (Marshal.SizeOf(typeof(int)) * 2)) + (i * Marshal.SizeOf(typeof(DS_REPL_CURSOR_3))));
                    DS_REPL_CURSOR_3 structure = new DS_REPL_CURSOR_3();
                    Marshal.PtrToStructure(zero, structure);
                    ReplicationCursor cursor = new ReplicationCursor(this.server, partition, structure.uuidSourceDsaInvocationID, structure.usnAttributeFilter, structure.ftimeLastSyncSuccess, structure.pszSourceDsaDN);
                    this.Add(cursor);
                }
                else
                {
                    zero = (IntPtr)((((long)info) + (Marshal.SizeOf(typeof(int)) * 2)) + (i * Marshal.SizeOf(typeof(DS_REPL_CURSOR))));
                    DS_REPL_CURSOR ds_repl_cursor = new DS_REPL_CURSOR();
                    Marshal.PtrToStructure(zero, ds_repl_cursor);
                    ReplicationCursor cursor2 = new ReplicationCursor(this.server, partition, ds_repl_cursor.uuidSourceDsaInvocationID, ds_repl_cursor.usnAttributeFilter);
                    this.Add(cursor2);
                }
            }
        }
        public int IndexOf(ReplicationCursor cursor)
        {
            if (cursor == null)
                throw new ArgumentNullException("cursor");

            return InnerList.IndexOf(cursor);
        }
 internal void AddHelper(string partition, object cursors, bool advanced, IntPtr info)
 {
     int cNumCursors = 0;
     if (advanced)
     {
         cNumCursors = ((DS_REPL_CURSORS_3) cursors).cNumCursors;
     }
     else
     {
         cNumCursors = ((DS_REPL_CURSORS) cursors).cNumCursors;
     }
     IntPtr zero = IntPtr.Zero;
     for (int i = 0; i < cNumCursors; i++)
     {
         if (advanced)
         {
             zero = (IntPtr) ((((long) info) + (Marshal.SizeOf(typeof(int)) * 2)) + (i * Marshal.SizeOf(typeof(DS_REPL_CURSOR_3))));
             DS_REPL_CURSOR_3 structure = new DS_REPL_CURSOR_3();
             Marshal.PtrToStructure(zero, structure);
             ReplicationCursor cursor = new ReplicationCursor(this.server, partition, structure.uuidSourceDsaInvocationID, structure.usnAttributeFilter, structure.ftimeLastSyncSuccess, structure.pszSourceDsaDN);
             this.Add(cursor);
         }
         else
         {
             zero = (IntPtr) ((((long) info) + (Marshal.SizeOf(typeof(int)) * 2)) + (i * Marshal.SizeOf(typeof(DS_REPL_CURSOR))));
             DS_REPL_CURSOR ds_repl_cursor = new DS_REPL_CURSOR();
             Marshal.PtrToStructure(zero, ds_repl_cursor);
             ReplicationCursor cursor2 = new ReplicationCursor(this.server, partition, ds_repl_cursor.uuidSourceDsaInvocationID, ds_repl_cursor.usnAttributeFilter);
             this.Add(cursor2);
         }
     }
 }
Example #7
0
 public int IndexOf(ReplicationCursor cursor)
 {
     if (cursor == null)
     {
         throw new ArgumentNullException("cursor");
     }
     return(base.InnerList.IndexOf(cursor));
 }
        public int IndexOf(ReplicationCursor cursor)
        {
            Contract.Requires(cursor != null);
            Contract.Ensures(Contract.Result <int>() >= -1);
            Contract.Ensures(Contract.Result <int>() < this.Count);

            return(default(int));
        }
Example #9
0
 public bool Contains(ReplicationCursor cursor)
 {
     if (cursor == null)
     {
         throw new ArgumentNullException("cursor");
     }
     return(base.InnerList.Contains(cursor));
 }
    public int IndexOf(ReplicationCursor cursor)
    {
      Contract.Requires(cursor!= null);
      Contract.Ensures(Contract.Result<int>() >= -1);
      Contract.Ensures(Contract.Result<int>() < this.Count);

      return default(int);
    }
		public bool Contains(ReplicationCursor cursor)
		{
			if (cursor != null)
			{
				return base.InnerList.Contains(cursor);
			}
			else
			{
				throw new ArgumentNullException("cursor");
			}
		}
		public int IndexOf(ReplicationCursor cursor)
		{
			if (cursor != null)
			{
				return base.InnerList.IndexOf(cursor);
			}
			else
			{
				throw new ArgumentNullException("cursor");
			}
		}
Example #13
0
        internal void AddHelper(string partition, object cursors, bool advanced, IntPtr info)
        {
            // get the count
            int count = 0;

            if (advanced)
            {
                count = ((DS_REPL_CURSORS_3)cursors).cNumCursors;
            }
            else
            {
                count = ((DS_REPL_CURSORS)cursors).cNumCursors;
            }

            IntPtr addr = (IntPtr)0;

            for (int i = 0; i < count; i++)
            {
                if (advanced)
                {
                    addr = IntPtr.Add(info, sizeof(int) * 2 + i * Marshal.SizeOf(typeof(DS_REPL_CURSOR_3)));
                    DS_REPL_CURSOR_3 cursor = new DS_REPL_CURSOR_3();
                    Marshal.PtrToStructure(addr, cursor);

                    ReplicationCursor managedCursor = new ReplicationCursor(_server,
                                                                            partition,
                                                                            cursor.uuidSourceDsaInvocationID,
                                                                            cursor.usnAttributeFilter,
                                                                            cursor.ftimeLastSyncSuccess,
                                                                            cursor.pszSourceDsaDN);
                    Add(managedCursor);
                }
                else
                {
                    addr = IntPtr.Add(info, sizeof(int) * 2 + i * Marshal.SizeOf(typeof(DS_REPL_CURSOR)));
                    DS_REPL_CURSOR cursor = new DS_REPL_CURSOR();
                    Marshal.PtrToStructure(addr, cursor);

                    ReplicationCursor managedCursor = new ReplicationCursor(_server,
                                                                            partition,
                                                                            cursor.uuidSourceDsaInvocationID,
                                                                            cursor.usnAttributeFilter);
                    Add(managedCursor);
                }
            }
        }
        internal void AddHelper(string partition, object cursors, bool advanced, IntPtr info)
        {
            // get the count
            int count = 0;
            if (advanced)
                count = ((DS_REPL_CURSORS_3)cursors).cNumCursors;
            else
                count = ((DS_REPL_CURSORS)cursors).cNumCursors;

            IntPtr addr = (IntPtr)0;

            for (int i = 0; i < count; i++)
            {
                if (advanced)
                {
                    addr = IntPtr.Add(info, Marshal.SizeOf(typeof(int)) * 2 + i * Marshal.SizeOf(typeof(DS_REPL_CURSOR_3)));
                    DS_REPL_CURSOR_3 cursor = new DS_REPL_CURSOR_3();
                    Marshal.PtrToStructure(addr, cursor);

                    ReplicationCursor managedCursor = new ReplicationCursor(_server,
                                                                         partition,
                                                                         cursor.uuidSourceDsaInvocationID,
                                                                         cursor.usnAttributeFilter,
                                                                         cursor.ftimeLastSyncSuccess,
                                                                         cursor.pszSourceDsaDN);
                    Add(managedCursor);
                }
                else
                {
                    addr = IntPtr.Add(info, Marshal.SizeOf(typeof(int)) * 2 + i * Marshal.SizeOf(typeof(DS_REPL_CURSOR)));
                    DS_REPL_CURSOR cursor = new DS_REPL_CURSOR();
                    Marshal.PtrToStructure(addr, cursor);

                    ReplicationCursor managedCursor = new ReplicationCursor(_server,
                                                                         partition,
                                                                         cursor.uuidSourceDsaInvocationID,
                                                                         cursor.usnAttributeFilter);
                    Add(managedCursor);
                }
            }
        }
		public void CopyTo (ReplicationCursor[] values, int index)
		{
			throw new NotImplementedException ();
		}
		public bool Contains (ReplicationCursor cursor)
		{
			throw new NotImplementedException ();
		}
Example #17
0
 private int Add(ReplicationCursor cursor)
 {
     return(base.InnerList.Add(cursor));
 }
		public void CopyTo(ReplicationCursor[] values, int index)
		{
			base.InnerList.CopyTo(values, index);
		}
        public bool Contains(ReplicationCursor cursor)
        {
            Contract.Requires(cursor != null);

            return(default(bool));
        }
Example #20
0
 private int Add(ReplicationCursor cursor) => InnerList.Add(cursor);
		private int Add(ReplicationCursor cursor)
		{
			return base.InnerList.Add(cursor);
		}
    public void CopyTo(ReplicationCursor[] values, int index)
    {
      Contract.Requires(values != null);
      Contract.Requires(index >= 0);

    }
		public int IndexOf (ReplicationCursor cursor)
		{
			throw new NotImplementedException ();
		}
Example #24
0
 public bool Contains(ReplicationCursor cursor)
 {
     throw new NotImplementedException();
 }
Example #25
0
 public int IndexOf(ReplicationCursor cursor)
 {
     throw new NotImplementedException();
 }
    public bool Contains(ReplicationCursor cursor)
    {
      Contract.Requires(cursor != null);

      return default(bool);
    }