Deveel.Data.Sql.ExecutionContext.SetCursor C# (CSharp) Method

SetCursor() public method

public SetCursor ( ICursor cursor ) : void
cursor ICursor
return void
        public void SetCursor(ICursor cursor)
        {
            if (cursor == null)
                throw new ArgumentNullException("cursor");

            if (HasResult)
                throw new InvalidOperationException("The context has already a result set.");
            if (HasCursor)
                throw new InvalidOperationException("A cursor was already set as result of this context.");

            Cursor = cursor;
            HasCursor = true;
        }