コード例 #1
0
        /// <summary>
        /// Get the plugin with the highest version for the given flow, or null if
        /// there aren't any plugins for the flow.
        /// </summary>
        public PluginItem GetHighestVersionPlugin(string flowId)
        {
            PluginItem item = null;

            DoSimpleTopQueryWithRowCallbackDelegate(TABLE_NAME,
                                                    "FlowId", flowId, "BinaryVersion DESC", MAP_PLUGIN_COLUMNS, 1,
                                                    delegate(IDataReader reader)
            {
                item               = new PluginItem();
                int index          = 0;
                item.Id            = reader.GetString(index++);
                item.FlowId        = reader.GetString(index++);
                item.BinaryVersion = VersionInfo.FromSortableString(reader.GetString(index++));
                item.ModifiedById  = reader.GetString(index++);
                item.ModifiedOn    = reader.GetDateTime(index++);
            });
            return(item);
        }