示例#1
0
        public SignalList <T> GetTopLevelSignals()
        {
            var toReturn = new SignalList <T>();

            toReturn.AddRange(this.Where(signal => signal.SubSource == null));
            return(toReturn);
        }
示例#2
0
        public SignalList <T> GetSignalsByCategory(string category)
        {
            var toReturn = new SignalList <T>();

            toReturn.AddRange(
                this.Where(
                    signal =>
                    !string.IsNullOrWhiteSpace(signal.Category) &&
                    string.Equals(category, signal.Category, StringComparison.OrdinalIgnoreCase)));
            return(toReturn);
        }
示例#3
0
        public SignalList <T> GetSignalsByCollection(string collectionName)
        {
            var toReturn = new SignalList <T>();

            toReturn.AddRange(
                this.Where(
                    signal =>
                    !string.IsNullOrWhiteSpace(signal.CollectionName) &&
                    string.Equals(collectionName, signal.CollectionName, StringComparison.OrdinalIgnoreCase)));
            return(toReturn);
        }
示例#4
0
        public SignalList <T> GetSignalsFromSource(object source)
        {
            var toReturn = new SignalList <T>();

            toReturn.AddRange(
                this.Where(
                    signal =>
                    signal.Source == source ||
                    string.Equals(signal.SourceFriendlyName, source.ToString(),
                                  StringComparison.OrdinalIgnoreCase)));
            return(toReturn);
        }
示例#5
0
        public SignalList <T> GetSignalsBySubSourceFriendlyName(string subSourceFriendlyName)
        {
            var toReturn = new SignalList <T>();

            toReturn.AddRange(
                this.Where(
                    signal =>
                    !string.IsNullOrWhiteSpace(signal.SubSourceFriendlyName) &&
                    string.Equals(subSourceFriendlyName, signal.SubSourceFriendlyName,
                                  StringComparison.OrdinalIgnoreCase)));
            return(toReturn);
        }