Пример #1
0
 public TypeAsset(IType type, string displayName, ExampleAssetInfo exampleInfo, string onDemandAssemblyFileName, AssemblyNameAndLocation[] resolvableAssemblyReferences)
     : this(type, displayName, exampleInfo)
 {
     this.onDemandAssemblyFileName     = onDemandAssemblyFileName;
     this.resolvableAssemblyReferences = resolvableAssemblyReferences;
     this.onDemandType = type;
 }
Пример #2
0
 public TypeAsset(IType type, string displayName, ExampleAssetInfo exampleInfo)
 {
     if (type == null)
     {
         throw new ArgumentNullException("type");
     }
     this.type        = type;
     this.exampleInfo = exampleInfo;
     this.displayName = displayName;
 }
Пример #3
0
        internal static TypeAssetInfoModel Create(IType type, IProject project, ExampleAssetInfo exampleInfo)
        {
            TypeAssetInfoModel typeAssetInfoModel = new TypeAssetInfoModel();

            typeAssetInfoModel.TypeName    = type.Name;
            typeAssetInfoModel.Namespace   = type.Namespace;
            typeAssetInfoModel.Description = exampleInfo == null || exampleInfo.Description == null?AssetInfoModel.GetDescription(type) : exampleInfo.Description;

            typeAssetInfoModel.SetFullPath(AssetInfoModel.AssemblyLocation(type, project));
            return(typeAssetInfoModel);
        }
Пример #4
0
 public static ExampleAssetInfo FromToolboxExample(IToolboxExample example, int index)
 {
     return(new ExampleAssetInfo()
     {
         Index = index,
         DisplayName = example.DisplayName,
         Description = AssetInfoModel.GetDescription(example.GetType()),
         Categories = Enumerable.ToArray <CustomAssetCategoryPath>(AssetTypeHelper.GetCustomAssetCategoryPaths(example.GetType())),
         IsBrowable = AssetTypeHelper.IsTypeBrowsable(example.GetType()),
         SmallIcon = ExampleAssetInfo.CopyStream(example.GetImageStream(new Size(12.0, 12.0))),
         LargeIcon = ExampleAssetInfo.CopyStream(example.GetImageStream(new Size(24.0, 24.0)))
     });
 }
Пример #5
0
 public ExampleTypeInstantiator(SceneView sceneView, ExampleAssetInfo exampleInfo)
     : base(sceneView)
 {
     this.exampleInfo = exampleInfo;
 }
Пример #6
0
 public BehaviorAsset(IType type, string displayName, ExampleAssetInfo exampleInfo, string onDemandAssemblyFileName, AssemblyNameAndLocation[] resolvableAssemblyReferences)
     : base(type, displayName, exampleInfo, onDemandAssemblyFileName, resolvableAssemblyReferences)
 {
 }