Esempio n. 1
0
        Tuple <IIndex <K>, VectorConstruction> IIndexBuilder.DropItem <K>(Tuple <IIndex <K>, VectorConstruction> _arg10, K key)
        {
            Tuple <IIndex <K>, VectorConstruction> tuple1 = _arg10;
            VectorConstruction vectorConstruction1        = tuple1.Item2;
            IIndex <K>         index = tuple1.Item1;
            FSharpChoice <Unit, Tuple <K, long> > fsharpChoice = OptionalValueModule.MissingPresent <Tuple <K, long> >(index.Lookup(key, Lookup.Exact, (Func <long, bool>) new LinearIndex.DeedleIndicesIIndexBuilderDropItem()));

            if (fsharpChoice is FSharpChoice <Unit, Tuple <K, long> > .Choice2Of2)
            {
                Tuple <K, long>        tuple2 = ((FSharpChoice <Unit, Tuple <K, long> > .Choice2Of2)fsharpChoice).get_Item();
                VectorConstruction     vectorConstruction2 = VectorConstruction.NewDropRange(vectorConstruction1, RangeRestriction <long> .NewFixed(tuple2.Item2, tuple2.Item2));
                ReadOnlyCollection <K> keys = index.Keys;
                return(new Tuple <IIndex <K>, VectorConstruction>((IIndex <K>) new LinearIndex <K>(System.Array.AsReadOnly <K>(ArrayModule.OfSeq <K>(SeqModule.Filter <K>((Func <K, bool>) new LinearIndex.newKeys <K>(key), (IEnumerable <M0>)keys))), (IIndexBuilder)this, FSharpOption <bool> .Some(index.IsOrdered)), vectorConstruction2));
            }
            string paramName = nameof(key);

            throw new ArgumentException(((Func <K, string>)ExtraTopLevelOperators.PrintFormatToString <Func <K, string> >((PrintfFormat <M0, Unit, string, string>) new PrintfFormat <Func <K, string>, Unit, string, string, K>("The key '%O' is not present in the index."))).Invoke(key), paramName);
        }