Ejemplo n.º 1
0
        internal static bool DeepEqualsReadOnlyDictionaryWithSimpleKeyAndSimpleValue <T, P>(
            this ReadOnlyDictionary <T, P> compared, ReadOnlyDictionary <T, P> comparedWith)
        {
            if (compared.Count != comparedWith.Count)
            {
                return(false);
            }

            for (var i = 0; i < compared.Count; i++)
            {
                if (!compared.ElementAt(i).Value.Equals(comparedWith.ElementAt(i).Value) ||
                    !compared.ElementAt(i).Key.Equals(comparedWith.ElementAt(i).Key))
                {
                    return(false);
                }
            }
            return(true);
        }
Ejemplo n.º 2
0
        internal static bool DeepEqualsReadOnlyDictionaryWithDefinitionKeyAndSimpleValue <T, P>(this ReadOnlyDictionary <T, P> compared, ReadOnlyDictionary <T, P> comparedWith) where T : IDeepEquatable <T>
        {
            if (compared.Count != comparedWith.Count)
            {
                return(false);
            }

            for (int i = 0; i < compared.Count; i++)
            {
                if (!compared.ElementAt(i).Key.DeepEquals(comparedWith.ElementAt(i).Key) || !compared.ElementAt(i).Value.Equals(comparedWith.ElementAt(i).Value))
                {
                    return(false);
                }
            }
            return(true);
        }
Ejemplo n.º 3
0
 public override void OnActivityCreated(Bundle savedInstanceState)
 {
     instance = this;
     base.OnActivityCreated(savedInstanceState);
     Preferences.instance.SupportActionBar.Title = GetString(Resource.String.opensource);
     //ListView.Divider = null;
     ListView.TextFilterEnabled = true;
     ListView.DividerHeight     = 0;
     ListAdapter         = new LibrariesAdapter(Preferences.instance, 0, libraries.Keys.ToList());
     ListView.ItemClick += (_, e) =>
     {
         isPaused = true;
         Intent intent = new Intent(Intent.ActionView);
         intent.SetData(Uri.Parse(libraries.ElementAt(e.Position).Value));
         StartActivity(intent);
     };
 }