当前位置: 首页>>代码示例>>C#>>正文


C# AList类代码示例

本文整理汇总了C#中AList的典型用法代码示例。如果您正苦于以下问题:C# AList类的具体用法?C# AList怎么用?C# AList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AList类属于命名空间,在下文中一共展示了AList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CompileFcToQd

 static void CompileFcToQd(string sourcePath)
 {
     QDeterminant = new QDet();
     var FCconverter = Manufactory.CreateFlowChartConverter(ConverterTypes.JSON);
     FCconverter.ParseDocument(sourcePath);
     var actionList = new AList(FCconverter.GetBlocks(), FCconverter.GetLinks(), Opertaions);
     QDeterminant = actionList.getqdet();
     var result = new StringBuilder("");
     if (QDeterminant.QDeterminant.Count > 0)
     {
         result.Append("{");
         foreach (var qterm in QDeterminant.QDeterminant)
         {
             result.Append("(");
             if (!String.IsNullOrEmpty(qterm.Logical))
             {
                 result.Append(qterm.Logical).Append(",");
             }
             result.Append(qterm.Definitive).Append(");");
         }
         result.Remove(result.Length - 1, 1).Append("}");
     }
     Console.WriteLine("Save QD");
     File.WriteAllText(Path.GetDirectoryName(sourcePath)[email protected]"\Qdeterminant.qd",result.ToString());
 }
开发者ID:Kingmidas74,项目名称:Q_Determinant,代码行数:25,代码来源:Program.cs

示例2: GetCRLsFromSignature

		public override IList<X509Crl> GetCRLsFromSignature()
		{
			IList<X509Crl> list = new AList<X509Crl>();
			try
			{
				// Add certificates contained in SignedData
                foreach (X509Crl crl in cmsSignedData.GetCrls
					("Collection").GetMatches(null))
				{					
					list.AddItem(crl);
				}
				// Add certificates in CAdES-XL certificate-values inside SignerInfo attribute if present
				SignerInformation si = cmsSignedData.GetSignerInfos().GetFirstSigner(signerId);
				if (si != null && si.UnsignedAttributes != null && si.UnsignedAttributes[PkcsObjectIdentifiers.IdAAEtsRevocationValues] != null)
				{
					RevocationValues revValues = RevocationValues.GetInstance(si.UnsignedAttributes[PkcsObjectIdentifiers.IdAAEtsRevocationValues].AttrValues[0]);
					foreach (CertificateList crlObj in revValues.GetCrlVals())
					{
						X509Crl crl = new X509Crl(crlObj);
						list.AddItem(crl);
					}
				}
			}
			/*catch (StoreException e)
			{
				throw new RuntimeException(e);
			}*/
			catch (CrlException e)
			{
				throw new RuntimeException(e);
			}
			return list;
		}
开发者ID:Gianluigi,项目名称:dssnet,代码行数:33,代码来源:CAdESCRLSource.cs

示例3: Process

 /// <exception cref="NBoilerpipe.BoilerpipeProcessingException"></exception>
 public bool Process(TextDocument doc)
 {
     bool changes = false;
     IList<TextBlock> blocks = doc.GetTextBlocks();
     IList<TextBlock> blocksNew = new AList<TextBlock>();
     foreach (TextBlock tb in blocks)
     {
         string text = tb.GetText();
         string[] paragraphs = text.Split("[\n\r]+");
         if (paragraphs.Length < 2)
         {
             blocksNew.AddItem(tb);
             continue;
         }
         bool isContent = tb.IsContent();
         ICollection<string> labels = tb.GetLabels();
         foreach (string p in paragraphs)
         {
             TextBlock tbP = new TextBlock(p);
             tbP.SetIsContent(isContent);
             tbP.AddLabels(labels);
             blocksNew.AddItem(tbP);
             changes = true;
         }
     }
     if (changes)
     {
         blocks.Clear();
         Sharpen.Collections.AddAll(blocks, blocksNew);
     }
     return changes;
 }
开发者ID:oganix,项目名称:NBoilerpipe,代码行数:33,代码来源:SplitParagraphBlocksFilter.cs

示例4: GetCertificateBySubjectName

        public virtual IList<CertificateAndContext> GetCertificateBySubjectName(X509Name
			 subjectName)
		{
			IList<CertificateAndContext> list = new AList<CertificateAndContext>();
			try
			{
				string url = GetAccessLocation(certificate, X509ObjectIdentifiers.IdADCAIssuers);
				if (url != null)
				{
                    X509CertificateParser parser = new X509CertificateParser();
                    X509Certificate cert = parser.ReadCertificate(httpDataLoader.Get(url));

					if (cert.SubjectDN.Equals(subjectName))
					{
						list.Add(new CertificateAndContext());
					}
				}
			}
			catch (CannotFetchDataException)
			{
                return new List<CertificateAndContext>();
			}
			catch (CertificateException)
			{
                return new List<CertificateAndContext>();
			}
			return list;
		}
开发者ID:Gianluigi,项目名称:dssnet,代码行数:28,代码来源:AIACertificateSource.cs

示例5: GetQuery

 public static Query GetQuery(Database database, string listDocId)
 {
     View view = database.GetView(ViewName);
     if (view.Map == null)
     {
         view.Map += (IDictionary<string, object> document, EmitDelegate emitter)=> 
         {
             if (Task.DocType.Equals(document.Get("type")))
             {
                 var keys = new AList<object>();
                 keys.AddItem(document.Get("list_id"));
                 keys.AddItem(document.Get("created_at"));
                 emitter(keys, document);
             }
         };
     }
     Query query = view.CreateQuery();
     query.Descending = true;
     IList<object> startKeys = new AList<object>();
     startKeys.AddItem(listDocId);
     startKeys.AddItem(new Dictionary<string, object>());
     IList<object> endKeys = new AList<object>();
     endKeys.AddItem(listDocId);
     query.StartKey = startKeys;
     query.EndKey = endKeys;
     return query;
 }
开发者ID:transformersprimeabcxyz,项目名称:_TO-DO-couchbase-lite-net-couchbase,代码行数:27,代码来源:Task.cs

示例6: PreprocessorExpressionParser

 public PreprocessorExpressionParser(TJS tjs, string script)
     : base(script)
 {
     //	private int mResult;
     mIDs = new AList<string>();
     mTJS = tjs;
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:7,代码来源:PreprocessorExpressionParser.cs

示例7: TestDatabase

		public virtual void TestDatabase()
		{
			Send("PUT", "/database", Status.Created, null);
			IDictionary<string, object> dbInfo = (IDictionary<string, object>)Send("GET", "/database"
				, Status.Ok, null);
			NUnit.Framework.Assert.AreEqual(0, dbInfo.Get("doc_count"));
			NUnit.Framework.Assert.AreEqual(0, dbInfo.Get("update_seq"));
			NUnit.Framework.Assert.IsTrue((int)dbInfo.Get("disk_size") > 8000);
			Send("PUT", "/database", Status.PreconditionFailed, null);
			Send("PUT", "/database2", Status.Created, null);
			IList<string> allDbs = new AList<string>();
			allDbs.AddItem("cblite-test");
			allDbs.AddItem("database");
			allDbs.AddItem("database2");
			Send("GET", "/_all_dbs", Status.Ok, allDbs);
			dbInfo = (IDictionary<string, object>)Send("GET", "/database2", Status.Ok, null);
			NUnit.Framework.Assert.AreEqual("database2", dbInfo.Get("db_name"));
			Send("DELETE", "/database2", Status.Ok, null);
			allDbs.Remove("database2");
			Send("GET", "/_all_dbs", Status.Ok, allDbs);
			Send("PUT", "/database%2Fwith%2Fslashes", Status.Created, null);
			dbInfo = (IDictionary<string, object>)Send("GET", "/database%2Fwith%2Fslashes", Status
				.Ok, null);
			NUnit.Framework.Assert.AreEqual("database/with/slashes", dbInfo.Get("db_name"));
		}
开发者ID:Redth,项目名称:couchbase-lite-net,代码行数:25,代码来源:RouterTest.cs

示例8: LogAllCommits

 public virtual void LogAllCommits()
 {
     IList<RevCommit> commits = new AList<RevCommit>();
     Git git = Git.Wrap(db);
     WriteTrashFile("Test.txt", "Hello world");
     git.Add().AddFilepattern("Test.txt").Call();
     commits.AddItem(git.Commit().SetMessage("initial commit").Call());
     git.BranchCreate().SetName("branch1").Call();
     Ref checkedOut = git.Checkout().SetName("branch1").Call();
     NUnit.Framework.Assert.AreEqual("refs/heads/branch1", checkedOut.GetName());
     WriteTrashFile("Test1.txt", "Hello world!");
     git.Add().AddFilepattern("Test1.txt").Call();
     commits.AddItem(git.Commit().SetMessage("branch1 commit").Call());
     checkedOut = git.Checkout().SetName("master").Call();
     NUnit.Framework.Assert.AreEqual("refs/heads/master", checkedOut.GetName());
     WriteTrashFile("Test2.txt", "Hello world!!");
     git.Add().AddFilepattern("Test2.txt").Call();
     commits.AddItem(git.Commit().SetMessage("branch1 commit").Call());
     Iterator<RevCommit> log = git.Log().All().Call().Iterator();
     NUnit.Framework.Assert.IsTrue(log.HasNext());
     NUnit.Framework.Assert.IsTrue(commits.Contains(log.Next()));
     NUnit.Framework.Assert.IsTrue(log.HasNext());
     NUnit.Framework.Assert.IsTrue(commits.Contains(log.Next()));
     NUnit.Framework.Assert.IsTrue(log.HasNext());
     NUnit.Framework.Assert.IsTrue(commits.Contains(log.Next()));
     NUnit.Framework.Assert.IsFalse(log.HasNext());
 }
开发者ID:JamesChan,项目名称:ngit,代码行数:27,代码来源:LogCommandTest.cs

示例9: AssignStructure

 /// <exception cref="Kirikiri.Tjs2.VariantException"></exception>
 /// <exception cref="Kirikiri.Tjs2.TJSException"></exception>
 public virtual void AssignStructure(Dispatch2 dsp, AList<Dispatch2> stack)
 {
     // assign structured data from dsp
     //ArrayNI dicni = null;
     if (dsp.GetNativeInstance(DictionaryClass.ClassID) != null)
     {
         // copy from dictionary
         stack.AddItem(dsp);
         try
         {
             CustomObject owner = mOwner.Get();
             owner.Clear();
             DictionaryNI.AssignStructCallback callback = new DictionaryNI.AssignStructCallback
                 (stack, owner);
             dsp.EnumMembers(Interface.IGNOREPROP, callback, dsp);
         }
         finally
         {
             stack.Remove(stack.Count - 1);
         }
     }
     else
     {
         throw new TJSException(Error.SpecifyDicOrArray);
     }
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:28,代码来源:DictionaryNI.cs

示例10: Add

 public void Add(Kirikiri.Tjs2.ExprNode node)
 {
     if (mNodes == null)
     {
         mNodes = new AList<Kirikiri.Tjs2.ExprNode>();
     }
     mNodes.AddItem(node);
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:8,代码来源:ExprNode.cs

示例11: LocalSymbolList

 public LocalSymbolList(int localCount)
 {
     //private int mStartWrite;
     //private int mCountWrite;
     mLocalCountStart = localCount;
     //mStartWrite = mCountWrite = 0;
     mList = new AList<string>();
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:8,代码来源:LocalSymbolList.cs

示例12: TestJoinIterable

 public virtual void TestJoinIterable()
 {
     IList<string> strings = new AList<string>();
     strings.Add("A");
     strings.Add("B");
     strings.Add("C");
     Sharpen.Tests.AreEqual("A;B;C", StringUtil.Join(strings.ToCharSequence(), ";"));
     Sharpen.Tests.AreEqual(string.Empty, StringUtil.Join(new AList<string>().ToCharSequence(), ";"));
 }
开发者ID:Sicos1977,项目名称:n-metadata-extractor,代码行数:9,代码来源:StringUtilTest.cs

示例13: LexicalAnalyzer

 public LexicalAnalyzer(Compiler block, string script, bool isexpr, bool resultneeded
     )
 {
     mRetValDeque = new LongQue();
     mEmbeddableExpressionDataStack = new AList<EmbeddableExpressionData>();
     mValues = new AList<object>();
     mBlock = block;
     mIsExprMode = isexpr;
     mResultNeeded = resultneeded;
     mPrevToken = -1;
     int scriptLen = script.Length;
     if (mIsExprMode)
     {
         mText = new char[scriptLen + 2];
         Sharpen.Runtime.GetCharsForString(script, 0, scriptLen, mText, 0);
         mText[scriptLen] = ';';
         mText[scriptLen + 1] = (char)0;
     }
     else
     {
         //mStream = new StringStream(script+";");
         if (script.StartsWith("#!") == true)
         {
             // #! を // に置换
             mText = new char[scriptLen + 1];
             Sharpen.Runtime.GetCharsForString(script, 2, scriptLen, mText, 2);
             mText[0] = mText[1] = '/';
             mText[scriptLen] = (char)0;
         }
         else
         {
             //mStream = new StringStream( "//" + script.substring(2));
             mText = new char[scriptLen + 1];
             Sharpen.Runtime.GetCharsForString(script, 0, scriptLen, mText, 0);
             mText[scriptLen] = (char)0;
         }
     }
     //mStream = new StringStream(script);
     if (CompileState.mEnableDicFuncQuickHack)
     {
         //----- dicfunc quick-hack
         //mDicFunc = false; // デフォルト值なので入れる必要なし
         //if( mIsExprMode && (script.startsWith("[") == true || script.startsWith("%[") == true) ) {
         char c = script[0];
         if (mIsExprMode && (c == '[' || (c == '%' && script[1] == '[')))
         {
             mDicFunc = true;
         }
     }
     //mIfLevel = 0;
     //mPrevPos = 0;
     //mNestLevel = 0;
     mIsFirst = true;
     //mRegularExpression = false;
     //mBareWord = false;
     PutValue(null);
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:57,代码来源:LexicalAnalyzer.cs

示例14: ExtendUnsignedAttributes

		/// <exception cref="System.IO.IOException"></exception>
        //private IDictionary<DerObjectIdentifier, Asn1Encodable> ExtendUnsignedAttributes(IDictionary
        //    <DerObjectIdentifier, Asn1Encodable> unsignedAttrs, X509Certificate signingCertificate
        //    , DateTime signingDate, CertificateSource optionalCertificateSource)
        private IDictionary ExtendUnsignedAttributes(IDictionary unsignedAttrs
            , X509Certificate signingCertificate, DateTime signingDate
            , CertificateSource optionalCertificateSource)
		{
			ValidationContext validationContext = certificateVerifier.ValidateCertificate(signingCertificate
				, signingDate, optionalCertificateSource, null, null);
			try
			{
				IList<X509CertificateStructure> certificateValues = new AList<X509CertificateStructure
					>();
				AList<CertificateList> crlValues = new AList<CertificateList>();
				AList<BasicOcspResponse> ocspValues = new AList<BasicOcspResponse>();
				foreach (CertificateAndContext c in validationContext.GetNeededCertificates())
				{
					if (!c.Equals(signingCertificate))
					{
                        certificateValues.AddItem(X509CertificateStructure.GetInstance(((Asn1Sequence)Asn1Object.FromByteArray
                            (c.GetCertificate().GetEncoded()))));
					}
				}
				foreach (X509Crl relatedcrl in validationContext.GetNeededCRL())
				{                    
					crlValues.AddItem(CertificateList.GetInstance((Asn1Sequence)Asn1Object.FromByteArray(((X509Crl
						)relatedcrl).GetEncoded())));
				}
				foreach (BasicOcspResp relatedocspresp in validationContext.GetNeededOCSPResp())
				{                    
					ocspValues.AddItem((BasicOcspResponse.GetInstance((Asn1Sequence)Asn1Object.FromByteArray(
						relatedocspresp.GetEncoded()))));
				}
				CertificateList[] crlValuesArray = new CertificateList[crlValues.Count];
				BasicOcspResponse[] ocspValuesArray = new BasicOcspResponse[ocspValues.Count];
				RevocationValues revocationValues = new RevocationValues(Sharpen.Collections.ToArray
					(crlValues, crlValuesArray), Sharpen.Collections.ToArray(ocspValues, ocspValuesArray
					), null);
				//unsignedAttrs.Put(PkcsObjectIdentifiers.IdAAEtsRevocationValues, new Attribute
                unsignedAttrs.Add(PkcsObjectIdentifiers.IdAAEtsRevocationValues, new BcCms.Attribute
					(PkcsObjectIdentifiers.IdAAEtsRevocationValues, new DerSet(revocationValues))
					);
				X509CertificateStructure[] certValuesArray = new X509CertificateStructure[certificateValues
					.Count];
				//unsignedAttrs.Put(PkcsObjectIdentifiers.IdAAEtsCertValues, new Attribute(PkcsObjectIdentifiers.IdAAEtsCertValues, new DerSet(new DerSequence(Sharpen.Collections.ToArray(certificateValues
                unsignedAttrs.Add(PkcsObjectIdentifiers.IdAAEtsCertValues, new BcCms.Attribute(PkcsObjectIdentifiers.IdAAEtsCertValues, new DerSet(new DerSequence(Sharpen.Collections.ToArray(certificateValues
					, certValuesArray)))));
			}
			catch (CertificateEncodingException e)
			{
				throw new RuntimeException(e);
			}
			catch (CrlException e)
			{
				throw new RuntimeException(e);
			}
			return unsignedAttrs;
		}
开发者ID:Gianluigi,项目名称:dssnet,代码行数:59,代码来源:CAdESProfileXL.cs

示例15: SaveStructuredDataForObject

 /// <exception cref="Kirikiri.Tjs2.VariantException"></exception>
 /// <exception cref="Kirikiri.Tjs2.TJSException"></exception>
 public static void SaveStructuredDataForObject(Dispatch2 dsp, AList<Dispatch2> stack
     , TextWriteStreamInterface stream, string indentstr)
 {
     // check object recursion
     int count = stack.Count;
     for (int i = 0; i < count; i++)
     {
         Dispatch2 d = stack[i];
         if (d == dsp)
         {
             // object recursion detected
             stream.Write("null /* object recursion detected */");
             return;
         }
     }
     // determin dsp's object type
     DictionaryNI dicni;
     ArrayNI arrayni;
     if (dsp != null)
     {
         dicni = (DictionaryNI)dsp.GetNativeInstance(DictionaryClass.ClassID);
         if (dicni != null)
         {
             // dictionary
             stack.AddItem(dsp);
             dicni.SaveStructuredData(stack, stream, indentstr);
             stack.Remove(stack.Count - 1);
             return;
         }
         else
         {
             arrayni = (ArrayNI)dsp.GetNativeInstance(ArrayClass.ClassID);
             if (arrayni != null)
             {
                 // array
                 stack.AddItem(dsp);
                 arrayni.SaveStructuredData(stack, stream, indentstr);
                 stack.Remove(stack.Count - 1);
                 return;
             }
             else
             {
                 // other objects
                 stream.Write("null /* (object) \"");
                 // stored as a null
                 Variant val = new Variant(dsp, dsp);
                 stream.Write(LexBase.EscapeC(val.AsString()));
                 stream.Write("\" */");
                 return;
             }
         }
     }
     stream.Write("null");
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:56,代码来源:ArrayNI.cs


注:本文中的AList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。