Ejemplo n.º 1
0
        public void WriteObject(PemObjectGenerator objGen)
        {
            PemObject pemObject = objGen.Generate();

            WritePreEncapsulationBoundary(pemObject.Type);
            if (((global::System.Collections.ICollection)pemObject.Headers).get_Count() > 0)
            {
                {
                    global::System.Collections.IEnumerator enumerator = ((global::System.Collections.IEnumerable)pemObject.Headers).GetEnumerator();
                    try
                    {
                        while (enumerator.MoveNext())
                        {
                            PemHeader pemHeader = (PemHeader)enumerator.get_Current();
                            writer.Write(pemHeader.Name);
                            writer.Write(": ");
                            writer.WriteLine(pemHeader.Value);
                        }
                    }
                    finally
                    {
                        global::System.IDisposable disposable = enumerator as global::System.IDisposable;
                        if (disposable != null)
                        {
                            disposable.Dispose();
                        }
                    }
                }
                writer.WriteLine();
            }
            WriteEncoded(pemObject.Content);
            WritePostEncapsulationBoundary(pemObject.Type);
        }
Ejemplo n.º 2
0
        public void WriteObject(PemObjectGenerator objGen)
        {
            PemObject obj2 = objGen.Generate();

            this.WritePreEncapsulationBoundary(obj2.Type);
            if (obj2.Headers.Count > 0)
            {
                IEnumerator enumerator = obj2.Headers.GetEnumerator();
                try
                {
                    while (enumerator.MoveNext())
                    {
                        PemHeader current = (PemHeader)enumerator.Current;
                        this.writer.Write(current.Name);
                        this.writer.Write(": ");
                        this.writer.WriteLine(current.Value);
                    }
                }
                finally
                {
                    if (enumerator is IDisposable disposable)
                    {
                        IDisposable disposable;
                        disposable.Dispose();
                    }
                }
                this.writer.WriteLine();
            }
            this.WriteEncoded(obj2.Content);
            this.WritePostEncapsulationBoundary(obj2.Type);
        }
Ejemplo n.º 3
0
        public void WriteObject(PemObjectGenerator objGen)
        {
            PemObject pemObject = objGen.Generate();

            WritePreEncapsulationBoundary(pemObject.Type);
            if (pemObject.Headers.Count > 0)
            {
                foreach (PemHeader header in pemObject.Headers)
                {
                    writer.Write(header.Name);
                    writer.Write(": ");
                    writer.WriteLine(header.Value);
                }
                writer.WriteLine();
            }
            WriteEncoded(pemObject.Content);
            WritePostEncapsulationBoundary(pemObject.Type);
        }
Ejemplo n.º 4
0
        public void WriteObject(PemObjectGenerator objGen)
        {
            PemObject obj = objGen.Generate();

            WritePreEncapsulationBoundary(obj.Type);

            if (obj.Headers.Count > 0)
            {
                foreach (PemHeader header in obj.Headers)
                {
                    writer.Write(header.Name);
                    writer.Write(": ");
                    writer.WriteLine(header.Value);
                }

                writer.WriteLine();
            }

            WriteEncoded(obj.Content);
            WritePostEncapsulationBoundary(obj.Type);
        }
Ejemplo n.º 5
0
        public void WriteObject(PemObjectGenerator objGen)
        {
            PemObject obj = objGen.Generate();

            WritePreEncapsulationBoundary(obj.Type);

            if (obj.Headers.Count > 0)
            {
                foreach (DictionaryEntry entry in obj.Headers)
                {
                    string hdr = (string)entry.Key;
                    string val = (string)entry.Value;

                    writer.Write(hdr);
                    writer.Write(": ");
                    writer.WriteLine(val);
                }

                writer.WriteLine();
            }

            WriteEncoded(obj.Content);
            WritePostEncapsulationBoundary(obj.Type);
        }
Ejemplo n.º 6
0
		public void WriteObject(PemObjectGenerator objGen)
		{
			PemObject obj = objGen.Generate();

			WritePreEncapsulationBoundary(obj.Type);

			if (obj.Headers.Count > 0)
			{
				foreach (DictionaryEntry entry in obj.Headers)
				{
					string hdr = (string)entry.Key;
					string val = (string)entry.Value;

					writer.Write(hdr);
					writer.Write(": ");
					writer.WriteLine(val);
				}

				writer.WriteLine();
			}

			WriteEncoded(obj.Content);
			WritePostEncapsulationBoundary(obj.Type);
		}