File tree Expand file tree Collapse file tree 1 file changed +0
-31
lines changed
Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -756,35 +756,4 @@ public FluentResults.Result Reset()
756
756
}
757
757
}
758
758
759
- public static class AssemblyExtensions
760
- {
761
- /// <summary>
762
- /// Gets all types in the given assembly. Handles invalid type scenarios.
763
- /// </summary>
764
- /// <param name="assembly">The assembly to scan</param>
765
- /// <returns>An enumerable collection of types.</returns>
766
- public static IEnumerable < Type > GetSafeTypes ( this Assembly assembly )
767
- {
768
- // Based on https://github.com/Qkrisi/ktanemodkit/blob/master/Assets/Scripts/ReflectionHelper.cs#L53-L67
769
759
770
- try
771
- {
772
- return assembly . GetTypes ( ) ;
773
- }
774
- catch ( ReflectionTypeLoadException re )
775
- {
776
- try
777
- {
778
- return re . Types . Where ( x => x != null ) ! ;
779
- }
780
- catch ( InvalidOperationException )
781
- {
782
- return new List < Type > ( ) ;
783
- }
784
- }
785
- catch ( Exception )
786
- {
787
- return new List < Type > ( ) ;
788
- }
789
- }
790
- }
You can’t perform that action at this time.
0 commit comments