| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,6 +48,12 @@ public ClassWithEventHandler() | |||
| 48 | 48 | this.arr = new int[800]; | |
| 49 | 49 | } | |
| 50 | 50 | ||
| 51 | + // Reference LeakEvent to silence warning | ||
| 52 | + protected virtual void OnLeakEvent(EventArgs e) | ||
| 53 | + { | ||
| 54 | + LeakEvent?.Invoke(this, e); | ||
| 55 | + } | ||
| 56 | + | ||
| 51 | 57 | ~ClassWithEventHandler() | |
| 52 | 58 | { | |
| 53 | 59 | Interlocked.Decrement(ref alive); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -103,5 +103,7 @@ public static PyFloat AsFloat(PyObject value) | |||
| 103 | 103 | public double ToDouble() => Runtime.PyFloat_AsDouble(obj); | |
| 104 | 104 | ||
| 105 | 105 | public override TypeCode GetTypeCode() => TypeCode.Double; | |
| 106 | + | ||
| 107 | + public override int GetHashCode() => base.GetHashCode(); | ||
| 106 | 108 | } | |
| 107 | 109 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -232,5 +232,7 @@ public string ToString(string format, IFormatProvider formatProvider) | |||
| 232 | 232 | } | |
| 233 | 233 | ||
| 234 | 234 | public override TypeCode GetTypeCode() => TypeCode.Int64; | |
| 235 | + | ||
| 236 | + public override int GetHashCode() => base.GetHashCode(); | ||
| 235 | 237 | } | |
| 236 | 238 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,7 +14,7 @@ public static AssemblyBuilder DefineDynamicAssembly(this AppDomain _, AssemblyNa | |||
| 14 | 14 | ||
| 15 | 15 | public static Type CreateType(this TypeBuilder typeBuilder) | |
| 16 | 16 | { | |
| 17 | - return typeBuilder.CreateTypeInfo(); | ||
| 17 | + return typeBuilder.CreateTypeInfo()!; | ||
| 18 | 18 | } | |
| 19 | 19 | ||
| 20 | 20 | public static T GetCustomAttribute<T>(this Type type) where T: Attribute | |
| Back | FazBrowse Home | New Git URL |
0 commit comments