Пример #1
0
        /// <summary>
        /// Récupère une CV à partir d'un identifiant de client
        /// </summary>
        /// <param name="Identifiant">Identifant de CV</param>
        /// <returns>Un CV </returns>
        public static CV Get(Int32 identifiant)
        {
            //Connection
            ConnectionStringSettings connectionStringSettings = ConfigurationManager.ConnectionStrings["EntretienSPPPConnectionString"];
            SqlConnection connection = new SqlConnection(connectionStringSettings.ToString());
            //Commande
            String requete = @"SELECT Identifiant, DateDeb, DateFin, Entreprise, Secteur, Poste, IdentifiantPersonne FROM CV
                                WHERE Identifiant = @Identifiant";
            SqlCommand commande = new SqlCommand(requete, connection);

            //Paramètres
            commande.Parameters.AddWithValue("Identifiant", identifiant);

            //Execution
            connection.Open();
            SqlDataReader dataReader = commande.ExecuteReader();

            dataReader.Read();

            //1 - Création du CV
            CV cv = new CV();

            cv.Identifiant = dataReader.GetInt32(0);
            cv.DateDeb = dataReader.GetDateTime(1);
            cv.DateFin = dataReader.GetDateTime(2);
            cv.Entreprise = dataReader.GetString(3);
            cv.Secteur = dataReader.GetString(4);
            cv.Poste = dataReader.GetString(5);
            cv.personne.Identifiant = dataReader.GetInt32(6);
            dataReader.Close();
            connection.Close();
            return cv;
        }
Пример #2
0
 public p_author_000081()
     : base()
 {
     typeCode = "AUT";
     contextControlCode = "OP";
     functionCode = new CV<string>("OA", "2.16.840.1.113883.2.1.3.2.4.17.178", null, null, "Originating Author", null);
     functionCode.OriginalText = null;
 }
 public SetSingleProperty()
 {
     InitializeComponent();
     _dataContext = LoadScreen._DataContext;
     _DataCV = LoadScreen._DataCV;
     //cbDeviceID.ItemsSource = _dataContext.t_Devices;
     Devices = new ObservableCollection<t_Device>(_DataCV.t_Devices);
     cbDeviceID.DisplayMemberPath = "DeviceName";
     //查询
     this.DataContext = this;
 }
Пример #4
0
        public CV<String> getVocabDetails(string codeSystem, string code)
        {
            CV<String> lookup = new CV<String>();

            string query = string.Format("codeSystem = '{0}' AND code = '{1}'", codeSystem, code);
            DataRow[] result = vocabStore.Select(query);

            foreach (DataRow row in result)
            {
                lookup.CodeSystem = row["codeSystem"].ToString();
                lookup.Code = row["code"].ToString();
                lookup.DisplayName = row["displayName"].ToString();
            }

            return lookup;
        }
Пример #5
0
        public ActionResult Create([Bind(Include = "PersonId,WorkEntries")] CVViewModel cv)
        {
            if (ModelState.IsValid)
            {
                CV databaseEntry = new CV();
                databaseEntry.PersonId = cv.PersonId;
                databaseEntry.WorkEntries = new List<WorkEntry>();
                foreach (WorkEntryViewModel wevm in cv.WorkEntries)
                {
                    databaseEntry.WorkEntries.Add(wevm.ToWorkEntry());
                }
                db.CVs.Add(databaseEntry);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            AddPeopleListToView();
            return View(cv);
        }
Пример #6
0
        public LineProperty()
        {
            InitializeComponent();

            ShowYear.Value = DateTime.Now.Year;
            ShowMonth.Value = DateTime.Now.Month;
            ShowDay.Value = DateTime.Now.Day;

            ShowHH.Value = DateTime.Now.Hour;
            ShowMi.Value = DateTime.Now.Minute;
            ShowSS.Value = DateTime.Now.Millisecond;

            _DataCV = LoadScreen._DataCV;
            Devices = new ObservableCollection<t_Device>(_DataCV.t_Devices);
            cbDeviceID.DisplayMemberPath = "DeviceName";

            this.DataContext = this;
            SetDefult();
        }
Пример #7
0
	public CV generateCV(Candidate candidate)
    {
        // Generate a CV object for a given candidate
        string cvText = "";
        cvText += makeHeader(candidate);
        cvText += makeJobHistory(candidate);

        List<string> skillHobbies = generateSkillHobbies(candidate);
        if(skillHobbies[0].Length != 9)
            cvText += skillHobbies[0];
        if(skillHobbies[1].Length != 9)
            cvText += skillHobbies[1];

        cvText += doctorsNote(candidate);

        Sprite cvPic = candidate.getCVPic();

        CV cv = new CV(candidate, cvText, cvPic);
        return cv;
    }
        protected void timer_Tick(object sender, EventArgs e)
        {
            //ShowCurve(RealtimeValue);
            if (SysSetReal == null)
                return;
            InvokeOperation<double> result = new CV().SelectNewValue(
                SysSetReal.StationID, SysSetReal.DeviceID
               , SysSetReal.ChannelNO);

            result.Completed += ((p1, q1) =>
            {
                if (result.HasError)
                    return;
                double val=result.Value;
                if (val != -999)
                {
                    this.realTime.RealtimeValue = val;
                }

            });
        }
Пример #9
0
        public static void Insert(CV Cv)
        {
            //Connection
            ConnectionStringSettings connectionStringSettings = ConfigurationManager.ConnectionStrings["EntretienSPPPConnectionString"];
            SqlConnection connection = new SqlConnection(connectionStringSettings.ToString());
            //Commande
            String requete = @"INSERT INTO CV  (DateDeb, DateFin, Entreprise, Secteur, Poste, IdentifiantPersonne)
                               VALUES (@DateDeb, @DateFin, @Entreprise, @Secteur, @Poste, @IdentifiantPersonne)";
            SqlCommand commande = new SqlCommand(requete, connection);

            //Paramètres
            commande.Parameters.AddWithValue("DateDeb", Cv.DateDeb);
            commande.Parameters.AddWithValue("DateFin", Cv.DateFin);
            commande.Parameters.AddWithValue("Entreprise", Cv.Entreprise);
            commande.Parameters.AddWithValue("Secteur", Cv.Secteur);
            commande.Parameters.AddWithValue("Poste", Cv.Poste);
            commande.Parameters.AddWithValue("IdentifiantPersonne", Cv.personne.Identifiant);
            //Execution
            connection.Open();
            commande.ExecuteNonQuery();
            connection.Close();
        }
Пример #10
0
 public void SetDocumentCodeSnomedCT(string codeValue)
 {
     code = new CV<string>(codeValue, OIDStore.OIDCodeSystemSnomedCT, null, null);
 }
Пример #11
0
        public void SetDocumentCodeSnomedCTComposition(SnomedConcept DocumentType, SnomedConcept CareSetting)
        {
            string composition =
                string.Format(
                "810301000000103:810311000000101={0},810321000000107={1}",
                DocumentType.ConceptCode,
                CareSetting.ConceptCode
                );

            string displayname =
                string.Format(
                "810301000000103|Clinical document descriptor|:810311000000101|Type of clinical document|={0}|{1}|,810321000000107|Care setting of clinical document|={2}|{3}|",
                DocumentType.ConceptCode,
                DocumentType.DisplayName,
                CareSetting.ConceptCode,
                CareSetting.DisplayName
                );

            code = new CV<string>(composition, OIDStore.OIDCodeSystemSnomedCTCompositionalGrammar, null, null);
            code.DisplayName = displayname;
        }
Пример #12
0
 public Diagnosis()
 {
     this.code  = new CVImpl();
     this.text  = new STImpl();
     this.value = new CVImpl();
 }
Пример #13
0
        public IEntryBuilder AddMeaning(CV meaning)
        {
            _value.Meaning = meaning;

            return(this);
        }
Пример #14
0
 public void CVExample10Test03()
 {
     CV<NullFlavor> nullflavor = new CV<NullFlavor>();
     nullflavor = new CV<NullFlavor>();
     nullflavor.CodeSystem = "Hello";
     nullflavor.Code = NullFlavor.NoInformation;
     Console.WriteLine(nullflavor.CodeSystem);
     //output: Hello
     Assert.IsTrue(nullflavor.Validate());
 }
Пример #15
0
        public override IObservable <Mat> Process(IObservable <Mat> source)
        {
            return(Observable.Defer(() =>
            {
                int rows = 0;
                double[] data = null;
                double[] feedforwardCoefficients = null;
                double[] feedbackCoefficients = null;
                double[] dataWeights = null;
                double[] dataMemory = null;
                double[] outputWeights = null;
                double[] outputMemory = null;
                return source.Select(input =>
                {
                    if (FeedforwardCoefficients != feedforwardCoefficients ||
                        FeedbackCoefficients != feedbackCoefficients ||
                        rows != input.Rows ||
                        data != null && data.Length != rows * input.Cols)
                    {
                        rows = input.Rows;
                        feedforwardCoefficients = FeedforwardCoefficients;
                        feedbackCoefficients = FeedbackCoefficients;
                        dataWeights = InitializeWeights(feedforwardCoefficients);
                        outputWeights = InitializeWeights(feedbackCoefficients);
                        for (int i = 0; i < outputWeights.Length - 1; i++)
                        {
                            outputWeights[i] = -outputWeights[i];
                        }

                        if (dataWeights != IdentityWeight || outputWeights != IdentityWeight)
                        {
                            data = new double[rows * input.Cols];
                            dataMemory = new double[rows * (dataWeights.Length - 1)];
                            outputMemory = new double[rows * (outputWeights.Length - 1)];
                        }
                    }

                    if (dataWeights == IdentityWeight && outputWeights == IdentityWeight)
                    {
                        return input;
                    }
                    else
                    {
                        var dataHandle = GCHandle.Alloc(data, GCHandleType.Pinned);
                        try
                        {
                            var output = new Mat(input.Size, input.Depth, input.Channels);
                            using (var dataHeader = new Mat(input.Size, Depth.F64, 1, dataHandle.AddrOfPinnedObject()))
                            {
                                CV.Convert(input, dataHeader);
                                ProcessData(rows, data, dataWeights, dataMemory, outputWeights, outputMemory);
                                CV.Convert(dataHeader, output);
                            }

                            return output;
                        }
                        finally { dataHandle.Free(); }
                    }
                });
            }));
        }
Пример #16
0
 public LanguageCode()
 {
     this.value = new CVImpl();
 }
Пример #17
0
 public static extern IntPtr cvInitMatNDHeader(
    IntPtr mat,
    int dims,
    [In]
    int[] sizes,
    CV.CvEnum.DepthType type,
    IntPtr data);
Пример #18
0
 public CoveredPartyAsPatient()
 {
     this.id        = new IIImpl();
     this.code      = new CVImpl();
     this.subjectOf = new List <Ca.Infoway.Messagebuilder.Model.Pcs_mr2009_r02_04_02.Claims.Merged.Subject>();
 }
Пример #19
0
 public NoImmunizationReason()
 {
     this.reasonCode = new CVImpl();
 }
Пример #20
0
        protected override Action <IplImage> GetRenderer()
        {
            var data = Data;

            if (data == null)
            {
                return(EmptyRenderer);
            }

            var min       = Min;
            var max       = Max;
            var dataRange = max - min;

            if (dataRange == 0)
            {
                CV.MinMaxLoc(data, out min, out max);
                dataRange = max - min;
                if (dataRange == 0)
                {
                    max = 1;
                    min = -1;
                }
            }

            var color = Color;
            var rect  = Destination;

            return(image =>
            {
                if (rect.Width == 0)
                {
                    rect.Width = image.Width;
                }
                if (rect.Height == 0)
                {
                    rect.Height = image.Height;
                }
                var top = rect.Y;
                var bottom = rect.Y + rect.Height;
                var scaleY = (top - bottom) / (max - min);
                var shiftY = -min * scaleY + bottom;
                var rangeWidth = data.Cols * ((rect.Width - 1) / (double)(data.Cols - 1));
                var points = new Point[data.Rows][];
                for (int i = 0; i < data.Rows; i++)
                {
                    points[i] = new Point[data.Cols];
                    var row = data.Rows > 1 ? data.GetRow(i) : data;
                    try
                    {
                        using (var rowT = row.Reshape(1, data.Cols))
                            using (var pointHeader = Mat.CreateMatHeader(points[i], data.Cols, 2, Depth.S32, 1))
                                using (var xAxis = pointHeader.GetCol(0))
                                    using (var yAxis = pointHeader.GetCol(1))
                                    {
                                        CV.Range(xAxis, rect.X, rect.X + rangeWidth);
                                        CV.ConvertScale(rowT, yAxis, scaleY, shiftY);
                                    }
                    }
                    finally
                    {
                        if (row != data)
                        {
                            row.Dispose();
                        }
                    }
                }

                CV.PolyLine(image, points, false, Color, Thickness, LineType);
            });
        }
Пример #21
0
 public SpecialAuthorizationRequest()
 {
     this.id         = new IIImpl();
     this.code       = new CVImpl();
     this.statusCode = new CSImpl();
 }
Пример #22
0
 public PriorCombinedMedicationRequest()
 {
     this.id   = new IIImpl();
     this.code = new CVImpl();
 }
Пример #23
0
        internal void SetCodeNull(string flavorCode)
        {
            NullFlavor flavorValue;

            code = new CV<string>();
            switch (flavorCode)
            {
                case "NI":
                    flavorValue = NullFlavor.NoInformation;
                    break;
                default:
                    flavorValue = NullFlavor.NoInformation;
                    break;
            }
            code.NullFlavor = new CS<NullFlavor>(flavorValue);
        }
Пример #24
0
    internal static void twoways(Ice.Communicator communicator, Test.MyClassPrx p)
    {
        {
            byte[] i = new byte[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c] = (byte)c;
            }
            byte[] o;
            byte[] r;

            r = p.opAByteS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List <byte> i = new List <byte>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add((byte)c);
            }
            List <byte> o;
            List <byte> r;

            r = p.opLByteS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList <byte> i = new LinkedList <byte>();
            for (int c = 0; c < _length; ++c)
            {
                i.AddLast((byte)c);
            }
            LinkedList <byte> o;
            LinkedList <byte> r;

            r = p.opKByteS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue <byte> i = new Queue <byte>();
            for (int c = 0; c < _length; ++c)
            {
                i.Enqueue((byte)c);
            }
            Queue <byte> o;
            Queue <byte> r;

            r = p.opQByteS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack <byte> i = new Stack <byte>();
            for (int c = 0; c < _length; ++c)
            {
                i.Push((byte)c);
            }
            Stack <byte> o;
            Stack <byte> r;

            r = p.opSByteS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CByteS i = new CByteS(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add((byte)c);
            }
            CByteS o;
            CByteS r;

            r = p.opCByteS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            bool[] i = new bool[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c] = c % 1 == 1;
            }
            bool[] o;
            bool[] r;

            r = p.opABoolS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List <bool> i = new List <bool>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(c % 1 == 1);
            }
            List <bool> o;
            List <bool> r;

            r = p.opLBoolS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList <bool> i = new LinkedList <bool>();
            for (int c = 0; c < _length; ++c)
            {
                i.AddLast(c % 1 == 1);
            }
            LinkedList <bool> o;
            LinkedList <bool> r;

            r = p.opKBoolS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue <bool> i = new Queue <bool>();
            for (int c = 0; c < _length; ++c)
            {
                i.Enqueue(c % 1 == 1);
            }
            Queue <bool> o;
            Queue <bool> r;

            r = p.opQBoolS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack <bool> i = new Stack <bool>();
            for (int c = 0; c < _length; ++c)
            {
                i.Push(c % 1 == 1);
            }
            Stack <bool> o;
            Stack <bool> r;

            r = p.opSBoolS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CBoolS i = new CBoolS(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(c % 1 == 1);
            }
            CBoolS o;
            CBoolS r;

            r = p.opCBoolS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            short[] i = new short[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c] = (short)c;
            }
            short[] o;
            short[] r;

            {
                r = p.opAShortS(i, out o);
            }
            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List <short> i = new List <short>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add((short)c);
            }
            List <short> o;
            List <short> r;

            r = p.opLShortS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList <short> i = new LinkedList <short>();
            for (int c = 0; c < _length; ++c)
            {
                i.AddLast((short)c);
            }
            LinkedList <short> o;
            LinkedList <short> r;

            r = p.opKShortS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue <short> i = new Queue <short>();
            for (int c = 0; c < _length; ++c)
            {
                i.Enqueue((short)c);
            }
            Queue <short> o;
            Queue <short> r;

            r = p.opQShortS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack <short> i = new Stack <short>();
            for (int c = 0; c < _length; ++c)
            {
                i.Push((short)c);
            }
            Stack <short> o;
            Stack <short> r;

            r = p.opSShortS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CShortS i = new CShortS(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add((short)c);
            }
            CShortS o;
            CShortS r;

            r = p.opCShortS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            int[] i = new int[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c] = (int)c;
            }
            int[] o;
            int[] r;

            r = p.opAIntS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List <int> i = new List <int>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add((int)c);
            }
            List <int> o;
            List <int> r;

            r = p.opLIntS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList <int> i = new LinkedList <int>();
            for (int c = 0; c < _length; ++c)
            {
                i.AddLast((int)c);
            }
            LinkedList <int> o;
            LinkedList <int> r;

            r = p.opKIntS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue <int> i = new Queue <int>();
            for (int c = 0; c < _length; ++c)
            {
                i.Enqueue((int)c);
            }
            Queue <int> o;
            Queue <int> r;

            r = p.opQIntS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack <int> i = new Stack <int>();
            for (int c = 0; c < _length; ++c)
            {
                i.Push((int)c);
            }
            Stack <int> o;
            Stack <int> r;

            r = p.opSIntS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CIntS i = new CIntS(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add((int)c);
            }
            CIntS o;
            CIntS r;

            r = p.opCIntS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            long[] i = new long[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c] = (long)c;
            }
            long[] o;
            long[] r;

            r = p.opALongS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List <long> i = new List <long>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add((long)c);
            }
            List <long> o;
            List <long> r;

            r = p.opLLongS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList <long> i = new LinkedList <long>();
            for (int c = 0; c < _length; ++c)
            {
                i.AddLast((long)c);
            }
            LinkedList <long> o;
            LinkedList <long> r;

            r = p.opKLongS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue <long> i = new Queue <long>();
            for (int c = 0; c < _length; ++c)
            {
                i.Enqueue((long)c);
            }
            Queue <long> o;
            Queue <long> r;

            r = p.opQLongS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack <long> i = new Stack <long>();
            for (int c = 0; c < _length; ++c)
            {
                i.Push((long)c);
            }
            Stack <long> o;
            Stack <long> r;

            r = p.opSLongS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CLongS i = new CLongS(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add((long)c);
            }
            CLongS o;
            CLongS r;

            r = p.opCLongS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            float[] i = new float[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c] = (float)c;
            }
            float[] o;
            float[] r;

            r = p.opAFloatS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List <float> i = new List <float>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add((float)c);
            }
            List <float> o;
            List <float> r;

            r = p.opLFloatS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList <float> i = new LinkedList <float>();
            for (int c = 0; c < _length; ++c)
            {
                i.AddLast((float)c);
            }
            LinkedList <float> o;
            LinkedList <float> r;

            r = p.opKFloatS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue <float> i = new Queue <float>();
            for (int c = 0; c < _length; ++c)
            {
                i.Enqueue((float)c);
            }
            Queue <float> o;
            Queue <float> r;

            r = p.opQFloatS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack <float> i = new Stack <float>();
            for (int c = 0; c < _length; ++c)
            {
                i.Push((float)c);
            }
            Stack <float> o;
            Stack <float> r;

            r = p.opSFloatS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CFloatS i = new CFloatS(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add((float)c);
            }
            CFloatS o;
            CFloatS r;

            r = p.opCFloatS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            double[] i = new double[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c] = (double)c;
            }
            double[] o;
            double[] r;

            r = p.opADoubleS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List <double> i = new List <double>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add((double)c);
            }
            List <double> o;
            List <double> r;

            r = p.opLDoubleS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList <double> i = new LinkedList <double>();
            for (int c = 0; c < _length; ++c)
            {
                i.AddLast((double)c);
            }
            LinkedList <double> o;
            LinkedList <double> r;

            r = p.opKDoubleS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue <double> i = new Queue <double>();
            for (int c = 0; c < _length; ++c)
            {
                i.Enqueue((double)c);
            }
            Queue <double> o;
            Queue <double> r;

            r = p.opQDoubleS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack <double> i = new Stack <double>();
            for (int c = 0; c < _length; ++c)
            {
                i.Push((double)c);
            }
            Stack <double> o;
            Stack <double> r;

            r = p.opSDoubleS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CDoubleS i = new CDoubleS(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add((double)c);
            }
            CDoubleS o;
            CDoubleS r;

            r = p.opCDoubleS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            string[] i = new string[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c] = c.ToString();
            }
            string[] o;
            string[] r;

            r = p.opAStringS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List <string> i = new List <string>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(c.ToString());
            }
            List <string> o;
            List <string> r;

            r = p.opLStringS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList <string> i = new LinkedList <string>();
            for (int c = 0; c < _length; ++c)
            {
                i.AddLast(c.ToString());
            }
            LinkedList <string> o;
            LinkedList <string> r;

            r = p.opKStringS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue <string> i = new Queue <string>();
            for (int c = 0; c < _length; ++c)
            {
                i.Enqueue(c.ToString());
            }
            Queue <string> o;
            Queue <string> r;

            r = p.opQStringS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack <string> i = new Stack <string>();
            for (int c = 0; c < _length; ++c)
            {
                i.Push(c.ToString());
            }
            Stack <string> o;
            Stack <string> r;

            r = p.opSStringS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CStringS i = new CStringS(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(c.ToString());
            }
            CStringS o;
            CStringS r;

            r = p.opCStringS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Ice.Object[] i = new CV[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c] = new CV(c);
            }
            Ice.Object[] o;
            Ice.Object[] r;

            r = p.opAObjectS(i, out o);

            System.Collections.IEnumerator eo = o.GetEnumerator();
            System.Collections.IEnumerator er = r.GetEnumerator();
            foreach (CV obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.i == ((CV)eo.Current).i);
                test(obj.i == ((CV)er.Current).i);
            }
        }

        {
            List <Ice.Object> i = new List <Ice.Object>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(new CV(c));
            }
            List <Ice.Object> o;
            List <Ice.Object> r;

            r = p.opLObjectS(i, out o);

            IEnumerator <Ice.Object> eo = o.GetEnumerator();
            IEnumerator <Ice.Object> er = r.GetEnumerator();
            foreach (CV obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.i == ((CV)eo.Current).i);
                test(obj.i == ((CV)er.Current).i);
            }
        }

        {
            CObjectS i = new CObjectS(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(new CV(c));
            }
            CObjectS o;
            CObjectS r;

            r = p.opCObjectS(i, out o);

            IEnumerator <Ice.Object> eo = (IEnumerator <Ice.Object>)o.GetEnumerator();
            IEnumerator <Ice.Object> er = (IEnumerator <Ice.Object>)r.GetEnumerator();
            foreach (CV obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.i == ((CV)eo.Current).i);
                test(obj.i == ((CV)er.Current).i);
            }
        }

        {
            Ice.ObjectPrx[] i = new Ice.ObjectPrx[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c] = communicator.stringToProxy(c.ToString());
            }
            Ice.ObjectPrx[] o;
            Ice.ObjectPrx[] r;

            r = p.opAObjectPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List <Ice.ObjectPrx> i = new List <Ice.ObjectPrx>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(communicator.stringToProxy(c.ToString()));
            }
            List <Ice.ObjectPrx> o;
            List <Ice.ObjectPrx> r;

            r = p.opLObjectPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList <Ice.ObjectPrx> i = new LinkedList <Ice.ObjectPrx>();
            for (int c = 0; c < _length; ++c)
            {
                i.AddLast(communicator.stringToProxy(c.ToString()));
            }
            LinkedList <Ice.ObjectPrx> o;
            LinkedList <Ice.ObjectPrx> r;

            r = p.opKObjectPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue <Ice.ObjectPrx> i = new Queue <Ice.ObjectPrx>();
            for (int c = 0; c < _length; ++c)
            {
                i.Enqueue(communicator.stringToProxy(c.ToString()));
            }
            Queue <Ice.ObjectPrx> o;
            Queue <Ice.ObjectPrx> r;

            r = p.opQObjectPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack <Ice.ObjectPrx> i = new Stack <Ice.ObjectPrx>();
            for (int c = 0; c < _length; ++c)
            {
                i.Push(communicator.stringToProxy(c.ToString()));
            }
            Stack <Ice.ObjectPrx> o;
            Stack <Ice.ObjectPrx> r;

            r = p.opSObjectPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CObjectPrxS i = new CObjectPrxS(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(communicator.stringToProxy(c.ToString()));
            }
            CObjectPrxS o;
            CObjectPrxS r;

            r = p.opCObjectPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            S[] i = new S[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c].i = c;
            }
            S[] o;
            S[] r;

            r = p.opAStructS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List <S> i = new List <S>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(new S(c));
            }
            List <S> o;
            List <S> r;

            r = p.opLStructS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList <S> i = new LinkedList <S>();
            for (int c = 0; c < _length; ++c)
            {
                i.AddLast(new S(c));
            }
            LinkedList <S> o;
            LinkedList <S> r;

            r = p.opKStructS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue <S> i = new Queue <S>();
            for (int c = 0; c < _length; ++c)
            {
                i.Enqueue(new S(c));
            }
            Queue <S> o;
            Queue <S> r;

            r = p.opQStructS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack <S> i = new Stack <S>();
            for (int c = 0; c < _length; ++c)
            {
                i.Push(new S(c));
            }
            Stack <S> o;
            Stack <S> r;


            r = p.opSStructS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CStructS i = new CStructS(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(new S(c));
            }
            CStructS o;
            CStructS r;

            r = p.opCStructS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            SD[] i = new SD[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c] = new SD(c);
            }
            SD[] o;
            SD[] r;

            r = p.opAStructSD(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List <SD> i = new List <SD>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(new SD(c));
            }
            List <SD> o;
            List <SD> r;

            r = p.opLStructSD(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList <SD> i = new LinkedList <SD>();
            for (int c = 0; c < _length; ++c)
            {
                i.AddLast(new SD(c));
            }
            LinkedList <SD> o;
            LinkedList <SD> r;

            r = p.opKStructSD(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue <SD> i = new Queue <SD>();
            for (int c = 0; c < _length; ++c)
            {
                i.Enqueue(new SD(c));
            }
            Queue <SD> o;
            Queue <SD> r;

            r = p.opQStructSD(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack <SD> i = new Stack <SD>();
            for (int c = 0; c < _length; ++c)
            {
                i.Push(new SD(c));
            }
            Stack <SD> o;
            Stack <SD> r;


            r = p.opSStructSD(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CStructSD i = new CStructSD(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(new SD(c));
            }
            CStructSD o;
            CStructSD r;

            r = p.opCStructSD(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CV[] i = new CV[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c] = new CV(c);
            }
            CV[] o;
            CV[] r;

            r = p.opACVS(i, out o);

            System.Collections.IEnumerator eo = o.GetEnumerator();
            System.Collections.IEnumerator er = r.GetEnumerator();
            foreach (CV obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.i == ((CV)eo.Current).i);
                test(obj.i == ((CV)er.Current).i);
            }
        }

        {
            List <CV> i = new List <CV>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(new CV(c));
            }
            List <CV> o;
            List <CV> r;

            r = p.opLCVS(i, out o);

            IEnumerator <CV> eo = o.GetEnumerator();
            IEnumerator <CV> er = r.GetEnumerator();
            foreach (CV obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.i == eo.Current.i);
                test(obj.i == er.Current.i);
            }
        }

        {
            CCVS i = new CCVS(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(new CV(c));
            }
            CCVS o;
            CCVS r;

            r = p.opCCVS(i, out o);

            IEnumerator <CV> eo = (IEnumerator <CV>)o.GetEnumerator();
            IEnumerator <CV> er = (IEnumerator <CV>)r.GetEnumerator();
            foreach (CV obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.i == eo.Current.i);
                test(obj.i == er.Current.i);
            }
        }

        {
            CR[] i = new CR[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c] = new CR(new CV(c));
            }
            CR[] o;
            CR[] r;

            r = p.opACRS(i, out o);

            System.Collections.IEnumerator eo = o.GetEnumerator();
            System.Collections.IEnumerator er = r.GetEnumerator();
            foreach (CR obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.v.i == ((CR)eo.Current).v.i);
                test(obj.v.i == ((CR)er.Current).v.i);
            }
        }

        {
            List <CR> i = new List <CR>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(new CR(new CV(c)));
            }
            List <CR> o;
            List <CR> r;

            r = p.opLCRS(i, out o);

            IEnumerator <CR> eo = o.GetEnumerator();
            IEnumerator <CR> er = r.GetEnumerator();
            foreach (CR obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.v.i == eo.Current.v.i);
                test(obj.v.i == er.Current.v.i);
            }
        }

        {
            CCRS i = new CCRS(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(new CR(new CV(c)));
            }
            CCRS o;
            CCRS r;

            r = p.opCCRS(i, out o);

            IEnumerator <CR> eo = (IEnumerator <CR>)o.GetEnumerator();
            IEnumerator <CR> er = (IEnumerator <CR>)r.GetEnumerator();
            foreach (CR obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.v.i == eo.Current.v.i);
                test(obj.v.i == er.Current.v.i);
            }
        }

        {
            En[] i = new En[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c] = (En)(c % 3);
            }
            En[] o;
            En[] r;

            r = p.opAEnS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List <En> i = new List <En>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add((En)(c % 3));
            }
            List <En> o;
            List <En> r;

            r = p.opLEnS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList <En> i = new LinkedList <En>();
            for (int c = 0; c < _length; ++c)
            {
                i.AddLast((En)(c % 3));
            }
            LinkedList <En> o;
            LinkedList <En> r;

            r = p.opKEnS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue <En> i = new Queue <En>();
            for (int c = 0; c < _length; ++c)
            {
                i.Enqueue((En)(c % 3));
            }
            Queue <En> o;
            Queue <En> r;

            r = p.opQEnS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack <En> i = new Stack <En>();
            for (int c = 0; c < _length; ++c)
            {
                i.Push((En)(c % 3));
            }
            Stack <En> o;
            Stack <En> r;

            r = p.opSEnS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CEnS i = new CEnS(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add((En)(c % 3));
            }
            CEnS o;
            CEnS r;

            r = p.opCEnS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CVPrx[] i = new CVPrx[_length];
            for (int c = 0; c < _length; ++c)
            {
                i[c] = CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString()));
            }
            CVPrx[] o;
            CVPrx[] r;

            r = p.opACVPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List <CVPrx> i = new List <CVPrx>(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
            }
            List <CVPrx> o;
            List <CVPrx> r;

            r = p.opLCVPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList <CVPrx> i = new LinkedList <CVPrx>();
            for (int c = 0; c < _length; ++c)
            {
                i.AddLast(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
            }
            LinkedList <CVPrx> o;
            LinkedList <CVPrx> r;

            r = p.opKCVPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue <CVPrx> i = new Queue <CVPrx>();
            for (int c = 0; c < _length; ++c)
            {
                i.Enqueue(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
            }
            Queue <CVPrx> o;
            Queue <CVPrx> r;

            r = p.opQCVPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack <CVPrx> i = new Stack <CVPrx>();
            for (int c = 0; c < _length; ++c)
            {
                i.Push(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
            }
            Stack <CVPrx> o;
            Stack <CVPrx> r;

            r = p.opSCVPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CCVPrxS i = new CCVPrxS(_length);
            for (int c = 0; c < _length; ++c)
            {
                i.Add(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
            }
            CCVPrxS o;
            CCVPrxS r;

            r = p.opCCVPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Custom <int> i = new Custom <int>();
            for (int c = 0; c < _length; ++c)
            {
                i.Add(c);
            }
            Custom <int> o;
            Custom <int> r;

            r = p.opCustomIntS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Custom <CV> i = new Custom <CV>();
            for (int c = 0; c < _length; ++c)
            {
                i.Add(new CV(c));
            }
            i.Add(null);
            Custom <CV> o;
            Custom <CV> r;

            r = p.opCustomCVS(i, out o);

            IEnumerator <CV> eo = (IEnumerator <CV>)o.GetEnumerator();
            IEnumerator <CV> er = (IEnumerator <CV>)r.GetEnumerator();
            foreach (CV obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                if (obj == null)
                {
                    test(eo.Current == null);
                    test(er.Current == null);
                }
                else
                {
                    test(obj.i == eo.Current.i);
                    test(obj.i == er.Current.i);
                }
            }
        }

        {
            Custom <Custom <int> > i = new Custom <Custom <int> >();
            for (int c = 0; c < _length; ++c)
            {
                Custom <int> inner = new Custom <int>();
                for (int j = 0; j < c; ++j)
                {
                    inner.Add(j);
                }
                i.Add(inner);
            }
            Custom <Custom <int> > o;
            Custom <Custom <int> > r;

            r = p.opCustomIntSS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Custom <Custom <CV> > i = new Custom <Custom <CV> >();
            for (int c = 0; c < _length; ++c)
            {
                Custom <CV> inner = new Custom <CV>();
                for (int j = 0; j < c; ++j)
                {
                    inner.Add(new CV(j));
                }
                i.Add(inner);
            }
            Custom <Custom <CV> > o;
            Custom <Custom <CV> > r;

            r = p.opCustomCVSS(i, out o);

            IEnumerator <Custom <CV> > eo = (IEnumerator <Custom <CV> >)o.GetEnumerator();
            IEnumerator <Custom <CV> > er = (IEnumerator <Custom <CV> >)r.GetEnumerator();
            foreach (Custom <CV> s in i)
            {
                eo.MoveNext();
                er.MoveNext();
                IEnumerator <CV> io = (IEnumerator <CV>)eo.Current.GetEnumerator();
                IEnumerator <CV> ir = (IEnumerator <CV>)er.Current.GetEnumerator();
                foreach (CV obj in s)
                {
                    io.MoveNext();
                    ir.MoveNext();
                    if (obj == null)
                    {
                        test(io.Current == null);
                        test(ir.Current == null);
                    }
                    else
                    {
                        test(obj.i == io.Current.i);
                        test(obj.i == ir.Current.i);
                    }
                }
            }
        }

#if !COMPACT && !SILVERLIGHT
        {
            Serialize.Small i = null;
            Serialize.Small o;
            Serialize.Small r;

            r = p.opSerialSmallCSharp(i, out o);

            test(o == null);
            test(r == null);
        }

        {
            Serialize.Small i = new Serialize.Small();
            i.i = 99;
            Serialize.Small o;
            Serialize.Small r;

            try
            {
                r = p.opSerialSmallCSharp(i, out o);

                test(o.i == 99);
                test(r.i == 99);
            }
            catch (Ice.OperationNotExistException)
            {
                // OK, talking to non-C# server.
            }
        }

        {
            Serialize.Large i = new Serialize.Large();
            i.d1  = 1.0;
            i.d2  = 2.0;
            i.d3  = 3.0;
            i.d4  = 4.0;
            i.d5  = 5.0;
            i.d6  = 6.0;
            i.d7  = 7.0;
            i.d8  = 8.0;
            i.d9  = 9.0;
            i.d10 = 10.0;
            Serialize.Large o;
            Serialize.Large r;

            try
            {
                r = p.opSerialLargeCSharp(i, out o);

                test(o.d1 == 1.0);
                test(o.d2 == 2.0);
                test(o.d3 == 3.0);
                test(o.d4 == 4.0);
                test(o.d5 == 5.0);
                test(o.d6 == 6.0);
                test(o.d7 == 7.0);
                test(o.d8 == 8.0);
                test(o.d9 == 9.0);
                test(o.d10 == 10.0);
                test(r.d1 == 1.0);
                test(r.d2 == 2.0);
                test(r.d3 == 3.0);
                test(r.d4 == 4.0);
                test(r.d5 == 5.0);
                test(r.d6 == 6.0);
                test(r.d7 == 7.0);
                test(r.d8 == 8.0);
                test(r.d9 == 9.0);
                test(r.d10 == 10.0);
            }
            catch (Ice.OperationNotExistException)
            {
                // OK, talking to non-C# server.
            }
        }

        {
            Serialize.Struct i = new Serialize.Struct();
            i.o  = null;
            i.o2 = i;
            i.s  = null;
            i.s2 = "Hello";
            Serialize.Struct o;
            Serialize.Struct r;

            try
            {
                r = p.opSerialStructCSharp(i, out o);

                test(o.o == null);
                test(o.o2 != null);
                test(((Serialize.Struct)(o.o2)).o == null);
                test(((Serialize.Struct)(o.o2)).o2 == o.o2);
                test(o.s == null);
                test(o.s2.Equals("Hello"));
                test(r.o == null);
                test(r.o2 != null);
                test(((Serialize.Struct)(r.o2)).o == null);
                test(((Serialize.Struct)(r.o2)).o2 == r.o2);
                test(r.s == null);
                test(r.s2.Equals("Hello"));
            }
            catch (Ice.OperationNotExistException)
            {
                // OK, talking to non-C# server.
            }
        }
#endif
    }
Пример #25
0
 internal void SetRecipientRoleCode(NullFlavor nullType)
 {
     recipientRoleCode = new CV<string>();
     recipientRoleCode.NullFlavor = nullType;
 }
Пример #26
0
 public CVType(CV Qualifier, BaseNode Child) : base(NodeType.CVQualifierType, Child)
 {
     this.Qualifier = Qualifier;
 }
Пример #27
0
    internal static void twoways(Ice.Communicator communicator, Test.MyClassPrx p)
    {
        {
            byte[] i = new byte[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = (byte)c;
            }
            byte[] o;
            byte[] r;

            r = p.opAByteS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List<byte> i = new List<byte>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add((byte)c);
            }
            List<byte> o;
            List<byte> r;

            r = p.opLByteS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList<byte> i = new LinkedList<byte>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast((byte)c);
            }
            LinkedList<byte> o;
            LinkedList<byte> r;

            r = p.opKByteS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue<byte> i = new Queue<byte>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue((byte)c);
            }
            Queue<byte> o;
            Queue<byte> r;

            r = p.opQByteS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack<byte> i = new Stack<byte>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push((byte)c);
            }
            Stack<byte> o;
            Stack<byte> r;

            r = p.opSByteS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CByteS i = new CByteS(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add((byte)c);
            }
            CByteS o;
            CByteS r;

            r = p.opCByteS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            bool[] i = new bool[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = c % 1 == 1;
            }
            bool[] o;
            bool[] r;

            r = p.opABoolS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List<bool> i = new List<bool>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(c % 1 == 1);
            }
            List<bool> o;
            List<bool> r;

            r = p.opLBoolS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList<bool> i = new LinkedList<bool>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast(c % 1 == 1);
            }
            LinkedList<bool> o;
            LinkedList<bool> r;

            r = p.opKBoolS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue<bool> i = new Queue<bool>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue(c % 1 == 1);
            }
            Queue<bool> o;
            Queue<bool> r;

            r = p.opQBoolS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack<bool> i = new Stack<bool>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push(c % 1 == 1);
            }
            Stack<bool> o;
            Stack<bool> r;

            r = p.opSBoolS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CBoolS i = new CBoolS(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(c % 1 == 1);
            }
            CBoolS o;
            CBoolS r;

            r = p.opCBoolS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            short[] i = new short[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = (short)c;
            }
            short[] o;
            short[] r;

            {
                r = p.opAShortS(i, out o);
            }
            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List<short> i = new List<short>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add((short)c);
            }
            List<short> o;
            List<short> r;

            r = p.opLShortS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList<short> i = new LinkedList<short>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast((short)c);
            }
            LinkedList<short> o;
            LinkedList<short> r;

            r = p.opKShortS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue<short> i = new Queue<short>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue((short)c);
            }
            Queue<short> o;
            Queue<short> r;

            r = p.opQShortS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack<short> i = new Stack<short>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push((short)c);
            }
            Stack<short> o;
            Stack<short> r;

            r = p.opSShortS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CShortS i = new CShortS(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add((short)c);
            }
            CShortS o;
            CShortS r;

            r = p.opCShortS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            int[] i = new int[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = (int)c;
            }
            int[] o;
            int[] r;

            r = p.opAIntS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List<int> i = new List<int>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add((int)c);
            }
            List<int> o;
            List<int> r;

            r = p.opLIntS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList<int> i = new LinkedList<int>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast((int)c);
            }
            LinkedList<int> o;
            LinkedList<int> r;

            r = p.opKIntS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue<int> i = new Queue<int>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue((int)c);
            }
            Queue<int> o;
            Queue<int> r;

            r = p.opQIntS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack<int> i = new Stack<int>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push((int)c);
            }
            Stack<int> o;
            Stack<int> r;

            r = p.opSIntS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CIntS i = new CIntS(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add((int)c);
            }
            CIntS o;
            CIntS r;

            r = p.opCIntS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            long[] i = new long[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = (long)c;
            }
            long[] o;
            long[] r;

            r = p.opALongS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List<long> i = new List<long>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add((long)c);
            }
            List<long> o;
            List<long> r;

            r = p.opLLongS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList<long> i = new LinkedList<long>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast((long)c);
            }
            LinkedList<long> o;
            LinkedList<long> r;

            r = p.opKLongS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue<long> i = new Queue<long>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue((long)c);
            }
            Queue<long> o;
            Queue<long> r;

            r = p.opQLongS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack<long> i = new Stack<long>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push((long)c);
            }
            Stack<long> o;
            Stack<long> r;

            r = p.opSLongS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CLongS i = new CLongS(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add((long)c);
            }
            CLongS o;
            CLongS r;

            r = p.opCLongS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            float[] i = new float[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = (float)c;
            }
            float[] o;
            float[] r;

            r = p.opAFloatS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List<float> i = new List<float>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add((float)c);
            }
            List<float> o;
            List<float> r;

            r = p.opLFloatS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList<float> i = new LinkedList<float>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast((float)c);
            }
            LinkedList<float> o;
            LinkedList<float> r;

            r = p.opKFloatS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue<float> i = new Queue<float>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue((float)c);
            }
            Queue<float> o;
            Queue<float> r;

            r = p.opQFloatS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack<float> i = new Stack<float>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push((float)c);
            }
            Stack<float> o;
            Stack<float> r;

            r = p.opSFloatS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CFloatS i = new CFloatS(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add((float)c);
            }
            CFloatS o;
            CFloatS r;

            r = p.opCFloatS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            double[] i = new double[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = (double)c;
            }
            double[] o;
            double[] r;

            r = p.opADoubleS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List<double> i = new List<double>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add((double)c);
            }
            List<double> o;
            List<double> r;

            r = p.opLDoubleS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList<double> i = new LinkedList<double>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast((double)c);
            }
            LinkedList<double> o;
            LinkedList<double> r;

            r = p.opKDoubleS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue<double> i = new Queue<double>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue((double)c);
            }
            Queue<double> o;
            Queue<double> r;

            r = p.opQDoubleS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack<double> i = new Stack<double>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push((double)c);
            }
            Stack<double> o;
            Stack<double> r;

            r = p.opSDoubleS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CDoubleS i = new CDoubleS(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add((double)c);
            }
            CDoubleS o;
            CDoubleS r;

            r = p.opCDoubleS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            string[] i = new string[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = c.ToString();
            }
            string[] o;
            string[] r;

            r = p.opAStringS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List<string> i = new List<string>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(c.ToString());
            }
            List<string> o;
            List<string> r;

            r = p.opLStringS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList<string> i = new LinkedList<string>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast(c.ToString());
            }
            LinkedList<string> o;
            LinkedList<string> r;

            r = p.opKStringS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue<string> i = new Queue<string>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue(c.ToString());
            }
            Queue<string> o;
            Queue<string> r;

            r = p.opQStringS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack<string> i = new Stack<string>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push(c.ToString());
            }
            Stack<string> o;
            Stack<string> r;

            r = p.opSStringS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CStringS i = new CStringS(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(c.ToString());
            }
            CStringS o;
            CStringS r;

            r = p.opCStringS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Ice.Object[] i = new CV[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = new CV(c);
            }
            Ice.Object[] o;
            Ice.Object[] r;

            r = p.opAObjectS(i, out o);

            System.Collections.IEnumerator eo = o.GetEnumerator();
            System.Collections.IEnumerator er = r.GetEnumerator();
            foreach(CV obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.i == ((CV)eo.Current).i);
                test(obj.i == ((CV)er.Current).i);
            }
        }

        {
            List<Ice.Object> i = new List<Ice.Object>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new CV(c));
            }
            List<Ice.Object> o;
            List<Ice.Object> r;

            r = p.opLObjectS(i, out o);

            IEnumerator<Ice.Object> eo = o.GetEnumerator();
            IEnumerator<Ice.Object> er = r.GetEnumerator();
            foreach(CV obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.i == ((CV)eo.Current).i);
                test(obj.i == ((CV)er.Current).i);
            }
        }

        {
            CObjectS i = new CObjectS(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new CV(c));
            }
            CObjectS o;
            CObjectS r;

            r = p.opCObjectS(i, out o);

            IEnumerator<Ice.Object> eo = (IEnumerator<Ice.Object>)o.GetEnumerator();
            IEnumerator<Ice.Object> er = (IEnumerator<Ice.Object>)r.GetEnumerator();
            foreach(CV obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.i == ((CV)eo.Current).i);
                test(obj.i == ((CV)er.Current).i);
            }
        }

        {
            Ice.ObjectPrx[] i = new Ice.ObjectPrx[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = communicator.stringToProxy(c.ToString());
            }
            Ice.ObjectPrx[] o;
            Ice.ObjectPrx[] r;

            r = p.opAObjectPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List<Ice.ObjectPrx> i = new List<Ice.ObjectPrx>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(communicator.stringToProxy(c.ToString()));
            }
            List<Ice.ObjectPrx> o;
            List<Ice.ObjectPrx> r;

            r = p.opLObjectPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList<Ice.ObjectPrx> i = new LinkedList<Ice.ObjectPrx>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast(communicator.stringToProxy(c.ToString()));
            }
            LinkedList<Ice.ObjectPrx> o;
            LinkedList<Ice.ObjectPrx> r;

            r = p.opKObjectPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue<Ice.ObjectPrx> i = new Queue<Ice.ObjectPrx>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue(communicator.stringToProxy(c.ToString()));
            }
            Queue<Ice.ObjectPrx> o;
            Queue<Ice.ObjectPrx> r;

            r = p.opQObjectPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack<Ice.ObjectPrx> i = new Stack<Ice.ObjectPrx>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push(communicator.stringToProxy(c.ToString()));
            }
            Stack<Ice.ObjectPrx> o;
            Stack<Ice.ObjectPrx> r;

            r = p.opSObjectPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CObjectPrxS i = new CObjectPrxS(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(communicator.stringToProxy(c.ToString()));
            }
            CObjectPrxS o;
            CObjectPrxS r;

            r = p.opCObjectPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            S[] i = new S[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c].i = c;
            }
            S[] o;
            S[] r;

            r = p.opAStructS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List<S> i = new List<S>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new S(c));
            }
            List<S> o;
            List<S> r;

            r = p.opLStructS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList<S> i = new LinkedList<S>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast(new S(c));
            }
            LinkedList<S> o;
            LinkedList<S> r;

            r = p.opKStructS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue<S> i = new Queue<S>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue(new S(c));
            }
            Queue<S> o;
            Queue<S> r;

            r = p.opQStructS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack<S> i = new Stack<S>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push(new S(c));
            }
            Stack<S> o;
            Stack<S> r;


            r = p.opSStructS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CStructS i = new CStructS(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new S(c));
            }
            CStructS o;
            CStructS r;

            r = p.opCStructS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            SD[] i = new SD[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = new SD(c);
            }
            SD[] o;
            SD[] r;

            r = p.opAStructSD(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List<SD> i = new List<SD>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new SD(c));
            }
            List<SD> o;
            List<SD> r;

            r = p.opLStructSD(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList<SD> i = new LinkedList<SD>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast(new SD(c));
            }
            LinkedList<SD> o;
            LinkedList<SD> r;

            r = p.opKStructSD(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue<SD> i = new Queue<SD>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue(new SD(c));
            }
            Queue<SD> o;
            Queue<SD> r;

            r = p.opQStructSD(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack<SD> i = new Stack<SD>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push(new SD(c));
            }
            Stack<SD> o;
            Stack<SD> r;


            r = p.opSStructSD(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CStructSD i = new CStructSD(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new SD(c));
            }
            CStructSD o;
            CStructSD r;

            r = p.opCStructSD(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CV[] i = new CV[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = new CV(c);
            }
            CV[] o;
            CV[] r;

            r = p.opACVS(i, out o);

            System.Collections.IEnumerator eo = o.GetEnumerator();
            System.Collections.IEnumerator er = r.GetEnumerator();
            foreach(CV obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.i == ((CV)eo.Current).i);
                test(obj.i == ((CV)er.Current).i);
            }
        }

        {
            List<CV> i = new List<CV>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new CV(c));
            }
            List<CV> o;
            List<CV> r;

            r = p.opLCVS(i, out o);

            IEnumerator<CV> eo = o.GetEnumerator();
            IEnumerator<CV> er = r.GetEnumerator();
            foreach(CV obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.i == eo.Current.i);
                test(obj.i == er.Current.i);
            }
        }

        {
            CCVS i = new CCVS(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new CV(c));
            }
            CCVS o;
            CCVS r;

            r = p.opCCVS(i, out o);

            IEnumerator<CV> eo = (IEnumerator<CV>)o.GetEnumerator();
            IEnumerator<CV> er = (IEnumerator<CV>)r.GetEnumerator();
            foreach(CV obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.i == eo.Current.i);
                test(obj.i == er.Current.i);
            }
        }

        {
            CR[] i = new CR[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = new CR(new CV(c));
            }
            CR[] o;
            CR[] r;

            r = p.opACRS(i, out o);

            System.Collections.IEnumerator eo = o.GetEnumerator();
            System.Collections.IEnumerator er = r.GetEnumerator();
            foreach(CR obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.v.i == ((CR)eo.Current).v.i);
                test(obj.v.i == ((CR)er.Current).v.i);
            }
        }

        {
            List<CR> i = new List<CR>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new CR(new CV(c)));
            }
            List<CR> o;
            List<CR> r;

            r = p.opLCRS(i, out o);

            IEnumerator<CR> eo = o.GetEnumerator();
            IEnumerator<CR> er = r.GetEnumerator();
            foreach(CR obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.v.i == eo.Current.v.i);
                test(obj.v.i == er.Current.v.i);
            }
        }

        {
            CCRS i = new CCRS(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new CR(new CV(c)));
            }
            CCRS o;
            CCRS r;

            r = p.opCCRS(i, out o);

            IEnumerator<CR> eo = (IEnumerator<CR>)o.GetEnumerator();
            IEnumerator<CR> er = (IEnumerator<CR>)r.GetEnumerator();
            foreach(CR obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                test(obj.v.i == eo.Current.v.i);
                test(obj.v.i == er.Current.v.i);
            }
        }

        {
            En[] i = new En[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = (En)(c % 3);
            }
            En[] o;
            En[] r;

            r = p.opAEnS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List<En> i = new List<En>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add((En)(c % 3));
            }
            List<En> o;
            List<En> r;

            r = p.opLEnS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList<En> i = new LinkedList<En>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast((En)(c % 3));
            }
            LinkedList<En> o;
            LinkedList<En> r;

            r = p.opKEnS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue<En> i = new Queue<En>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue((En)(c % 3));
            }
            Queue<En> o;
            Queue<En> r;

            r = p.opQEnS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack<En> i = new Stack<En>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push((En)(c % 3));
            }
            Stack<En> o;
            Stack<En> r;

            r = p.opSEnS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CEnS i = new CEnS(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add((En)(c % 3));
            }
            CEnS o;
            CEnS r;

            r = p.opCEnS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CVPrx[] i = new CVPrx[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString()));
            }
            CVPrx[] o;
            CVPrx[] r;

            r = p.opACVPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            List<CVPrx> i = new List<CVPrx>(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
            }
            List<CVPrx> o;
            List<CVPrx> r;

            r = p.opLCVPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            LinkedList<CVPrx> i = new LinkedList<CVPrx>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
            }
            LinkedList<CVPrx> o;
            LinkedList<CVPrx> r;

            r = p.opKCVPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Queue<CVPrx> i = new Queue<CVPrx>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
            }
            Queue<CVPrx> o;
            Queue<CVPrx> r;

            r = p.opQCVPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Stack<CVPrx> i = new Stack<CVPrx>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
            }
            Stack<CVPrx> o;
            Stack<CVPrx> r;

            r = p.opSCVPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            CCVPrxS i = new CCVPrxS(_length);
            for(int c = 0; c < _length; ++c)
            {
                i.Add(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
            }
            CCVPrxS o;
            CCVPrxS r;

            r = p.opCCVPrxS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Custom<int> i = new Custom<int>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(c);
            }
            Custom<int> o;
            Custom<int> r;

            r = p.opCustomIntS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Custom<CV> i = new Custom<CV>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new CV(c));
            }
            i.Add(null);
            Custom<CV> o;
            Custom<CV> r;

            r = p.opCustomCVS(i, out o);

            IEnumerator<CV> eo = (IEnumerator<CV>)o.GetEnumerator();
            IEnumerator<CV> er = (IEnumerator<CV>)r.GetEnumerator();
            foreach(CV obj in i)
            {
                eo.MoveNext();
                er.MoveNext();
                if(obj == null)
                {
                    test(eo.Current == null);
                    test(er.Current == null);
                }
                else
                {
                    test(obj.i == eo.Current.i);
                    test(obj.i == er.Current.i);
                }
            }
        }

        {
            Custom<Custom<int>> i = new Custom<Custom<int>>();
            for(int c = 0; c < _length; ++c)
            {
                Custom<int> inner = new Custom<int>();
                for(int j = 0; j < c; ++j)
                {
                    inner.Add(j);
                }
                i.Add(inner);
            }
            Custom<Custom<int>> o;
            Custom<Custom<int>> r;

            r = p.opCustomIntSS(i, out o);

            test(Ice.CollectionComparer.Equals(i, o));
            test(Ice.CollectionComparer.Equals(i, r));
        }

        {
            Custom<Custom<CV>> i = new Custom<Custom<CV>>();
            for(int c = 0; c < _length; ++c)
            {
                Custom<CV> inner = new Custom<CV>();
                for(int j = 0; j < c; ++j)
                {
                    inner.Add(new CV(j));
                }
                i.Add(inner);
            }
            Custom<Custom<CV>> o;
            Custom<Custom<CV>> r;

            r = p.opCustomCVSS(i, out o);

            IEnumerator<Custom<CV>> eo = (IEnumerator<Custom<CV>>)o.GetEnumerator();
            IEnumerator<Custom<CV>> er = (IEnumerator<Custom<CV>>)r.GetEnumerator();
            foreach(Custom<CV> s in i)
            {
                eo.MoveNext();
                er.MoveNext();
                IEnumerator<CV> io = (IEnumerator<CV>)eo.Current.GetEnumerator();
                IEnumerator<CV> ir = (IEnumerator<CV>)er.Current.GetEnumerator();
                foreach(CV obj in s)
                {
                    io.MoveNext();
                    ir.MoveNext();
                    if(obj == null)
                    {
                        test(io.Current == null);
                        test(ir.Current == null);
                    }
                    else
                    {
                        test(obj.i == io.Current.i);
                        test(obj.i == ir.Current.i);
                    }
                }
            }
        }

#if !COMPACT && !SILVERLIGHT
        {
            Serialize.Small i = null;
            Serialize.Small o;
            Serialize.Small r;

            r = p.opSerialSmallCSharp(i, out o);

            test(o == null);
            test(r == null);
        }

        {
            Serialize.Small i = new Serialize.Small();
            i.i = 99;
            Serialize.Small o;
            Serialize.Small r;

            try
            {
                r = p.opSerialSmallCSharp(i, out o);

                test(o.i == 99);
                test(r.i == 99);
            }
            catch(Ice.OperationNotExistException)
            {
                // OK, talking to non-C# server.
            }
        }

        {
            Serialize.Large i = new Serialize.Large();
            i.d1 = 1.0;
            i.d2 = 2.0;
            i.d3 = 3.0;
            i.d4 = 4.0;
            i.d5 = 5.0;
            i.d6 = 6.0;
            i.d7 = 7.0;
            i.d8 = 8.0;
            i.d9 = 9.0;
            i.d10 = 10.0;
            Serialize.Large o;
            Serialize.Large r;

            try
            {
                r = p.opSerialLargeCSharp(i, out o);

                test(o.d1 == 1.0);
                test(o.d2 == 2.0);
                test(o.d3 == 3.0);
                test(o.d4 == 4.0);
                test(o.d5 == 5.0);
                test(o.d6 == 6.0);
                test(o.d7 == 7.0);
                test(o.d8 == 8.0);
                test(o.d9 == 9.0);
                test(o.d10 == 10.0);
                test(r.d1 == 1.0);
                test(r.d2 == 2.0);
                test(r.d3 == 3.0);
                test(r.d4 == 4.0);
                test(r.d5 == 5.0);
                test(r.d6 == 6.0);
                test(r.d7 == 7.0);
                test(r.d8 == 8.0);
                test(r.d9 == 9.0);
                test(r.d10 == 10.0);
            }
            catch(Ice.OperationNotExistException)
            {
                // OK, talking to non-C# server.
            }
        }

        {
            Serialize.Struct i = new Serialize.Struct();
            i.o = null;
            i.o2 = i;
            i.s = null;
            i.s2 = "Hello";
            Serialize.Struct o;
            Serialize.Struct r;

            try
            {
                r = p.opSerialStructCSharp(i, out o);

                test(o.o == null);
                test(o.o2 != null);
                test(((Serialize.Struct)(o.o2)).o == null);
                test(((Serialize.Struct)(o.o2)).o2 == o.o2);
                test(o.s == null);
                test(o.s2.Equals("Hello"));
                test(r.o == null);
                test(r.o2 != null);
                test(((Serialize.Struct)(r.o2)).o == null);
                test(((Serialize.Struct)(r.o2)).o2 == r.o2);
                test(r.s == null);
                test(r.s2.Equals("Hello"));
            }
            catch(Ice.OperationNotExistException)
            {
                // OK, talking to non-C# server.
            }
        }
#endif
    }
Пример #28
0
 public HasCharacteristic()
 {
     this.drugCharacteristicValue     = new STImpl();
     this.drugCharacteristicTypeValue = new CVImpl();
 }
Пример #29
0
 public void CVExample10Test01()
 {
     CV<NullFlavor> nullflavor = new CV<NullFlavor>();
     nullflavor.Code = NullFlavor.NoInformation;
     Console.WriteLine(nullflavor.CodeSystem);
     //output
     Assert.AreEqual(nullflavor.CodeSystem, "2.16.840.1.113883.5.1008");
     Assert.IsTrue(nullflavor.Validate());
 }
Пример #30
0
 public PrescriptionPatientMeasurements()
 {
     this.code          = new CVImpl();
     this.effectiveTime = new TSImpl();
     this.value         = new PQImpl();
 }
Пример #31
0
 public Protocols()
 {
     this.id   = new IIImpl();
     this.code = new CVImpl();
 }
Пример #32
0
 public Exposures()
 {
     this.id        = new IIImpl();
     this.routeCode = new CVImpl();
 }
Пример #33
0
 public AllowedSubstitution()
 {
     this.code        = new CVImpl();
     this.negationInd = new BLImpl();
     this.reasonCode  = new CVImpl();
 }
Пример #34
0
 public PrescriptionDispense()
 {
     this.id = new IIImpl();
     this.confidentialityCode = new CVImpl();
 }
Пример #35
0
 public GenericQueryParameters()
 {
     this.patientNoteCategoryCodeValue = new CVImpl();
 }
Пример #36
0
 public GroupedWithin()
 {
     this.code = new CVImpl();
     this.generalizedMedicineClassCode = new CVImpl();
     this.generalizedMedicineClassName = new STImpl();
 }
Пример #37
0
 public RefusedBy()
 {
     this.time          = new TSImpl();
     this.modeCode      = new CVImpl();
     this.signatureText = new EDImpl <String>();
 }
Пример #38
0
        private phosphoRS.PTMResultClass RunOnSource(string sourceFilepath, int currentSource, int totalSources, PhosphoRSConfig config, IDictionary <long, PhosphoPeptideAttestationRow> phosphoRows)
        {
            var msd          = new pwiz.CLI.msdata.MSDataFile(sourceFilepath);
            var spectrumList = msd.run.spectrumList;

            int rowNumber = 0;
            int totalRows = phosphoRows.Count();

            items.Clear();

            var spectrumTypes = new Set <CVID>();

            foreach (var row in phosphoRows)
            {
                if (rowNumber == 0 || (rowNumber % 100) == 0)
                {
                    if (cancelAttestation.IsCancellationRequested)
                    {
                        this.progressBar.ProgressBar.Visible = false;
                        _bgWorkerCancelled = true;
                        setProgress(-1, "Cancelled.");
                        return(null);
                    }
                    else
                    {
                        if (rowNumber == 0)
                        {
                            setStatus(String.Format("Reading peaks and creating PhosphoRS objects for source {0} of {1} ({2}): {3} spectra\r\n", currentSource, totalSources, Path.GetFileName(sourceFilepath), totalRows));
                        }
                        setProgress((rowNumber + 1) / totalRows * 100, String.Format("Reading peaks and creating PhosphoRS objects for source {0} of {1} ({2}): {3}/{4} spectra", currentSource, totalSources, Path.GetFileName(sourceFilepath), rowNumber + 1, totalRows));
                    }
                }

                var pwizSpectrum = spectrumList.spectrum(spectrumList.find(row.Value.SpectrumNativeID), true); //may create indexoutofrange error if no spectrum nativeID

                var OriginalMZs         = pwizSpectrum.getMZArray().data;                                      //getMZArray().data returns IList<double>
                var OriginalIntensities = pwizSpectrum.getIntensityArray().data;
                row.Value.Peaks = new phosphoRS.Peak[OriginalMZs.Count];
                for (int i = 0; i < OriginalMZs.Count; ++i)
                {
                    row.Value.Peaks[i] = new phosphoRS.Peak(OriginalMZs[i], OriginalIntensities[i]);
                }

                if (config.spectrumType == phosphoRS.SpectrumType.None)
                {
                    row.Value.SpectrumType = phosphoRS.SpectrumType.None;
                    foreach (var precursor in pwizSpectrum.precursors)
                    {
                        foreach (var method in precursor.activation.cvParamChildren(CVID.MS_dissociation_method))
                        {
                            // if dissociation method is set to "Auto" but could not be determined from the file, alert the user
                            if (!spectrumTypeByDissociationMethod.Contains(method.cvid))
                            {
                                throw new InvalidDataException("cannot handle unmapped dissociation method \"" + CV.cvTermInfo(method.cvid).shortName() + "\" for spectrum \"" + row.Value.SourceName + "/" + row.Value.SpectrumNativeID + "\"; please override the method manually");
                            }
                            else if (row.Value.SpectrumType != phosphoRS.SpectrumType.ECD_ETD) // don't override ETD (e.g. if there is also supplemental CID)
                            {
                                row.Value.SpectrumType = spectrumTypeByDissociationMethod[method.cvid];
                                spectrumTypes.Add(method.cvid);
                            }
                        }
                    }

                    if (row.Value.SpectrumType == phosphoRS.SpectrumType.None)
                    {
                        throw new InvalidDataException("cannot find a dissociation method for spectrum \"" + row.Value.SourceName + "/" + row.Value.SpectrumNativeID + "\"; please set the method manually");
                    }
                }
                else
                {
                    row.Value.SpectrumType = config.spectrumType;
                }

                var psm = getPhosphoRS_PSM(config, row.Value);

                // DEBUG
                //tbStatus.AppendText(PeptideToString(phosphoPeptide) + "," + AAS.ToOneLetterCodeString() + "," + ptmRepresentation.ToString() + "\n");
                // Init the mod map of original variant for this PSM.
                var id2ModMap = new List <System.Tuple <int, List <int> > > {
                    new System.Tuple <int, List <int> >((int)row.Value.PSMId, row.Value.OriginalPhosphoSites.Keys.ToList <int>())
                };

                items.Add(new System.Tuple <phosphoRS.PeptideSpectrumMatch, List <System.Tuple <int, List <int> > > >(psm, id2ModMap));

                ++rowNumber;
            }

            // report automatically found fragmentation method
            if (config.spectrumType == phosphoRS.SpectrumType.None)
            {
                setStatus(String.Format("Found {0} fragmentation types: {1}\r\n", spectrumTypes.Count, String.Join(", ", spectrumTypes.Keys.Select(o => CV.cvTermInfo(o).shortName()))));
            }

            setProgress(currentSource / totalSources * 100, String.Format("Running PhosphoRS on source {0} of {1} ({2})...", currentSource, totalSources, Path.GetFileName(sourceFilepath)));

            // Initialize the localization.
            currentNr = 0;
            var phosphoRS_Context = new phosphoRS.ThreadManagement(this, cancelAttestation, config.maxIsoformCount, config.maxPTMCount, config.scoreNLToo, config.fragmentMassTolerance, config.scoredAA, items.Count);

            // Start the site localization (takes advantage of multi-threading)
            try
            {
                phosphoRS_Context.StartPTMLocalisation();

                // Safety if the attestation module doesn't throw the exception.
                if (cancelAttestation.IsCancellationRequested)
                {
                    this.progressBar.ProgressBar.Visible = false;
                    _bgWorkerCancelled = true;
                    setProgress(-1, "Cancelled.");
                    return(null);
                }

                return(phosphoRS_Context.PTMResult);
            }
            catch (OperationCanceledException)
            {
                this.progressBar.ProgressBar.Visible = false;
                _bgWorkerCancelled = true;
                setProgress(-1, "Cancelled.");
                return(null);
            }
            finally
            {
                msd.Dispose();
            }
        }
Пример #39
0
        public void SetDocumentCodeSnomedCTComposition(string codeDocumentType, string codeCareSetting, string displayName)
        {
            string composition =
                string.Format(
                "810301000000103:810311000000101={0},810321000000107={1}",
                codeDocumentType,
                codeCareSetting
                );

            code = new CV<string>(composition, OIDStore.OIDCodeSystemSnomedCTCompositionalGrammar, null, null);
            code.DisplayName = displayName;
        }
Пример #40
0
 public Patient()
 {
     this.patientLivingSubjectKindAdministrativeGenderCode = new CVImpl();
 }
Пример #41
0
 internal void SetCode(string codeSystemValue, string codeValue, string displayNameValue)
 {
     code = new CV<string>(codeValue, codeSystemValue, null, null, displayNameValue, null);
     code.OriginalText = null;
 }
Пример #42
0
 public PrescriptionDispense()
 {
     this.id = new IIImpl();
     this.confidentialityCode         = new CVImpl();
     this.component2DosageInstruction = new List <Ca.Infoway.Messagebuilder.Model.Pcs_cerx_v01_r04_4.Pharmacy.Porx_mt980040ca.AdministrationInstructions>();
 }
Пример #43
0
 internal void SetRecipientRoleCode(string codeSystemValue, string codeValue, string displayNameValue)
 {
     recipientRoleCode = new CV<string>(codeValue, codeSystemValue, null, null, displayNameValue, null);
     recipientRoleCode.OriginalText = null;
 }
Пример #44
0
 public RelatedPerson()
 {
     this.id   = new IIImpl();
     this.code = new CVImpl();
     this.relationshipHolderName = new PNImpl();
 }
Пример #45
0
        static void Main(string[] args)
        {

            // This layer of the Everest Framework maps 1:1 with the underlying HL7v3 structures, so it requires a detailed understanding of HL7v3
            // This example shows some of the Mohawk Everest Framework features, such as:
            //
            //     - overloaded constructors
            //     - structural validation
            //     - vocabulary support with enumerations
            //     - smart datatype support with helper methods
            //     - intellisense support including MIF documentation pass-thru
            //     - built-in XML ITS formatting 
            //     - and other features (see API documentation)
            //
            // Higher levels of an API Framework would provide abstraction from these message details 
            // 


            // Create a client registry "find candidates query" message structure using the required parameters constructor
            // This constructor looks complicated at first, but it ensures that all required elements are present in the message structure

            PRPA_IN101103CA FindCandidatesStructure = new PRPA_IN101103CA( // use the required elements version of the constructor
                           new MARC.Everest.DataTypes.II(new Guid("6AE2BD87-332A-3B99-4EAD-FAF9CE012843")), // message id
                           new DateTime(2009, 03, 14, 19, 58, 55, 218), 
                           ResponseMode.Immediate, // response mode selected from enumeration
                           new MARC.Everest.DataTypes.II("2.16.840.1.113883.1.18", "PRPA_IN101103CA"), // interaction id
                           new MARC.Everest.DataTypes.LIST<II>() { new MARC.Everest.DataTypes.II("2.16.840.1.113883.2.20.2", "R02.04.00") }, // profileID
                           new CS<ProcessingID>(ProcessingID.Debugging), // processing ID code
                           new CS<AcknowledgementCondition>(AcknowledgementCondition.Never), // ack type
                           new MARC.Everest.RMIM.CA.R020401.MCCI_MT002300CA.Receiver(
                               new MARC.Everest.RMIM.CA.R020401.MCCI_MT002300CA.Device2(new II("2.16.840.1.113883.19.3.297.15.37.0.47", "DIS01"))),
                           new MARC.Everest.RMIM.CA.R020401.MCCI_MT002300CA.Sender(
                               new MARC.Everest.RMIM.CA.R020401.MCCI_MT002300CA.Device1(new II("2.16.840.1.113883.19.3.207.15.1.0.3", "DIS01"))));


            // prepare a coded value representing the trigger event - this will be attached to the control act event
            CV<String> triggerevent = new CV<String>() { Code = "PRPA_TE101103CA", CodeSystem = "2.16.840.1.113883.1.18" };

            // Create the control act event required for this message and attach it to the structure
            // Since this is a "Query" interaction type, we create a QueryByParameter structure and attach it to the control act
            // We will later fill in this query block with our specific parameters
            FindCandidatesStructure.controlActEvent = PRPA_IN101103CA.CreateControlActEvent(
                new II("2.16.840.1.113883.19.3.207.15.1.1", "0245285594892"),
                triggerevent,
                new MARC.Everest.RMIM.CA.R020401.MFMI_MT700751CA.Author(new TS(DateTime.Parse("2009-03-14 19:58:55.218"))),
                new MARC.Everest.RMIM.CA.R020401.MFMI_MT700746CA.QueryByParameter<MARC.Everest.RMIM.CA.R020401.PRPA_MT101103CA.ParameterList>(
                    II.CreateToken(Guid.NewGuid()),
                    new MARC.Everest.RMIM.CA.R020401.PRPA_MT101103CA.ParameterList()
                ));
                

            // add the name to search for and attach it to the parameter list
            List<ENXP> namelist = new List<ENXP>();  
            
            namelist.Add(new ENXP("Nuclear", EntityNamePartType.Family));
            namelist.Add(new ENXP("Nancy", EntityNamePartType.Given));

            PN pn1 = new PN(namelist);
            MARC.Everest.RMIM.CA.R020401.PRPA_MT101103CA.PersonName persname = new MARC.Everest.RMIM.CA.R020401.PRPA_MT101103CA.PersonName(pn1);
            // notice we use .Add() to attach a name to the parameter list - this is due to the fact that a person name is actually a list of names
            FindCandidatesStructure.controlActEvent.QueryByParameter.parameterList.PersonName.Add(persname);


            // add the birthday to search for and add it to the parameter list
            TS birthdate = new TS(new DateTime(1990, 1, 1));
            MARC.Everest.RMIM.CA.R020401.PRPA_MT101103CA.PersonBirthtime pbt = new MARC.Everest.RMIM.CA.R020401.PRPA_MT101103CA.PersonBirthtime(birthdate);
            // notice we use assignment to attach the populated object pdt (no .Add() method as above since it is a simple object -- see PersonName.Add() for contrasting example)
            FindCandidatesStructure.controlActEvent.QueryByParameter.parameterList.PersonBirthtime = pbt;

            FindCandidatesStructure.controlActEvent.LanguageCode = new CE<string>() { NullFlavor = MARC.Everest.DataTypes.NullFlavor.AskedUnknown };

            // Create an XML formatter
            XmlIts1Formatter its1Formatter = new XmlIts1Formatter();
            // Add the datatypes R1 graph aide
            its1Formatter.GraphAides.Add(new DatatypeFormatter());

            // Check the structure for conformance by forcing the formatter to render to a memory stream
            // Result.Code will then indicate if the message is conformant
            var Result = its1Formatter.Graph(new MemoryStream(), FindCandidatesStructure);

            if (Result.Code == MARC.Everest.Connectors.ResultCode.AcceptedNonConformant)
            {
                // we have a conformant message, so let's save it

                // print the XML to STDOUT
                its1Formatter.Graph(Console.OpenStandardOutput(), FindCandidatesStructure);

                // if we stream it through an XML writer and set the indent property the output will contain line breaks and indentation which makes it much easier to read (not necessaily required for machine-machine transmission)
                System.Xml.XmlWriterSettings settings = new XmlWriterSettings();
                settings.Indent = true;
                XmlWriter x = XmlWriter.Create(@"PRPA_IN101103CA_Everest.xml", settings);
                // XmlStateWriter is required here to get around some complicated formatting issues
                MARC.Everest.Xml.XmlStateWriter sw = new MARC.Everest.Xml.XmlStateWriter(x);
                its1Formatter.Graph(sw, FindCandidatesStructure);
                sw.Flush();
            }
            else
            {
                Console.WriteLine("Error trying to save structure PRPA_IN101103CA. Formatter response: {0}", Result.Code.ToString());
            }

            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();


            
        }
 public void DeleteCV(CV cv)
 {
     db.CVs.Remove(cv);
     db.SaveChanges();
 }
Пример #47
0
 public static extern IntPtr cvCreateSparseMat(
    int dims,
    IntPtr sizes,
    CV.CvEnum.DepthType type);
 public void SaveDocument(string id, CV cv)
 {
     db.Users.Single(i => i.Id == id).CV = cv;
     db.SaveChanges();
 }
Пример #49
0
 public override void opACVS_async(AMD_MyClass_opACVS cb, CV[] i, Ice.Current current)
 {
     cb.ice_response(i, i);
 }
Пример #50
0
 public override void ice_response(CV[] r, CV[] o)
 {
     System.Collections.IEnumerator eo = o.GetEnumerator();
     System.Collections.IEnumerator er = r.GetEnumerator();
     foreach(CV obj in _i)
     {
         eo.MoveNext();
         er.MoveNext();
         test(obj.i == ((CV)eo.Current).i);
         test(obj.i == ((CV)er.Current).i);
     }
     callback.called();
 }
Пример #51
0
 public void CVExample12Test02()
 {
     CV<String> member = new CV<String>()
     {
         NullFlavor = null
     };
     member.OriginalText = "Step-Brother In Law";
     member.CodeSystem = "2.16.840.1.113883.5.111";
     Assert.IsFalse(member.Validate());
 }
Пример #52
0
 public DischargeDiagnoses()
 {
     this.code  = new CDImpl();
     this.value = new CVImpl();
 }
Пример #53
0
 public ClinicalDevice()
 {
     this.code = new CVImpl();
     this.name = new STImpl();
     this.desc = new STImpl();
 }
Пример #54
0
 public IssueManagements()
 {
     this.code       = new CVImpl();
     this.text       = new STImpl();
     this.authorTime = new TSImpl();
 }
 public void DeleteDocument(CV cv)
 {
     db.CVs.Remove(cv);
     db.SaveChanges();
 }
Пример #56
0
 public DrugDispensedIn()
 {
     this.quantity = new PQImpl();
     this.containerPackagedMedicineFormCode = new CVImpl();
 }
Пример #57
0
 public AMI_MyClass_opACVSI(CV[] i)
 {
     _i = i;
 }
Пример #58
0
        /// <summary>
        /// Parse IHTSDO Expression CR List
        /// </summary>
        private LIST <CR <String> > ParseCodeExpressionQualifier(string expression, ICodedValue context)
        {
            if (expression.StartsWith("{") && expression.EndsWith("}"))
            {
                expression = expression.Substring(1, expression.Length - 2);
            }
            else if (expression.StartsWith("{"))
            {
                throw new InvalidOperationException();
            }

            List <String> crExpressions = new List <string>(10);
            Regex         splitReg      = new Regex("^([0-9]*.*?)([=,{}():])(.*?)$", RegexOptions.Multiline);

            int    bDepth = 0;
            string cExpr  = String.Empty;

            while (expression.Length > 0)
            {
                var splitMatch = splitReg.Match(expression);

                // Successful match?
                if (!splitMatch.Success)
                {
                    break;
                }

                // Determine the delimiter
                switch (splitMatch.Groups[2].Value)
                {
                case "{":     // Increases scope
                case "(":
                    bDepth++;
                    cExpr += splitMatch.Groups[1].Value + splitMatch.Groups[2].Value;
                    break;

                case "}":     // Decreases scope
                case ")":
                    bDepth--;
                    cExpr += splitMatch.Groups[1].Value + splitMatch.Groups[2].Value;
                    break;

                case ",":     // Seperator
                    if (bDepth == 0)
                    {
                        cExpr += splitMatch.Groups[1].Value;
                        crExpressions.Add(cExpr);
                        cExpr = String.Empty;
                    }
                    else
                    {
                        cExpr += splitMatch.Groups[1].Value + splitMatch.Groups[2].Value;
                    }
                    break;

                default:
                    cExpr += splitMatch.Groups[1].Value + splitMatch.Groups[2].Value;
                    break;
                }
                expression = splitMatch.Groups[3].Value;
            }

            // Last match?
            splitReg = new Regex("([0-9]+.*)");
            var lastMatch = splitReg.Match(expression);

            // Successful match?
            if (lastMatch.Success)
            {
                cExpr += lastMatch.Groups[1].Value;
            }

            // Depth
            if (bDepth > 1)
            {
                throw new InvalidOperationException("Missing closing bracket in expression");
            }

            crExpressions.Add(cExpr);

            // Prepare return value
            LIST <CR <String> > retVal = new LIST <CR <string> >(crExpressions.Count);

            // Now Process each expression
            splitReg = new Regex("^([0-9]+)[|]?(.*?)[|]?=([(]?.*)$", RegexOptions.Multiline);
            Regex codeMnemReg = new Regex("^([0-9]+)[|](.*?)[|]$", RegexOptions.Multiline);

            foreach (var expr in crExpressions)
            {
                // Each expression must match
                var exprMatch = splitReg.Match(expr);
                if (!exprMatch.Success)
                {
                    throw new InvalidOperationException("Qualifier expression does not follow format of name=value");
                }

                // Process the name
                CV <String> name = new CV <string>(exprMatch.Groups[1].Value, context.CodeSystem, context.CodeSystemName, context.CodeSystemVersion)
                {
                    DisplayName     = String.IsNullOrEmpty(exprMatch.Groups[2].Value) ? null : exprMatch.Groups[2].Value,
                    ValueSet        = context.ValueSet,
                    ValueSetVersion = context.ValueSetVersion
                };


                // Process value
                CD <String> value = null;
                decimal     id;

                // Try to match the exact pattern of a code with description
                var codeMnemMatch = codeMnemReg.Match(exprMatch.Groups[3].Value);
                if (codeMnemMatch.Success)
                {
                    value = new CD <string>(codeMnemMatch.Groups[1].Value, context.CodeSystem, context.CodeSystemName, context.CodeSystemVersion)
                    {
                        DisplayName     = String.IsNullOrEmpty(codeMnemMatch.Groups[2].Value) ? null : codeMnemMatch.Groups[2].Value,
                        ValueSet        = context.ValueSet,
                        ValueSetVersion = context.ValueSetVersion
                    }
                }
                ;
                else if (decimal.TryParse(exprMatch.Groups[3].Value, out id)) // Simple code
                {
                    value = new CD <string>(exprMatch.Groups[3].Value, context.CodeSystem, context.CodeSystemName, context.CodeSystemVersion)
                    {
                        ValueSet        = context.ValueSet,
                        ValueSetVersion = context.ValueSetVersion
                    }
                }
                ;
                else // IHTSDO expression tree
                {
                    string valueExpression = exprMatch.Groups[3].Value;
                    value = ParseCodeExpression(valueExpression, context);
                }

                retVal.Add(new CR <string>(name, value));
            }

            return(retVal);
        }
Пример #59
0
    internal static void twowaysAMI(Ice.Communicator communicator, Test.MyClassPrx p)
    {
        {
            byte[] i = new byte[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = (byte)c;
            }

            AMI_MyClass_opAByteSI cb = new AMI_MyClass_opAByteSI(i);
            p.opAByteS_async(cb, i);
            cb.check();
        }

        {
            List<byte> i = new List<byte>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add((byte)c);
            }

            AMI_MyClass_opLByteSI cb = new AMI_MyClass_opLByteSI(i);
            p.opLByteS_async(cb, i);
            cb.check();
        }

        {
            LinkedList<byte> i = new LinkedList<byte>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast((byte)c);
            }

            AMI_MyClass_opKByteSI cb = new AMI_MyClass_opKByteSI(i);
            p.opKByteS_async(cb, i);
            cb.check();
        }

        {
            Queue<byte> i = new Queue<byte>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue((byte)c);
            }

            AMI_MyClass_opQByteSI cb = new AMI_MyClass_opQByteSI(i);
            p.opQByteS_async(cb, i);
            cb.check();
        }

        {
            Stack<byte> i = new Stack<byte>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push((byte)c);
            }

            AMI_MyClass_opSByteSI cb = new AMI_MyClass_opSByteSI(i);
            p.opSByteS_async(cb, i);
            cb.check();
        }

        {
            CByteS i = new CByteS();
            for(int c = 0; c < _length; ++c)
            {
                i.Add((byte)c);
            }

            AMI_MyClass_opCByteSI cb = new AMI_MyClass_opCByteSI(i);
            p.opCByteS_async(cb, i);
            cb.check();
        }

        {
            bool[] i = new bool[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = c % 1 == 1;
            }

            AMI_MyClass_opABoolSI cb = new AMI_MyClass_opABoolSI(i);
            p.opABoolS_async(cb, i);
            cb.check();
        }

        {
            List<bool> i = new List<bool>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(c % 1 == 1);
            }

            AMI_MyClass_opLBoolSI cb = new AMI_MyClass_opLBoolSI(i);
            p.opLBoolS_async(cb, i);
            cb.check();
        }

        {
            LinkedList<bool> i = new LinkedList<bool>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast(c % 1 == 1);
            }

            AMI_MyClass_opKBoolSI cb = new AMI_MyClass_opKBoolSI(i);
            p.opKBoolS_async(cb, i);
            cb.check();
        }

        {
            Queue<bool> i = new Queue<bool>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue(c % 1 == 1);
            }

            AMI_MyClass_opQBoolSI cb = new AMI_MyClass_opQBoolSI(i);
            p.opQBoolS_async(cb, i);
            cb.check();
        }

        {
            Stack<bool> i = new Stack<bool>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push(c % 1 == 1);
            }

            AMI_MyClass_opSBoolSI cb = new AMI_MyClass_opSBoolSI(i);
            p.opSBoolS_async(cb, i);
            cb.check();
        }

        {
            CBoolS i = new CBoolS();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(c % 1 == 1);
            }

            AMI_MyClass_opCBoolSI cb = new AMI_MyClass_opCBoolSI(i);
            p.opCBoolS_async(cb, i);
            cb.check();
        }

        {
            short[] i = new short[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = (short)c;
            }

            AMI_MyClass_opAShortSI cb = new AMI_MyClass_opAShortSI(i);
            p.opAShortS_async(cb, i);
            cb.check();
        }

        {
            List<short> i = new List<short>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add((short)c);
            }

            AMI_MyClass_opLShortSI cb = new AMI_MyClass_opLShortSI(i);
            p.opLShortS_async(cb, i);
            cb.check();
        }

        {
            LinkedList<short> i = new LinkedList<short>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast((short)c);
            }

            AMI_MyClass_opKShortSI cb = new AMI_MyClass_opKShortSI(i);
            p.opKShortS_async(cb, i);
            cb.check();
        }

        {
            Queue<short> i = new Queue<short>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue((short)c);
            }

            AMI_MyClass_opQShortSI cb = new AMI_MyClass_opQShortSI(i);
            p.opQShortS_async(cb, i);
            cb.check();
        }

        {
            Stack<short> i = new Stack<short>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push((short)c);
            }

            AMI_MyClass_opSShortSI cb = new AMI_MyClass_opSShortSI(i);
            p.opSShortS_async(cb, i);
            cb.check();
        }

        {
            CShortS i = new CShortS();
            for(int c = 0; c < _length; ++c)
            {
                i.Add((short)c);
            }

            AMI_MyClass_opCShortSI cb = new AMI_MyClass_opCShortSI(i);
            p.opCShortS_async(cb, i);
            cb.check();
        }

        {
            int[] i = new int[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = (int)c;
            }

            AMI_MyClass_opAIntSI cb = new AMI_MyClass_opAIntSI(i);
            p.opAIntS_async(cb, i);
            cb.check();
        }

        {
            List<int> i = new List<int>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add((int)c);
            }

            AMI_MyClass_opLIntSI cb = new AMI_MyClass_opLIntSI(i);
            p.opLIntS_async(cb, i);
            cb.check();
        }

        {
            LinkedList<int> i = new LinkedList<int>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast((int)c);
            }

            AMI_MyClass_opKIntSI cb = new AMI_MyClass_opKIntSI(i);
            p.opKIntS_async(cb, i);
            cb.check();
        }

        {
            Queue<int> i = new Queue<int>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue((int)c);
            }

            AMI_MyClass_opQIntSI cb = new AMI_MyClass_opQIntSI(i);
            p.opQIntS_async(cb, i);
            cb.check();
        }

        {
            Stack<int> i = new Stack<int>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push((int)c);
            }

            AMI_MyClass_opSIntSI cb = new AMI_MyClass_opSIntSI(i);
            p.opSIntS_async(cb, i);
            cb.check();
        }

        {
            CIntS i = new CIntS();
            for(int c = 0; c < _length; ++c)
            {
                i.Add((int)c);
            }

            AMI_MyClass_opCIntSI cb = new AMI_MyClass_opCIntSI(i);
            p.opCIntS_async(cb, i);
            cb.check();
        }

        {
            long[] i = new long[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = (long)c;
            }

            AMI_MyClass_opALongSI cb = new AMI_MyClass_opALongSI(i);
            p.opALongS_async(cb, i);
            cb.check();
        }

        {
            List<long> i = new List<long>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add((long)c);
            }

            AMI_MyClass_opLLongSI cb = new AMI_MyClass_opLLongSI(i);
            p.opLLongS_async(cb, i);
            cb.check();
        }

        {
            LinkedList<long> i = new LinkedList<long>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast((long)c);
            }

            AMI_MyClass_opKLongSI cb = new AMI_MyClass_opKLongSI(i);
            p.opKLongS_async(cb, i);
            cb.check();
        }

        {
            Queue<long> i = new Queue<long>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue((long)c);
            }

            AMI_MyClass_opQLongSI cb = new AMI_MyClass_opQLongSI(i);
            p.opQLongS_async(cb, i);
            cb.check();
        }

        {
            Stack<long> i = new Stack<long>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push((long)c);
            }

            AMI_MyClass_opSLongSI cb = new AMI_MyClass_opSLongSI(i);
            p.opSLongS_async(cb, i);
            cb.check();
        }

        {
            CLongS i = new CLongS();
            for(int c = 0; c < _length; ++c)
            {
                i.Add((long)c);
            }

            AMI_MyClass_opCLongSI cb = new AMI_MyClass_opCLongSI(i);
            p.opCLongS_async(cb, i);
            cb.check();
        }

        {
            float[] i = new float[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = (float)c;
            }

            AMI_MyClass_opAFloatSI cb = new AMI_MyClass_opAFloatSI(i);
            p.opAFloatS_async(cb, i);
            cb.check();
        }

        {
            List<float> i = new List<float>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add((float)c);
            }

            AMI_MyClass_opLFloatSI cb = new AMI_MyClass_opLFloatSI(i);
            p.opLFloatS_async(cb, i);
            cb.check();
        }

        {
            LinkedList<float> i = new LinkedList<float>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast((float)c);
            }

            AMI_MyClass_opKFloatSI cb = new AMI_MyClass_opKFloatSI(i);
            p.opKFloatS_async(cb, i);
            cb.check();
        }

        {
            Queue<float> i = new Queue<float>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue((float)c);
            }

            AMI_MyClass_opQFloatSI cb = new AMI_MyClass_opQFloatSI(i);
            p.opQFloatS_async(cb, i);
            cb.check();
        }

        {
            Stack<float> i = new Stack<float>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push((float)c);
            }

            AMI_MyClass_opSFloatSI cb = new AMI_MyClass_opSFloatSI(i);
            p.opSFloatS_async(cb, i);
            cb.check();
        }

        {
            CFloatS i = new CFloatS();
            for(int c = 0; c < _length; ++c)
            {
                i.Add((float)c);
            }

            AMI_MyClass_opCFloatSI cb = new AMI_MyClass_opCFloatSI(i);
            p.opCFloatS_async(cb, i);
            cb.check();
        }

        {
            double[] i = new double[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = (double)c;
            }

            AMI_MyClass_opADoubleSI cb = new AMI_MyClass_opADoubleSI(i);
            p.opADoubleS_async(cb, i);
            cb.check();
        }

        {
            List<double> i = new List<double>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add((double)c);
            }

            AMI_MyClass_opLDoubleSI cb = new AMI_MyClass_opLDoubleSI(i);
            p.opLDoubleS_async(cb, i);
            cb.check();
        }

        {
            LinkedList<double> i = new LinkedList<double>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast((double)c);
            }

            AMI_MyClass_opKDoubleSI cb = new AMI_MyClass_opKDoubleSI(i);
            p.opKDoubleS_async(cb, i);
            cb.check();
        }

        {
            Queue<double> i = new Queue<double>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue((double)c);
            }

            AMI_MyClass_opQDoubleSI cb = new AMI_MyClass_opQDoubleSI(i);
            p.opQDoubleS_async(cb, i);
            cb.check();
        }

        {
            Stack<double> i = new Stack<double>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push((double)c);
            }

            AMI_MyClass_opSDoubleSI cb = new AMI_MyClass_opSDoubleSI(i);
            p.opSDoubleS_async(cb, i);
            cb.check();
        }

        {
            CDoubleS i = new CDoubleS();
            for(int c = 0; c < _length; ++c)
            {
                i.Add((double)c);
            }

            AMI_MyClass_opCDoubleSI cb = new AMI_MyClass_opCDoubleSI(i);
            p.opCDoubleS_async(cb, i);
            cb.check();
        }

        {
            string[] i = new string[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = c.ToString();
            }

            AMI_MyClass_opAStringSI cb = new AMI_MyClass_opAStringSI(i);
            p.opAStringS_async(cb, i);
            cb.check();
        }

        {
            List<string> i = new List<string>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(c.ToString());
            }

            AMI_MyClass_opLStringSI cb = new AMI_MyClass_opLStringSI(i);
            p.opLStringS_async(cb, i);
            cb.check();
        }

        {
            LinkedList<string> i = new LinkedList<string>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast(c.ToString());
            }

            AMI_MyClass_opKStringSI cb = new AMI_MyClass_opKStringSI(i);
            p.opKStringS_async(cb, i);
            cb.check();
        }

        {
            Queue<string> i = new Queue<string>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue(c.ToString());
            }

            AMI_MyClass_opQStringSI cb = new AMI_MyClass_opQStringSI(i);
            p.opQStringS_async(cb, i);
            cb.check();
        }

        {
            Stack<string> i = new Stack<string>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push(c.ToString());
            }

            AMI_MyClass_opSStringSI cb = new AMI_MyClass_opSStringSI(i);
            p.opSStringS_async(cb, i);
            cb.check();
        }

        {
            CStringS i = new CStringS();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(c.ToString());
            }

            AMI_MyClass_opCStringSI cb = new AMI_MyClass_opCStringSI(i);
            p.opCStringS_async(cb, i);
            cb.check();
        }

        {
            Ice.Object[] i = new Ice.Object[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = new CV(c);
            }

            AMI_MyClass_opAObjectSI cb = new AMI_MyClass_opAObjectSI(i);
            p.opAObjectS_async(cb, i);
            cb.check();
        }

        {
            List<Ice.Object> i = new List<Ice.Object>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new CV(c));
            }

            AMI_MyClass_opLObjectSI cb = new AMI_MyClass_opLObjectSI(i);
            p.opLObjectS_async(cb, i);
            cb.check();
        }

        {
            CObjectS i = new CObjectS();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new CV(c));
            }

            AMI_MyClass_opCObjectSI cb = new AMI_MyClass_opCObjectSI(i);
            p.opCObjectS_async(cb, i);
            cb.check();
        }

        {
            Ice.ObjectPrx[] i = new Ice.ObjectPrx[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = communicator.stringToProxy(c.ToString());
            }

            AMI_MyClass_opAObjectPrxSI cb = new AMI_MyClass_opAObjectPrxSI(i);
            p.opAObjectPrxS_async(cb, i);
            cb.check();
        }

        {
            List<Ice.ObjectPrx> i = new List<Ice.ObjectPrx>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(communicator.stringToProxy(c.ToString()));
            }

            AMI_MyClass_opLObjectPrxSI cb = new AMI_MyClass_opLObjectPrxSI(i);
            p.opLObjectPrxS_async(cb, i);
            cb.check();
        }

        {
            LinkedList<Ice.ObjectPrx> i = new LinkedList<Ice.ObjectPrx>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast(communicator.stringToProxy(c.ToString()));
            }

            AMI_MyClass_opKObjectPrxSI cb = new AMI_MyClass_opKObjectPrxSI(i);
            p.opKObjectPrxS_async(cb, i);
            cb.check();
        }

        {
            Queue<Ice.ObjectPrx> i = new Queue<Ice.ObjectPrx>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue(communicator.stringToProxy(c.ToString()));
            }

            AMI_MyClass_opQObjectPrxSI cb = new AMI_MyClass_opQObjectPrxSI(i);
            p.opQObjectPrxS_async(cb, i);
            cb.check();
        }

        {
            Stack<Ice.ObjectPrx> i = new Stack<Ice.ObjectPrx>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push(communicator.stringToProxy(c.ToString()));
            }

            AMI_MyClass_opSObjectPrxSI cb = new AMI_MyClass_opSObjectPrxSI(i);
            p.opSObjectPrxS_async(cb, i);
            cb.check();
        }

        {
            CObjectPrxS i = new CObjectPrxS();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(communicator.stringToProxy(c.ToString()));
            }

            AMI_MyClass_opCObjectPrxSI cb = new AMI_MyClass_opCObjectPrxSI(i);
            p.opCObjectPrxS_async(cb, i);
            cb.check();
        }

        {
            S[] i = new S[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c].i = c;
            }

            AMI_MyClass_opAStructSI cb = new AMI_MyClass_opAStructSI(i);
            p.opAStructS_async(cb, i);
            cb.check();
        }

        {
            List<S> i = new List<S>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new S(c));
            }

            AMI_MyClass_opLStructSI cb = new AMI_MyClass_opLStructSI(i);
            p.opLStructS_async(cb, i);
            cb.check();
        }

        {
            LinkedList<S> i = new LinkedList<S>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast(new S(c));
            }

            AMI_MyClass_opKStructSI cb = new AMI_MyClass_opKStructSI(i);
            p.opKStructS_async(cb, i);
            cb.check();
        }

        {
            Queue<S> i = new Queue<S>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue(new S(c));
            }

            AMI_MyClass_opQStructSI cb = new AMI_MyClass_opQStructSI(i);
            p.opQStructS_async(cb, i);
            cb.check();
        }

        {
            Stack<S> i = new Stack<S>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push(new S(c));
            }

            AMI_MyClass_opSStructSI cb = new AMI_MyClass_opSStructSI(i);
            p.opSStructS_async(cb, i);
            cb.check();
        }

        {
            CStructS i = new CStructS();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new S(c));
            }

            AMI_MyClass_opCStructSI cb = new AMI_MyClass_opCStructSI(i);
            p.opCStructS_async(cb, i);
            cb.check();
        }

        {
            SD[] i = new SD[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = new SD(c);
            }

            AMI_MyClass_opAStructSDI cb = new AMI_MyClass_opAStructSDI(i);
            p.opAStructSD_async(cb, i);
            cb.check();
        }

        {
            List<SD> i = new List<SD>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new SD(c));
            }

            AMI_MyClass_opLStructSDI cb = new AMI_MyClass_opLStructSDI(i);
            p.opLStructSD_async(cb, i);
            cb.check();
        }

        {
            LinkedList<SD> i = new LinkedList<SD>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast(new SD(c));
            }

            AMI_MyClass_opKStructSDI cb = new AMI_MyClass_opKStructSDI(i);
            p.opKStructSD_async(cb, i);
            cb.check();
        }

        {
            Queue<SD> i = new Queue<SD>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue(new SD(c));
            }

            AMI_MyClass_opQStructSDI cb = new AMI_MyClass_opQStructSDI(i);
            p.opQStructSD_async(cb, i);
            cb.check();
        }

        {
            Stack<SD> i = new Stack<SD>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push(new SD(c));
            }

            AMI_MyClass_opSStructSDI cb = new AMI_MyClass_opSStructSDI(i);
            p.opSStructSD_async(cb, i);
            cb.check();
        }

        {
            CStructSD i = new CStructSD();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new SD(c));
            }

            AMI_MyClass_opCStructSDI cb = new AMI_MyClass_opCStructSDI(i);
            p.opCStructSD_async(cb, i);
            cb.check();
        }

        {
            CV[] i = new CV[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = new CV(c);
            }

            AMI_MyClass_opACVSI cb = new AMI_MyClass_opACVSI(i);
            p.opACVS_async(cb, i);
            cb.check();
        }

        {
            List<CV> i = new List<CV>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new CV(c));
            }

            AMI_MyClass_opLCVSI cb = new AMI_MyClass_opLCVSI(i);
            p.opLCVS_async(cb, i);
            cb.check();
        }

        {
            CCVS i = new CCVS();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new CV(c));
            }

            AMI_MyClass_opCCVSI cb = new AMI_MyClass_opCCVSI(i);
            p.opCCVS_async(cb, i);
            cb.check();
        }

        {
            CVPrx[] i = new CVPrx[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString()));
            }

            AMI_MyClass_opACVPrxSI cb = new AMI_MyClass_opACVPrxSI(i);
            p.opACVPrxS_async(cb, i);
            cb.check();
        }

        {
            List<CVPrx> i = new List<CVPrx>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
            }

            AMI_MyClass_opLCVPrxSI cb = new AMI_MyClass_opLCVPrxSI(i);
            p.opLCVPrxS_async(cb, i);
            cb.check();
        }

        {
            LinkedList<CVPrx> i = new LinkedList<CVPrx>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
            }

            AMI_MyClass_opKCVPrxSI cb = new AMI_MyClass_opKCVPrxSI(i);
            p.opKCVPrxS_async(cb, i);
            cb.check();
        }

        {
            Queue<CVPrx> i = new Queue<CVPrx>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
            }

            AMI_MyClass_opQCVPrxSI cb = new AMI_MyClass_opQCVPrxSI(i);
            p.opQCVPrxS_async(cb, i);
            cb.check();
        }

        {
            Stack<CVPrx> i = new Stack<CVPrx>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
            }

            AMI_MyClass_opSCVPrxSI cb = new AMI_MyClass_opSCVPrxSI(i);
            p.opSCVPrxS_async(cb, i);
            cb.check();
        }

        {
            CCVPrxS i = new CCVPrxS();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
            }

            AMI_MyClass_opCCVPrxSI cb = new AMI_MyClass_opCCVPrxSI(i);
            p.opCCVPrxS_async(cb, i);
            cb.check();
        }

        {
            CR[] i = new CR[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = new CR(new CV(c));
            }

            AMI_MyClass_opACRSI cb = new AMI_MyClass_opACRSI(i);
            p.opACRS_async(cb, i);
            cb.check();
        }

        {
            List<CR> i = new List<CR>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new CR(new CV(c)));
            }

            AMI_MyClass_opLCRSI cb = new AMI_MyClass_opLCRSI(i);
            p.opLCRS_async(cb, i);
            cb.check();
        }

        {
            CCRS i = new CCRS();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new CR(new CV(c)));
            }

            AMI_MyClass_opCCRSI cb = new AMI_MyClass_opCCRSI(i);
            p.opCCRS_async(cb, i);
            cb.check();
        }

        {
            En[] i = new En[_length];
            for(int c = 0; c < _length; ++c)
            {
                i[c] = (En)(c % 3);
            }

            AMI_MyClass_opAEnSI cb = new AMI_MyClass_opAEnSI(i);
            p.opAEnS_async(cb, i);
            cb.check();
        }

        {
            List<En> i = new List<En>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add((En)(c % 3));
            }

            AMI_MyClass_opLEnSI cb = new AMI_MyClass_opLEnSI(i);
            p.opLEnS_async(cb, i);
            cb.check();
        }

        {
            LinkedList<En> i = new LinkedList<En>();
            for(int c = 0; c < _length; ++c)
            {
                i.AddLast((En)(c % 3));
            }

            AMI_MyClass_opKEnSI cb = new AMI_MyClass_opKEnSI(i);
            p.opKEnS_async(cb, i);
            cb.check();
        }

        {
            Queue<En> i = new Queue<En>();
            for(int c = 0; c < _length; ++c)
            {
                i.Enqueue((En)(c % 3));
            }

            AMI_MyClass_opQEnSI cb = new AMI_MyClass_opQEnSI(i);
            p.opQEnS_async(cb, i);
            cb.check();
        }

        {
            Stack<En> i = new Stack<En>();
            for(int c = 0; c < _length; ++c)
            {
                i.Push((En)(c % 3));
            }

            AMI_MyClass_opSEnSI cb = new AMI_MyClass_opSEnSI(i);
            p.opSEnS_async(cb, i);
            cb.check();
        }

        {
            CEnS i = new CEnS();
            for(int c = 0; c < _length; ++c)
            {
                i.Add((En)(c % 3));
            }

            AMI_MyClass_opCEnSI cb = new AMI_MyClass_opCEnSI(i);
            p.opCEnS_async(cb, i);
            cb.check();
        }

        {
            Custom<int> i = new Custom<int>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(c);
            }

            AMI_MyClass_opCustomIntSI cb = new AMI_MyClass_opCustomIntSI(i);
            p.opCustomIntS_async(cb, i);
            cb.check();
        }

        {
            Custom<CV> i = new Custom<CV>();
            for(int c = 0; c < _length; ++c)
            {
                i.Add(new CV(c));
            }

            AMI_MyClass_opCustomCVSI cb = new AMI_MyClass_opCustomCVSI(i);
            p.opCustomCVS_async(cb, i);
            cb.check();
        }

        {
            Custom<Custom<int>> i = new Custom<Custom<int>>();
            for(int c = 0; c < _length; ++c)
            {
                Custom<int> inner = new Custom<int>();
                for(int j = 0; j < c; ++j)
                {
                    inner.Add(j);
                }
                i.Add(inner);
            }

            AMI_MyClass_opCustomIntSSI cb = new AMI_MyClass_opCustomIntSSI(i);
            p.opCustomIntSS_async(cb, i);
            cb.check();
        }

        {
            Custom<Custom<CV>> i = new Custom<Custom<CV>>();
            for(int c = 0; c < _length; ++c)
            {
                Custom<CV> inner = new Custom<CV>();
                for(int j = 0; j < c; ++j)
                {
                    inner.Add(new CV(j));
                }
                i.Add(inner);
            }

            AMI_MyClass_opCustomCVSSI cb = new AMI_MyClass_opCustomCVSSI(i);
            p.opCustomCVSS_async(cb, i);
            cb.check();
        }

#if !COMPACT && !SILVERLIGHT
        {
            Serialize.Small i = null;

            AMI_MyClass_opSerialSmallCSharpNull cb = new AMI_MyClass_opSerialSmallCSharpNull();
            p.opSerialSmallCSharp_async(cb, i);
            cb.check();
        }

        {
            Serialize.Small i = new Serialize.Small();
            i.i = 99;

            AMI_MyClass_opSerialSmallCSharp cb = new AMI_MyClass_opSerialSmallCSharp();
            p.opSerialSmallCSharp_async(cb, i);
            cb.check();
        }

        {
            Serialize.Large i = new Serialize.Large();
            i.d1 = 1.0;
            i.d2 = 2.0;
            i.d3 = 3.0;
            i.d4 = 4.0;
            i.d5 = 5.0;
            i.d6 = 6.0;
            i.d7 = 7.0;
            i.d8 = 8.0;
            i.d9 = 9.0;
            i.d10 = 10.0;

            AMI_MyClass_opSerialLargeCSharp cb = new AMI_MyClass_opSerialLargeCSharp();
            p.opSerialLargeCSharp_async(cb, i);
            cb.check();
        }

        {
            Serialize.Struct i = new Serialize.Struct();
            i.o = null;
            i.o2 = i;
            i.s = null;
            i.s2 = "Hello";

            AMI_MyClass_opSerialStructCSharp cb = new AMI_MyClass_opSerialStructCSharp();
            p.opSerialStructCSharp_async(cb, i);
            cb.check();
        }
#endif
    }
Пример #60
0
        public override IObservable <IplImage> Process(IObservable <IplImage> source)
        {
            return(Observable.Defer(() =>
            {
                int averageCount = 0;
                IplImage image = null;
                IplImage difference = null;
                IplImage background = null;
                return source.Select(input =>
                {
                    if (background == null || background.Size != input.Size)
                    {
                        averageCount = 0;
                        image = new IplImage(input.Size, IplDepth.F32, input.Channels);
                        difference = new IplImage(input.Size, IplDepth.F32, input.Channels);
                        background = new IplImage(input.Size, IplDepth.F32, input.Channels);
                        background.SetZero();
                    }

                    var output = new IplImage(input.Size, IplDepth.U8, input.Channels);
                    if (averageCount < BackgroundFrames)
                    {
                        averageCount++;
                        output.SetZero();
                        CV.Acc(input, background);
                        if (averageCount == BackgroundFrames)
                        {
                            CV.ConvertScale(background, background, 1.0 / averageCount, 0);
                        }
                    }
                    else
                    {
                        CV.Convert(input, image);
                        switch (SubtractionMethod)
                        {
                        case SubtractionMethod.Bright:
                            CV.Sub(image, background, difference);
                            break;

                        case SubtractionMethod.Dark:
                            CV.Sub(background, image, difference);
                            break;

                        case SubtractionMethod.Absolute:
                        default:
                            CV.AbsDiff(image, background, difference);
                            break;
                        }

                        if (AdaptationRate > 0)
                        {
                            CV.RunningAvg(image, background, AdaptationRate);
                        }

                        CV.Threshold(difference, output, ThresholdValue, 255, ThresholdType);
                    }

                    return output;
                });
            }));
        }