コード例 #1
0
 /// <summary>Removes the specified elements from the Bcc collection.</summary>
 public Message RemoveBcc(System.Collections.Generic.IEnumerable <Contact> values)
 {
     return(this.With(bcc: CollectionHelpers.RemoveRange(this.Bcc, values)));
 }
コード例 #2
0
 public override int GetHashCode() => CollectionHelpers.GetHashCode(this);
コード例 #3
0
        internal object UpdateDictionary(ControllerContext controllerContext, ModelBindingContext bindingContext, Type keyType, Type valueType)
        {
            IModelBinder keyBinder   = Binders.GetBinder(keyType);
            IModelBinder valueBinder = Binders.GetBinder(valueType);

            // build up a list of items from the request
            List <KeyValuePair <object, object> > modelList = new List <KeyValuePair <object, object> >();

            for (int currentIndex = 0; ; currentIndex++)
            {
                string subIndexKey   = CreateSubIndexName(bindingContext.ModelName, currentIndex);
                string keyFieldKey   = CreateSubPropertyName(subIndexKey, "key");
                string valueFieldKey = CreateSubPropertyName(subIndexKey, "value");

                if (!(DictionaryHelpers.DoesAnyKeyHavePrefix(bindingContext.ValueProvider, keyFieldKey) && DictionaryHelpers.DoesAnyKeyHavePrefix(bindingContext.ValueProvider, valueFieldKey)))
                {
                    // we ran out of elements to pull
                    break;
                }

                // bind the key
                ModelBindingContext keyBindingContext = new ModelBindingContext()
                {
                    ModelName     = keyFieldKey,
                    ModelState    = bindingContext.ModelState,
                    ModelType     = keyType,
                    ValueProvider = bindingContext.ValueProvider
                };
                object thisKey = keyBinder.BindModel(controllerContext, keyBindingContext);

                // we need to merge model errors up
                VerifyValueUsability(controllerContext, bindingContext.ModelState, keyFieldKey, keyType, thisKey);
                if (!keyType.IsInstanceOfType(thisKey))
                {
                    // we can't add an invalid key, so just move on
                    continue;
                }

                // bind the value
                ModelBindingContext valueBindingContext = new ModelBindingContext()
                {
                    ModelName      = valueFieldKey,
                    ModelState     = bindingContext.ModelState,
                    ModelType      = valueType,
                    PropertyFilter = bindingContext.PropertyFilter,
                    ValueProvider  = bindingContext.ValueProvider
                };
                object thisValue = valueBinder.BindModel(controllerContext, valueBindingContext);

                // we need to merge model errors up
                VerifyValueUsability(controllerContext, bindingContext.ModelState, valueFieldKey, valueType, thisValue);
                KeyValuePair <object, object> kvp = new KeyValuePair <object, object>(thisKey, thisValue);
                modelList.Add(kvp);
            }

            // if there weren't any elements at all in the request, just return
            if (modelList.Count == 0)
            {
                return(null);
            }

            // replace the original collection
            object dictionary = bindingContext.Model;

            CollectionHelpers.ReplaceDictionary(keyType, valueType, dictionary, modelList);
            return(dictionary);
        }
コード例 #4
0
        /// <summary>
        /// Constructs a NURBS surface from a set of NURBS curves.<br/>
        /// </summary>
        /// <param name="curves">Set of a minimum of two curves to create the surface.</param>
        /// <param name="loftType">Enum to choose the type of loft generation.</param>
        /// <returns>A NURBS surface.</returns>
        public static NurbsSurface FromLoft(IList <NurbsBase> curves, LoftType loftType = LoftType.Normal)
        {
            if (curves == null)
            {
                throw new ArgumentException("An invalid number of curves to perform the loft.");
            }

            if (curves.Count < 2)
            {
                throw new ArgumentException("An invalid number of curves to perform the loft.");
            }

            if (curves.Any(x => x == null))
            {
                throw new ArgumentException("The input set contains null curves.");
            }

            bool isClosed = curves[0].IsClosed;

            foreach (NurbsBase c in curves.Skip(1))
            {
                if (isClosed != c.IsClosed)
                {
                    throw new ArgumentException("Loft only works if all curves are open, or all curves are closed.");
                }
            }

            // Copy curves for possible operation of homogenization.
            IList <NurbsBase> copyCurves = new List <NurbsBase>(curves);

            // Clamp curves if periodic.
            if (copyCurves[0].IsPeriodic)
            {
                for (int i = 0; i < copyCurves.Count; i++)
                {
                    copyCurves[i] = copyCurves[i].ClampEnds();
                }
            }

            // If necessary, the curves can be brought to a common degree and knots, as we do for the ruled surface.
            // In fact, the ruled surface is a special case of a skinned surface.
            if (copyCurves.Any(c => c.Degree != copyCurves[0].Degree))
            {
                copyCurves = CurveHelpers.NormalizedDegree(copyCurves);
                copyCurves = CurveHelpers.NormalizedKnots(copyCurves);
            }

            int                   degreeV              = copyCurves[0].Degree;
            int                   degreeU              = 3;
            KnotVector            knotVectorU          = new KnotVector();
            KnotVector            knotVectorV          = copyCurves[0].Knots;
            List <List <Point4> > surfaceControlPoints = new List <List <Point4> >();

            switch (loftType)
            {
            case LoftType.Normal:
                List <List <Point4> > tempPts = new List <List <Point4> >();
                for (int n = 0; n < copyCurves[0].ControlPointLocations.Count; n++)
                {
                    List <Point3> pts = copyCurves.Select(c => c.ControlPointLocations[n]).ToList();
                    NurbsBase     crv = Fitting.Curve.Interpolated(pts, degreeU);
                    tempPts.Add(crv.ControlPoints);
                    knotVectorU = crv.Knots;
                }
                surfaceControlPoints = CollectionHelpers.Transpose2DArray(tempPts);
                break;

            case LoftType.Loose:
                surfaceControlPoints = copyCurves.Select(c => c.ControlPoints).ToList();
                knotVectorU          = new KnotVector(degreeU, copyCurves.Count);
                break;
            }
            return(new NurbsSurface(degreeU, degreeV, knotVectorU, knotVectorV, surfaceControlPoints));
        }
コード例 #5
0
        internal object UpdateDictionary(ControllerContext controllerContext, ModelBindingContext bindingContext, Type keyType, Type valueType)
        {
            bool stopOnIndexNotFound;
            IEnumerable <string> indexes;

            GetIndexes(bindingContext, out stopOnIndexNotFound, out indexes);

            IModelBinder keyBinder   = Binders.GetBinder(keyType);
            IModelBinder valueBinder = Binders.GetBinder(valueType);

            // build up a list of items from the request
            List <KeyValuePair <object, object> > modelList = new List <KeyValuePair <object, object> >();

            foreach (string currentIndex in indexes)
            {
                string subIndexKey   = CreateSubIndexName(bindingContext.ModelName, currentIndex);
                string keyFieldKey   = CreateSubPropertyName(subIndexKey, "key");
                string valueFieldKey = CreateSubPropertyName(subIndexKey, "value");

                if (!(bindingContext.ValueProvider.ContainsPrefix(keyFieldKey) && bindingContext.ValueProvider.ContainsPrefix(valueFieldKey)))
                {
                    if (stopOnIndexNotFound)
                    {
                        // we ran out of elements to pull
                        break;
                    }
                    else
                    {
                        continue;
                    }
                }

                // bind the key
                ModelBindingContext keyBindingContext = new ModelBindingContext()
                {
                    ModelMetadata = ModelMetadataProviders.Current.GetMetadataForType(null, keyType),
                    ModelName     = keyFieldKey,
                    ModelState    = bindingContext.ModelState,
                    ValueProvider = bindingContext.ValueProvider
                };
                object thisKey = keyBinder.BindModel(controllerContext, keyBindingContext);

                // we need to merge model errors up
                AddValueRequiredMessageToModelState(controllerContext, bindingContext.ModelState, keyFieldKey, keyType, thisKey);
                if (!keyType.IsInstanceOfType(thisKey))
                {
                    // we can't add an invalid key, so just move on
                    continue;
                }

                // bind the value
                modelList.Add(CreateEntryForModel(controllerContext, bindingContext, valueType, valueBinder, valueFieldKey, thisKey));
            }

            // Let's try another method
            if (modelList.Count == 0)
            {
                IEnumerableValueProvider enumerableValueProvider = bindingContext.ValueProvider as IEnumerableValueProvider;
                if (enumerableValueProvider != null)
                {
                    IDictionary <string, string> keys = enumerableValueProvider.GetKeysFromPrefix(bindingContext.ModelName);
                    foreach (var thisKey in keys)
                    {
                        modelList.Add(CreateEntryForModel(controllerContext, bindingContext, valueType, valueBinder, thisKey.Value, thisKey.Key));
                    }
                }
            }

            // if there weren't any elements at all in the request, just return
            if (modelList.Count == 0)
            {
                return(null);
            }

            // replace the original collection
            object dictionary = bindingContext.Model;

            CollectionHelpers.ReplaceDictionary(keyType, valueType, dictionary, modelList);
            return(dictionary);
        }
コード例 #6
0
 IEnumerator IEnumerable.GetEnumerator()
 => CollectionHelpers.GetEnumerator(this);
コード例 #7
0
ファイル: PeriodList.cs プロジェクト: julthep/CommunityServer
 protected bool Equals(PeriodList other) => string.Equals(TzId, other.TzId, StringComparison.OrdinalIgnoreCase) &&
 CollectionHelpers.Equals(Periods, other.Periods);
コード例 #8
0
 /// <summary>Adds the specified elements from the Members collection.</summary>
 public Family AddMembers(params Person[] values)
 {
     return(this.With(members: CollectionHelpers.AddRange(this.Members, values)));
 }
コード例 #9
0
 /// <summary>Removes the specified elements from the Members collection.</summary>
 public Family RemoveMembers(System.Collections.Generic.IEnumerable <Person> values)
 {
     return(this.With(members: CollectionHelpers.RemoveRange(this.Members, values)));
 }
コード例 #10
0
 /// <summary>Replaces the elements of the Members collection with the specified collection.</summary>
 public Family WithMembers(params Person[] values)
 {
     return(this.With(members: CollectionHelpers.ResetContents(this.Members, values)));
 }
コード例 #11
0
 /// <summary>Replaces the elements of the Members collection with the specified collection.</summary>
 public Family WithMembers(System.Collections.Generic.IEnumerable <Person> values)
 {
     return(this.With(members: CollectionHelpers.ResetContents(this.Members, values)));
 }
        public void LogParameters(ICoreLogger logger)
        {
            var builder = new StringBuilder();

            builder.AppendLine("=== InteractiveParameters Data ===");
            builder.AppendLine("LoginHint provided: " + !string.IsNullOrEmpty(LoginHint));
            builder.AppendLine("User provided: " + (Account != null));
            builder.AppendLine("UseEmbeddedWebView: " + UseEmbeddedWebView);
            builder.AppendLine("ExtraScopesToConsent: " + string.Join(";", ExtraScopesToConsent ?? CollectionHelpers.GetEmptyReadOnlyList <string>()));
            builder.AppendLine("Prompt: " + Prompt.PromptValue);
            builder.AppendLine("HasCustomWebUi: " + (CustomWebUi != null));
            UiParent.SystemWebViewOptions?.LogParameters(logger);
            logger.Info(builder.ToString());
        }
コード例 #13
0
 public CTDAFunction FunctionByIndex(UInt16 index)
 {
     return(CollectionHelpers.BinarySearch(ctdaFunctions, fn => {
         return index.CompareTo(fn.index);
     }));
 }
コード例 #14
0
 /// <summary>Removes the specified elements from the Bcc collection.</summary>
 public Message RemoveBcc(params Contact[] values)
 {
     return(this.With(bcc: CollectionHelpers.RemoveRange(this.Bcc, values)));
 }
コード例 #15
0
 /// <summary>Removes the specified elements from the Children collection.</summary>
 public FileSystemDirectory RemoveChildren(System.Collections.Generic.IEnumerable <FileSystemEntry> values)
 {
     return(this.With(children: CollectionHelpers.RemoveRange(this.Children, values)));
 }
コード例 #16
0
 void ICollection.CopyTo(Array array, int index)
 {
     CollectionHelpers.CopyTo(_collection, array, index);
 }
コード例 #17
0
 /// <summary>Removes the specified elements from the Children collection.</summary>
 public FileSystemDirectory RemoveChildren(params FileSystemEntry[] values)
 {
     return(this.With(children: CollectionHelpers.RemoveRange(this.Children, values)));
 }
コード例 #18
0
 /// <summary>Replaces the elements of the Attributes collection with the specified collection.</summary>
 public FileSystemFile WithAttributes(params System.String[] values)
 {
     return(this.With(attributes: CollectionHelpers.ResetContents(this.Attributes, values)));
 }
コード例 #19
0
        public void PeriodListTests()
        {
            var startTimesA = new List <DateTime>
            {
                new DateTime(2017, 03, 02, 06, 00, 00),
                new DateTime(2017, 03, 03, 06, 00, 00),
                new DateTime(2017, 03, 06, 06, 00, 00),
                new DateTime(2017, 03, 07, 06, 00, 00),
                new DateTime(2017, 03, 08, 06, 00, 00),
                new DateTime(2017, 03, 09, 06, 00, 00),
                new DateTime(2017, 03, 10, 06, 00, 00),
                new DateTime(2017, 03, 13, 06, 00, 00),
                new DateTime(2017, 03, 14, 06, 00, 00),
                new DateTime(2017, 03, 17, 06, 00, 00),
                new DateTime(2017, 03, 20, 06, 00, 00),
                new DateTime(2017, 03, 21, 06, 00, 00),
                new DateTime(2017, 03, 22, 06, 00, 00),
                new DateTime(2017, 03, 23, 06, 00, 00),
                new DateTime(2017, 03, 24, 06, 00, 00),
                new DateTime(2017, 03, 27, 06, 00, 00),
                new DateTime(2017, 03, 28, 06, 00, 00),
                new DateTime(2017, 03, 29, 06, 00, 00),
                new DateTime(2017, 03, 30, 06, 00, 00),
                new DateTime(2017, 03, 31, 06, 00, 00),
                new DateTime(2017, 04, 03, 06, 00, 00),
                new DateTime(2017, 04, 05, 06, 00, 00),
                new DateTime(2017, 04, 06, 06, 00, 00),
                new DateTime(2017, 04, 07, 06, 00, 00),
                new DateTime(2017, 04, 10, 06, 00, 00),
                new DateTime(2017, 04, 11, 06, 00, 00),
                new DateTime(2017, 04, 12, 06, 00, 00),
                new DateTime(2017, 04, 13, 06, 00, 00),
                new DateTime(2017, 04, 17, 06, 00, 00),
                new DateTime(2017, 04, 18, 06, 00, 00),
                new DateTime(2017, 04, 19, 06, 00, 00),
                new DateTime(2017, 04, 20, 06, 00, 00),
                new DateTime(2017, 04, 21, 06, 00, 00),
                new DateTime(2017, 04, 24, 06, 00, 00),
                new DateTime(2017, 04, 25, 06, 00, 00),
                new DateTime(2017, 04, 27, 06, 00, 00),
                new DateTime(2017, 04, 28, 06, 00, 00),
                new DateTime(2017, 05, 01, 06, 00, 00),
            }
            .Select(dt => new Period(new CalDateTime(dt))).ToList();
            var a = new PeriodList();

            foreach (var period in startTimesA)
            {
                a.Add(period);
            }

            //Difference from A: first element became the second, and last element became the second-to-last element
            var startTimesB = new List <DateTime>
            {
                new DateTime(2017, 03, 03, 06, 00, 00),
                new DateTime(2017, 03, 02, 06, 00, 00),
                new DateTime(2017, 03, 06, 06, 00, 00),
                new DateTime(2017, 03, 07, 06, 00, 00),
                new DateTime(2017, 03, 08, 06, 00, 00),
                new DateTime(2017, 03, 09, 06, 00, 00),
                new DateTime(2017, 03, 10, 06, 00, 00),
                new DateTime(2017, 03, 13, 06, 00, 00),
                new DateTime(2017, 03, 14, 06, 00, 00),
                new DateTime(2017, 03, 17, 06, 00, 00),
                new DateTime(2017, 03, 20, 06, 00, 00),
                new DateTime(2017, 03, 21, 06, 00, 00),
                new DateTime(2017, 03, 22, 06, 00, 00),
                new DateTime(2017, 03, 23, 06, 00, 00),
                new DateTime(2017, 03, 24, 06, 00, 00),
                new DateTime(2017, 03, 27, 06, 00, 00),
                new DateTime(2017, 03, 28, 06, 00, 00),
                new DateTime(2017, 03, 29, 06, 00, 00),
                new DateTime(2017, 03, 30, 06, 00, 00),
                new DateTime(2017, 03, 31, 06, 00, 00),
                new DateTime(2017, 04, 03, 06, 00, 00),
                new DateTime(2017, 04, 05, 06, 00, 00),
                new DateTime(2017, 04, 06, 06, 00, 00),
                new DateTime(2017, 04, 07, 06, 00, 00),
                new DateTime(2017, 04, 10, 06, 00, 00),
                new DateTime(2017, 04, 11, 06, 00, 00),
                new DateTime(2017, 04, 12, 06, 00, 00),
                new DateTime(2017, 04, 13, 06, 00, 00),
                new DateTime(2017, 04, 17, 06, 00, 00),
                new DateTime(2017, 04, 18, 06, 00, 00),
                new DateTime(2017, 04, 19, 06, 00, 00),
                new DateTime(2017, 04, 20, 06, 00, 00),
                new DateTime(2017, 04, 21, 06, 00, 00),
                new DateTime(2017, 04, 24, 06, 00, 00),
                new DateTime(2017, 04, 25, 06, 00, 00),
                new DateTime(2017, 04, 27, 06, 00, 00),
                new DateTime(2017, 05, 01, 06, 00, 00),
                new DateTime(2017, 04, 28, 06, 00, 00),
            }
            .Select(dt => new Period(new CalDateTime(dt))).ToList();
            var b = new PeriodList();

            foreach (var period in startTimesB)
            {
                b.Add(period);
            }

            var collectionEqual = CollectionHelpers.Equals(a, b);

            Assert.AreEqual(true, collectionEqual);
            Assert.AreEqual(a.GetHashCode(), b.GetHashCode());

            var listOfListA = new List <IPeriodList> {
                a
            };
            var listOfListB = new List <IPeriodList> {
                b
            };

            Assert.IsTrue(CollectionHelpers.Equals(listOfListA, listOfListB));

            var aThenB = new List <IPeriodList> {
                a, b
            };
            var bThenA = new List <IPeriodList> {
                b, a
            };

            Assert.IsTrue(CollectionHelpers.Equals(aThenB, bThenA));
        }
コード例 #20
0
 /// <summary>Replaces the elements of the Attributes collection with the specified collection.</summary>
 public FileSystemFile WithAttributes(System.Collections.Generic.IEnumerable <System.String> values)
 {
     return(this.With(attributes: CollectionHelpers.ResetContents(this.Attributes, values)));
 }
コード例 #21
0
        /// <summary>
        /// Checks if a NURBS surface is closed.<br/>
        /// A surface is closed if the first points and the lasts in a direction are coincident.
        /// </summary>
        /// <returns>True if the curve is closed.</returns>
        public bool IsClosed(SurfaceDirection direction)
        {
            var pts2d = (direction == SurfaceDirection.U) ? CollectionHelpers.Transpose2DArray(ControlPointLocations) : ControlPointLocations;

            return(pts2d.All(pts => pts[0].DistanceTo(pts.Last()) < GSharkMath.Epsilon));
        }
コード例 #22
0
 /// <summary>Removes the specified elements from the Attributes collection.</summary>
 public FileSystemFile RemoveAttributes(System.Collections.Generic.IEnumerable <System.String> values)
 {
     return(this.With(attributes: CollectionHelpers.RemoveRange(this.Attributes, values)));
 }
コード例 #23
0
        /// <summary>
        /// Creates a surface of revolution through an arbitrary angle, and axis.
        /// <em>Corresponds the algorithm A8.1 of The NURBS Book by Piegl and Tiller.</em>
        /// </summary>
        /// <param name="curveProfile">Profile curve.</param>
        /// <param name="axis">Revolution axis.</param>
        /// <param name="rotationAngle">Angle in radiance.</param>
        /// <returns>The revolution surface.</returns>
        public static NurbsSurface Revolved(NurbsBase curveProfile, Ray axis, double rotationAngle)
        {
            // if angle is less than 90.
            int        arcCount = 1;
            KnotVector knotsU   = Vector.Zero1d(6).ToKnot();

            if (rotationAngle <= Math.PI && rotationAngle > (Math.PI / 2))
            {
                arcCount  = 2;
                knotsU[3] = knotsU[4] = 0.5;
            }

            if (rotationAngle <= (3 * Math.PI / 2) && rotationAngle > Math.PI)
            {
                arcCount  = 3;
                knotsU    = Vector.Zero1d(6 + 2 * (arcCount - 1)).ToKnot();
                knotsU[3] = knotsU[4] = (double)1 / 3;
                knotsU[5] = knotsU[6] = (double)2 / 3;
            }

            if (rotationAngle <= (4 * Math.PI) && rotationAngle > (3 * Math.PI / 2))
            {
                arcCount  = 4;
                knotsU    = Vector.Zero1d(6 + 2 * (arcCount - 1)).ToKnot();
                knotsU[3] = knotsU[4] = (double)1 / 4;
                knotsU[5] = knotsU[6] = (double)1 / 2;
                knotsU[7] = knotsU[8] = (double)3 / 4;
            }

            // load start and end knots.
            int t = 3 + 2 * (arcCount - 1);

            for (int i = 0; i < 3; i++, t++)
            {
                knotsU[i] = 0.0;
                knotsU[t] = 1.0;
            }

            // some initialization.
            double divideAngle = rotationAngle / arcCount;
            int    n           = 2 * arcCount;
            double wm          = divideAngle / 2; // is the base angle.

            // initialize the sines and cosines only once.
            double angle = 0.0;

            double[] sines   = new double[arcCount + 1];
            double[] cosines = new double[arcCount + 1];
            for (int i = 1; i <= arcCount; i++)
            {
                angle     += divideAngle;
                sines[i]   = Math.Sin(angle);
                cosines[i] = Math.Cos(angle);
            }

            // loop and compute each u row of control points and weights.
            List <List <Point4> > controlPts = new List <List <Point4> >();

            for (int r = 0; r < 2 * arcCount + 1; r++)
            {
                List <Point4> temp = CollectionHelpers.RepeatData(Point4.Zero, curveProfile.ControlPoints.Count);
                controlPts.Add(temp);
            }

            for (int j = 0; j < curveProfile.ControlPointLocations.Count; j++)
            {
                Point3  ptO     = axis.ClosestPoint(curveProfile.ControlPointLocations[j]);
                Vector3 vectorX = curveProfile.ControlPointLocations[j] - ptO;
                double  radius  = vectorX.Length; // the radius at that length.
                Vector3 vectorY = Vector3.CrossProduct(axis.Direction, vectorX);

                if (radius > GSharkMath.Epsilon)
                {
                    vectorX *= (1 / radius);
                    vectorY *= (1 / radius);
                }

                // initialize the first control points and weights.
                Point3 pt0 = curveProfile.ControlPointLocations[j];
                controlPts[0][j] = new Point4(pt0, curveProfile.Weights[j]);

                Vector3 tangent0 = vectorY;
                int     index    = 0;

                for (int i = 1; i <= arcCount; i++)
                {
                    // rotated generatrix point.
                    Point3 pt2 = (Math.Abs(radius) < GSharkMath.Epsilon)
                        ? ptO
                        : ptO + (vectorX * (cosines[i] * radius) + vectorY * (sines[i] * radius));

                    controlPts[index + 2][j] = new Point4(pt2, curveProfile.Weights[j]);

                    // construct the vector tangent to the rotation.
                    Vector3 rotationTangent = vectorX * (-1 * sines[i]) + vectorY * cosines[i];

                    // construct the next control point.
                    if (Math.Abs(radius) < GSharkMath.Epsilon)
                    {
                        controlPts[index + 1][j] = ptO;
                    }
                    else
                    {
                        Line ln0 = new Line(pt0, tangent0, tangent0.Length);
                        Line ln1 = new Line(pt2, rotationTangent, rotationTangent.Length);
                        Intersection.Intersect.LineLine(ln0, ln1, out Point3 intersectionPt, out _, out _, out _);
                        controlPts[index + 1][j] = new Point4(intersectionPt, wm * curveProfile.Weights[j]);
                    }

                    index += 2;
                    if (i >= arcCount)
                    {
                        continue;
                    }
                    pt0      = pt2;
                    tangent0 = rotationTangent;
                }
            }

            return(new NurbsSurface(2, curveProfile.Degree, knotsU, curveProfile.Knots, controlPts.Select(pts => pts.ToList()).ToList()));
        }
コード例 #24
0
 /// <summary>Removes the specified elements from the Attributes collection.</summary>
 public FileSystemFile RemoveAttributes(params System.String[] values)
 {
     return(this.With(attributes: CollectionHelpers.RemoveRange(this.Attributes, values)));
 }
コード例 #25
0
ファイル: PeriodList.cs プロジェクト: wenlei416/ical.net
 protected bool Equals(PeriodList other)
 {
     return(string.Equals(TzId, other.TzId) && CollectionHelpers.Equals(Periods, other.Periods));
 }
コード例 #26
0
 /// <summary>Replaces the elements of the Children collection with the specified collection.</summary>
 public FileSystemDirectory WithChildren(params FileSystemEntry[] values)
 {
     return(this.With(children: CollectionHelpers.ResetContents(this.Children, values)));
 }
コード例 #27
0
 protected bool Equals(CalendarCollection obj) => CollectionHelpers.Equals(this, obj);
コード例 #28
0
 /// <summary>Replaces the elements of the Children collection with the specified collection.</summary>
 public FileSystemDirectory WithChildren(System.Collections.Generic.IEnumerable <FileSystemEntry> values)
 {
     return(this.With(children: CollectionHelpers.ResetContents(this.Children, values)));
 }
        public virtual List <MsalIdTokenCacheItem> GetAllIdTokens(string partitionKey = null, ICoreLogger requestlogger = null)

        {
            return(CollectionHelpers.GetEmptyList <MsalIdTokenCacheItem>());
        }
コード例 #30
0
 /// <summary>Replaces the elements of the Bcc collection with the specified collection.</summary>
 public Message WithBcc(System.Collections.Generic.IEnumerable <Contact> values)
 {
     return(this.With(bcc: CollectionHelpers.ResetContents(this.Bcc, values)));
 }