Ejemplo n.º 1
0
        public NuGetListPackagesNode(Workspace workspace) : base(workspace)
        {
            Settings = Inlets.Create <ISettings>(nameof(Settings));
            Repo     = Outlets.Create <string>(nameof(Repo));

            Settings.OnNext(NuGet.Configuration.Settings.LoadDefaultSettings("."));
        }
Ejemplo n.º 2
0
 private void SetupAttributtedPins()
 {
     foreach (var propertyInfo in GetType().GetRuntimeProperties())
     {
         var propertyTypeInfo = propertyInfo.PropertyType.GetTypeInfo();
         if (propertyTypeInfo.IsGenericType && propertyTypeInfo.GetGenericTypeDefinition() == typeof(Inlet <>))
         {
             var designerPropertiesAttributes = propertyInfo.GetCustomAttributes <DesignerPropertiesAttribute>();
             var basicInlet = Inlets.Create(propertyInfo.Name);
             basicInlet.SetAttribute("type", propertyTypeInfo.GenericTypeArguments[0].AssemblyQualifiedName);
             var inlet = CastInlet(basicInlet, propertyTypeInfo.GenericTypeArguments[0]);
             propertyInfo.SetValue(this, inlet);
         }
         if (propertyTypeInfo.IsGenericType && propertyTypeInfo.GetGenericTypeDefinition() == typeof(Outlet <>))
         {
             var designerPropertiesAttributes = propertyInfo.GetCustomAttributes <DesignerPropertiesAttribute>();
             var nonTypedOutlet = Outlets.Create(propertyInfo.Name);
             nonTypedOutlet.SetAttribute("type", propertyTypeInfo.GenericTypeArguments[0].AssemblyQualifiedName);
             var outlet = CastOutlet(nonTypedOutlet, propertyTypeInfo.GenericTypeArguments[0]);
             propertyInfo.SetValue(this, outlet);
         }
     }
 }