/// <summary> /// The get add carrier. /// </summary> /// <param name="wrapTrackShell"> /// The wrap track shell. /// </param> /// <param name="carrierType"> /// The carrier type. /// </param> /// <returns> /// The <see cref="ICarrierBase"/>. /// </returns> public ICarrierBase GetAddCarrier(IWrapTrackWebShell wrapTrackShell, string carrierType) { var me = wrapTrackShell.Me(); var collection = me.GetCollection(); var addCarrier = GetCarrierBySelectType(collection, carrierType); return(addCarrier); }
/// <summary> /// The get current user collection. /// </summary> /// <param name="wrapTrackShell"> /// The wrap track shell. /// </param> /// <param name="addIfNone"> /// The add If None. /// </param> /// <returns> /// The <see cref="bool"/>. /// </returns> protected ICollection GetCurrentUserCollection( IWrapTrackWebShell wrapTrackShell, bool addIfNone = true) { var me = wrapTrackShell.Me(); StfAssert.IsNotNull("Got a MeProfile", me); var collection = me.GetCollection(); StfAssert.IsNotNull("Got my collection", collection); // Be sure there is a wrap in collection. If requested if (addIfNone && collection.NumOfWraps() == 0) { collection.AddWrap("Ali Dover", "Hygge", "Blue"); // ensure we always are at Collection when done - as we would if not adding a wrap me = wrapTrackShell.Me(); collection = me.GetCollection(); } return(collection); }