Skip to content

Commit f6b8825

Browse files
committed
Clean-up simple classes
1 parent a73f174 commit f6b8825

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

src/runtime/indexer.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,15 @@ public Indexer()
2121
}
2222

2323

24-
public bool CanGet => GetterBinder.Count > 0;
24+
public bool CanGet
25+
{
26+
get { return GetterBinder.Count > 0; }
27+
}
2528

26-
public bool CanSet => SetterBinder.Count > 0;
29+
public bool CanSet
30+
{
31+
get { return SetterBinder.Count > 0; }
32+
}
2733

2834

2935
public void AddProperty(PropertyInfo pi)

src/runtime/pyiter.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ public void Reset()
7676
//Not supported in python.
7777
}
7878

79-
public object Current => _current;
79+
public object Current
80+
{
81+
get { return _current; }
82+
}
8083

8184
#endregion
8285
}

src/runtime/pyobject.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Python.Runtime
1313
public class PyObject : DynamicObject, IDisposable
1414
{
1515
protected internal IntPtr obj = IntPtr.Zero;
16-
private bool disposed;
16+
private bool disposed = false;
1717

1818
/// <summary>
1919
/// PyObject Constructor
@@ -54,7 +54,10 @@ protected PyObject()
5454
/// Gets the native handle of the underlying Python object. This
5555
/// value is generally for internal use by the PythonNet runtime.
5656
/// </remarks>
57-
public IntPtr Handle => obj;
57+
public IntPtr Handle
58+
{
59+
get { return obj; }
60+
}
5861

5962

6063
/// <summary>

src/runtime/typemethod.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
using System;
2+
using System.Collections;
23
using System.Reflection;
34

45
namespace Python.Runtime
56
{
6-
/// <summary>
7-
/// Implements a Python type that provides access to CLR object methods.
8-
/// </summary>
7+
//========================================================================
8+
// Implements a Python type that provides access to CLR object methods.
9+
//========================================================================
10+
911
internal class TypeMethod : MethodObject
1012
{
1113
public TypeMethod(Type type, string name, MethodInfo[] info) :

0 commit comments

Comments
 (0)