Git Product home page Git Product logo

olinq's People

Contributors

mcintyre321 avatar wasabii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

olinq's Issues

OLinq makes applications susceptible to memory leaks

OLinq currently implements IDisposable from the View and Buffer down through the operation graph into any underlying sources to handle event unsubscriptions. This works if the lifetime of the View or Buffer is carefully managed. However, in most WPF applications, the lifetime of objects exposed from the ViewModel is not carefully managed. The window is just closed.

Consequently if event subscriptions are held to objects that are not scoped to the Window, these references will end up preventing the GC from disposing entire sets of instances and UI resources.

Reactive values

is there anything in OLinq like the ReactiveValue I've made up below?

class Obj : INotifyPropertyChanged
{
    public Obj()
    {
        FullName = new ReactiveValue(this, () => this.FirstName + this.LastName); //watch these properties
    }
    public event PropertyChangedEventHandler PropertyChanged;

    public string FirstName{...} //Notifies changes
    public string LastName {...}//Notifies changes

    public string FullName {get; private set;} 
}

cheers!

Is Except working?

I'm trying to get a collection that has items from list A that are not in list B. I tried a simple where/!contains, but it says ! is not supported.

Is there any way to do what I'm trying to do?

Any alternatives to this project?

Good project but missing some linq methods and seems not updated anymore, Any alternatives to this project? All similar projects seems dead :(

Continuous Aggregation

Hello, does OLinq offer continuous aggregation like CLINQ?

I wrote a short script to see if it did, out but I was finding that re-executing queries re-enumerated the source, indicating that the results are not cached, so it looks to me like it doesn't, but it may have been a mistake on my part.

PCL Support?

I'd love to use OLinq in my PCL project, is it possible to compile it as portable?

LambdaContainer misbehaviour when the source contains duplicate items

A LambdaContainer is effectively a Dictionary, keyed by the source elements:

        IEnumerable<TSource> source;
        Dictionary<TSource, LambdaOperation<TResult>> lambdas =
            new Dictionary<TSource, LambdaOperation<TResult>>();

When the source contains duplicate elements, they get merged into a single LambdaOperation, which has some undesireable consequences:

  1. if one of the duplicate items gets removed from the source, the LambdaOperation is removed immediately, which is equivalent to silently removing all of the duplicate items;
  2. if the duplicated item raises OnPropertyChanged, the merged LambdaOperation will retranslate the notification only once, instead of one-per-duplicate, which will mislead the group operations like Sum, etc.

At the first glance it looks like simple reference counting would suffice, but I've discovered this issue while trying to make GroupBy notifications respect the ordering. That alone, in turn, requires knowing all of the source item indices, therefore a MultiMap-like solution would fit better.

If my vision of the situation is correct, I'll try fixing it as well :)

Join() support

Hi,

it's been a while and now I'm finally stuck into absense of joins, and going to implement it. After having analysed revision history, it looks like ��it would be sufficient to:

  • add JoinOperation, likely based on SelectManyOperation or GroupByOperation;
  • update OperationFactory's methods FromExpression() and FromQueryableExpression();
  • add tests accordingly.

Is it all?

Remove Rx-Interfaces dependency for net40

I'm just starting to look at your library, but it seems really cool so far. Thank you!

Under .NET 4.0+ you don't seem to need the Rx-Interfaces reference at all (the IObservable / IObserver is part of the base framework). Would it be possible to remove it from the package dependencies when installing the OLinq NuGet package (and remove the reference from the main project?)

INotifyPropertyChanged

Hi I'm thinking about taking a fork to add INotifyPropertyChanged handling. Am I right in thinking basic support could be added by removing, then re-adding an item when one of it's properties change?

Not working?

i tried from nuget and compile from latest source,

var collection = new ObservableCollection(){ 1, 2, 3 }; //an object implementing INo
var observableView = collection.AsObservableQuery().Where(i => i > 2).ToObservableView();
var observableBuffer = observableView.ToBuffer(); //an ObservableBuffer caches the result

AsObservableQuery() is just empty class, and if i use linq i get i cannot use ToObservableView()

Remove item from collection throws exception

When I try to remove item from original collection I'm getting exception:
"Collection Remove event must specify item position."

        private ObservableCollection<int> oc = new ObservableCollection<int>();
        private ObservableView<int> ov;

        oc.Add(10);
        oc.Add(20);
        oc.Add(30);

        ov = oc.AsObservableQuery().Where(i => i < 30).AsObservableQuery().ToObservableView();

        oc.Remove(20);

Managed to get around with new methods:

        public static void RaiseRemoveEvent<T>(Action<NotifyCollectionChangedEventArgs> raise, IEnumerable<T> oldItems, int oldIdx)
        {
#if !SILVERLIGHT && !PCL
            raise(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, oldItems.ToList(), oldIdx));
#else
            foreach (var item in oldItems)
                raise(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item, oldIdx));
#endif
        }

        public static void RaiseRemoveEvent<T>(Action<NotifyCollectionChangedEventArgs> raise, T oldItem, int oldIdx)
        {
#if !SILVERLIGHT && !PCL
            raise(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, oldItem, oldIdx));
#else
            raise(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, oldItem, oldIdx));
#endif
        }

And in WhereOperation calling
NotifyCollectionChangedUtil.RaiseRemoveEvent(OnCollectionChanged, oldItems**, args.OldStartingIndex**);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.