internal IRegistrationSource GetLazyRegistrationSource(Type typeToRegister) { var registrationContainer = new RegistrationContainer(); registrationContainer.AddRegistration(new RegistrationItem(typeToRegister)); return(new LightCore.Registration.RegistrationSource.LazyRegistrationSource(registrationContainer)); }
internal IRegistrationSource GetOpenGenericRegistrationSource(Type contractType, Type implementationType) { var registrationContainer = new RegistrationContainer(); registrationContainer.AddRegistration(new RegistrationItem(contractType) { ImplementationType = implementationType, Lifecycle = new TransientLifecycle() }); return(new LightCore.Registration.RegistrationSource.OpenGenericRegistrationSource(registrationContainer)); }
/// <summary> /// Gets a fake registration container with given registered types. /// </summary> /// <param name="typesToRegister">The types to register.</param> /// <returns>The registration container with registered types.</returns> internal static RegistrationContainer GetRegistrationContainerFor(Type[] typesToRegister) { var registrationContainer = new RegistrationContainer(); foreach (var registeredType in typesToRegister) { var item = new RegistrationItem(registeredType); registrationContainer.AddRegistration(item); } return(registrationContainer); }
private ResolutionContext GetContext(Type contractType, Type implementationType) { var registrationContainer = new RegistrationContainer(); var registration = new RegistrationItem(contractType) { Activator = new LightCore.Activation.Activators.ReflectionActivator ( implementationType, new LightCore.Activation.Components.ConstructorSelector(), new LightCore.Activation.Components.ArgumentCollector() ), Lifecycle = new TransientLifecycle() }; registrationContainer.AddRegistration(registration); return(new ResolutionContext(new Container(registrationContainer), registrationContainer)); }
void ReleaseDesignerOutlets() { if (BackButton != null) { BackButton.Dispose(); BackButton = null; } if (BackgroundImageView != null) { BackgroundImageView.Dispose(); BackgroundImageView = null; } if (ConfirmPasswordTextField != null) { ConfirmPasswordTextField.Dispose(); ConfirmPasswordTextField = null; } if (CreateAccountButton != null) { CreateAccountButton.Dispose(); CreateAccountButton = null; } if (EmailTextField != null) { EmailTextField.Dispose(); EmailTextField = null; } if (EmailTextFieldOfForgetPassword != null) { EmailTextFieldOfForgetPassword.Dispose(); EmailTextFieldOfForgetPassword = null; } if (EmailTextFieldOfRegistration != null) { EmailTextFieldOfRegistration.Dispose(); EmailTextFieldOfRegistration = null; } if (ErrorMessageLabel != null) { ErrorMessageLabel.Dispose(); ErrorMessageLabel = null; } if (FirstNameTextField != null) { FirstNameTextField.Dispose(); FirstNameTextField = null; } if (ForgetPasswordButton != null) { ForgetPasswordButton.Dispose(); ForgetPasswordButton = null; } if (ForgetPasswordContainer != null) { ForgetPasswordContainer.Dispose(); ForgetPasswordContainer = null; } if (LastNameTextField != null) { LastNameTextField.Dispose(); LastNameTextField = null; } if (LoadingIndicator != null) { LoadingIndicator.Dispose(); LoadingIndicator = null; } if (LoginButton != null) { LoginButton.Dispose(); LoginButton = null; } if (LoginContainer != null) { LoginContainer.Dispose(); LoginContainer = null; } if (PasswordTextField != null) { PasswordTextField.Dispose(); PasswordTextField = null; } if (PasswordTextFieldOfRegistration != null) { PasswordTextFieldOfRegistration.Dispose(); PasswordTextFieldOfRegistration = null; } if (RegistrationButton != null) { RegistrationButton.Dispose(); RegistrationButton = null; } if (RegistrationContainer != null) { RegistrationContainer.Dispose(); RegistrationContainer = null; } if (ResetPasswordButton != null) { ResetPasswordButton.Dispose(); ResetPasswordButton = null; } if (WhatIsSeekiosButton != null) { WhatIsSeekiosButton.Dispose(); WhatIsSeekiosButton = null; } }
private ResolutionContext GetContext() { var registrationContainer = new RegistrationContainer(); return(new ResolutionContext(new Container(registrationContainer), registrationContainer)); }