Write() private méthode

private Write ( JsonWriter writer ) : void
writer Newtonsoft.Json.JsonWriter
Résultat void
Exemple #1
0
        private void CreatePassFile(PassGeneratorRequest request, string tempPath)
        {
            string passFileAndPath = Path.Combine(tempPath, "pass.json");

            using (StreamWriter sr = File.CreateText(passFileAndPath))
            {
                using (JsonWriter writer = new JsonTextWriter(sr))
                {
                    request.Write(writer);
                }
            }
        }
Exemple #2
0
        private void CreatePassFile(PassGeneratorRequest request)
        {
            using (MemoryStream ms = new MemoryStream())
            {
                using (StreamWriter sr = new StreamWriter(ms))
                {
                    using (JsonWriter writer = new JsonTextWriter(sr))
                    {
                        request.Write(writer);
                    }

                    passFile = ms.ToArray();
                }
            }
        }
        private void CreatePassFile(PassGeneratorRequest request)
        {
            using (MemoryStream ms = new MemoryStream())
            {
                using (StreamWriter sr = new StreamWriter(ms))
                {
                    using (JsonWriter writer = new JsonTextWriter(sr))
                    {
                        Trace.TraceInformation("Writing JSON...");
                        request.Write(writer);
                    }

                    passFile = ms.ToArray();
                }
            }
        }
        private void CreatePassFile(PassGeneratorRequest request, string tempPath)
        {
            string passFileAndPath = Path.Combine(tempPath, "pass.json");

            using (StreamWriter sr = File.CreateText(passFileAndPath))
            {
                using (JsonWriter writer = new JsonTextWriter(sr))
                {
                    request.Write(writer);
                }
            }
        }
        private void CreatePassFile(PassGeneratorRequest request)
        {
            using (MemoryStream ms = new MemoryStream())
            {
                using (StreamWriter sr = new StreamWriter(ms))
                {
                    using (JsonWriter writer = new JsonTextWriter(sr))
                    {
                        request.Write(writer);
                    }

                    passFile = ms.ToArray();
                }
            }
        }
        private void CreatePassFile(PassGeneratorRequest request)
        {
            using (MemoryStream ms = new MemoryStream())
            {
                using (StreamWriter sr = new StreamWriter(ms))
                {
                    using (JsonWriter writer = new JsonTextWriter(sr))
                    {
                        Trace.TraceInformation("Writing JSON...");
                        request.Write(writer);
                    }

                    passFile = ms.ToArray();
                }
            }
        }