Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Diagnostics;
- using System.IO;
- using System.Reflection;
- using System.Runtime.CompilerServices;
- using System.Runtime.InteropServices;
- using <StartupCode$_>;
- using Microsoft.FSharp.Collections;
- using Microsoft.FSharp.Core;
- [assembly: FSharpInterfaceDataVersion(2, 0, 0)]
- [assembly: AssemblyVersion("0.0.0.0")]
- [CompilationMapping(SourceConstructFlags.Module)]
- public static class MyProgram
- {
- [Serializable]
- [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
- [DebuggerDisplay("{__DebugDisplay(),nq}")]
- [CompilationMapping(SourceConstructFlags.SumType)]
- public abstract class GeometricFigure : IEquatable<GeometricFigure>, IStructuralEquatable, IComparable<GeometricFigure>, IComparable, IStructuralComparable
- {
- public static class Tags
- {
- public const int Rectangle = 0;
- public const int Circle = 1;
- public const int Triangle = 2;
- public const int Ellipse = 3;
- }
- [Serializable]
- [SpecialName]
- [DebuggerTypeProxy(typeof(Rectangle@DebugTypeProxy))]
- [DebuggerDisplay("{__DebugDisplay(),nq}")]
- public class Rectangle : GeometricFigure
- {
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal readonly double _width;
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal readonly double _length;
- [CompilationMapping(SourceConstructFlags.Field, 0, 0)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- public double width
- {
- [CompilerGenerated]
- [DebuggerNonUserCode]
- get
- {
- return _width;
- }
- }
- [CompilationMapping(SourceConstructFlags.Field, 0, 1)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- public double length
- {
- [CompilerGenerated]
- [DebuggerNonUserCode]
- get
- {
- return _length;
- }
- }
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal Rectangle(double _width, double _length)
- : base(0)
- {
- this._width = _width;
- this._length = _length;
- }
- }
- [Serializable]
- [SpecialName]
- [DebuggerTypeProxy(typeof(Circle@DebugTypeProxy))]
- [DebuggerDisplay("{__DebugDisplay(),nq}")]
- public class Circle : GeometricFigure
- {
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal readonly double _radius;
- [CompilationMapping(SourceConstructFlags.Field, 1, 0)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- public double radius
- {
- [CompilerGenerated]
- [DebuggerNonUserCode]
- get
- {
- return _radius;
- }
- }
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal Circle(double _radius)
- : base(1)
- {
- this._radius = _radius;
- }
- }
- [Serializable]
- [SpecialName]
- [DebuggerTypeProxy(typeof(Triangle@DebugTypeProxy))]
- [DebuggerDisplay("{__DebugDisplay(),nq}")]
- public class Triangle : GeometricFigure
- {
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal readonly double _length;
- [CompilationMapping(SourceConstructFlags.Field, 2, 0)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- public double length
- {
- [CompilerGenerated]
- [DebuggerNonUserCode]
- get
- {
- return _length;
- }
- }
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal Triangle(double _length)
- : base(2)
- {
- this._length = _length;
- }
- }
- [Serializable]
- [SpecialName]
- [DebuggerTypeProxy(typeof(Ellipse@DebugTypeProxy))]
- [DebuggerDisplay("{__DebugDisplay(),nq}")]
- public class Ellipse : GeometricFigure
- {
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal readonly double _focus;
- [CompilationMapping(SourceConstructFlags.Field, 3, 0)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- public double focus
- {
- [CompilerGenerated]
- [DebuggerNonUserCode]
- get
- {
- return _focus;
- }
- }
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal Ellipse(double _focus)
- : base(3)
- {
- this._focus = _focus;
- }
- }
- [SpecialName]
- internal class Rectangle@DebugTypeProxy
- {
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal Rectangle _obj;
- [CompilationMapping(SourceConstructFlags.Field, 0, 0)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- public double width
- {
- [CompilerGenerated]
- [DebuggerNonUserCode]
- get
- {
- return _obj._width;
- }
- }
- [CompilationMapping(SourceConstructFlags.Field, 0, 1)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- public double length
- {
- [CompilerGenerated]
- [DebuggerNonUserCode]
- get
- {
- return _obj._length;
- }
- }
- [CompilerGenerated]
- [DebuggerNonUserCode]
- public Rectangle@DebugTypeProxy(Rectangle obj)
- {
- _obj = obj;
- }
- }
- [SpecialName]
- internal class Circle@DebugTypeProxy
- {
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal Circle _obj;
- [CompilationMapping(SourceConstructFlags.Field, 1, 0)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- public double radius
- {
- [CompilerGenerated]
- [DebuggerNonUserCode]
- get
- {
- return _obj._radius;
- }
- }
- [CompilerGenerated]
- [DebuggerNonUserCode]
- public Circle@DebugTypeProxy(Circle obj)
- {
- _obj = obj;
- }
- }
- [SpecialName]
- internal class Triangle@DebugTypeProxy
- {
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal Triangle _obj;
- [CompilationMapping(SourceConstructFlags.Field, 2, 0)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- public double length
- {
- [CompilerGenerated]
- [DebuggerNonUserCode]
- get
- {
- return _obj._length;
- }
- }
- [CompilerGenerated]
- [DebuggerNonUserCode]
- public Triangle@DebugTypeProxy(Triangle obj)
- {
- _obj = obj;
- }
- }
- [SpecialName]
- internal class Ellipse@DebugTypeProxy
- {
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal Ellipse _obj;
- [CompilationMapping(SourceConstructFlags.Field, 3, 0)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- public double focus
- {
- [CompilerGenerated]
- [DebuggerNonUserCode]
- get
- {
- return _obj._focus;
- }
- }
- [CompilerGenerated]
- [DebuggerNonUserCode]
- public Ellipse@DebugTypeProxy(Ellipse obj)
- {
- _obj = obj;
- }
- }
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal readonly int _tag;
- [CompilerGenerated]
- [DebuggerNonUserCode]
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- public int Tag
- {
- [CompilerGenerated]
- [DebuggerNonUserCode]
- get
- {
- return _tag;
- }
- }
- [CompilerGenerated]
- [DebuggerNonUserCode]
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- public bool IsRectangle
- {
- [CompilerGenerated]
- [DebuggerNonUserCode]
- get
- {
- return Tag == 0;
- }
- }
- [CompilerGenerated]
- [DebuggerNonUserCode]
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- public bool IsCircle
- {
- [CompilerGenerated]
- [DebuggerNonUserCode]
- get
- {
- return Tag == 1;
- }
- }
- [CompilerGenerated]
- [DebuggerNonUserCode]
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- public bool IsTriangle
- {
- [CompilerGenerated]
- [DebuggerNonUserCode]
- get
- {
- return Tag == 2;
- }
- }
- [CompilerGenerated]
- [DebuggerNonUserCode]
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- public bool IsEllipse
- {
- [CompilerGenerated]
- [DebuggerNonUserCode]
- get
- {
- return Tag == 3;
- }
- }
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal GeometricFigure(int _tag)
- {
- this._tag = _tag;
- }
- [CompilationMapping(SourceConstructFlags.UnionCase, 0)]
- public static GeometricFigure NewRectangle(double _width, double _length)
- {
- return new Rectangle(_width, _length);
- }
- [CompilationMapping(SourceConstructFlags.UnionCase, 1)]
- public static GeometricFigure NewCircle(double _radius)
- {
- return new Circle(_radius);
- }
- [CompilationMapping(SourceConstructFlags.UnionCase, 2)]
- public static GeometricFigure NewTriangle(double _length)
- {
- return new Triangle(_length);
- }
- [CompilationMapping(SourceConstructFlags.UnionCase, 3)]
- public static GeometricFigure NewEllipse(double _focus)
- {
- return new Ellipse(_focus);
- }
- [SpecialName]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal object __DebugDisplay()
- {
- return ExtraTopLevelOperators.PrintFormatToString(new PrintfFormat<FSharpFunc<GeometricFigure, string>, Unit, string, string, string>("%+0.8A")).Invoke(this);
- }
- [CompilerGenerated]
- public override string ToString()
- {
- return ExtraTopLevelOperators.PrintFormatToString(new PrintfFormat<FSharpFunc<GeometricFigure, string>, Unit, string, string, GeometricFigure>("%+A")).Invoke(this);
- }
- [CompilerGenerated]
- public sealed override int CompareTo(GeometricFigure obj)
- {
- if (this != null)
- {
- if (obj != null)
- {
- int tag = _tag;
- int tag2 = obj._tag;
- if (tag == tag2)
- {
- return CompareTo$cont@11(this, obj, null);
- }
- return tag - tag2;
- }
- return 1;
- }
- if (obj != null)
- {
- return -1;
- }
- return 0;
- }
- [CompilerGenerated]
- public sealed override int CompareTo(object obj)
- {
- return CompareTo((GeometricFigure)obj);
- }
- [CompilerGenerated]
- public sealed override int CompareTo(object obj, IComparer comp)
- {
- GeometricFigure geometricFigure = (GeometricFigure)obj;
- if (this != null)
- {
- if ((GeometricFigure)obj != null)
- {
- int tag = _tag;
- int tag2 = geometricFigure._tag;
- if (tag == tag2)
- {
- return CompareTo$cont@11-1(comp, this, geometricFigure, null);
- }
- return tag - tag2;
- }
- return 1;
- }
- if ((GeometricFigure)obj != null)
- {
- return -1;
- }
- return 0;
- }
- [CompilerGenerated]
- public sealed override int GetHashCode(IEqualityComparer comp)
- {
- if (this != null)
- {
- int num = 0;
- switch (Tag)
- {
- default:
- {
- Rectangle rectangle = (Rectangle)this;
- num = 0;
- num = -1640531527 + (LanguagePrimitives.HashCompare.GenericHashWithComparerIntrinsic(comp, rectangle._length) + ((num << 6) + (num >> 2)));
- return -1640531527 + (LanguagePrimitives.HashCompare.GenericHashWithComparerIntrinsic(comp, rectangle._width) + ((num << 6) + (num >> 2)));
- }
- case 1:
- {
- Circle circle = (Circle)this;
- num = 1;
- return -1640531527 + (LanguagePrimitives.HashCompare.GenericHashWithComparerIntrinsic(comp, circle._radius) + ((num << 6) + (num >> 2)));
- }
- case 2:
- {
- Triangle triangle = (Triangle)this;
- num = 2;
- return -1640531527 + (LanguagePrimitives.HashCompare.GenericHashWithComparerIntrinsic(comp, triangle._length) + ((num << 6) + (num >> 2)));
- }
- case 3:
- {
- Ellipse ellipse = (Ellipse)this;
- num = 3;
- return -1640531527 + (LanguagePrimitives.HashCompare.GenericHashWithComparerIntrinsic(comp, ellipse._focus) + ((num << 6) + (num >> 2)));
- }
- }
- }
- return 0;
- }
- [CompilerGenerated]
- public sealed override int GetHashCode()
- {
- return GetHashCode(LanguagePrimitives.GenericEqualityComparer);
- }
- [CompilerGenerated]
- public sealed override bool Equals(object obj, IEqualityComparer comp)
- {
- if (this != null)
- {
- GeometricFigure geometricFigure = obj as GeometricFigure;
- if (geometricFigure != null)
- {
- int tag = _tag;
- int tag2 = geometricFigure._tag;
- if (tag == tag2)
- {
- switch (Tag)
- {
- default:
- {
- Rectangle rectangle = (Rectangle)this;
- Rectangle rectangle2 = (Rectangle)geometricFigure;
- if (rectangle._width == rectangle2._width)
- {
- return rectangle._length == rectangle2._length;
- }
- return false;
- }
- case 1:
- {
- Circle circle = (Circle)this;
- Circle circle2 = (Circle)geometricFigure;
- return circle._radius == circle2._radius;
- }
- case 2:
- {
- Triangle triangle = (Triangle)this;
- Triangle triangle2 = (Triangle)geometricFigure;
- return triangle._length == triangle2._length;
- }
- case 3:
- {
- Ellipse ellipse = (Ellipse)this;
- Ellipse ellipse2 = (Ellipse)geometricFigure;
- return ellipse._focus == ellipse2._focus;
- }
- }
- }
- return false;
- }
- return false;
- }
- return obj == null;
- }
- [CompilerGenerated]
- public sealed override bool Equals(GeometricFigure obj)
- {
- if (this != null)
- {
- if (obj != null)
- {
- int tag = _tag;
- int tag2 = obj._tag;
- if (tag == tag2)
- {
- return Equals$cont@11(this, obj, null);
- }
- return false;
- }
- return false;
- }
- return obj == null;
- }
- [CompilerGenerated]
- public sealed override bool Equals(object obj)
- {
- GeometricFigure geometricFigure = obj as GeometricFigure;
- if (geometricFigure != null)
- {
- return Equals(geometricFigure);
- }
- return false;
- }
- }
- [Serializable]
- [CompilationMapping(SourceConstructFlags.ObjectType)]
- public class Logger
- {
- public c Bind<b, c>(b x, FSharpFunc<b, c> f)
- {
- log(x);
- return f.Invoke(x);
- }
- public a Return<a>(a x)
- {
- return x;
- }
- [CompilerGenerated]
- internal void log<a>(a p)
- {
- PrintfFormat<FSharpFunc<a, Unit>, TextWriter, Unit, Unit> format = new PrintfFormat<FSharpFunc<a, Unit>, TextWriter, Unit, Unit, a>("logged %A");
- PrintfModule.PrintFormatLineToTextWriter(Console.Out, format).Invoke(p);
- }
- }
- [CompilationMapping(SourceConstructFlags.Value)]
- public static GeometricFigure rectangle
- {
- get
- {
- return $MyProgram.rectangle@18;
- }
- }
- [CompilationMapping(SourceConstructFlags.Value)]
- public static GeometricFigure circle
- {
- get
- {
- return $MyProgram.circle@19;
- }
- }
- [CompilationMapping(SourceConstructFlags.Value)]
- public static GeometricFigure triangle
- {
- get
- {
- return $MyProgram.triangle@20;
- }
- }
- [CompilationMapping(SourceConstructFlags.Value)]
- public static GeometricFigure ellipse
- {
- get
- {
- return $MyProgram.ellipse@21;
- }
- }
- [CompilationMapping(SourceConstructFlags.Value)]
- public static Unit result2
- {
- get
- {
- return $MyProgram.result2@31;
- }
- }
- [CompilationMapping(SourceConstructFlags.Value)]
- public static Logger logger
- {
- get
- {
- return $MyProgram.logger@41;
- }
- }
- [CompilationMapping(SourceConstructFlags.Value)]
- public static int loggedWork
- {
- get
- {
- return $MyProgram.loggedWork@42;
- }
- }
- [SpecialName]
- [CompilationArgumentCounts(new int[] { 1, 1 })]
- public static b op_PipeRight<a, b>(a x, FSharpFunc<a, b> f)
- {
- return f.Invoke(x);
- }
- public static int func(int x)
- {
- return x * x + 2 * x + 4 - 121 - x * x * x;
- }
- public static string toString(int x)
- {
- return string.Concat(x.ToString(), "DimaEvtyukhov");
- }
- public static string reverseString(string x)
- {
- return string.Concat(new string(ArrayModule.Reverse(x.ToCharArray())), "M32011");
- }
- public static string result1(int x)
- {
- string text = string.Concat(func(x).ToString(), "DimaEvtyukhov");
- return string.Concat(new string(ArrayModule.Reverse(text.ToCharArray())), "M32011");
- }
- [CompilerGenerated]
- internal static int CompareTo$cont@11(GeometricFigure @this, GeometricFigure obj, Unit unitVar)
- {
- switch (@this.Tag)
- {
- default:
- {
- GeometricFigure.Rectangle rectangle = (GeometricFigure.Rectangle)@this;
- GeometricFigure.Rectangle rectangle2 = (GeometricFigure.Rectangle)obj;
- IComparer genericComparer = LanguagePrimitives.GenericComparer;
- double focus = rectangle._width;
- double focus2 = rectangle2._width;
- int num = ((focus < focus2) ? (-1) : ((focus > focus2) ? 1 : ((focus != focus2) ? LanguagePrimitives.HashCompare.GenericComparisonWithComparerIntrinsic(genericComparer, focus, focus2) : 0)));
- if (num < 0)
- {
- return num;
- }
- if (num > 0)
- {
- return num;
- }
- genericComparer = LanguagePrimitives.GenericComparer;
- focus = rectangle._length;
- focus2 = rectangle2._length;
- if (focus < focus2)
- {
- return -1;
- }
- if (focus > focus2)
- {
- return 1;
- }
- if (focus == focus2)
- {
- return 0;
- }
- return LanguagePrimitives.HashCompare.GenericComparisonWithComparerIntrinsic(genericComparer, focus, focus2);
- }
- case 1:
- {
- GeometricFigure.Circle circle = (GeometricFigure.Circle)@this;
- GeometricFigure.Circle circle2 = (GeometricFigure.Circle)obj;
- IComparer genericComparer = LanguagePrimitives.GenericComparer;
- double focus = circle._radius;
- double focus2 = circle2._radius;
- if (focus < focus2)
- {
- return -1;
- }
- if (focus > focus2)
- {
- return 1;
- }
- if (focus == focus2)
- {
- return 0;
- }
- return LanguagePrimitives.HashCompare.GenericComparisonWithComparerIntrinsic(genericComparer, focus, focus2);
- }
- case 2:
- {
- GeometricFigure.Triangle triangle = (GeometricFigure.Triangle)@this;
- GeometricFigure.Triangle triangle2 = (GeometricFigure.Triangle)obj;
- IComparer genericComparer = LanguagePrimitives.GenericComparer;
- double focus = triangle._length;
- double focus2 = triangle2._length;
- if (focus < focus2)
- {
- return -1;
- }
- if (focus > focus2)
- {
- return 1;
- }
- if (focus == focus2)
- {
- return 0;
- }
- return LanguagePrimitives.HashCompare.GenericComparisonWithComparerIntrinsic(genericComparer, focus, focus2);
- }
- case 3:
- {
- GeometricFigure.Ellipse ellipse = (GeometricFigure.Ellipse)@this;
- GeometricFigure.Ellipse ellipse2 = (GeometricFigure.Ellipse)obj;
- IComparer genericComparer = LanguagePrimitives.GenericComparer;
- double focus = ellipse._focus;
- double focus2 = ellipse2._focus;
- if (focus < focus2)
- {
- return -1;
- }
- if (focus > focus2)
- {
- return 1;
- }
- if (focus == focus2)
- {
- return 0;
- }
- return LanguagePrimitives.HashCompare.GenericComparisonWithComparerIntrinsic(genericComparer, focus, focus2);
- }
- }
- }
- [CompilerGenerated]
- internal static int CompareTo$cont@11-1(IComparer comp, GeometricFigure @this, GeometricFigure objTemp, Unit unitVar)
- {
- switch (@this.Tag)
- {
- default:
- {
- GeometricFigure.Rectangle rectangle = (GeometricFigure.Rectangle)@this;
- GeometricFigure.Rectangle rectangle2 = (GeometricFigure.Rectangle)objTemp;
- double focus = rectangle._width;
- double focus2 = rectangle2._width;
- int num = ((focus < focus2) ? (-1) : ((focus > focus2) ? 1 : ((focus != focus2) ? LanguagePrimitives.HashCompare.GenericComparisonWithComparerIntrinsic(comp, focus, focus2) : 0)));
- if (num < 0)
- {
- return num;
- }
- if (num > 0)
- {
- return num;
- }
- focus = rectangle._length;
- focus2 = rectangle2._length;
- if (focus < focus2)
- {
- return -1;
- }
- if (focus > focus2)
- {
- return 1;
- }
- if (focus == focus2)
- {
- return 0;
- }
- return LanguagePrimitives.HashCompare.GenericComparisonWithComparerIntrinsic(comp, focus, focus2);
- }
- case 1:
- {
- GeometricFigure.Circle circle = (GeometricFigure.Circle)@this;
- GeometricFigure.Circle circle2 = (GeometricFigure.Circle)objTemp;
- double focus = circle._radius;
- double focus2 = circle2._radius;
- if (focus < focus2)
- {
- return -1;
- }
- if (focus > focus2)
- {
- return 1;
- }
- if (focus == focus2)
- {
- return 0;
- }
- return LanguagePrimitives.HashCompare.GenericComparisonWithComparerIntrinsic(comp, focus, focus2);
- }
- case 2:
- {
- GeometricFigure.Triangle triangle = (GeometricFigure.Triangle)@this;
- GeometricFigure.Triangle triangle2 = (GeometricFigure.Triangle)objTemp;
- double focus = triangle._length;
- double focus2 = triangle2._length;
- if (focus < focus2)
- {
- return -1;
- }
- if (focus > focus2)
- {
- return 1;
- }
- if (focus == focus2)
- {
- return 0;
- }
- return LanguagePrimitives.HashCompare.GenericComparisonWithComparerIntrinsic(comp, focus, focus2);
- }
- case 3:
- {
- GeometricFigure.Ellipse ellipse = (GeometricFigure.Ellipse)@this;
- GeometricFigure.Ellipse ellipse2 = (GeometricFigure.Ellipse)objTemp;
- double focus = ellipse._focus;
- double focus2 = ellipse2._focus;
- if (focus < focus2)
- {
- return -1;
- }
- if (focus > focus2)
- {
- return 1;
- }
- if (focus == focus2)
- {
- return 0;
- }
- return LanguagePrimitives.HashCompare.GenericComparisonWithComparerIntrinsic(comp, focus, focus2);
- }
- }
- }
- [CompilerGenerated]
- internal static bool Equals$cont@11(GeometricFigure @this, GeometricFigure obj, Unit unitVar)
- {
- switch (@this.Tag)
- {
- default:
- {
- GeometricFigure.Rectangle rectangle = (GeometricFigure.Rectangle)@this;
- GeometricFigure.Rectangle rectangle2 = (GeometricFigure.Rectangle)obj;
- double focus = rectangle._width;
- double focus2 = rectangle2._width;
- if (focus == focus2 || (focus != focus && focus2 != focus2))
- {
- focus = rectangle._length;
- focus2 = rectangle2._length;
- if (focus == focus2)
- {
- return true;
- }
- if (focus != focus)
- {
- return focus2 != focus2;
- }
- return false;
- }
- return false;
- }
- case 1:
- {
- GeometricFigure.Circle circle = (GeometricFigure.Circle)@this;
- GeometricFigure.Circle circle2 = (GeometricFigure.Circle)obj;
- double focus = circle._radius;
- double focus2 = circle2._radius;
- if (focus == focus2)
- {
- return true;
- }
- if (focus != focus)
- {
- return focus2 != focus2;
- }
- return false;
- }
- case 2:
- {
- GeometricFigure.Triangle triangle = (GeometricFigure.Triangle)@this;
- GeometricFigure.Triangle triangle2 = (GeometricFigure.Triangle)obj;
- double focus = triangle._length;
- double focus2 = triangle2._length;
- if (focus == focus2)
- {
- return true;
- }
- if (focus != focus)
- {
- return focus2 != focus2;
- }
- return false;
- }
- case 3:
- {
- GeometricFigure.Ellipse ellipse = (GeometricFigure.Ellipse)@this;
- GeometricFigure.Ellipse ellipse2 = (GeometricFigure.Ellipse)obj;
- double focus = ellipse._focus;
- double focus2 = ellipse2._focus;
- if (focus == focus2)
- {
- return true;
- }
- if (focus != focus)
- {
- return focus2 != focus2;
- }
- return false;
- }
- }
- }
- public static void getFigureParameter(GeometricFigure figure)
- {
- switch (figure.Tag)
- {
- default:
- {
- GeometricFigure.Rectangle rectangle = (GeometricFigure.Rectangle)figure;
- double focus = rectangle._length;
- PrintfFormat<FSharpFunc<double, Unit>, TextWriter, Unit, Unit> format = new PrintfFormat<FSharpFunc<double, Unit>, TextWriter, Unit, Unit, double>("%A");
- PrintfModule.PrintFormatLineToTextWriter(Console.Out, format).Invoke(focus);
- break;
- }
- case 1:
- {
- GeometricFigure.Circle circle = (GeometricFigure.Circle)figure;
- double focus = circle._radius;
- PrintfFormat<FSharpFunc<double, Unit>, TextWriter, Unit, Unit> format = new PrintfFormat<FSharpFunc<double, Unit>, TextWriter, Unit, Unit, double>("%A");
- PrintfModule.PrintFormatLineToTextWriter(Console.Out, format).Invoke(focus);
- break;
- }
- case 2:
- {
- GeometricFigure.Triangle triangle = (GeometricFigure.Triangle)figure;
- double focus = triangle._length;
- PrintfFormat<FSharpFunc<double, Unit>, TextWriter, Unit, Unit> format = new PrintfFormat<FSharpFunc<double, Unit>, TextWriter, Unit, Unit, double>("%A");
- PrintfModule.PrintFormatLineToTextWriter(Console.Out, format).Invoke(focus);
- break;
- }
- case 3:
- {
- GeometricFigure.Ellipse ellipse = (GeometricFigure.Ellipse)figure;
- double focus = ellipse._focus;
- PrintfFormat<FSharpFunc<double, Unit>, TextWriter, Unit, Unit> format = new PrintfFormat<FSharpFunc<double, Unit>, TextWriter, Unit, Unit, double>("%A");
- PrintfModule.PrintFormatLineToTextWriter(Console.Out, format).Invoke(focus);
- break;
- }
- }
- }
- [CompilerGenerated]
- internal static int f@36(int x)
- {
- logger.log(5);
- return f@36-1(x, 5);
- }
- [CompilerGenerated]
- internal static int f@36-1(int x, int y)
- {
- int num = x + y;
- logger.log(num);
- return num;
- }
- }
- namespace <StartupCode$_>
- {
- internal static class $MyProgram
- {
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- internal static readonly MyProgram.GeometricFigure rectangle@18;
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- internal static readonly MyProgram.GeometricFigure circle@19;
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- internal static readonly MyProgram.GeometricFigure triangle@20;
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- internal static readonly MyProgram.GeometricFigure ellipse@21;
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- internal static readonly Unit result2@31;
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- internal static readonly MyProgram.Logger logger@41;
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- internal static readonly int loggedWork@42;
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- [CompilerGenerated]
- [DebuggerNonUserCode]
- internal static int init@;
- static $MyProgram()
- {
- rectangle@18 = MyProgram.GeometricFigure.NewRectangle(100.0, 100.0);
- circle@19 = MyProgram.GeometricFigure.NewCircle(10.0);
- triangle@20 = MyProgram.GeometricFigure.NewTriangle(11.0);
- ellipse@21 = MyProgram.GeometricFigure.NewEllipse(228.0);
- MyProgram.getFigureParameter(MyProgram.rectangle);
- result2@31 = null;
- logger@41 = new MyProgram.Logger();
- MyProgram.logger.log(1);
- loggedWork@42 = MyProgram.f@36(1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement