lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [2/2] lucenenet git commit: Cleanup
Date Wed, 31 Dec 2014 21:33:08 GMT
Cleanup


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/4128cedf
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/4128cedf
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/4128cedf

Branch: refs/heads/master
Commit: 4128cedfef26b451f03385e453f716a37dacdad2
Parents: f3a5a56
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Wed Dec 31 23:32:55 2014 +0200
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Wed Dec 31 23:32:55 2014 +0200

----------------------------------------------------------------------
 src/Lucene.Net.Core/Store/Directory.cs         |  2 ++
 src/Lucene.Net.Core/Store/SimpleFSDirectory.cs | 18 ++++++++----------
 2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4128cedf/src/Lucene.Net.Core/Store/Directory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/Directory.cs b/src/Lucene.Net.Core/Store/Directory.cs
index 3d1aa7f..7c341a1 100644
--- a/src/Lucene.Net.Core/Store/Directory.cs
+++ b/src/Lucene.Net.Core/Store/Directory.cs
@@ -1,5 +1,7 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
+using Lucene.Net.Index;
 
 namespace Lucene.Net.Store
 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4128cedf/src/Lucene.Net.Core/Store/SimpleFSDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/SimpleFSDirectory.cs b/src/Lucene.Net.Core/Store/SimpleFSDirectory.cs
index 424a771..186913d 100644
--- a/src/Lucene.Net.Core/Store/SimpleFSDirectory.cs
+++ b/src/Lucene.Net.Core/Store/SimpleFSDirectory.cs
@@ -58,31 +58,28 @@ namespace Lucene.Net.Store
         public override IndexInput OpenInput(string name, IOContext context)
         {
             EnsureOpen();
-            FileInfo path = new FileInfo(Path.Combine(Directory.FullName, name));
-            FileStream raf = new FileStream(path.FullName, FileMode.Open, FileAccess.Read,
FileShare.Read);
+            var path = new FileInfo(Path.Combine(Directory.FullName, name));
+            var raf = new FileStream(path.FullName, FileMode.Open, FileAccess.Read, FileShare.Read);
             return new SimpleFSIndexInput("SimpleFSIndexInput(path=\"" + path.FullName +
"\")", raf, context);
         }
 
         public override IndexInputSlicer CreateSlicer(string name, IOContext context)
         {
             EnsureOpen();
-            FileInfo file = new FileInfo(Path.Combine(Directory.FullName, name));
-            FileStream descriptor = new FileStream(file.FullName, FileMode.Open, FileAccess.Read,
FileShare.Read);
+            var file = new FileInfo(Path.Combine(Directory.FullName, name));
+            var descriptor = new FileStream(file.FullName, FileMode.Open, FileAccess.Read,
FileShare.Read);
             return new IndexInputSlicerAnonymousInnerClassHelper(this, context, file, descriptor);
         }
 
         private class IndexInputSlicerAnonymousInnerClassHelper : IndexInputSlicer
         {
-            private readonly SimpleFSDirectory OuterInstance;
-
-            private IOContext Context;
-            private FileInfo File;
-            private FileStream Descriptor;
+            private readonly IOContext Context;
+            private readonly FileInfo File;
+            private readonly FileStream Descriptor;
 
             public IndexInputSlicerAnonymousInnerClassHelper(SimpleFSDirectory outerInstance,
IOContext context, FileInfo file, FileStream descriptor)
                 : base(outerInstance)
             {
-                this.OuterInstance = outerInstance;
                 this.Context = context;
                 this.File = file;
                 this.Descriptor = descriptor;
@@ -101,6 +98,7 @@ namespace Lucene.Net.Store
                 return new SimpleFSIndexInput("SimpleFSIndexInput(" + sliceDescription +
" in path=\"" + File.FullName + "\" slice=" + offset + ":" + (offset + length) + ")", Descriptor,
offset, length, BufferedIndexInput.BufferSize(Context));
             }
 
+            [Obsolete]
             public override IndexInput OpenFullSlice()
             {
                 try


Mime
View raw message