public static void SearchSingle(string Title, string Year, Action <Entry> AddEntry) { var c = new BasicIMDBAliasSearch(); var x = default(Entry); c.AddEntry += (e, i) => { if (x == null) { x = e; } else { if (!string.IsNullOrEmpty(Year)) { if (!string.IsNullOrEmpty(e.OptionalReleaseDate)) { if (e.OptionalReleaseDate.Contains(Year)) { x = e; } } } } }; c.Search(Title); if (x != null) { AddEntry(x); } }
public static void Search(string Title, Action <Entry, int> AddEntry) { var c = new BasicIMDBAliasSearch(); c.AddEntry += AddEntry; c.Search(Title); }
public static void SearchSingle(string Title, string Year, Action<Entry> AddEntry) { var c = new BasicIMDBAliasSearch(); var x = default(Entry); c.AddEntry += (e, i) => { if (x == null) { x = e; } else { if (!string.IsNullOrEmpty(Year)) if (!string.IsNullOrEmpty(e.OptionalReleaseDate)) if (e.OptionalReleaseDate.Contains(Year)) x = e; } }; c.Search(Title); if (x != null) AddEntry(x); }
public static void Search(string Title, Action<Entry, int> AddEntry) { var c = new BasicIMDBAliasSearch(); c.AddEntry += AddEntry; c.Search(Title); }