public Task MultipleInheritanceFelinePut() => Test(async(host, pipeline) => { var value = new Feline(false, true); var result = await new ServiceClient(ClientDiagnostics, pipeline, host).RestClient.PutFelineAsync(value); Assert.AreEqual(200, result.GetRawResponse().Status); Assert.AreEqual("Feline was correct!", result.Value); });
static void ExampleInheritanceAbstractClase() { //var aninal = new AnimalBase(); //verificar los enum, para las validaciones de tipo de datos var canino = new Canine(); canino.ScientificName = "Canino algo"; canino.CanineType = CanineType.Domesticated; canino.FeedingType = FeedingType.omnivore; canino.SkeletonType = SkeletonType.invertebrate; canino.CanineInfo(); canino.Sound(); //Apesar que en felino no tiene propiedades, heredamos todo del animal base var felino = new Feline(); felino.FeedingType = FeedingType.carnivorous; felino.ScientificName = "Felino prueba"; felino.SkeletonType = SkeletonType.vertebrate; felino.Sound(); var canineOne = new Canine(FeedingType.carnivorous, CanineType.Wild) { SkeletonType = SkeletonType.vertebrate , ScientificName = "Canidae" }; canineOne.CanineInfo(); canineOne.Sound(); Console.ReadKey(); }
public override Feline HereKittyKitty() { switch (_Location) { case Location.Bedroom: _Amusement = Amusements.Sleep; break; case Location.Kitchen: _Amusement = Amusements.Food; break; case Location.LivingRoom: _Amusement = Amusements.String; break; default: _Amusement = Amusements.Mouse; break; } _Cat = new Cat(_Amusement); return(_Cat); }
static void Main() { Animal[] ani = new Animal[100]; ani[0] = new Feline(); ani[1] = new Canine(); ani[2] = new Cat(); ani[3] = new Tiger(); ani[4] = new Lion(); ani[5] = new Dog(); ani[6] = new Wolf(); ani[7] = new Jindo(); }
static void Main(string[] args) { Animal[] ani = new Animal[100];// 참조변수가 100개 생성 ani[0] = new Feline(); ani[1] = new Canine(); ani[2] = new Cat(); ani[3] = new Tiger(); ani[4] = new Lion(); ani[5] = new Dog(); ani[6] = new Wolf(); ani[7] = new Jindo(); }
public virtual Response <string> PutFeline(Feline feline, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("ServiceClient.PutFeline"); scope.Start(); try { return(RestClient.PutFeline(feline, cancellationToken)); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual async Task <Response <string> > PutFelineAsync(Feline feline, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("ServiceClient.PutFeline"); scope.Start(); try { return(await RestClient.PutFelineAsync(feline, cancellationToken).ConfigureAwait(false)); } catch (Exception e) { scope.Failed(e); throw; } }
static void Main(string[] args) { Animal[] animalArr = new Animal[8]; animalArr[0] = new Feline(); animalArr[1] = new Canine(); animalArr[2] = new Cat(); animalArr[3] = new Tiger(); animalArr[4] = new Lion(); animalArr[5] = new Dog(); animalArr[6] = new Wolf(); animalArr[7] = new Jindo(); foreach (Animal animal in animalArr) { Console.WriteLine(animal); } }
private bool initialized = false; //ForLoading /// <summary> /// Probably needs to get called when Creating Carvan during setup. /// </summary> /// <param name="papaName">Name of Leader</param> /// <param name="mamaName">Name of Second in command</param> public void InitializeCaravan(string papaName, string mamaName) { Feline papa = new Feline(papaName); Feline moma = new Feline(mamaName); Feline kid1 = new Feline("Derp1"); Feline kid2 = new Feline("Derp2"); cats.Add(papa); cats.Add(moma); cats.Add(kid1); cats.Add(kid2); //Initialize starting values. foodValue = 5; initialized = true; SpawnCats(); }
static void Main(string[] args) { Animal[] objArr = new Animal[9]; objArr[0] = new Feline(); objArr[1] = new Canine(); objArr[2] = new Cat(); objArr[3] = new Tiger(); objArr[4] = new Lion(); objArr[5] = new Dog(); objArr[6] = new Wolf(); objArr[7] = new Jindo(); objArr[8] = new Animal(); foreach (Object obj in objArr) { Console.WriteLine(obj); } }
public Feline CreateFeline( string type, string name, double weight, string livingRegion, string breed) { type = type.ToLower(); Feline feline = null; switch (type) { case "cat": feline = new Cat(name, weight, livingRegion, breed); break; case "tiger": feline = new Tiger(name, weight, livingRegion, breed); break; } return(feline); }
public void SetFelineData(Feline pFeline) { felineData = pFeline; }