Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
12f0460a
Commit
12f0460a
authored
Jan 27, 2011
by
Jon Skeet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Effectively revert previous change to Generator.cs
parent
7ac20214
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
19 deletions
+3
-19
Generator.cs
src/ProtoGen/Generator.cs
+3
-19
No files found.
src/ProtoGen/Generator.cs
View file @
12f0460a
...
...
@@ -93,25 +93,9 @@ namespace Google.ProtocolBuffers.ProtoGen {
/// </summary>
private
void
Generate
(
FileDescriptor
descriptor
)
{
UmbrellaClassGenerator
ucg
=
new
UmbrellaClassGenerator
(
descriptor
);
string
tempFile
=
Path
.
GetTempFileName
();
try
{
using
(
Stream
fstream
=
File
.
Open
(
GetOutputFile
(
descriptor
),
FileMode
.
OpenOrCreate
,
FileAccess
.
Write
,
FileShare
.
Read
))
{
using
(
TextWriter
textWriter
=
File
.
CreateText
(
tempFile
))
{
TextGenerator
writer
=
new
TextGenerator
(
textWriter
);
ucg
.
Generate
(
writer
);
}
fstream
.
SetLength
(
0
);
using
(
TextReader
input
=
new
StreamReader
(
tempFile
))
using
(
TextWriter
output
=
new
StreamWriter
(
fstream
))
{
string
line
;
while
(
null
!=
(
line
=
input
.
ReadLine
()))
output
.
WriteLine
(
line
);
}
}
}
finally
{
if
(
File
.
Exists
(
tempFile
))
File
.
Delete
(
tempFile
);
using
(
TextWriter
textWriter
=
File
.
CreateText
(
GetOutputFile
(
descriptor
)))
{
TextGenerator
writer
=
new
TextGenerator
(
textWriter
);
ucg
.
Generate
(
writer
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment