Beispiel #1
0
        static void enumColumnView(IEnumCERTVIEWROW dbRow, AdcsDbRow row)
        {
            IEnumCERTVIEWCOLUMN dbColumn = dbRow.EnumCertViewColumn();

            while (dbColumn.Next() != -1)
            {
                String colName = dbColumn.GetName();
                Object colVal  = dbColumn.GetValue(CertAdmConstants.CV_OUT_BASE64);
                switch (colName)
                {
                case "RequestID":
                case "ExtensionRequestId":
                case "AttributeRequestId":
                case "CRLRowId":
                    row.RowId = (Int32)colVal;
                    break;
                }
                row.Properties.Add(colName, colVal);
            }
            CryptographyUtils.ReleaseCom(dbColumn);
        }
Beispiel #2
0
 /// <summary>
 /// Gets a database row view based on a current configuration.
 /// </summary>
 /// <param name="skipRows">Number of rows to skip. Default is 0.</param>
 /// <param name="takeRows">Number of rows to fetch. Default is unlimited.</param>
 /// <returns>Database row view enumerator.</returns>
 /// <remarks>
 /// After calling this method, CA database reader configuration cannot be altered. That is, no columns
 /// or query filters can be added. In order to change reader configuration, a new instance of
 /// <strong>AdcsDbReader</strong> class must be created.
 /// <para>This method supports <code>yield return</code> statement and returns row as quickly as
 /// they are retrieved by a reader.</para>
 /// </remarks>
 public IEnumerable <AdcsDbRow> GetView(Int32 skipRows = 0, Int32 takeRows = Int32.MaxValue)
 {
     isOpenView = true;
     if (!allSet)
     {
         setResultColumns();
         setFilters();
         allSet = true;
     }
     if (dbRow == null)
     {
         dbRow = _caView.OpenView();
     }
     else
     {
         dbRow.Reset();
     }
     foreach (AdcsDbRow row in enumRows(skipRows, takeRows))
     {
         yield return(row);
     }
 }