Giter VIP home page Giter VIP logo

Comments (8)

briannoyes avatar briannoyes commented on May 16, 2024

You are right, need to get that updated. Hopefully someone from the community who it bothers will step in and submit a pull request with those fixes (hint hint) :)

Seriously though, please do if you have time. We'll keep this in the backlog if not and try to get to it when we can.

from prism-samples-wpf.

YehudahA avatar YehudahA commented on May 16, 2024

OK, may be I will do it.

from prism-samples-wpf.

YehudahA avatar YehudahA commented on May 16, 2024

I did it, and I'm trying to send a pull request but I get a message that i don't have permissions.

from prism-samples-wpf.

bartlannoeye avatar bartlannoeye commented on May 16, 2024

I suppose you did commit to your own fork and not this repository? As others can send a PR, I think everything permission-wise should be ok (unless one of the brians changed it lately).

from prism-samples-wpf.

briannoyes avatar briannoyes commented on May 16, 2024

No changes that I am aware of.

So did you get your changes checked in to your own fork and push'ed up to GitHub? Is the error happening when you press the "Compare, Review and Create a Pull Request" green button to the upper left of the list of files in your fork?

If you can give some more information we can try to help you through it. Or if you just want to send me a zip of what you have I can get it checked in for you but will still need you to sign a CLA:
https://cla2.dotnetfoundation.org/

Thanks
Brian

from prism-samples-wpf.

YehudahA avatar YehudahA commented on May 16, 2024

I hope I did everything right ..

YehudahA#1

from prism-samples-wpf.

briannoyes avatar briannoyes commented on May 16, 2024

Your pull request was under your own repo, not the Prism one. There were a number of changes I would have made to it anyway, so just went and updated the sample myself.

from prism-samples-wpf.

YehudahA avatar YehudahA commented on May 16, 2024

OK, a good job, but some comments:

  • I think that using ObservableCollection as Notify-property is anti-pattern.
    Instead of:
        public ObservableCollection<Meeting> Meetings
        {
            get { return meetings; }
            set { SetProperty(ref meetings, value); }
        }

Instead of this, we can use List<Meeting>, or like you did in ContactsViewModel: mettings.ForEach ....

But in my opinion, the best way to initialize collection is using extension method:

using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace ViewSwitchingNavigation.Infrastructure
{
    public static class ObservableCollectionExtensions
    {
        public static void AddRange<T> (this ObservableCollection<T> targetCollection,IEnumerable<T> source)
        {
            foreach(T item in source)
            {
                targetCollection.Add(item);
            }
        }
    }
}

//====================//
Instead of:

            contactsServiceMock
                .Setup(svc => svc.GetContactsAsync())
                .Returns(Task.FromResult(contacts));

You can write:

            contactsServiceMock
                .Setup(svc => svc.GetContactsAsync())
                .ReturnsAsync(contacts);

from prism-samples-wpf.

Related Issues (20)

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.